⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 110620 in webkit


Ignore:
Timestamp:
Mar 13, 2012, 3:06:24 PM (15 years ago)
Author:
enne@google.com
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:
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r110619 r110620  
     12012-03-13  Adrienne Walker  <enne@google.com>
     2
     3        [chromium] Mark root layer scrollbars as always opaque to disable blending
     4        https://bugs.webkit.org/show_bug.cgi?id=79951
     5
     6        Reviewed by James Robinson.
     7
     8        Mark canvas-text-alignment.html as failing on Linux in general, not
     9        just in debug. I believe that with this change, the same image will
     10        pass on both release and debug, but will land that change separately.
     11
     12        * platform/chromium/test_expectations.txt:
     13
    1142012-03-13  Thiago Marcos P. Santos  <thiago.santos@intel.com>
    215
  • trunk/LayoutTests/platform/chromium/test_expectations.txt

    r110596 r110620  
    37033703BUGV8_1948 : fast/js/dfg-put-by-id-prototype-check.html = TEXT
    37043704
    3705 BUGWK78529 LINUX DEBUG : platform/chromium/virtual/gpu/fast/canvas/canvas-text-alignment.html = IMAGE
     3705BUGWK78529 LINUX : platform/chromium/virtual/gpu/fast/canvas/canvas-text-alignment.html = IMAGE
    37063706
    37073707BUGWK78561 WIN : css3/filters/crash-hw-sw-switch.html = MISSING
  • trunk/Source/WebCore/ChangeLog

    r110618 r110620  
     12012-03-13  Adrienne Walker  <enne@google.com>
     2
     3        [chromium] Mark root layer scrollbars as always opaque to disable blending
     4        https://bugs.webkit.org/show_bug.cgi?id=79951
     5
     6        Reviewed by James Robinson.
     7
     8        Now that scrollbar layers exist, mark non-overlay root scrollbars as
     9        opaque. This disables blending for correctness and performance.
     10
     11        * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
     12        (WebCore::scrollbarLayerDidChange):
     13        (WebCore::ScrollingCoordinator::frameViewHorizontalScrollbarLayerDidChange):
     14        (WebCore::ScrollingCoordinator::frameViewVerticalScrollbarLayerDidChange):
     15        * platform/graphics/chromium/LayerRendererChromium.cpp:
     16        (WebCore::LayerRendererChromium::drawTileQuad):
     17
    1182012-03-13  Gavin Peters  <gavinp@chromium.org>
    219
  • trunk/Source/WebCore/page/scrolling/chromium/ScrollingCoordinatorChromium.cpp

    r110338 r110620  
    8282}
    8383
    84 static void scrollbarLayerDidChange(Scrollbar* scrollbar, LayerChromium* scrollLayer, GraphicsLayer* scrollbarGraphicsLayer)
     84static void scrollbarLayerDidChange(Scrollbar* scrollbar, LayerChromium* scrollLayer, GraphicsLayer* scrollbarGraphicsLayer, FrameView* frameView)
    8585{
    8686    ASSERT(scrollbar);
    87     ASSERT(scrollLayer);
    8887    ASSERT(scrollbarGraphicsLayer);
     88
     89    if (!scrollLayer) {
     90        // FIXME: sometimes we get called before setScrollLayer, workaround by finding the scroll layout ourselves.
     91        scrollLayer = scrollLayerForFrameView(frameView)->platformLayer();
     92        ASSERT(scrollLayer);
     93    }
     94
     95    // Root layer non-overlay scrollbars should be marked opaque to disable
     96    // blending.
     97    bool isOpaqueRootScrollbar = !frameView->parent() && !scrollbar->isOverlayScrollbar();
     98    if (!scrollbarGraphicsLayer->contentsOpaque())
     99        scrollbarGraphicsLayer->setContentsOpaque(isOpaqueRootScrollbar);
    89100
    90101    if (scrollbar->isCustomScrollbar() || !CCProxy::hasImplThread()) {
    … …  
    97108    scrollbarGraphicsLayer->setContentsToMedia(scrollbarLayer.get());
    98109    scrollbarGraphicsLayer->setDrawsContent(false);
     110    scrollbarLayer->setOpaque(scrollbarGraphicsLayer->contentsOpaque());
    99111}
    100112
    … …  
    104116        return;
    105117
    106     LayerChromium* scrollLayer = m_private->scrollLayer();
    107     if (!scrollLayer) // FIXME: sometimes we get called before setScrollLayer, workaround by finding the scroll layout ourselves.
    108         scrollLayer = scrollLayerForFrameView(frameView)->platformLayer();
    109 
    110     scrollbarLayerDidChange(frameView->horizontalScrollbar(), scrollLayer, horizontalScrollbarLayer);
     118    scrollbarLayerDidChange(frameView->horizontalScrollbar(), m_private->scrollLayer(), horizontalScrollbarLayer, frameView);
    111119}
    112120
    … …  
    116124        return;
    117125
    118     LayerChromium* scrollLayer = m_private->scrollLayer();
    119     if (!scrollLayer) // FIXME: sometimes we get called before setScrollLayer, workaround by finding the scroll layout ourselves.
    120         scrollLayer = scrollLayerForFrameView(frameView)->platformLayer();
    121 
    122     scrollbarLayerDidChange(frameView->verticalScrollbar(), scrollLayer, verticalScrollbarLayer);
     126    scrollbarLayerDidChange(frameView->verticalScrollbar(), m_private->scrollLayer(), verticalScrollbarLayer, frameView);
    123127}
    124128
Note: See TracChangeset for help on using the changeset viewer.