diff options
author | Samuel Rødal <sroedal@trolltech.com> | 2009-09-17 08:52:05 (GMT) |
---|---|---|
committer | Samuel Rødal <sroedal@trolltech.com> | 2009-09-21 14:37:50 (GMT) |
commit | 32c3de3d02193c994c701f085cd64d864563bac0 (patch) | |
tree | 3f763c49f5e8f1bb3949abd45d139216d927f649 /src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h | |
parent | c6d2ec67384d5b0a4f9108277888d4aaf0e2f6d2 (diff) | |
download | Qt-32c3de3d02193c994c701f085cd64d864563bac0.zip Qt-32c3de3d02193c994c701f085cd64d864563bac0.tar.gz Qt-32c3de3d02193c994c701f085cd64d864563bac0.tar.bz2 |
Optimized GL2 engine to use scissor clipping more aggressively.
There's no reason to stop using a scissor clip when a more complex clip
is set. Instead, we can use a combination of scissoring and depth
clipping to represent the final clip. When intersecting with a new clip
path, if the clip path is a rectangle we simply intersect it against the
scissor clip, and otherwise we intersect its bounding rect against the
scissor clip and write the actual path to the depth buffer.
The patch simplifies the logic in clip() quite a bit, except in the
UniteClip case in which we don't care about performance anyways.
It also fixes a bug which could cause rendering errors if the stencil
buffer contains junk before painting.
Reviewed-by: Gunnar Sletta
Diffstat (limited to 'src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h')
-rw-r--r-- | src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h index 8b09f41..049994f 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h @@ -217,11 +217,13 @@ public: bool brushUniformsDirty; bool simpleShaderMatrixUniformDirty; bool shaderMatrixUniformDirty; - bool stencilBufferDirty; bool depthUniformDirty; bool simpleShaderDepthUniformDirty; bool opacityUniformDirty; + QRegion dirtyStencilRegion; + QRect currentScissorBounds; + const QBrush* currentBrush; // May not be the state's brush! GLfloat inverseScale; |