Title: [121111] branches/chromium/1132/Source/WebCore
Revision
121111
Author
[email protected]
Date
2012-06-23 23:49:50 -0700 (Sat, 23 Jun 2012)

Log Message

Revert 121000 - [chromium] LayerRendererChromium is not getting visibility messages in single threaded compositing mode.

This is an emergency fix for the 1132 chromium branch. A more correct fix is in bug 89045.

https://bugs.webkit.org/show_bug.cgi?id=89731

Reviewed by James Robinson.


* platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
(WebCore::CCLayerTreeHost::compositeAndReadback):
(WebCore::CCLayerTreeHost::setVisible):
* platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
(WebCore::CCLayerTreeHostImpl::commitComplete):
* platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
(WebCore::CCSingleThreadProxy::setNeedsForcedCommit):


[email protected]
Review URL: https://chromiumcodereview.appspot.com/10658010

Modified Paths

Diff

Modified: branches/chromium/1132/Source/WebCore/ChangeLog (121110 => 121111)


--- branches/chromium/1132/Source/WebCore/ChangeLog	2012-06-24 05:51:40 UTC (rev 121110)
+++ branches/chromium/1132/Source/WebCore/ChangeLog	2012-06-24 06:49:50 UTC (rev 121111)
@@ -1,22 +1,3 @@
-2012-06-21  Vangelis Kokkevis  <[email protected]>
-
-        [chromium] LayerRendererChromium is not getting visibility messages in single threaded compositing mode.
-
-        This is an emergency fix for the 1132 chromium branch. A more correct fix is in bug 89045.
-
-        https://bugs.webkit.org/show_bug.cgi?id=89731
-
-        Reviewed by James Robinson.
-
-
-        * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
-        (WebCore::CCLayerTreeHost::compositeAndReadback):
-        (WebCore::CCLayerTreeHost::setVisible):
-        * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
-        (WebCore::CCLayerTreeHostImpl::commitComplete):
-        * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
-        (WebCore::CCSingleThreadProxy::setNeedsForcedCommit):
-
 2012-06-18  Nico Weber  <[email protected]>
 
         [chromium/mac] Unbreak smooth scrolling.

Modified: branches/chromium/1132/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp (121110 => 121111)


--- branches/chromium/1132/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp	2012-06-24 05:51:40 UTC (rev 121110)
+++ branches/chromium/1132/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp	2012-06-24 06:49:50 UTC (rev 121111)
@@ -296,28 +296,7 @@
             return false;
     }
     m_triggerIdlePaints = false;
-
-    // If the texture manager's limit is set to zero (e.g. invisible tab)
-    // we won't be able to paint. We temporarily set it to a non-zero value
-    // and bring it back down to zero after we composite and read-back.
-    bool needsAllocationReset = false;
-    bool savedMemoryAllocationsIsForDisplay = false;
-    if (!m_memoryAllocationBytes) {
-        needsAllocationReset = true;
-        savedMemoryAllocationsIsForDisplay = m_memoryAllocationIsForDisplay;
-
-        m_memoryAllocationBytes = TextureManager::highLimitBytes(viewportSize());
-        m_memoryAllocationIsForDisplay = m_visible;
-     }
-
     bool ret = m_proxy->compositeAndReadback(pixels, rect);
-
-    // Set texture manager's limit back to zero.
-    if (needsAllocationReset) {
-        setContentsMemoryAllocationLimitBytes(0);
-        m_memoryAllocationIsForDisplay = savedMemoryAllocationsIsForDisplay;
-    }
-
     m_triggerIdlePaints = true;
     return ret;
 }
@@ -420,9 +399,9 @@
             setContentsMemoryAllocationLimitBytes(0);
         else
             setContentsMemoryAllocationLimitBytes(m_contentsTextureManager->preferredMemoryLimitBytes());
-    } else {
-        setNeedsForcedCommit();
     }
+
+    setNeedsForcedCommit();
 }
 
 void CCLayerTreeHost::setContentsMemoryAllocationLimitBytes(size_t bytes)

Modified: branches/chromium/1132/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp (121110 => 121111)


--- branches/chromium/1132/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp	2012-06-24 05:51:40 UTC (rev 121110)
+++ branches/chromium/1132/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp	2012-06-24 06:49:50 UTC (rev 121111)
@@ -146,11 +146,6 @@
     // Recompute max scroll position; must be after layer content bounds are
     // updated.
     updateMaxScrollPosition();
-
-    // Ensure all GL calls (including texture deletions) will actually be
-    // submitted for execution in the case we didn't call swap buffers.
-    if ((!m_visible || !canDraw()) && context())
-        context()->flush();
 }
 
 bool CCLayerTreeHostImpl::canDraw()

Modified: branches/chromium/1132/Source/WebCore/platform/graphics/chromium/cc/CCSingleThreadProxy.cpp (121110 => 121111)


--- branches/chromium/1132/Source/WebCore/platform/graphics/chromium/cc/CCSingleThreadProxy.cpp	2012-06-24 05:51:40 UTC (rev 121110)
+++ branches/chromium/1132/Source/WebCore/platform/graphics/chromium/cc/CCSingleThreadProxy.cpp	2012-06-24 06:49:50 UTC (rev 121111)
@@ -252,9 +252,8 @@
 
 void CCSingleThreadProxy::setNeedsForcedCommit()
 {
-    // Do the commit right here. Simply scheduling a commit won't
-    // work if we're not visible.
-    commitAndComposite();
+    // This proxy doesn't block commits when not visible so use a normal commit.
+    setNeedsCommit();
 }
 
 void CCSingleThreadProxy::setNeedsRedraw()
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to