Title: [258454] trunk/Source/WebCore
Revision
258454
Author
sabouhall...@apple.com
Date
2020-03-13 18:27:59 -0700 (Fri, 13 Mar 2020)

Log Message

[GPU Process] GraphicsContextStateChange::apply() should process ShadowsIgnoreTransformsChange before processing ShadowChange
https://bugs.webkit.org/show_bug.cgi?id=209071

Reviewed by Darin Adler.

Ensure GraphicsContextStateChange::apply() calls shadowsIgnoreTransforms()
before calling setLegacyShadow() or setShadow().

Test: This patch fixes the following tests when running:
"run-webkit-tests --internal-feature RenderCanvasInGPUProcessEnabled"
    fast/canvas/canvas-image-shadow.html
    fast/canvas/canvas-scale-drawImage-shadow.html
    fast/canvas/canvas-scale-fillPath-shadow.html
    fast/canvas/canvas-scale-fillRect-shadow.html
    fast/canvas/canvas-scale-shadowBlur.html
    fast/canvas/canvas-transforms-fillRect-shadow.html
    fast/canvas/fillText-shadow.html

* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContextStateChange::apply const):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (258453 => 258454)


--- trunk/Source/WebCore/ChangeLog	2020-03-14 01:01:23 UTC (rev 258453)
+++ trunk/Source/WebCore/ChangeLog	2020-03-14 01:27:59 UTC (rev 258454)
@@ -1,3 +1,26 @@
+2020-03-13  Said Abou-Hallawa  <sabouhall...@apple.com>
+
+        [GPU Process] GraphicsContextStateChange::apply() should process ShadowsIgnoreTransformsChange before processing ShadowChange
+        https://bugs.webkit.org/show_bug.cgi?id=209071
+
+        Reviewed by Darin Adler.
+
+        Ensure GraphicsContextStateChange::apply() calls shadowsIgnoreTransforms()
+        before calling setLegacyShadow() or setShadow().
+
+        Test: This patch fixes the following tests when running:
+        "run-webkit-tests --internal-feature RenderCanvasInGPUProcessEnabled"
+            fast/canvas/canvas-image-shadow.html
+            fast/canvas/canvas-scale-drawImage-shadow.html
+            fast/canvas/canvas-scale-fillPath-shadow.html
+            fast/canvas/canvas-scale-fillRect-shadow.html
+            fast/canvas/canvas-scale-shadowBlur.html
+            fast/canvas/canvas-transforms-fillRect-shadow.html
+            fast/canvas/fillText-shadow.html
+
+        * platform/graphics/GraphicsContext.cpp:
+        (WebCore::GraphicsContextStateChange::apply const):
+
 2020-03-13  John Wilander  <wilan...@apple.com>
 
         Remove unused code related to removePrevalentDomains()

Modified: trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp (258453 => 258454)


--- trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp	2020-03-14 01:01:23 UTC (rev 258453)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp	2020-03-14 01:27:59 UTC (rev 258454)
@@ -200,6 +200,9 @@
     if (m_changeFlags.contains(GraphicsContextState::FillPatternChange))
         context.setFillPattern(*m_state.fillPattern);
 
+    if (m_changeFlags.contains(GraphicsContextState::ShadowsIgnoreTransformsChange))
+        context.setShadowsIgnoreTransforms(m_state.shadowsIgnoreTransforms);
+
     if (m_changeFlags.contains(GraphicsContextState::ShadowChange)) {
 #if USE(CG)
         if (m_state.shadowsUseLegacyRadius)
@@ -242,9 +245,6 @@
     if (m_changeFlags.contains(GraphicsContextState::ShouldSubpixelQuantizeFontsChange))
         context.setShouldSubpixelQuantizeFonts(m_state.shouldSubpixelQuantizeFonts);
 
-    if (m_changeFlags.contains(GraphicsContextState::ShadowsIgnoreTransformsChange))
-        context.setShadowsIgnoreTransforms(m_state.shadowsIgnoreTransforms);
-
     if (m_changeFlags.contains(GraphicsContextState::DrawLuminanceMaskChange))
         context.setDrawLuminanceMask(m_state.drawLuminanceMask);
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to