diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2009-10-06 22:38:59 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2009-10-06 22:38:59 (GMT) |
commit | 101184ea92171c303d240917f34815730a5e9fab (patch) | |
tree | e265a681a4146f00878cb3a9b6297f6b8b6e0a95 /src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h | |
parent | 396a06a52a0f00639c9e528caf80ae2294e80bd2 (diff) | |
parent | 2d2b4e8a77a30449d8b4ebc88979b3aff45a8222 (diff) | |
download | Qt-101184ea92171c303d240917f34815730a5e9fab.zip Qt-101184ea92171c303d240917f34815730a5e9fab.tar.gz Qt-101184ea92171c303d240917f34815730a5e9fab.tar.bz2 |
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into kinetic-declarativeui
Diffstat (limited to 'src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h')
-rw-r--r-- | src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h | 50 |
1 files changed, 22 insertions, 28 deletions
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h index 4f42082..28c972e 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h @@ -82,17 +82,17 @@ public: QOpenGL2PaintEngineState(); ~QOpenGL2PaintEngineState(); - bool needsDepthBufferClear; - qreal depthBufferClearValue; + uint needsClipBufferClear : 1; + uint clipTestEnabled : 1; + uint canRestoreClip : 1; + uint matrixChanged : 1; + uint compositionModeChanged : 1; + uint opacityChanged : 1; + uint renderHintsChanged : 1; + uint clipChanged : 1; + uint currentClip : 8; - bool depthTestEnabled; - bool scissorTestEnabled; - uint maxDepth; - uint currentDepth; - - bool canRestoreClip; QRect rectangleClip; - bool hasRectangleClip; }; class Q_OPENGL_EXPORT QGL2PaintEngineEx : public QPaintEngineEx @@ -200,7 +200,8 @@ public: inline void useSimpleShader(); - float zValueForRenderText() const; + void prepareDepthRangeForRenderText(); + void restoreDepthRangeForRenderText(); static QGLEngineShaderManager* shaderManagerForEngine(QGL2PaintEngineEx *engine) { return engine->d_func()->shaderManager; } @@ -220,12 +221,11 @@ public: bool brushUniformsDirty; bool simpleShaderMatrixUniformDirty; bool shaderMatrixUniformDirty; - bool depthUniformDirty; - bool simpleShaderDepthUniformDirty; bool opacityUniformDirty; QRegion dirtyStencilRegion; QRect currentScissorBounds; + uint maxClip; const QBrush* currentBrush; // May not be the state's brush! @@ -242,26 +242,16 @@ public: QGLEngineShaderManager* shaderManager; - void writeClip(const QVectorPath &path, uint depth); - void updateDepthScissorTest(); + void clearClip(uint value); + void writeClip(const QVectorPath &path, uint value); + void resetClipIfNeeded(); + + void updateClipScissorTest(); void setScissor(const QRect &rect); - void regenerateDepthClip(); + void regenerateClip(); void systemStateChanged(); uint use_system_clip : 1; - static inline GLfloat rawDepth(uint depth) - { - // assume at least 16 bits in the depth buffer, and - // use 2^15 depth levels to be safe with regard to - // rounding issues etc - return depth * (1.0f / GLfloat((1 << 15) - 1)); - } - - static inline GLfloat normalizedDeviceDepth(uint depth) - { - return 2.0f * rawDepth(depth) - 1.0f; - } - uint location(QGLEngineShaderManager::Uniform uniform) { return shaderManager->getUniformLocation(uniform); @@ -272,12 +262,16 @@ public: bool needsSync; bool inRenderText; + GLfloat depthRange[2]; + float textureInvertedY; QScopedPointer<QPixmapFilter> convolutionFilter; QScopedPointer<QPixmapFilter> colorizeFilter; QScopedPointer<QPixmapFilter> blurFilter; QScopedPointer<QPixmapFilter> fastBlurFilter; + QScopedPointer<QPixmapFilter> dropShadowFilter; + QScopedPointer<QPixmapFilter> fastDropShadowFilter; }; QT_END_NAMESPACE |