summaryrefslogtreecommitdiffstats
path: root/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h')
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h50
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