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

Unified Diff: cc/layers/texture_layer_unittest.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/layers/texture_layer_unittest.cc
diff --git a/cc/layers/texture_layer_unittest.cc b/cc/layers/texture_layer_unittest.cc
index feaa585921b25d8b90556c71fa31f4095c719c29..dd175d028523b50f6c2ebd53d3ea5aab334bcbae 100644
--- a/cc/layers/texture_layer_unittest.cc
+++ b/cc/layers/texture_layer_unittest.cc
@@ -1402,11 +1402,12 @@ class TextureLayerClientTest
expected_used_textures_on_draw_ = expected_used_textures_on_commit_;
}
- 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 {
ContextForImplThread(host_impl)->ResetUsedTextures();
- return true;
+ return DrawSwapReadbackResult::DID_DRAW;
}
virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl,
@@ -1548,11 +1549,12 @@ class TextureLayerChangeInvisibleTest
expected_texture_on_draw_ = texture_;
}
- 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 {
ContextForImplThread(host_impl)->ResetUsedTextures();
- return true;
+ return DrawSwapReadbackResult::DID_DRAW;
}
virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl,
@@ -1982,9 +1984,10 @@ class TextureLayerLostContextTest
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 {
LayerImpl* root = host_impl->RootLayer();
TextureLayerImpl* texture_layer =
static_cast<TextureLayerImpl*>(root->children()[0]);
@@ -1992,7 +1995,7 @@ class TextureLayerLostContextTest
EXPECT_EQ(0u, texture_layer->texture_id());
else
EXPECT_EQ(1u, texture_layer->texture_id());
- return true;
+ return DrawSwapReadbackResult::DID_DRAW;
}
virtual void DidCommitAndDrawFrame() OVERRIDE {

Powered by Google App Engine
This is Rietveld 408576698