Title: [121450] trunk/Source
- Revision
- 121450
- Author
- [email protected]
- Date
- 2012-06-28 12:27:47 -0700 (Thu, 28 Jun 2012)
Log Message
[chromium] Should schedule a commit when dropping contents textures
https://bugs.webkit.org/show_bug.cgi?id=90031
Patch by James Robinson <[email protected]> on 2012-06-28
Reviewed by Adrienne Walker.
Source/WebCore:
If we're dropping contents textures on the impl thread, we need to schedule a commit to pick up new contents at
the next commit opportunity. Also adds some traces to make debugging issues like this easier.
* platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
(WebCore::CCLayerTreeHostImpl::commitComplete):
(WebCore::CCLayerTreeHostImpl::canDraw):
(WebCore::CCLayerTreeHostImpl::releaseContentsTextures):
* platform/graphics/chromium/cc/CCScheduler.cpp:
(WebCore::CCScheduler::processScheduledActions):
Source/WebKit/chromium:
Adds a somewhat vacuous test unit test for committing when releasing textures.
* tests/CCLayerTreeHostImplTest.cpp:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (121449 => 121450)
--- trunk/Source/WebCore/ChangeLog 2012-06-28 19:20:28 UTC (rev 121449)
+++ trunk/Source/WebCore/ChangeLog 2012-06-28 19:27:47 UTC (rev 121450)
@@ -1,3 +1,20 @@
+2012-06-28 James Robinson <[email protected]>
+
+ [chromium] Should schedule a commit when dropping contents textures
+ https://bugs.webkit.org/show_bug.cgi?id=90031
+
+ Reviewed by Adrienne Walker.
+
+ If we're dropping contents textures on the impl thread, we need to schedule a commit to pick up new contents at
+ the next commit opportunity. Also adds some traces to make debugging issues like this easier.
+
+ * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
+ (WebCore::CCLayerTreeHostImpl::commitComplete):
+ (WebCore::CCLayerTreeHostImpl::canDraw):
+ (WebCore::CCLayerTreeHostImpl::releaseContentsTextures):
+ * platform/graphics/chromium/cc/CCScheduler.cpp:
+ (WebCore::CCScheduler::processScheduledActions):
+
2012-06-28 Antti Koivisto <[email protected]>
Don't malloc RenderGeometryMap steps individually
Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp (121449 => 121450)
--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp 2012-06-28 19:20:28 UTC (rev 121449)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp 2012-06-28 19:27:47 UTC (rev 121450)
@@ -155,6 +155,7 @@
void CCLayerTreeHostImpl::commitComplete()
{
+ TRACE_EVENT0("cc", "CCLayerTreeHostImpl::commitComplete");
// Recompute max scroll position; must be after layer content bounds are
// updated.
updateMaxScrollPosition();
@@ -163,14 +164,22 @@
bool CCLayerTreeHostImpl::canDraw()
{
- if (!m_rootLayerImpl)
+ if (!m_rootLayerImpl) {
+ TRACE_EVENT_INSTANT0("cc", "CCLayerTreeHostImpl::canDraw no root layer");
return false;
- if (viewportSize().isEmpty())
+ }
+ if (viewportSize().isEmpty()) {
+ TRACE_EVENT_INSTANT0("cc", "CCLayerTreeHostImpl::canDraw empty viewport");
return false;
- if (!m_layerRenderer)
+ }
+ if (!m_layerRenderer) {
+ TRACE_EVENT_INSTANT0("cc", "CCLayerTreeHostImpl::canDraw no layerRenderer");
return false;
- if (m_contentsTexturesWerePurgedSinceLastCommit)
+ }
+ if (m_contentsTexturesWerePurgedSinceLastCommit) {
+ TRACE_EVENT_INSTANT0("cc", "CCLayerTreeHostImpl::canDraw contents textures purged");
return false;
+ }
return true;
}
@@ -478,6 +487,7 @@
{
contentsTextureAllocator()->deleteAllTextures();
m_contentsTexturesWerePurgedSinceLastCommit = true;
+ m_client->setNeedsCommitOnImplThread();
}
void CCLayerTreeHostImpl::setMemoryAllocationLimitBytes(size_t bytes)
Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCScheduler.cpp (121449 => 121450)
--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCScheduler.cpp 2012-06-28 19:20:28 UTC (rev 121449)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCScheduler.cpp 2012-06-28 19:27:47 UTC (rev 121450)
@@ -159,6 +159,7 @@
do {
action = ""
m_stateMachine.updateState(action);
+ TRACE_EVENT1("cc", "CCScheduler::processScheduledActions()", "action", action);
switch (action) {
case CCSchedulerStateMachine::ACTION_NONE:
Modified: trunk/Source/WebKit/chromium/ChangeLog (121449 => 121450)
--- trunk/Source/WebKit/chromium/ChangeLog 2012-06-28 19:20:28 UTC (rev 121449)
+++ trunk/Source/WebKit/chromium/ChangeLog 2012-06-28 19:27:47 UTC (rev 121450)
@@ -1,3 +1,14 @@
+2012-06-28 James Robinson <[email protected]>
+
+ [chromium] Should schedule a commit when dropping contents textures
+ https://bugs.webkit.org/show_bug.cgi?id=90031
+
+ Reviewed by Adrienne Walker.
+
+ Adds a somewhat vacuous test unit test for committing when releasing textures.
+
+ * tests/CCLayerTreeHostImplTest.cpp:
+
2012-06-27 Dana Jansens <[email protected]>
[chromium] Do not multiply bounds by contentsScale in TiledLayerChromium and CanvasLayerTextureUpdater
Modified: trunk/Source/WebKit/chromium/tests/CCLayerTreeHostImplTest.cpp (121449 => 121450)
--- trunk/Source/WebKit/chromium/tests/CCLayerTreeHostImplTest.cpp 2012-06-28 19:20:28 UTC (rev 121449)
+++ trunk/Source/WebKit/chromium/tests/CCLayerTreeHostImplTest.cpp 2012-06-28 19:27:47 UTC (rev 121450)
@@ -2855,6 +2855,12 @@
}
}
+TEST_F(CCLayerTreeHostImplTest, releaseContentsTextureShouldTriggerCommit)
+{
+ m_hostImpl->releaseContentsTextures();
+ EXPECT_TRUE(m_didRequestCommit);
+}
+
struct RenderPassCacheEntry {
mutable OwnPtr<CCRenderPass> renderPassPtr;
CCRenderPass* renderPass;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes