Title: [99504] branches/chromium/912/Source/WebCore/platform/graphics/chromium/cc
Revision
99504
Author
vange...@chromium.org
Date
2011-11-07 16:44:10 -0800 (Mon, 07 Nov 2011)

Log Message

Merge 98392 - LayerRendererChromium::setVisible called needlessly without a visibility change
https://bugs.webkit.org/show_bug.cgi?id=70766

Patch by Michal Mocny <mmo...@google.com> on 2011-10-25
Reviewed by Kenneth Russell.

Check that visibility has actually changed before calling LayerRendererChromium::setVisible

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

TBR=commit-qu...@webkit.org
Review URL: http://codereview.chromium.org/8491030

Modified Paths

Diff

Modified: branches/chromium/912/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp (99503 => 99504)


--- branches/chromium/912/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp	2011-11-08 00:42:30 UTC (rev 99503)
+++ branches/chromium/912/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp	2011-11-08 00:44:10 UTC (rev 99504)
@@ -47,6 +47,7 @@
     : m_sourceFrameNumber(-1)
     , m_frameNumber(0)
     , m_settings(settings)
+    , m_visible(true)
 {
     ASSERT(CCProxy::isImplThread());
 }
@@ -122,6 +123,10 @@
 
 void CCLayerTreeHostImpl::setVisible(bool visible)
 {
+    if (m_visible == visible)
+        return;
+    m_visible = visible;
+
     if (m_layerRenderer)
         m_layerRenderer->setVisible(visible);
 }

Modified: branches/chromium/912/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.h (99503 => 99504)


--- branches/chromium/912/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.h	2011-11-08 00:42:30 UTC (rev 99503)
+++ branches/chromium/912/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.h	2011-11-08 00:44:10 UTC (rev 99504)
@@ -97,6 +97,7 @@
     RefPtr<CCLayerImpl> m_rootLayerImpl;
     CCSettings m_settings;
     IntSize m_viewportSize;
+    bool m_visible;
 };
 
 };
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to