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

Unified Diff: cc/trees/layer_tree_host_unittest_context.cc

Issue 2752833002: cc: Use gpu raster in HUD. (Closed)
Patch Set: review comments updated. Created 3 years, 6 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_context.cc
diff --git a/cc/trees/layer_tree_host_unittest_context.cc b/cc/trees/layer_tree_host_unittest_context.cc
index c3584d33630525fcee969a30b768035643a8000e..557d88e97a044ea04b65e1422abe3510103b00f5 100644
--- a/cc/trees/layer_tree_host_unittest_context.cc
+++ b/cc/trees/layer_tree_host_unittest_context.cc
@@ -1001,11 +1001,6 @@ class LayerTreeHostContextTestDontUseLostResources
DrawResult PrepareToDrawOnThread(LayerTreeHostImpl* host_impl,
LayerTreeHostImpl::FrameData* frame,
DrawResult draw_result) override {
- if (host_impl->active_tree()->source_frame_number() == 2) {
- // Lose the context during draw on the second commit. This will cause
- // a third commit to recover.
- context3d_->set_times_bind_texture_succeeds(0);
- }
return draw_result;
}
@@ -1021,6 +1016,13 @@ class LayerTreeHostContextTestDontUseLostResources
void DidCommitAndDrawFrame() override {
ASSERT_TRUE(layer_tree_host()->hud_layer());
+
+ if (layer_tree_host()->SourceFrameNumber() == 2) {
+ // Lose the context after draw on the second commit. This will cause
+ // a third commit to recover.
+ context3d_->set_times_bind_texture_succeeds(0);
+ }
+
// End the test once we know the 3nd frame drew.
if (layer_tree_host()->SourceFrameNumber() < 5) {
layer_tree_host()->root_layer()->SetNeedsDisplay();
« cc/layers/heads_up_display_layer_impl.cc ('K') | « cc/trees/layer_tree_host_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698