summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Cooksey <thomas.cooksey@nokia.com>2010-04-14 13:29:03 (GMT)
committerTom Cooksey <thomas.cooksey@nokia.com>2010-04-14 13:32:04 (GMT)
commit78dd32bce0cab27474faafd149bac99b4197f124 (patch)
tree3deed5cf121217c70e19b233781afb0d0bfa1fac
parent131f634a2595ca7910c34bd07c311aea9de2bb62 (diff)
downloadQt-78dd32bce0cab27474faafd149bac99b4197f124.zip
Qt-78dd32bce0cab27474faafd149bac99b4197f124.tar.gz
Qt-78dd32bce0cab27474faafd149bac99b4197f124.tar.bz2
Move nativePaintingActive flag to GL2 engine's private
Reviewed-By: Samuel
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp12
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h7
2 files changed, 10 insertions, 9 deletions
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
index 0534233..c89d34f 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
@@ -516,7 +516,7 @@ void QGL2PaintEngineEx::beginNativePainting()
ensureActive();
d->transferMode(BrushDrawingMode);
- nativePaintingActive = true;
+ d->nativePaintingActive = true;
QGLContext *ctx = d->ctx;
glUseProgram(0);
@@ -585,7 +585,12 @@ void QGL2PaintEngineEx::endNativePainting()
{
Q_D(QGL2PaintEngineEx);
d->needsSync = true;
- nativePaintingActive = false;
+ d->nativePaintingActive = false;
+}
+
+bool QGL2PaintEngineEx::isNativePaintingActive() const {
+ Q_D(const QGL2PaintEngineEx);
+ return d->nativePaintingActive;
}
void QGL2PaintEngineExPrivate::transferMode(EngineMode newMode)
@@ -1104,8 +1109,7 @@ void QGL2PaintEngineExPrivate::drawVertexArrays(const float *data, int *stops, i
/////////////////////////////////// Public Methods //////////////////////////////////////////
QGL2PaintEngineEx::QGL2PaintEngineEx()
- : QPaintEngineEx(*(new QGL2PaintEngineExPrivate(this))),
- nativePaintingActive(false)
+ : QPaintEngineEx(*(new QGL2PaintEngineExPrivate(this)))
{
}
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
index 0538107..2ac2ca4 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
@@ -157,13 +157,8 @@ public:
bool isNativePaintingActive() const;
private:
Q_DISABLE_COPY(QGL2PaintEngineEx)
- bool nativePaintingActive;
};
-inline bool QGL2PaintEngineEx::isNativePaintingActive() const {
- return nativePaintingActive;
-}
-
class QGL2PaintEngineExPrivate : public QPaintEngineExPrivate
{
Q_DECLARE_PUBLIC(QGL2PaintEngineEx)
@@ -183,6 +178,7 @@ public:
elementIndicesVBOId(0),
snapToPixelGrid(false),
addOffset(false),
+ nativePaintingActive(false),
inverseScale(1),
lastMaskTextureUsed(0)
{ }
@@ -285,6 +281,7 @@ public:
bool snapToPixelGrid;
bool addOffset; // When enabled, adds a 0.49,0.49 offset to matrix in updateMatrix
+ bool nativePaintingActive;
GLfloat pmvMatrix[3][3];
GLfloat inverseScale;