Title: [119683] trunk/Source
- Revision
- 119683
- Author
- [email protected]
- Date
- 2012-06-06 22:00:00 -0700 (Wed, 06 Jun 2012)
Log Message
[chromium] Stop dropping texture limits when the layer tree host becomes invisible, and initialize with 0 allocation.
https://bugs.webkit.org/show_bug.cgi?id=87747
Patch by Michal Mocny <[email protected]> on 2012-06-06
Reviewed by Adrienne Walker.
Source/WebCore:
GpuMemoryManager manages texture memory allocation limits. It will send a 0 allocation when a renderer becomes
invisible, and an appropriate allocation after a renderer is initialized. These numbers will change
depending on the state of memory across devices and other renderers, so we would like to remove all explicit
management by the renderers themselves.
* platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
(WebCore::CCLayerTreeHost::initializeLayerRenderer):
(WebCore::CCLayerTreeHost::setVisible):
Source/WebKit/chromium:
* tests/CCLayerTreeHostTest.cpp:
(WTF::MockLayerTreeHost::create):
* tests/Canvas2DLayerChromiumTest.cpp:
(Canvas2DLayerChromiumTest::fullLifecycleTest):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (119682 => 119683)
--- trunk/Source/WebCore/ChangeLog 2012-06-07 04:52:05 UTC (rev 119682)
+++ trunk/Source/WebCore/ChangeLog 2012-06-07 05:00:00 UTC (rev 119683)
@@ -1,3 +1,19 @@
+2012-06-06 Michal Mocny <[email protected]>
+
+ [chromium] Stop dropping texture limits when the layer tree host becomes invisible, and initialize with 0 allocation.
+ https://bugs.webkit.org/show_bug.cgi?id=87747
+
+ Reviewed by Adrienne Walker.
+
+ GpuMemoryManager manages texture memory allocation limits. It will send a 0 allocation when a renderer becomes
+ invisible, and an appropriate allocation after a renderer is initialized. These numbers will change
+ depending on the state of memory across devices and other renderers, so we would like to remove all explicit
+ management by the renderers themselves.
+
+ * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
+ (WebCore::CCLayerTreeHost::initializeLayerRenderer):
+ (WebCore::CCLayerTreeHost::setVisible):
+
2012-06-06 Sheriff Bot <[email protected]>
Unreviewed, rolling out r119680.
Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp (119682 => 119683)
--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp 2012-06-07 04:52:05 UTC (rev 119682)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp 2012-06-07 05:00:00 UTC (rev 119683)
@@ -149,11 +149,6 @@
m_contentsTextureManager = TextureManager::create(0, 0, m_proxy->layerRendererCapabilities().maxTextureSize);
- // FIXME: This is the same as setContentsMemoryAllocationLimitBytes, but
- // we're in the middle of a commit here and don't want to force another.
- m_memoryAllocationBytes = TextureManager::highLimitBytes(deviceViewportSize());
- m_memoryAllocationIsForDisplay = true;
-
m_layerRendererInitialized = true;
m_settings.defaultTileSize = IntSize(min(m_settings.defaultTileSize.width(), m_proxy->layerRendererCapabilities().maxTextureSize),
@@ -405,15 +400,6 @@
return;
m_visible = visible;
-
- // FIXME: Remove this stuff, it is here just for the m20 merge.
- if (!m_visible && m_layerRendererInitialized) {
- if (m_proxy->layerRendererCapabilities().contextHasCachedFrontBuffer)
- setContentsMemoryAllocationLimitBytes(0);
- else
- setContentsMemoryAllocationLimitBytes(m_contentsTextureManager->preferredMemoryLimitBytes());
- }
-
setNeedsForcedCommit();
}
Modified: trunk/Source/WebKit/chromium/ChangeLog (119682 => 119683)
--- trunk/Source/WebKit/chromium/ChangeLog 2012-06-07 04:52:05 UTC (rev 119682)
+++ trunk/Source/WebKit/chromium/ChangeLog 2012-06-07 05:00:00 UTC (rev 119683)
@@ -1,3 +1,15 @@
+2012-06-06 Michal Mocny <[email protected]>
+
+ [chromium] Stop dropping texture limits when the layer tree host becomes invisible, and initialize with 0 allocation.
+ https://bugs.webkit.org/show_bug.cgi?id=87747
+
+ Reviewed by Adrienne Walker.
+
+ * tests/CCLayerTreeHostTest.cpp:
+ (WTF::MockLayerTreeHost::create):
+ * tests/Canvas2DLayerChromiumTest.cpp:
+ (Canvas2DLayerChromiumTest::fullLifecycleTest):
+
2012-06-06 Mark Pilgrim <[email protected]>
[Chromium] Move createMessagePortChannel to Platform.h
Modified: trunk/Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp (119682 => 119683)
--- trunk/Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp 2012-06-07 04:52:05 UTC (rev 119682)
+++ trunk/Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp 2012-06-07 05:00:00 UTC (rev 119683)
@@ -227,6 +227,7 @@
// LayerTreeHostImpl won't draw if it has 1x1 viewport.
layerTreeHost->setViewportSize(IntSize(1, 1));
+ layerTreeHost->setContentsMemoryAllocationLimitBytes(TextureManager::highLimitBytes(layerTreeHost->viewportSize()));
layerTreeHost->rootLayer()->setLayerAnimationDelegate(testHooks);
Modified: trunk/Source/WebKit/chromium/tests/Canvas2DLayerChromiumTest.cpp (119682 => 119683)
--- trunk/Source/WebKit/chromium/tests/Canvas2DLayerChromiumTest.cpp 2012-06-07 04:52:05 UTC (rev 119682)
+++ trunk/Source/WebKit/chromium/tests/Canvas2DLayerChromiumTest.cpp 2012-06-07 05:00:00 UTC (rev 119683)
@@ -125,6 +125,7 @@
WebCompositor::initialize(thread.get());
OwnPtr<FakeCCLayerTreeHost> layerTreeHost(FakeCCLayerTreeHost::create());
+ layerTreeHost->setContentsMemoryAllocationLimitBytes(TextureManager::highLimitBytes(layerTreeHost->viewportSize()));
// Force an update, so that we get a valid TextureManager.
layerTreeHost->updateLayers(updater);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes