Changeset 209224 in webkit


Ignore:
Timestamp:
Dec 1, 2016 5:21:46 PM (7 years ago)
Author:
Simon Fraser
Message:

Put an obvious debug border on layers with backdrop filters
https://bugs.webkit.org/show_bug.cgi?id=165291

Reviewed by Tim Horton.

Put a wide magenta border on layers with backdrop filters, to highlight their performance impact.

Change the "contents layer" color (used by WebGL, video etc) to blue.

Make the clipping layer border slightly narrower.

  • platform/graphics/GraphicsLayer.cpp:

(WebCore::GraphicsLayer::getDebugBorderInfo):

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::setBackdropFilters):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r209221 r209224  
     12016-12-01  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Put an obvious debug border on layers with backdrop filters
     4        https://bugs.webkit.org/show_bug.cgi?id=165291
     5
     6        Reviewed by Tim Horton.
     7
     8        Put a wide magenta border on layers with backdrop filters, to highlight their performance impact.
     9       
     10        Change the "contents layer" color (used by WebGL, video etc) to blue.
     11       
     12        Make the clipping layer border slightly narrower.
     13
     14        * platform/graphics/GraphicsLayer.cpp:
     15        (WebCore::GraphicsLayer::getDebugBorderInfo):
     16        * platform/graphics/ca/GraphicsLayerCA.cpp:
     17        (WebCore::GraphicsLayerCA::setBackdropFilters):
     18
    1192016-12-01  Brian Burg  <bburg@apple.com>
    220
  • trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp

    r208927 r209224  
    438438void GraphicsLayer::getDebugBorderInfo(Color& color, float& width) const
    439439{
     440    width = 2;
     441
     442    if (needsBackdrop()) {
     443        color = Color(255, 0, 255, 128); // has backdrop: magenta
     444        width = 12;
     445        return;
     446    }
     447   
    440448    if (drawsContent()) {
    441449        if (m_usingTiledBacking) {
    442450            color = Color(255, 128, 0, 128); // tiled layer: orange
    443             width = 2;
    444451            return;
    445452        }
    446453
    447454        color = Color(0, 128, 32, 128); // normal layer: green
    448         width = 2;
    449455        return;
    450456    }
    451457
    452458    if (usesContentsLayer()) {
    453         color = Color(255, 150, 255, 200); // non-painting layer with contents: pink
    454         width = 2;
     459        color = Color(0, 64, 128, 150); // non-painting layer with contents: blue
     460        width = 8;
    455461        return;
    456462    }
     
    458464    if (masksToBounds()) {
    459465        color = Color(128, 255, 255, 48); // masking layer: pale blue
    460         width = 20;
     466        width = 16;
    461467        return;
    462468    }
    463469
    464470    color = Color(255, 255, 0, 192); // container: yellow
    465     width = 2;
    466471}
    467472
  • trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp

    r208985 r209224  
    788788    }
    789789
    790     noteLayerPropertyChanged(BackdropFiltersChanged);
     790    noteLayerPropertyChanged(BackdropFiltersChanged | DebugIndicatorsChanged);
    791791    return canCompositeFilters;
    792792}
Note: See TracChangeset for help on using the changeset viewer.