[SKIA] Must make skia's GL context current before drawing in GraphicsContext::clearRect
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 15 Jul 2011 19:44:23 +0000 (19:44 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 15 Jul 2011 19:44:23 +0000 (19:44 +0000)
https://bugs.webkit.org/show_bug.cgi?id=64612

Patch by Brian Salomon <bsalomon@google.com> on 2011-07-15
Reviewed by Stephen White.

Tested by compositing/shadows/shadow-drawing.html

* platform/graphics/skia/GraphicsContextSkia.cpp:
(WebCore::GraphicsContext::clearRect):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@91093 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp

index cf44ed7..e3b9595 100644 (file)
@@ -1,3 +1,15 @@
+2011-07-15  Brian Salomon  <bsalomon@google.com>
+
+        [SKIA] Must make skia's GL context current before drawing in GraphicsContext::clearRect
+        https://bugs.webkit.org/show_bug.cgi?id=64612
+
+        Reviewed by Stephen White.
+
+        Tested by compositing/shadows/shadow-drawing.html
+
+        * platform/graphics/skia/GraphicsContextSkia.cpp:
+        (WebCore::GraphicsContext::clearRect):
+
 2011-07-15  Ian Henderson  <ianh@apple.com>
 
         Avoid rounded rect corner-drawing overhead if no corners are visible
index 23b9114..5dc784a 100644 (file)
@@ -326,6 +326,8 @@ void GraphicsContext::clearRect(const FloatRect& rect)
     if (!isRectSkiaSafe(getCTM(), r))
         ClipRectToCanvas(*platformContext()->canvas(), r, &r);
 
+    platformContext()->makeGrContextCurrent();
+
     SkPaint paint;
     platformContext()->setupPaintForFilling(&paint);
     paint.setXfermodeMode(SkXfermode::kClear_Mode);