Title: [98392] trunk/Source/WebCore
Revision
98392
Author
[email protected]
Date
2011-10-25 13:59:15 -0700 (Tue, 25 Oct 2011)

Log Message

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

Patch by Michal Mocny <[email protected]> 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:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (98391 => 98392)


--- trunk/Source/WebCore/ChangeLog	2011-10-25 20:56:06 UTC (rev 98391)
+++ trunk/Source/WebCore/ChangeLog	2011-10-25 20:59:15 UTC (rev 98392)
@@ -1,3 +1,17 @@
+2011-10-25  Michal Mocny  <[email protected]>
+
+        LayerRendererChromium::setVisible called needlessly without a visibility change
+        https://bugs.webkit.org/show_bug.cgi?id=70766
+
+        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:
+
 2011-10-25  Anders Carlsson  <[email protected]>
 
         REGRESSION(97821): HistoryController::itemsAreClones crashes a lot

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


--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp	2011-10-25 20:56:06 UTC (rev 98391)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp	2011-10-25 20:59:15 UTC (rev 98392)
@@ -48,6 +48,7 @@
     , m_sourceFrameNumber(-1)
     , m_frameNumber(0)
     , m_settings(settings)
+    , m_visible(true)
 {
     ASSERT(CCProxy::isImplThread());
 }
@@ -128,6 +129,10 @@
 
 void CCLayerTreeHostImpl::setVisible(bool visible)
 {
+    if (m_visible == visible)
+        return;
+    m_visible = visible;
+
     if (m_layerRenderer)
         m_layerRenderer->setVisible(visible);
 }

Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.h (98391 => 98392)


--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.h	2011-10-25 20:56:06 UTC (rev 98391)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.h	2011-10-25 20:59:15 UTC (rev 98392)
@@ -109,6 +109,7 @@
     RefPtr<CCLayerImpl> m_rootLayerImpl;
     CCSettings m_settings;
     IntSize m_viewportSize;
+    bool m_visible;
 };
 
 };
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to