Title: [233556] trunk
Revision
233556
Author
[email protected]
Date
2018-07-05 18:56:48 -0700 (Thu, 05 Jul 2018)

Log Message

REGRESSION(r233495) [cairo] drawGlyphsShadow should use the fast path for zero blur-radius
https://bugs.webkit.org/show_bug.cgi?id=187336

Reviewed by Carlos Garcia Campos.

Source/WebCore:

drawGlyphsShadow has a fast path to draw a shadow without a shadow
layer. Since r233495, it is not used for zero blur-radius shadow.

In Bug 187244, I changed ShadowState::isRequired not to check
blur-radius is zero. This is not a right fix.

This change reverts r233495.

No new tests (Covered by existing tests).

* platform/graphics/cairo/CairoOperations.cpp:
(WebCore::Cairo::ShadowState::isRequired const): Return false if
'blur' is zero.
(WebCore::Cairo::fillRectWithRoundedHole): Use
ShadowState::isVisible instead of ShadowState::isRequired to check
a shadow should be drawn.

LayoutTests:

* platform/gtk/TestExpectations: Unmarked fast/text/multiple-text-shadow-overflow-layout-rect.html.

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (233555 => 233556)


--- trunk/LayoutTests/ChangeLog	2018-07-06 01:35:31 UTC (rev 233555)
+++ trunk/LayoutTests/ChangeLog	2018-07-06 01:56:48 UTC (rev 233556)
@@ -1,3 +1,12 @@
+2018-07-05  Fujii Hironori  <[email protected]>
+
+        REGRESSION(r233495) [cairo] drawGlyphsShadow should use the fast path for zero blur-radius
+        https://bugs.webkit.org/show_bug.cgi?id=187336
+
+        Reviewed by Carlos Garcia Campos.
+
+        * platform/gtk/TestExpectations: Unmarked fast/text/multiple-text-shadow-overflow-layout-rect.html.
+
 2018-07-05  Saam Barati  <[email protected]>
 
         [mac-wk1] Layout Test editing/selection/navigation-clears-editor-state.html is a flaky failure

Modified: trunk/LayoutTests/platform/gtk/TestExpectations (233555 => 233556)


--- trunk/LayoutTests/platform/gtk/TestExpectations	2018-07-06 01:35:31 UTC (rev 233555)
+++ trunk/LayoutTests/platform/gtk/TestExpectations	2018-07-06 01:56:48 UTC (rev 233556)
@@ -3471,8 +3471,6 @@
 
 webkit.org/b/187323 imported/w3c/web-platform-tests/web-animations/timing-model/timelines/timelines.html [ Failure ]
 
-webkit.org/b/187324 fast/text/multiple-text-shadow-overflow-layout-rect.html [ ImageOnlyFailure ]
-
 webkit.org/b/187325 http/wpt/css/css-animations/start-animation-001.html [ ImageOnlyFailure ]
 
 #////////////////////////////////////////////////////////////////////////////////////////

Modified: trunk/Source/WebCore/ChangeLog (233555 => 233556)


--- trunk/Source/WebCore/ChangeLog	2018-07-06 01:35:31 UTC (rev 233555)
+++ trunk/Source/WebCore/ChangeLog	2018-07-06 01:56:48 UTC (rev 233556)
@@ -1,3 +1,27 @@
+2018-07-05  Fujii Hironori  <[email protected]>
+
+        REGRESSION(r233495) [cairo] drawGlyphsShadow should use the fast path for zero blur-radius
+        https://bugs.webkit.org/show_bug.cgi?id=187336
+
+        Reviewed by Carlos Garcia Campos.
+
+        drawGlyphsShadow has a fast path to draw a shadow without a shadow
+        layer. Since r233495, it is not used for zero blur-radius shadow.
+
+        In Bug 187244, I changed ShadowState::isRequired not to check
+        blur-radius is zero. This is not a right fix.
+
+        This change reverts r233495.
+
+        No new tests (Covered by existing tests).
+
+        * platform/graphics/cairo/CairoOperations.cpp:
+        (WebCore::Cairo::ShadowState::isRequired const): Return false if
+        'blur' is zero.
+        (WebCore::Cairo::fillRectWithRoundedHole): Use
+        ShadowState::isVisible instead of ShadowState::isRequired to check
+        a shadow should be drawn.
+
 2018-07-05  Timothy Hatcher  <[email protected]>
 
         Rename and flip the meaning of defaultAppearance to be useDarkAppearance.

Modified: trunk/Source/WebCore/platform/graphics/cairo/CairoOperations.cpp (233555 => 233556)


--- trunk/Source/WebCore/platform/graphics/cairo/CairoOperations.cpp	2018-07-06 01:35:31 UTC (rev 233555)
+++ trunk/Source/WebCore/platform/graphics/cairo/CairoOperations.cpp	2018-07-06 01:56:48 UTC (rev 233556)
@@ -612,7 +612,8 @@
 
 bool ShadowState::isRequired(PlatformContextCairo& platformContext) const
 {
-    if (color.isVisible())
+    // We can't avoid ShadowBlur if the shadow has blur.
+    if (color.isVisible() && blur)
         return true;
 
     // We can avoid ShadowBlur and optimize, since we're not drawing on a
@@ -734,7 +735,7 @@
 {
     // FIXME: this should leverage the specified color.
 
-    if (shadowState.isRequired(platformContext)) {
+    if (shadowState.isVisible()) {
         ShadowBlur shadow({ shadowState.blur, shadowState.blur }, shadowState.offset, shadowState.color, shadowState.ignoreTransforms);
         shadow.drawInsetShadow(State::getCTM(platformContext), State::getClipBounds(platformContext), rect, roundedHoleRect,
             [&platformContext, &shadowState](ImageBuffer& layerImage, const FloatPoint& layerOrigin, const FloatSize& layerSize, const FloatRect& sourceRect)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to