Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(300)

Unified Diff: Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp

Issue 10456072: Merge 118276 - [chromium] Enable the CCLayerTreeHostTestCanDrawBlocksDrawing test in single-threade… (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1132/
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/WebKit/chromium/ChangeLog ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp
===================================================================
--- Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp (revision 119176)
+++ Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp (working copy)
@@ -73,6 +73,7 @@
virtual void updateAnimations(double monotonicTime) { }
virtual void layout() { }
virtual void didRecreateContext(bool succeded) { }
+ virtual void didCommit() { }
virtual void didCommitAndDrawFrame() { }
// Implementation of CCLayerAnimationDelegate
@@ -256,6 +257,7 @@
virtual void didCommit() OVERRIDE
{
+ m_testHooks->didCommit();
}
virtual void didCommitAndDrawFrame() OVERRIDE
@@ -841,7 +843,6 @@
}
// If the layerTreeHost says it can't draw, then we should not try to draw.
-// FIXME: Make this run in single threaded mode too. http://crbug.com/127481
class CCLayerTreeHostTestCanDrawBlocksDrawing : public CCLayerTreeHostTestThreadOnly {
public:
CCLayerTreeHostTestCanDrawBlocksDrawing()
@@ -868,7 +869,7 @@
}
}
- virtual void didCommitAndDrawFrame()
+ virtual void didCommit()
{
m_numCommits++;
if (m_numCommits == 1) {
@@ -878,10 +879,10 @@
OwnArrayPtr<char> pixels(adoptArrayPtr(new char[4]));
m_layerTreeHost->compositeAndReadback(static_cast<void*>(pixels.get()), IntRect(0, 0, 1, 1));
} else if (m_numCommits == 2) {
+ m_layerTreeHost->setNeedsRedraw();
m_layerTreeHost->setNeedsCommit();
- m_layerTreeHost->finishAllRendering();
+ } else
endTest();
- }
}
virtual void afterTest()
@@ -892,10 +893,7 @@
int m_numCommits;
};
-TEST_F(CCLayerTreeHostTestCanDrawBlocksDrawing, runMultiThread)
-{
- runTestThreaded();
-}
+SINGLE_AND_MULTI_THREAD_TEST_F(CCLayerTreeHostTestCanDrawBlocksDrawing)
// beginLayerWrite should prevent draws from executing until a commit occurs
class CCLayerTreeHostTestWriteLayersRedraw : public CCLayerTreeHostTestThreadOnly {
« no previous file with comments | « Source/WebKit/chromium/ChangeLog ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698