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

Unified Diff: cc/test/layer_tree_test.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: wrapping... 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
« no previous file with comments | « cc/test/layer_tree_test.h ('k') | cc/trees/layer_tree_host_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/layer_tree_test.cc
diff --git a/cc/test/layer_tree_test.cc b/cc/test/layer_tree_test.cc
index 373f92bdfe95cdec3a43302849a999db4690ac65..a253782e0d5dd91b00bbd57fd1ee60331fcdb820 100644
--- a/cc/test/layer_tree_test.cc
+++ b/cc/test/layer_tree_test.cc
@@ -35,10 +35,11 @@ TestHooks::TestHooks() {}
TestHooks::~TestHooks() {}
-bool TestHooks::PrepareToDrawOnThread(LayerTreeHostImpl* host_impl,
- LayerTreeHostImpl::FrameData* frame_data,
- bool result) {
- return true;
+DrawSwapReadbackResult::DrawResult TestHooks::PrepareToDrawOnThread(
+ LayerTreeHostImpl* host_impl,
+ LayerTreeHostImpl::FrameData* frame_data,
+ DrawSwapReadbackResult::DrawResult draw_result) {
+ return draw_result;
}
base::TimeDelta TestHooks::LowFrequencyAnimationInterval() const {
@@ -101,12 +102,12 @@ class LayerTreeHostImplForTesting : public LayerTreeHostImpl {
}
}
- virtual bool PrepareToDraw(FrameData* frame,
- const gfx::Rect& damage_rect) OVERRIDE {
- bool result = LayerTreeHostImpl::PrepareToDraw(frame, damage_rect);
- if (!test_hooks_->PrepareToDrawOnThread(this, frame, result))
- result = false;
- return result;
+ virtual DrawSwapReadbackResult::DrawResult PrepareToDraw(
+ FrameData* frame,
+ const gfx::Rect& damage_rect) OVERRIDE {
+ DrawSwapReadbackResult::DrawResult draw_result =
+ LayerTreeHostImpl::PrepareToDraw(frame, damage_rect);
+ return test_hooks_->PrepareToDrawOnThread(this, frame, draw_result);
}
virtual void DrawLayers(FrameData* frame,
« no previous file with comments | « cc/test/layer_tree_test.h ('k') | cc/trees/layer_tree_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698