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

Changeset 246471 in webkit


Ignore:
Timestamp:
Jun 15, 2019, 10:33:28 PM (7 years ago)
Author:
Simon Fraser
Message:

Make layerTreeAsText() output a bit less verbose
https://bugs.webkit.org/show_bug.cgi?id=198870

Reviewed by Tim Horton.

Source/WebCore:

"accelerates drawing" was getting dumped twice for debug dumps.
Only dump the non-default state for "uses display-list drawing".
Use the new OptionSet<> dumping for GraphicsLayerPaintingPhases.

  • platform/graphics/GraphicsLayer.cpp:

(WebCore::GraphicsLayer::dumpProperties const):
(WebCore::operator<<):

  • platform/graphics/GraphicsLayer.h:
  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):

LayoutTests:

  • compositing/overflow/stacking-context-composited-scroller-with-foreground-paint-phases-expected.txt:
  • platform/gtk/compositing/overflow/composited-scrolling-paint-phases-expected.txt:
  • platform/ios-wk2/compositing/overflow/stacking-context-composited-scroller-with-foreground-paint-phases-expected.txt:
  • platform/mac-wk1/compositing/overflow/stacking-context-composited-scroller-with-foreground-paint-phases-expected.txt:
  • platform/mac/compositing/overflow/composited-scrolling-paint-phases-expected.txt: Removed.
Location:
trunk
Files:
1 deleted
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r246466 r246471  
     12019-06-15  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Make layerTreeAsText() output a bit less verbose
     4        https://bugs.webkit.org/show_bug.cgi?id=198870
     5
     6        Reviewed by Tim Horton.
     7
     8        * compositing/overflow/stacking-context-composited-scroller-with-foreground-paint-phases-expected.txt:
     9        * platform/gtk/compositing/overflow/composited-scrolling-paint-phases-expected.txt:
     10        * platform/ios-wk2/compositing/overflow/stacking-context-composited-scroller-with-foreground-paint-phases-expected.txt:
     11        * platform/mac-wk1/compositing/overflow/stacking-context-composited-scroller-with-foreground-paint-phases-expected.txt:
     12        * platform/mac/compositing/overflow/composited-scrolling-paint-phases-expected.txt: Removed.
     13
    1142019-06-15  Rob Buis  <rbuis@igalia.com>
    215
  • trunk/LayoutTests/compositing/overflow/stacking-context-composited-scroller-with-foreground-paint-phases-expected.txt

    r246019 r246471  
    33  (anchor 0.00 0.00)
    44  (bounds 800.00 600.00)
    5   (paintingPhases
    6     GraphicsLayerPaintBackground
    7     GraphicsLayerPaintForeground
    8     )
     5  (paintingPhases [background, foreground])
    96  (children 1
    107    (GraphicsLayer
    118      (bounds 800.00 600.00)
    129      (contentsOpaque 1)
    13       (paintingPhases
    14         GraphicsLayerPaintBackground
    15         GraphicsLayerPaintForeground
    16         )
     10      (paintingPhases [background, foreground])
    1711      (children 1
    1812        (GraphicsLayer
     
    2014          (bounds 322.00 322.00)
    2115          (drawsContent 1)
    22           (paintingPhases
    23             GraphicsLayerPaintBackground
    24             GraphicsLayerPaintCompositedScroll
    25             )
     16          (paintingPhases [background, composited-scroll])
    2617          (children 1
    2718            (GraphicsLayer
     
    3526                  (bounds 305.00 1020.00)
    3627                  (drawsContent 1)
    37                   (paintingPhases
    38                     GraphicsLayerPaintOverflowContents
    39                     GraphicsLayerPaintCompositedScroll
    40                     )
     28                  (paintingPhases [overflow-contents, composited-scroll])
    4129                  (children 2
    4230                    (GraphicsLayer
     
    4432                      (bounds 100.00 100.00)
    4533                      (contentsOpaque 1)
    46                       (paintingPhases
    47                         GraphicsLayerPaintBackground
    48                         GraphicsLayerPaintForeground
    49                         )
     34                      (paintingPhases [background, foreground])
    5035                    )
    5136                    (GraphicsLayer
     
    5338                      (bounds 305.00 1020.00)
    5439                      (drawsContent 1)
    55                       (paintingPhases
    56                         GraphicsLayerPaintForeground
    57                         GraphicsLayerPaintOverflowContents
    58                         )
     40                      (paintingPhases [foreground, overflow-contents])
    5941                    )
    6042                  )
  • trunk/LayoutTests/platform/gtk/compositing/overflow/composited-scrolling-paint-phases-expected.txt

    r225897 r246471  
    22  (anchor 0.00 0.00)
    33  (bounds 800.00 600.00)
    4   (paintingPhases
    5     GraphicsLayerPaintBackground
    6     GraphicsLayerPaintForeground
    7     )
     4  (paintingPhases [background, foreground])
    85  (children 1
    96    (GraphicsLayer
    107      (bounds 800.00 600.00)
    118      (contentsOpaque 1)
    12       (paintingPhases
    13         GraphicsLayerPaintBackground
    14         GraphicsLayerPaintForeground
    15         )
     9      (paintingPhases [background, foreground])
    1610      (children 1
    1711        (GraphicsLayer
     
    1913          (bounds 202.00 202.00)
    2014          (drawsContent 1)
    21           (paintingPhases
    22             GraphicsLayerPaintBackground
    23             GraphicsLayerPaintCompositedScroll
    24             )
     15          (paintingPhases [background, foreground])
    2516          (children 4
    2617            (GraphicsLayer
     
    2819              (position 1.00 1.00)
    2920              (bounds 185.00 185.00)
    30               (paintingPhases
    31                 GraphicsLayerPaintBackground
    32                 GraphicsLayerPaintForeground
    33                 )
     21              (paintingPhases [background, foreground])
    3422              (children 1
    3523                (GraphicsLayer
     
    3725                  (bounds 185.00 715.00)
    3826                  (drawsContent 1)
    39                   (paintingPhases
    40                     GraphicsLayerPaintOverflowContents
    41                     GraphicsLayerPaintCompositedScroll
    42                     )
     27                  (paintingPhases [overflow-contents, composited-scroll])
    4328                  (children 2
    4429                    (GraphicsLayer
     
    4631                      (bounds 80.00 10.00)
    4732                      (contentsOpaque 1)
    48                       (paintingPhases
    49                         GraphicsLayerPaintBackground
    50                         GraphicsLayerPaintForeground
    51                         )
     33                      (paintingPhases [background, foreground])
    5234                    )
    5335                    (GraphicsLayer
     
    5537                      (bounds 185.00 715.00)
    5638                      (drawsContent 1)
    57                       (paintingPhases
    58                         GraphicsLayerPaintForeground
    59                         )
     39                      (paintingPhases [foreground])
    6040                    )
    6141                  )
     
    6747              (bounds 185.00 15.00)
    6848              (drawsContent 1)
    69               (paintingPhases
    70                 GraphicsLayerPaintBackground
    71                 GraphicsLayerPaintForeground
    72                 )
     49              (paintingPhases [background, foreground])
    7350            )
    7451            (GraphicsLayer
     
    7653              (bounds 15.00 185.00)
    7754              (drawsContent 1)
    78               (paintingPhases
    79                 GraphicsLayerPaintBackground
    80                 GraphicsLayerPaintForeground
    81                 )
     55              (paintingPhases [background, foreground])
    8256            )
    8357            (GraphicsLayer
     
    8559              (bounds 15.00 15.00)
    8660              (drawsContent 1)
    87               (paintingPhases
    88                 GraphicsLayerPaintBackground
    89                 GraphicsLayerPaintForeground
    90                 )
     61              (paintingPhases [background, foreground])
    9162            )
    9263          )
  • trunk/LayoutTests/platform/ios-wk2/compositing/overflow/stacking-context-composited-scroller-with-foreground-paint-phases-expected.txt

    r246019 r246471  
    33  (anchor 0.00 0.00)
    44  (bounds 800.00 600.00)
    5   (paintingPhases
    6     GraphicsLayerPaintBackground
    7     GraphicsLayerPaintForeground
    8     )
     5  (paintingPhases [background, foreground])
    96  (children 1
    107    (GraphicsLayer
    118      (bounds 800.00 600.00)
    129      (contentsOpaque 1)
    13       (paintingPhases
    14         GraphicsLayerPaintBackground
    15         GraphicsLayerPaintForeground
    16         )
     10      (paintingPhases [background, foreground])
    1711      (children 1
    1812        (GraphicsLayer
     
    2014          (bounds 322.00 322.00)
    2115          (drawsContent 1)
    22           (paintingPhases
    23             GraphicsLayerPaintBackground
    24             GraphicsLayerPaintCompositedScroll
    25             )
     16          (paintingPhases [background, composited-scroll])
    2617          (children 1
    2718            (GraphicsLayer
     
    3526                  (bounds 320.00 1020.00)
    3627                  (drawsContent 1)
    37                   (paintingPhases
    38                     GraphicsLayerPaintOverflowContents
    39                     GraphicsLayerPaintCompositedScroll
    40                     )
     28                  (paintingPhases [overflow-contents, composited-scroll])
    4129                  (children 2
    4230                    (GraphicsLayer
     
    4432                      (bounds 100.00 100.00)
    4533                      (contentsOpaque 1)
    46                       (paintingPhases
    47                         GraphicsLayerPaintBackground
    48                         GraphicsLayerPaintForeground
    49                         )
     34                      (paintingPhases [background, foreground])
    5035                    )
    5136                    (GraphicsLayer
     
    5338                      (bounds 320.00 1020.00)
    5439                      (drawsContent 1)
    55                       (paintingPhases
    56                         GraphicsLayerPaintForeground
    57                         GraphicsLayerPaintOverflowContents
    58                         )
     40                      (paintingPhases [foreground, overflow-contents])
    5941                    )
    6042                  )
  • trunk/LayoutTests/platform/mac-wk1/compositing/overflow/stacking-context-composited-scroller-with-foreground-paint-phases-expected.txt

    r246017 r246471  
    33  (anchor 0.00 0.00)
    44  (bounds 800.00 600.00)
    5   (paintingPhases
    6     GraphicsLayerPaintBackground
    7     GraphicsLayerPaintForeground
    8     )
     5  (paintingPhases [background, foreground])
    96  (children 1
    107    (GraphicsLayer
    118      (bounds 800.00 600.00)
    129      (contentsOpaque 1)
    13       (paintingPhases
    14         GraphicsLayerPaintBackground
    15         GraphicsLayerPaintForeground
    16         )
     10      (paintingPhases [background, foreground])
    1711      (children 1
    1812        (GraphicsLayer
     
    2014          (bounds 322.00 322.00)
    2115          (drawsContent 1)
    22           (paintingPhases
    23             GraphicsLayerPaintBackground
    24             )
     16          (paintingPhases [background])
    2517          (children 1
    2618            (GraphicsLayer
     
    2820              (position 1.00 1.00)
    2921              (bounds 305.00 305.00)
    30               (paintingPhases
    31                 GraphicsLayerPaintBackground
    32                 GraphicsLayerPaintForeground
    33                 )
     22              (paintingPhases [background, foreground])
    3423              (children 2
    3524                (GraphicsLayer
     
    3726                  (bounds 100.00 100.00)
    3827                  (contentsOpaque 1)
    39                   (paintingPhases
    40                     GraphicsLayerPaintBackground
    41                     GraphicsLayerPaintForeground
    42                     )
     28                  (paintingPhases [background, foreground])
    4329                )
    4430                (GraphicsLayer
     
    4632                  (bounds 305.00 305.00)
    4733                  (drawsContent 1)
    48                   (paintingPhases
    49                     GraphicsLayerPaintForeground
    50                     )
     34                  (paintingPhases [foreground])
    5135                )
    5236              )
  • trunk/Source/WebCore/ChangeLog

    r246470 r246471  
     12019-06-15  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Make layerTreeAsText() output a bit less verbose
     4        https://bugs.webkit.org/show_bug.cgi?id=198870
     5
     6        Reviewed by Tim Horton.
     7
     8        "accelerates drawing" was getting dumped twice for debug dumps.
     9        Only dump the non-default state for "uses display-list drawing".
     10        Use the new OptionSet<> dumping for GraphicsLayerPaintingPhases.
     11
     12        * platform/graphics/GraphicsLayer.cpp:
     13        (WebCore::GraphicsLayer::dumpProperties const):
     14        (WebCore::operator<<):
     15        * platform/graphics/GraphicsLayer.h:
     16        * platform/graphics/ca/GraphicsLayerCA.cpp:
     17        (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
     18
    1192019-06-15  Youenn Fablet  <youenn@apple.com>
    220
  • trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp

    r245977 r246471  
    919919        ts << indent << "(backfaceVisibility " << (m_backfaceVisibility ? "visible" : "hidden") << ")\n";
    920920
    921     if (behavior & LayerTreeAsTextDebug) {
     921    if (behavior & LayerTreeAsTextDebug)
    922922        ts << indent << "(primary-layer-id " << primaryLayerID() << ")\n";
    923         ts << indent << "(client " << static_cast<void*>(m_client) << ")\n";
    924     }
    925923
    926924    if (m_backgroundColor.isValid() && client().shouldDumpPropertyForLayer(this, "backgroundColor", behavior))
     
    1000998    }
    1001999
    1002     if (behavior & LayerTreeAsTextIncludePaintingPhases && paintingPhase()) {
    1003         ts << indent << "(paintingPhases\n";
    1004         TextStream::IndentScope indentScope(ts);
    1005         if (paintingPhase().contains(GraphicsLayerPaintingPhase::Background))
    1006             ts << indent << "GraphicsLayerPaintBackground\n";
    1007 
    1008         if (paintingPhase().contains(GraphicsLayerPaintingPhase::Foreground))
    1009             ts << indent << "GraphicsLayerPaintForeground\n";
    1010 
    1011         if (paintingPhase().contains(GraphicsLayerPaintingPhase::Mask))
    1012             ts << indent << "GraphicsLayerPaintMask\n";
    1013 
    1014         if (paintingPhase().contains(GraphicsLayerPaintingPhase::ChildClippingMask))
    1015             ts << indent << "GraphicsLayerPaintChildClippingMask\n";
    1016 
    1017         if (paintingPhase().contains(GraphicsLayerPaintingPhase::OverflowContents))
    1018             ts << indent << "GraphicsLayerPaintOverflowContents\n";
    1019 
    1020         if (paintingPhase().contains(GraphicsLayerPaintingPhase::CompositedScroll))
    1021             ts << indent << "GraphicsLayerPaintCompositedScroll\n";
    1022 
    1023         ts << indent << ")\n";
    1024     }
     1000    if (behavior & LayerTreeAsTextIncludePaintingPhases && paintingPhase())
     1001        ts << indent << "(paintingPhases " << paintingPhase() << ")\n";
    10251002
    10261003    dumpAdditionalProperties(ts, behavior);
     
    10521029}
    10531030
    1054 TextStream& operator<<(TextStream& ts, const WebCore::GraphicsLayer::CustomAppearance& customAppearance)
     1031TextStream& operator<<(TextStream& ts, GraphicsLayerPaintingPhase phase)
     1032{
     1033    switch (phase) {
     1034    case GraphicsLayerPaintingPhase::Background: ts << "background"; break;
     1035    case GraphicsLayerPaintingPhase::Foreground: ts << "foreground"; break;
     1036    case GraphicsLayerPaintingPhase::Mask: ts << "mask"; break;
     1037    case GraphicsLayerPaintingPhase::ClipPath: ts << "clip-path"; break;
     1038    case GraphicsLayerPaintingPhase::OverflowContents: ts << "overflow-contents"; break;
     1039    case GraphicsLayerPaintingPhase::CompositedScroll: ts << "composited-scroll"; break;
     1040    case GraphicsLayerPaintingPhase::ChildClippingMask: ts << "child-clipping-mask"; break;
     1041    }
     1042
     1043    return ts;
     1044}
     1045
     1046TextStream& operator<<(TextStream& ts, const GraphicsLayer::CustomAppearance& customAppearance)
    10551047{
    10561048    switch (customAppearance) {
  • trunk/Source/WebCore/platform/graphics/GraphicsLayer.h

    r245977 r246471  
    742742};
    743743
     744WEBCORE_EXPORT WTF::TextStream& operator<<(WTF::TextStream&, const WebCore::GraphicsLayerPaintingPhase);
    744745WEBCORE_EXPORT WTF::TextStream& operator<<(WTF::TextStream&, const Vector<GraphicsLayer::PlatformLayerID>&);
    745746WEBCORE_EXPORT WTF::TextStream& operator<<(WTF::TextStream&, const GraphicsLayer::CustomAppearance&);
  • trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp

    r246018 r246471  
    37273727        textStream << indent << "(in window " << tiledBacking()->isInWindow() << ")\n";
    37283728    }
    3729    
     3729
    37303730    if (m_layer->wantsDeepColorBackingStore())
    37313731        textStream << indent << "(deep color 1)\n";
    3732 
    37333732
    37343733    if (behavior & LayerTreeAsTextIncludeContentLayers) {
     
    37433742
    37443743    if (behavior & LayerTreeAsTextDebug) {
    3745         textStream << indent << "(accelerates drawing " << m_acceleratesDrawing << ")\n";
    3746         textStream << indent << "(uses display-list drawing " << m_usesDisplayListDrawing << ")\n";
     3744        if (m_usesDisplayListDrawing)
     3745            textStream << indent << "(uses display-list drawing " << m_usesDisplayListDrawing << ")\n";
    37473746    }
    37483747}
Note: See TracChangeset for help on using the changeset viewer.