Title: [126719] trunk/Source
- Revision
- 126719
- Author
- [email protected]
- Date
- 2012-08-26 19:49:36 -0700 (Sun, 26 Aug 2012)
Log Message
[chromium] Fix a bug where CCThreadProxy::canDraw() gets stuck at false on tab switch
https://bugs.webkit.org/show_bug.cgi?id=94903
Patch by Christopher Cameron <[email protected]> on 2012-08-26
Reviewed by James Robinson.
Suppose the impl thread deletes all textures via
releaseContentsTextures(). The impl thread will not be able to draw
again until resetContentsTexturesPurged() is called in
scheduledActionCommit(). When deleting the textures, the function
releaseContentsTextures() calls setNeedsCommitOnImplThread() to ensure
that a commit will come along to allow drawing again. If this commit
is aborted, then the page will not draw until a commit is scheduled,
which may be never.
Make beginFrameAborted() call setNeedsCommit(), so that the requested
commit will eventually occur.
No new tests, update to CCSchedulerStateMachineTest's
TestGoesInvisibleBeforeBeginFrameCompletes to require new
functionality (new test fails with old behavior).
* platform/graphics/chromium/cc/CCSchedulerStateMachine.cpp:
(WebCore::CCSchedulerStateMachine::beginFrameAborted):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (126718 => 126719)
--- trunk/Source/WebCore/ChangeLog 2012-08-27 00:49:25 UTC (rev 126718)
+++ trunk/Source/WebCore/ChangeLog 2012-08-27 02:49:36 UTC (rev 126719)
@@ -1,3 +1,29 @@
+2012-08-26 Christopher Cameron <[email protected]>
+
+ [chromium] Fix a bug where CCThreadProxy::canDraw() gets stuck at false on tab switch
+ https://bugs.webkit.org/show_bug.cgi?id=94903
+
+ Reviewed by James Robinson.
+
+ Suppose the impl thread deletes all textures via
+ releaseContentsTextures(). The impl thread will not be able to draw
+ again until resetContentsTexturesPurged() is called in
+ scheduledActionCommit(). When deleting the textures, the function
+ releaseContentsTextures() calls setNeedsCommitOnImplThread() to ensure
+ that a commit will come along to allow drawing again. If this commit
+ is aborted, then the page will not draw until a commit is scheduled,
+ which may be never.
+
+ Make beginFrameAborted() call setNeedsCommit(), so that the requested
+ commit will eventually occur.
+
+ No new tests, update to CCSchedulerStateMachineTest's
+ TestGoesInvisibleBeforeBeginFrameCompletes to require new
+ functionality (new test fails with old behavior).
+
+ * platform/graphics/chromium/cc/CCSchedulerStateMachine.cpp:
+ (WebCore::CCSchedulerStateMachine::beginFrameAborted):
+
2012-08-26 Antti Koivisto <[email protected]>
Remove parent pointer from StyleSheetContents and StyleRuleImport
Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCSchedulerStateMachine.cpp (126718 => 126719)
--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCSchedulerStateMachine.cpp 2012-08-27 00:49:25 UTC (rev 126718)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCSchedulerStateMachine.cpp 2012-08-27 02:49:36 UTC (rev 126719)
@@ -303,6 +303,7 @@
{
ASSERT(m_commitState == COMMIT_STATE_FRAME_IN_PROGRESS);
m_commitState = COMMIT_STATE_IDLE;
+ setNeedsCommit();
}
void CCSchedulerStateMachine::beginUpdateMoreResourcesComplete(bool morePending)
Modified: trunk/Source/WebKit/chromium/tests/CCSchedulerStateMachineTest.cpp (126718 => 126719)
--- trunk/Source/WebKit/chromium/tests/CCSchedulerStateMachineTest.cpp 2012-08-27 00:49:25 UTC (rev 126718)
+++ trunk/Source/WebKit/chromium/tests/CCSchedulerStateMachineTest.cpp 2012-08-27 02:49:36 UTC (rev 126719)
@@ -830,6 +830,19 @@
// We should now be back in the idle state as if we didn't start a frame at all.
EXPECT_EQ(CCSchedulerStateMachine::COMMIT_STATE_IDLE, state.commitState());
EXPECT_EQ(CCSchedulerStateMachine::ACTION_NONE, state.nextAction());
+
+ // Become visible again
+ state.setVisible(true);
+
+ // We should be beginning a frame now
+ EXPECT_EQ(CCSchedulerStateMachine::COMMIT_STATE_IDLE, state.commitState());
+ EXPECT_EQ(CCSchedulerStateMachine::ACTION_BEGIN_FRAME, state.nextAction());
+
+ // Begin the frame
+ state.updateState(state.nextAction());
+
+ // We should be starting the commit now
+ EXPECT_EQ(CCSchedulerStateMachine::COMMIT_STATE_FRAME_IN_PROGRESS, state.commitState());
}
TEST(CCSchedulerStateMachineTest, TestContextLostWhenCompletelyIdle)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes