Title: [112439] trunk/Source/WebCore
Revision
112439
Author
[email protected]
Date
2012-03-28 14:18:20 -0700 (Wed, 28 Mar 2012)

Log Message

[chromium] Add tracing events around CCLayerTreeHostImpl visibility.
https://bugs.webkit.org/show_bug.cgi?id=82501

Patch by Michal Mocny <[email protected]> on 2012-03-28
Reviewed by James Robinson.

* platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
(WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl):
(WebCore::CCLayerTreeHostImpl::setVisible):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (112438 => 112439)


--- trunk/Source/WebCore/ChangeLog	2012-03-28 21:00:37 UTC (rev 112438)
+++ trunk/Source/WebCore/ChangeLog	2012-03-28 21:18:20 UTC (rev 112439)
@@ -1,3 +1,14 @@
+2012-03-28  Michal Mocny  <[email protected]>
+
+        [chromium] Add tracing events around CCLayerTreeHostImpl visibility.
+        https://bugs.webkit.org/show_bug.cgi?id=82501
+
+        Reviewed by James Robinson.
+
+        * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
+        (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl):
+        (WebCore::CCLayerTreeHostImpl::setVisible):
+
 2012-03-28  Florin Malita  <[email protected]>
 
         Incorrect foreignObject hit test results when overlapping other SVG elements

Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp (112438 => 112439)


--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp	2012-03-28 21:00:37 UTC (rev 112438)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp	2012-03-28 21:18:20 UTC (rev 112439)
@@ -44,6 +44,17 @@
 
 namespace {
 const double lowFrequencyAnimationInterval = 1;
+
+void didVisibilityChange(WebCore::CCLayerTreeHostImpl* id, bool visible)
+{
+    if (visible) {
+        TRACE_EVENT_START1("webkit", "CCLayerTreeHostImpl::setVisible", id, "CCLayerTreeHostImpl", id);
+        return;
+    }
+
+    TRACE_EVENT_FINISH0("webkit", "CCLayerTreeHostImpl::setVisible", id);
+}
+
 } // namespace
 
 namespace WebCore {
@@ -106,6 +117,7 @@
     , m_timeSourceClientAdapter(CCLayerTreeHostImplTimeSourceAdapter::create(this, CCDelayBasedTimeSource::create(lowFrequencyAnimationInterval * 1000.0, CCProxy::currentThread())))
 {
     ASSERT(CCProxy::isImplThread());
+    didVisibilityChange(this, m_visible);
 }
 
 CCLayerTreeHostImpl::~CCLayerTreeHostImpl()
@@ -474,6 +486,7 @@
     if (m_visible == visible)
         return;
     m_visible = visible;
+    didVisibilityChange(this, m_visible);
 
     if (!m_layerRenderer)
         return;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to