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

Unified Diff: cc/trees/layer_tree_host_unittest_animation.cc

Issue 131683005: cc: Make PrepareToDraw return an enum for why it aborts (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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
Index: cc/trees/layer_tree_host_unittest_animation.cc
diff --git a/cc/trees/layer_tree_host_unittest_animation.cc b/cc/trees/layer_tree_host_unittest_animation.cc
index 22c8965a5fd6c76b1f3e15891d48778d0ec73fdf..92c113e26b5e7149dd112805912469a14e8a91cd 100644
--- a/cc/trees/layer_tree_host_unittest_animation.cc
+++ b/cc/trees/layer_tree_host_unittest_animation.cc
@@ -201,11 +201,11 @@ class LayerTreeHostAnimationTestCheckerboardDoesNotStarveDraws
EndTest();
}
- virtual bool PrepareToDrawOnThread(
+ virtual DrawSwapReadbackResult::DrawResult PrepareToDrawOnThread(
LayerTreeHostImpl* host_impl,
LayerTreeHostImpl::FrameData* frame,
- bool result) OVERRIDE {
- return false;
+ DrawSwapReadbackResult::DrawResult draw_result) OVERRIDE {
+ return DrawSwapReadbackResult::DRAW_ABORTED_CHECKERBOARD_ANIMATIONS;
}
virtual void AfterTest() OVERRIDE { }
@@ -893,16 +893,17 @@ class LayerTreeHostAnimationTestCheckerboardDoesntStartAnimations
PostSetNeedsCommitToMainThread();
}
- virtual bool PrepareToDrawOnThread(LayerTreeHostImpl* host_impl,
- LayerTreeHostImpl::FrameData* frame_data,
- bool result) OVERRIDE {
+ virtual DrawSwapReadbackResult::DrawResult PrepareToDrawOnThread(
+ LayerTreeHostImpl* host_impl,
+ LayerTreeHostImpl::FrameData* frame_data,
+ DrawSwapReadbackResult::DrawResult draw_result) OVERRIDE {
if (added_animations_ < 2)
- return result;
+ return draw_result;
if (TestEnded())
- return result;
+ return draw_result;
// Act like there is checkerboard when the second animation wants to draw.
++prevented_draw_;
- return false;
+ return DrawSwapReadbackResult::DRAW_ABORTED_CHECKERBOARD_ANIMATIONS;
}
virtual void DidCommitAndDrawFrame() OVERRIDE {

Powered by Google App Engine
This is Rietveld 408576698