Title: [92787] trunk/Source/WebCore
Revision
92787
Author
[email protected]
Date
2011-08-10 12:47:45 -0700 (Wed, 10 Aug 2011)

Log Message

[skia] Move calls to makeGrContextCurrent into clipPathAntiAliased from callers
https://bugs.webkit.org/show_bug.cgi?id=65733

This protects against callers of clipPathAntiAliased forgetting to call makeGrContextCurrent.

Patch by Ben Wells <[email protected]> on 2011-08-10
Reviewed by James Robinson.

No change in functionality, no new tests.

* platform/graphics/skia/GraphicsContextSkia.cpp:
(WebCore::GraphicsContext::addInnerRoundedRectClip):
(WebCore::GraphicsContext::clip):
* platform/graphics/skia/PlatformContextSkia.cpp:
(WebCore::PlatformContextSkia::clipPathAntiAliased):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (92786 => 92787)


--- trunk/Source/WebCore/ChangeLog	2011-08-10 19:45:49 UTC (rev 92786)
+++ trunk/Source/WebCore/ChangeLog	2011-08-10 19:47:45 UTC (rev 92787)
@@ -1,3 +1,20 @@
+2011-08-10  Ben Wells  <[email protected]>
+
+        [skia] Move calls to makeGrContextCurrent into clipPathAntiAliased from callers
+        https://bugs.webkit.org/show_bug.cgi?id=65733
+        
+        This protects against callers of clipPathAntiAliased forgetting to call makeGrContextCurrent.
+
+        Reviewed by James Robinson.
+
+        No change in functionality, no new tests.
+
+        * platform/graphics/skia/GraphicsContextSkia.cpp:
+        (WebCore::GraphicsContext::addInnerRoundedRectClip):
+        (WebCore::GraphicsContext::clip):
+        * platform/graphics/skia/PlatformContextSkia.cpp:
+        (WebCore::PlatformContextSkia::clipPathAntiAliased):
+
 2011-08-10  Benjamin Poulain  <[email protected]>
 
         MarkupAccumulator: make resolution of URLs implicit to appendQuotedURLAttributeValue()

Modified: trunk/Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp (92786 => 92787)


--- trunk/Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp	2011-08-10 19:45:49 UTC (rev 92786)
+++ trunk/Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp	2011-08-10 19:47:45 UTC (rev 92787)
@@ -296,7 +296,6 @@
     if (!isRectSkiaSafe(getCTM(), r))
         return;
 
-    platformContext()->makeGrContextCurrent();
     SkPath path;
     path.addOval(r, SkPath::kCW_Direction);
     // only perform the inset if we won't invert r
@@ -356,7 +355,6 @@
     if (!isPathSkiaSafe(getCTM(), p))
         return;
 
-    platformContext()->makeGrContextCurrent();
     platformContext()->clipPathAntiAliased(p);
 }
 

Modified: trunk/Source/WebCore/platform/graphics/skia/PlatformContextSkia.cpp (92786 => 92787)


--- trunk/Source/WebCore/platform/graphics/skia/PlatformContextSkia.cpp	2011-08-10 19:45:49 UTC (rev 92786)
+++ trunk/Source/WebCore/platform/graphics/skia/PlatformContextSkia.cpp	2011-08-10 19:47:45 UTC (rev 92787)
@@ -267,6 +267,7 @@
 
 void PlatformContextSkia::clipPathAntiAliased(const SkPath& clipPath)
 {
+    makeGrContextCurrent();
     if (m_canvas->getTopDevice()->getDeviceCapabilities() & SkDevice::kVector_Capability) {
         // When the output is a vector device, like PDF, we don't need antialiased clips.
         // It's up to the PDF rendering engine to do that. We can simply disable the
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to