Move some Compositing logging to the Layers log channel
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 27 Apr 2019 19:31:00 +0000 (19:31 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 27 Apr 2019 19:31:00 +0000 (19:31 +0000)
https://bugs.webkit.org/show_bug.cgi?id=197345

Reviewed by Sam Weinig.

Make Compositing logging a bit less verbose by moving the GraphicsLayer tree dump
to the Layers log channel. Also log GraphicsLayers after flushing, when we'll have
accurate visible rects.

* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::updateCoverage):
* rendering/RenderLayerCompositor.cpp:
(WebCore::layersLogEnabled):
(WebCore::RenderLayerCompositor::flushPendingLayerChanges):
(WebCore::RenderLayerCompositor::updateCompositingLayers):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244722 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
Source/WebCore/rendering/RenderLayerCompositor.cpp

index c00feef..0a8e4dc 100644 (file)
@@ -1,3 +1,21 @@
+2019-04-27  Simon Fraser  <simon.fraser@apple.com>
+
+        Move some Compositing logging to the Layers log channel
+        https://bugs.webkit.org/show_bug.cgi?id=197345
+
+        Reviewed by Sam Weinig.
+
+        Make Compositing logging a bit less verbose by moving the GraphicsLayer tree dump
+        to the Layers log channel. Also log GraphicsLayers after flushing, when we'll have
+        accurate visible rects. 
+
+        * platform/graphics/ca/GraphicsLayerCA.cpp:
+        (WebCore::GraphicsLayerCA::updateCoverage):
+        * rendering/RenderLayerCompositor.cpp:
+        (WebCore::layersLogEnabled):
+        (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
+        (WebCore::RenderLayerCompositor::updateCompositingLayers):
+
 2019-04-27  Megan Gardner  <megan_gardner@apple.com>
 
         Lookup only looking up the first word in selection
index a939a35..90c803c 100644 (file)
@@ -2423,9 +2423,9 @@ void GraphicsLayerCA::updateCoverage(const CommitState& commitState)
                 
                 return "has transform animation with unknown extent";
             };
-            LOG_WITH_STREAM(Compositing, stream << "GraphicsLayerCA " << this << " id " << primaryLayerID() << " setBackingStoreAttached: " << requiresBacking << " (" << reasonForBacking() << ")");
+            LOG_WITH_STREAM(Layers, stream << "GraphicsLayerCA " << this << " id " << primaryLayerID() << " setBackingStoreAttached: " << requiresBacking << " (" << reasonForBacking() << ")");
         } else
-            LOG_WITH_STREAM(Compositing, stream << "GraphicsLayerCA " << this << " id " << primaryLayerID() << " setBackingStoreAttached: " << requiresBacking);
+            LOG_WITH_STREAM(Layers, stream << "GraphicsLayerCA " << this << " id " << primaryLayerID() << " setBackingStoreAttached: " << requiresBacking);
 #endif
 
         m_layer->setBackingStoreAttached(requiresBacking);
index 0f2c4b1..94f86ac 100644 (file)
@@ -276,6 +276,11 @@ static inline bool compositingLogEnabled()
 {
     return LogCompositing.state == WTFLogChannelState::On;
 }
+
+static inline bool layersLogEnabled()
+{
+    return LogLayers.state == WTFLogChannelState::On;
+}
 #endif
 
 RenderLayerCompositor::RenderLayerCompositor(RenderView& renderView)
@@ -492,7 +497,7 @@ void RenderLayerCompositor::flushPendingLayerChanges(bool isFlushRoot)
     // As long as we're not the root of the flush, we can bail.
     if (!isFlushRoot && rootLayerAttachment() == RootLayerAttachedViaEnclosingFrame)
         return;
-    
+
     if (rootLayerAttachment() == RootLayerUnattached) {
 #if PLATFORM(IOS_FAMILY)
         startLayerFlushTimerIfNeeded();
@@ -515,6 +520,13 @@ void RenderLayerCompositor::flushPendingLayerChanges(bool isFlushRoot)
         }
         
         ASSERT(m_flushingLayers);
+
+#if ENABLE(TREE_DEBUGGING)
+        if (layersLogEnabled()) {
+            LOG(Layers, "RenderLayerCompositor::flushPendingLayerChanges");
+            showGraphicsLayerTree(m_rootContentsLayer.get());
+        }
+#endif
     }
 
 #if PLATFORM(IOS_FAMILY)
@@ -806,8 +818,6 @@ bool RenderLayerCompositor::updateCompositingLayers(CompositingUpdateType update
     if (compositingLogEnabled()) {
         LOG(Compositing, "RenderLayerCompositor::updateCompositingLayers - post");
         showPaintOrderTree(m_renderView.layer());
-        LOG(Compositing, "RenderLayerCompositor::updateCompositingLayers - GraphicsLayers post, contentLayersCount %d", m_contentLayersCount);
-        showGraphicsLayerTree(m_rootContentsLayer.get());
     }
 #endif