summaryrefslogtreecommitdiff
path: root/Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@digia.com>2014-01-30 17:01:04 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-31 21:21:42 +0100
commitf314bb46c5b144be4559ac13f055062d5e3027b3 (patch)
tree975fbd34c77e27ddc3aa49ecd31f41414328df38 /Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.cpp
parentdb006e7811c4cdc8eada301a2a986a8abbc5d13f (diff)
downloadqtwebkit-f314bb46c5b144be4559ac13f055062d5e3027b3.tar.gz
Fix assert in m_stack.isEmpty() in GraphicsContext::~GraphicsContext()
Save and restore is not balanced in GraphicsContext. This causes the log error "ERROR void GraphicsContext::restore() stack is empty" and assert in the GraphicsContext destructor. The cause is a mismatch of GraphicsContexts being saved and restored by TextureMapperImageBuffer beginClip and endClip. This patch fixes endClip to restore the currentContext beginClip saved. Change-Id: Ief0100dd26c7eded04734167e86712a81f1a7674 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Diffstat (limited to 'Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.cpp')
-rw-r--r--Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.cpp b/Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.cpp
index c04e576db..668ea95b1 100644
--- a/Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.cpp
+++ b/Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.cpp
@@ -114,6 +114,15 @@ void TextureMapperImageBuffer::beginClip(const TransformationMatrix& matrix, con
#endif
}
+void TextureMapperImageBuffer::endClip()
+{
+ GraphicsContext* context = currentContext();
+ if (!context)
+ return;
+
+ context->restore();
+}
+
void TextureMapperImageBuffer::drawTexture(const BitmapTexture& texture, const FloatRect& targetRect, const TransformationMatrix& matrix, float opacity, unsigned /* exposedEdges */)
{
GraphicsContext* context = currentContext();