Title: [110620] trunk
Revision
110620
Author
[email protected]
Date
2012-03-13 15:06:24 -0700 (Tue, 13 Mar 2012)

Log Message

[chromium] Mark root layer scrollbars as always opaque to disable blending
https://bugs.webkit.org/show_bug.cgi?id=79951

Reviewed by James Robinson.

Source/WebCore:

Now that scrollbar layers exist, mark non-overlay root scrollbars as
opaque. This disables blending for correctness and performance.

* page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
(WebCore::scrollbarLayerDidChange):
(WebCore::ScrollingCoordinator::frameViewHorizontalScrollbarLayerDidChange):
(WebCore::ScrollingCoordinator::frameViewVerticalScrollbarLayerDidChange):
* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::drawTileQuad):

LayoutTests:

Mark canvas-text-alignment.html as failing on Linux in general, not
just in debug. I believe that with this change, the same image will
pass on both release and debug, but will land that change separately.

* platform/chromium/test_expectations.txt:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (110619 => 110620)


--- trunk/LayoutTests/ChangeLog	2012-03-13 21:59:21 UTC (rev 110619)
+++ trunk/LayoutTests/ChangeLog	2012-03-13 22:06:24 UTC (rev 110620)
@@ -1,3 +1,16 @@
+2012-03-13  Adrienne Walker  <[email protected]>
+
+        [chromium] Mark root layer scrollbars as always opaque to disable blending
+        https://bugs.webkit.org/show_bug.cgi?id=79951
+
+        Reviewed by James Robinson.
+
+        Mark canvas-text-alignment.html as failing on Linux in general, not
+        just in debug. I believe that with this change, the same image will
+        pass on both release and debug, but will land that change separately.
+
+        * platform/chromium/test_expectations.txt:
+
 2012-03-13  Thiago Marcos P. Santos  <[email protected]>
 
         [EFL][DRT] Expose window.internals object

Modified: trunk/LayoutTests/platform/chromium/test_expectations.txt (110619 => 110620)


--- trunk/LayoutTests/platform/chromium/test_expectations.txt	2012-03-13 21:59:21 UTC (rev 110619)
+++ trunk/LayoutTests/platform/chromium/test_expectations.txt	2012-03-13 22:06:24 UTC (rev 110620)
@@ -3702,7 +3702,7 @@
 
 BUGV8_1948 : fast/js/dfg-put-by-id-prototype-check.html = TEXT
 
-BUGWK78529 LINUX DEBUG : platform/chromium/virtual/gpu/fast/canvas/canvas-text-alignment.html = IMAGE
+BUGWK78529 LINUX : platform/chromium/virtual/gpu/fast/canvas/canvas-text-alignment.html = IMAGE
 
 BUGWK78561 WIN : css3/filters/crash-hw-sw-switch.html = MISSING
 BUGWK78561 WIN : css3/filters/filter-empty-element-crash.html = MISSING

Modified: trunk/Source/WebCore/ChangeLog (110619 => 110620)


--- trunk/Source/WebCore/ChangeLog	2012-03-13 21:59:21 UTC (rev 110619)
+++ trunk/Source/WebCore/ChangeLog	2012-03-13 22:06:24 UTC (rev 110620)
@@ -1,3 +1,20 @@
+2012-03-13  Adrienne Walker  <[email protected]>
+
+        [chromium] Mark root layer scrollbars as always opaque to disable blending
+        https://bugs.webkit.org/show_bug.cgi?id=79951
+
+        Reviewed by James Robinson.
+
+        Now that scrollbar layers exist, mark non-overlay root scrollbars as
+        opaque. This disables blending for correctness and performance.
+
+        * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
+        (WebCore::scrollbarLayerDidChange):
+        (WebCore::ScrollingCoordinator::frameViewHorizontalScrollbarLayerDidChange):
+        (WebCore::ScrollingCoordinator::frameViewVerticalScrollbarLayerDidChange):
+        * platform/graphics/chromium/LayerRendererChromium.cpp:
+        (WebCore::LayerRendererChromium::drawTileQuad):
+
 2012-03-13  Gavin Peters  <[email protected]>
 
         Remove vestigal abortEvent from image attribute.

Modified: trunk/Source/WebCore/page/scrolling/chromium/ScrollingCoordinatorChromium.cpp (110619 => 110620)


--- trunk/Source/WebCore/page/scrolling/chromium/ScrollingCoordinatorChromium.cpp	2012-03-13 21:59:21 UTC (rev 110619)
+++ trunk/Source/WebCore/page/scrolling/chromium/ScrollingCoordinatorChromium.cpp	2012-03-13 22:06:24 UTC (rev 110620)
@@ -81,12 +81,23 @@
 #endif
 }
 
-static void scrollbarLayerDidChange(Scrollbar* scrollbar, LayerChromium* scrollLayer, GraphicsLayer* scrollbarGraphicsLayer)
+static void scrollbarLayerDidChange(Scrollbar* scrollbar, LayerChromium* scrollLayer, GraphicsLayer* scrollbarGraphicsLayer, FrameView* frameView)
 {
     ASSERT(scrollbar);
-    ASSERT(scrollLayer);
     ASSERT(scrollbarGraphicsLayer);
 
+    if (!scrollLayer) {
+        // FIXME: sometimes we get called before setScrollLayer, workaround by finding the scroll layout ourselves.
+        scrollLayer = scrollLayerForFrameView(frameView)->platformLayer();
+        ASSERT(scrollLayer);
+    }
+
+    // Root layer non-overlay scrollbars should be marked opaque to disable
+    // blending.
+    bool isOpaqueRootScrollbar = !frameView->parent() && !scrollbar->isOverlayScrollbar();
+    if (!scrollbarGraphicsLayer->contentsOpaque())
+        scrollbarGraphicsLayer->setContentsOpaque(isOpaqueRootScrollbar);
+
     if (scrollbar->isCustomScrollbar() || !CCProxy::hasImplThread()) {
         scrollbarGraphicsLayer->setContentsToMedia(0);
         scrollbarGraphicsLayer->setDrawsContent(true);
@@ -96,6 +107,7 @@
     RefPtr<ScrollbarLayerChromium> scrollbarLayer = ScrollbarLayerChromium::create(scrollbar, scrollLayer->id());
     scrollbarGraphicsLayer->setContentsToMedia(scrollbarLayer.get());
     scrollbarGraphicsLayer->setDrawsContent(false);
+    scrollbarLayer->setOpaque(scrollbarGraphicsLayer->contentsOpaque());
 }
 
 void ScrollingCoordinator::frameViewHorizontalScrollbarLayerDidChange(FrameView* frameView, GraphicsLayer* horizontalScrollbarLayer)
@@ -103,11 +115,7 @@
     if (!horizontalScrollbarLayer || !coordinatesScrollingForFrameView(frameView))
         return;
 
-    LayerChromium* scrollLayer = m_private->scrollLayer();
-    if (!scrollLayer) // FIXME: sometimes we get called before setScrollLayer, workaround by finding the scroll layout ourselves.
-        scrollLayer = scrollLayerForFrameView(frameView)->platformLayer();
-
-    scrollbarLayerDidChange(frameView->horizontalScrollbar(), scrollLayer, horizontalScrollbarLayer);
+    scrollbarLayerDidChange(frameView->horizontalScrollbar(), m_private->scrollLayer(), horizontalScrollbarLayer, frameView);
 }
 
 void ScrollingCoordinator::frameViewVerticalScrollbarLayerDidChange(FrameView* frameView, GraphicsLayer* verticalScrollbarLayer)
@@ -115,11 +123,7 @@
     if (!verticalScrollbarLayer || !coordinatesScrollingForFrameView(frameView))
         return;
 
-    LayerChromium* scrollLayer = m_private->scrollLayer();
-    if (!scrollLayer) // FIXME: sometimes we get called before setScrollLayer, workaround by finding the scroll layout ourselves.
-        scrollLayer = scrollLayerForFrameView(frameView)->platformLayer();
-
-    scrollbarLayerDidChange(frameView->verticalScrollbar(), scrollLayer, verticalScrollbarLayer);
+    scrollbarLayerDidChange(frameView->verticalScrollbar(), m_private->scrollLayer(), verticalScrollbarLayer, frameView);
 }
 
 void ScrollingCoordinator::setScrollLayer(GraphicsLayer* scrollLayer)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to