Title: [190616] trunk/Source/WebCore
Revision
190616
Author
bfulg...@apple.com
Date
2015-10-06 09:28:38 -0700 (Tue, 06 Oct 2015)

Log Message

[Win] Correct positioning error introduced in r190235
https://bugs.webkit.org/show_bug.cgi?id=149631
<rdar://problem/22635080>

Reviewed by Simon Fraser.

Covered by existing compositing tests:
  css3/filters/clipping-overflow-scroll-with-pixel-moving-effect-on.html
  fast/layers/no-clipping-overflow-hidden-added-after-transform.html
  fast/layers/no-clipping-overflow-hidden-added-after-transition.html
  fast/layers/no-clipping-overflow-hidden-hardware-acceleration.html
  transforms/2d/preserve3d-not-fixed-container.html

* platform/graphics/ca/TileGrid.cpp:
(TileGrid::platformCALayerPaintContents): No need to do this extra flipping step
on Windows.
* platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
(PlatformCALayerWinInternal::displayCallback): We should always flip the
coordinate system when drawing these layers on Windows.
(shouldInvertBeforeDrawingContent): Deleted.
* platform/graphics/ca/win/WebTiledBackingLayerWin.cpp:
(WebTiledBackingLayerWin::displayCallback): We do not need to flip coordinates
for these tiled layers; that's already accounted for in common tile drawing code.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (190615 => 190616)


--- trunk/Source/WebCore/ChangeLog	2015-10-06 16:21:04 UTC (rev 190615)
+++ trunk/Source/WebCore/ChangeLog	2015-10-06 16:28:38 UTC (rev 190616)
@@ -1,3 +1,29 @@
+2015-10-06  Brent Fulgham  <bfulg...@apple.com>
+
+        [Win] Correct positioning error introduced in r190235
+        https://bugs.webkit.org/show_bug.cgi?id=149631
+        <rdar://problem/22635080>
+
+        Reviewed by Simon Fraser.
+
+        Covered by existing compositing tests:
+          css3/filters/clipping-overflow-scroll-with-pixel-moving-effect-on.html
+          fast/layers/no-clipping-overflow-hidden-added-after-transform.html
+          fast/layers/no-clipping-overflow-hidden-added-after-transition.html
+          fast/layers/no-clipping-overflow-hidden-hardware-acceleration.html
+          transforms/2d/preserve3d-not-fixed-container.html
+
+        * platform/graphics/ca/TileGrid.cpp:
+        (TileGrid::platformCALayerPaintContents): No need to do this extra flipping step
+        on Windows.
+        * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
+        (PlatformCALayerWinInternal::displayCallback): We should always flip the
+        coordinate system when drawing these layers on Windows.
+        (shouldInvertBeforeDrawingContent): Deleted.
+        * platform/graphics/ca/win/WebTiledBackingLayerWin.cpp:
+        (WebTiledBackingLayerWin::displayCallback): We do not need to flip coordinates
+        for these tiled layers; that's already accounted for in common tile drawing code.
+
 2015-10-06  Emanuele Aina  <emanuele.a...@collabora.com>
 
         Fix ENABLE_OPENGL=OFF builds

Modified: trunk/Source/WebCore/platform/graphics/ca/TileGrid.cpp (190615 => 190616)


--- trunk/Source/WebCore/platform/graphics/ca/TileGrid.cpp	2015-10-06 16:21:04 UTC (rev 190615)
+++ trunk/Source/WebCore/platform/graphics/ca/TileGrid.cpp	2015-10-06 16:28:38 UTC (rev 190616)
@@ -669,13 +669,8 @@
     }
 
     int repaintCount = platformCALayerIncrementRepaintCount(platformCALayer);
-    if (m_controller.rootLayer().owner()->platformCALayerShowRepaintCounter(0)) {
-#if OS(WINDOWS)
-        // Tiled layers in Windows have flipped coordinates
-        PlatformCALayer::flipContext(context.platformContext(), platformCALayer->bounds().size().height());
-#endif
+    if (m_controller.rootLayer().owner()->platformCALayerShowRepaintCounter(0))
         PlatformCALayer::drawRepaintIndicator(context.platformContext(), platformCALayer, repaintCount, cachedCGColor(m_controller.tileDebugBorderColor(), ColorSpaceDeviceRGB));
-    }
 
     if (m_controller.scrollingPerformanceLoggingEnabled()) {
         FloatRect visiblePart(platformCALayer->position().x(), platformCALayer->position().y(), platformCALayer->bounds().size().width(), platformCALayer->bounds().size().height());

Modified: trunk/Source/WebCore/platform/graphics/ca/win/PlatformCALayerWinInternal.cpp (190615 => 190616)


--- trunk/Source/WebCore/platform/graphics/ca/win/PlatformCALayerWinInternal.cpp	2015-10-06 16:21:04 UTC (rev 190615)
+++ trunk/Source/WebCore/platform/graphics/ca/win/PlatformCALayerWinInternal.cpp	2015-10-06 16:28:38 UTC (rev 190616)
@@ -71,12 +71,6 @@
     self->displayCallback(retainedContext->layer.get(), retainedContext->context.get());
 }
 
-static bool shouldInvertBeforeDrawingContent(PlatformCALayer::LayerType layerType, GraphicsLayer::CompositingCoordinatesOrientation coordinateOrientation)
-{
-    return (layerType != PlatformCALayer::LayerTypeTiledBackingTileLayer)
-        && (coordinateOrientation == GraphicsLayer::CompositingCoordinatesTopDown);
-}
-
 static bool repaintCountersAreDrawnByGridController(PlatformCALayer::LayerType layerType)
 {
     return layerType == PlatformCALayer::LayerTypeTiledBackingTileLayer;
@@ -100,8 +94,7 @@
     PlatformCALayerClient* client = owner()->owner();
     GraphicsLayer::CompositingCoordinatesOrientation orientation = client->platformCALayerContentsOrientation();
 
-    if (shouldInvertBeforeDrawingContent(layerType, orientation))
-        PlatformCALayer::flipContext(context, layerBounds.size.height);
+    PlatformCALayer::flipContext(context, layerBounds.size.height);
 
     GraphicsContext graphicsContext(context);
 

Modified: trunk/Source/WebCore/platform/graphics/ca/win/WebTiledBackingLayerWin.cpp (190615 => 190616)


--- trunk/Source/WebCore/platform/graphics/ca/win/WebTiledBackingLayerWin.cpp	2015-10-06 16:21:04 UTC (rev 190615)
+++ trunk/Source/WebCore/platform/graphics/ca/win/WebTiledBackingLayerWin.cpp	2015-10-06 16:28:38 UTC (rev 190616)
@@ -87,8 +87,6 @@
     PlatformCALayerClient* client = owner()->owner();
     GraphicsLayer::CompositingCoordinatesOrientation orientation = client->platformCALayerContentsOrientation();
 
-    PlatformCALayer::flipContext(context, layerBounds.size.height);
-
     GraphicsContext graphicsContext(context);
 
     // It's important to get the clip from the context, because it may be significantly
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to