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

Changeset 246668 in webkit


Ignore:
Timestamp:
Jun 20, 2019, 7:30:35 PM (7 years ago)
Author:
Simon Fraser
Message:

Make it possible to include clipping in GraphicsLayer tree dumps
https://bugs.webkit.org/show_bug.cgi?id=199096

Reviewed by Zalan Bujtas.

Source/WebCore:

Add LAYER_TREE_INCLUDES_CLIPPING and plumb it down to GraphicsLayers, turning
it on for a couple of tests.

  • page/Frame.h:
  • platform/graphics/GraphicsLayer.cpp:

(WebCore::GraphicsLayer::dumpProperties const):

  • platform/graphics/GraphicsLayerClient.h:
  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::layerTreeAsText):

  • testing/Internals.cpp:

(WebCore::toLayerTreeFlags):

  • testing/Internals.h:
  • testing/Internals.idl:

LayoutTests:

  • compositing/clipping/border-radius-async-overflow-clipping-layer-expected.txt:
  • compositing/clipping/border-radius-async-overflow-clipping-layer.html:
  • compositing/clipping/border-radius-overflow-hidden-stacking-context-expected.txt:
  • compositing/clipping/border-radius-overflow-hidden-stacking-context.html:
  • platform/mac-wk1/compositing/clipping/border-radius-async-overflow-clipping-layer-expected.txt:
Location:
trunk
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r246655 r246668  
     12019-06-20  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Make it possible to include clipping in GraphicsLayer tree dumps
     4        https://bugs.webkit.org/show_bug.cgi?id=199096
     5
     6        Reviewed by Zalan Bujtas.
     7
     8        * compositing/clipping/border-radius-async-overflow-clipping-layer-expected.txt:
     9        * compositing/clipping/border-radius-async-overflow-clipping-layer.html:
     10        * compositing/clipping/border-radius-overflow-hidden-stacking-context-expected.txt:
     11        * compositing/clipping/border-radius-overflow-hidden-stacking-context.html:
     12        * platform/mac-wk1/compositing/clipping/border-radius-async-overflow-clipping-layer-expected.txt:
     13
    1142019-06-20  Greg Doolittle  <gr3g@apple.com>
    215
  • trunk/LayoutTests/compositing/clipping/border-radius-async-overflow-clipping-layer-expected.txt

    r240941 r246668  
    44  (anchor 0.00 0.00)
    55  (bounds 800.00 600.00)
     6  (clips 1)
    67  (children 1
    78    (GraphicsLayer
     
    1920              (position 44.00 44.00)
    2021              (bounds 320.00 200.00)
     22              (clips 1)
    2123              (children 1
    2224                (GraphicsLayer
     
    5254              (position 44.00 44.00)
    5355              (bounds 320.00 200.00)
     56              (clips 1)
    5457              (children 1
    5558                (GraphicsLayer
    5659                  (offsetFromRenderer width=30 height=30)
    5760                  (bounds 320.00 200.00)
     61                  (clips 1)
    5862                  (children 1
    5963                    (GraphicsLayer
  • trunk/LayoutTests/compositing/clipping/border-radius-async-overflow-clipping-layer.html

    r243347 r246668  
    4040        window.addEventListener('load', () => {
    4141            if (window.testRunner)
    42                 document.getElementById('layers').innerText = window.internals.layerTreeAsText(document);
     42                document.getElementById('layers').innerText = window.internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_CLIPPING);
    4343        }, false);
    4444    </script>
  • trunk/LayoutTests/compositing/clipping/border-radius-overflow-hidden-stacking-context-expected.txt

    r179147 r246668  
    44  (anchor 0.00 0.00)
    55  (bounds 800.00 600.00)
     6  (clips 1)
    67  (children 1
    78    (GraphicsLayer
     
    1516            (GraphicsLayer
    1617              (bounds 100.00 100.00)
     18              (clips 1)
    1719              (children 1
    1820                (GraphicsLayer
  • trunk/LayoutTests/compositing/clipping/border-radius-overflow-hidden-stacking-context.html

    r179147 r246668  
    3636    function doTest() {
    3737      if (window.testRunner) {
    38         document.getElementById('layers').innerText = window.internals.layerTreeAsText(document);
     38        document.getElementById('layers').innerText = window.internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_CLIPPING);
    3939        testRunner.notifyDone();
    4040      }
  • trunk/LayoutTests/platform/mac-wk1/compositing/clipping/border-radius-async-overflow-clipping-layer-expected.txt

    r243361 r246668  
    44  (anchor 0.00 0.00)
    55  (bounds 800.00 600.00)
     6  (clips 1)
    67  (children 1
    78    (GraphicsLayer
     
    1819              (position 44.00 44.00)
    1920              (bounds 320.00 200.00)
     21              (clips 1)
    2022              (children 1
    2123                (GraphicsLayer
     
    4446              (position 44.00 44.00)
    4547              (bounds 320.00 200.00)
     48              (clips 1)
    4649              (children 1
    4750                (GraphicsLayer
  • trunk/Source/WebCore/ChangeLog

    r246664 r246668  
     12019-06-20  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Make it possible to include clipping in GraphicsLayer tree dumps
     4        https://bugs.webkit.org/show_bug.cgi?id=199096
     5
     6        Reviewed by Zalan Bujtas.
     7
     8        Add LAYER_TREE_INCLUDES_CLIPPING and plumb it down to GraphicsLayers, turning
     9        it on for a couple of tests.
     10
     11        * page/Frame.h:
     12        * platform/graphics/GraphicsLayer.cpp:
     13        (WebCore::GraphicsLayer::dumpProperties const):
     14        * platform/graphics/GraphicsLayerClient.h:
     15        * rendering/RenderLayerCompositor.cpp:
     16        (WebCore::RenderLayerCompositor::layerTreeAsText):
     17        * testing/Internals.cpp:
     18        (WebCore::toLayerTreeFlags):
     19        * testing/Internals.h:
     20        * testing/Internals.idl:
     21
    1222019-06-20  Daniel Bates  <dabates@apple.com>
    223
  • trunk/Source/WebCore/page/Frame.h

    r244775 r246668  
    114114    LayerTreeFlagsIncludeContentLayers          = 1 << 5,
    115115    LayerTreeFlagsIncludeAcceleratesDrawing     = 1 << 6,
    116     LayerTreeFlagsIncludeBackingStoreAttached   = 1 << 7,
    117     LayerTreeFlagsIncludeRootLayerProperties    = 1 << 8,
    118     LayerTreeFlagsIncludeEventRegion            = 1 << 9,
     116    LayerTreeFlagsIncludeClipping               = 1 << 7,
     117    LayerTreeFlagsIncludeBackingStoreAttached   = 1 << 8,
     118    LayerTreeFlagsIncludeRootLayerProperties    = 1 << 9,
     119    LayerTreeFlagsIncludeEventRegion            = 1 << 10,
    119120};
    120121typedef unsigned LayerTreeFlags;
  • trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp

    r246471 r246668  
    907907        ts << indent << "(supports subpixel antialiased text " << m_supportsSubpixelAntialiasedText << ")\n";
    908908
     909    if (m_masksToBounds && behavior & LayerTreeAsTextIncludeClipping)
     910        ts << indent << "(clips " << m_masksToBounds << ")\n";
     911
    909912    if (m_preserves3D)
    910913        ts << indent << "(preserves3D " << m_preserves3D << ")\n";
  • trunk/Source/WebCore/platform/graphics/GraphicsLayerClient.h

    r246596 r246668  
    7171    LayerTreeAsTextIncludePageOverlayLayers     = 1 << 6,
    7272    LayerTreeAsTextIncludeAcceleratesDrawing    = 1 << 7,
    73     LayerTreeAsTextIncludeBackingStoreAttached  = 1 << 8,
    74     LayerTreeAsTextIncludeRootLayerProperties   = 1 << 9,
    75     LayerTreeAsTextIncludeEventRegion           = 1 << 10,
     73    LayerTreeAsTextIncludeClipping              = 1 << 8,
     74    LayerTreeAsTextIncludeBackingStoreAttached  = 1 << 9,
     75    LayerTreeAsTextIncludeRootLayerProperties   = 1 << 10,
     76    LayerTreeAsTextIncludeEventRegion           = 1 << 11,
    7677    LayerTreeAsTextShowAll                      = 0xFFFF
    7778};
  • trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp

    r246612 r246668  
    20852085    if (flags & LayerTreeFlagsIncludeAcceleratesDrawing)
    20862086        layerTreeBehavior |= LayerTreeAsTextIncludeAcceleratesDrawing;
     2087    if (flags & LayerTreeFlagsIncludeClipping)
     2088        layerTreeBehavior |= LayerTreeAsTextIncludeClipping;
    20872089    if (flags & LayerTreeFlagsIncludeBackingStoreAttached)
    20882090        layerTreeBehavior |= LayerTreeAsTextIncludeBackingStoreAttached;
  • trunk/Source/WebCore/testing/Internals.cpp

    r246490 r246668  
    25452545    if (flags & Internals::LAYER_TREE_INCLUDES_ACCELERATES_DRAWING)
    25462546        layerTreeFlags |= LayerTreeFlagsIncludeAcceleratesDrawing;
     2547    if (flags & Internals::LAYER_TREE_INCLUDES_CLIPPING)
     2548        layerTreeFlags |= LayerTreeFlagsIncludeClipping;
    25472549    if (flags & Internals::LAYER_TREE_INCLUDES_BACKING_STORE_ATTACHED)
    25482550        layerTreeFlags |= LayerTreeFlagsIncludeBackingStoreAttached;
  • trunk/Source/WebCore/testing/Internals.h

    r246490 r246668  
    352352        LAYER_TREE_INCLUDES_CONTENT_LAYERS = 16,
    353353        LAYER_TREE_INCLUDES_ACCELERATES_DRAWING = 32,
    354         LAYER_TREE_INCLUDES_BACKING_STORE_ATTACHED = 64,
    355         LAYER_TREE_INCLUDES_ROOT_LAYER_PROPERTIES = 128,
    356         LAYER_TREE_INCLUDES_EVENT_REGION = 256,
     354        LAYER_TREE_INCLUDES_CLIPPING = 64,
     355        LAYER_TREE_INCLUDES_BACKING_STORE_ATTACHED = 128,
     356        LAYER_TREE_INCLUDES_ROOT_LAYER_PROPERTIES = 256,
     357        LAYER_TREE_INCLUDES_EVENT_REGION = 512,
    357358    };
    358359    ExceptionOr<String> layerTreeAsText(Document&, unsigned short flags) const;
  • trunk/Source/WebCore/testing/Internals.idl

    r246184 r246668  
    373373    const unsigned short LAYER_TREE_INCLUDES_CONTENT_LAYERS = 16;
    374374    const unsigned short LAYER_TREE_INCLUDES_ACCELERATES_DRAWING = 32;
    375     const unsigned short LAYER_TREE_INCLUDES_BACKING_STORE_ATTACHED = 64;
    376     const unsigned short LAYER_TREE_INCLUDES_ROOT_LAYER_PROPERTIES = 128;
    377     const unsigned short LAYER_TREE_INCLUDES_EVENT_REGION = 256;
     375    const unsigned short LAYER_TREE_INCLUDES_CLIPPING = 64;
     376    const unsigned short LAYER_TREE_INCLUDES_BACKING_STORE_ATTACHED = 128;
     377    const unsigned short LAYER_TREE_INCLUDES_ROOT_LAYER_PROPERTIES = 256;
     378    const unsigned short LAYER_TREE_INCLUDES_EVENT_REGION = 512;
    378379    [MayThrowException] DOMString layerTreeAsText(Document document, optional unsigned short flags = 0);
    379380
Note: See TracChangeset for help on using the changeset viewer.