summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-07-29 23:10:44 (GMT)
committerBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-07-29 23:10:44 (GMT)
commiteb10295a88b677a34ea9d8f9c32e416a3b5d72be (patch)
tree8cc8f83396496492cdd49e83411cbdf3d8682200
parent24f041b30f576a2f6ca1cd9e07cba91fc32fac59 (diff)
parentd279a24b93b749ca27db39239f1eb03b4992eebb (diff)
downloadQt-eb10295a88b677a34ea9d8f9c32e416a3b5d72be.zip
Qt-eb10295a88b677a34ea9d8f9c32e416a3b5d72be.tar.gz
Qt-eb10295a88b677a34ea9d8f9c32e416a3b5d72be.tar.bz2
Merge branch 'kinetic-graphicseffect' of git@scm.dev.nokia.troll.no:qt/kinetic into graphicseffects
-rw-r--r--src/opengl/gl2paintengineex/qglengineshadermanager_p.h3
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h2
-rw-r--r--src/opengl/qpixmapdata_gl.cpp9
3 files changed, 7 insertions, 7 deletions
diff --git a/src/opengl/gl2paintengineex/qglengineshadermanager_p.h b/src/opengl/gl2paintengineex/qglengineshadermanager_p.h
index 8122a08..884e687 100644
--- a/src/opengl/gl2paintengineex/qglengineshadermanager_p.h
+++ b/src/opengl/gl2paintengineex/qglengineshadermanager_p.h
@@ -428,10 +428,9 @@ private:
QGLShaderProgram* simpleShaderProg;
QGLEngineShaderProg* currentShaderProg;
- QCache<QByteArray, QGLShader> customShaderCache;
-
// TODO: Possibly convert to a LUT
QList<QGLEngineShaderProg> cachedPrograms;
+ QCache<QByteArray, QGLShader> customShaderCache;
QGLShader* compiledShaders[TotalShaderCount];
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
index 3ff2dca..6a96877 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
@@ -150,7 +150,7 @@ public:
q(q_ptr),
width(0), height(0),
ctx(0),
- currentBrush( &(q->state()->brush) ),
+ currentBrush(0),
inverseScale(1),
shaderManager(0)
{ }
diff --git a/src/opengl/qpixmapdata_gl.cpp b/src/opengl/qpixmapdata_gl.cpp
index c0eed4d..f9d09b7 100644
--- a/src/opengl/qpixmapdata_gl.cpp
+++ b/src/opengl/qpixmapdata_gl.cpp
@@ -191,6 +191,8 @@ QGLPixmapData::~QGLPixmapData()
if (!shareWidget)
return;
+ delete m_engine;
+
if (m_texture.id) {
QGLShareContextScope ctx(shareWidget->context());
glDeleteTextures(1, &m_texture.id);
@@ -463,10 +465,8 @@ void QGLPixmapData::swapBuffers()
m_renderFbo->release();
qgl_fbo_pool()->release(m_renderFbo);
- delete m_engine;
m_renderFbo = 0;
- m_engine = 0;
}
void QGLPixmapData::makeCurrent()
@@ -493,7 +493,7 @@ QPaintEngine* QGLPixmapData::paintEngine() const
if (!isValid())
return 0;
- if (m_engine)
+ if (m_renderFbo)
return m_engine;
if (useFramebufferObjects()) {
@@ -511,7 +511,8 @@ QPaintEngine* QGLPixmapData::paintEngine() const
m_renderFbo = qgl_fbo_pool()->acquire(size(), format);
if (m_renderFbo) {
- m_engine = new QGL2PaintEngineEx;
+ if (!m_engine)
+ m_engine = new QGL2PaintEngineEx;
return m_engine;
}