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

Unified Diff: cc/trees/layer_tree_host_unittest_context.cc

Issue 2961633002: cc: HUD handle context lost in Gpu raster.
Patch Set: update comments. Created 3 years, 5 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/trees/layer_tree_host_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 250cb101284a43379b162e8d21ef33f4f5aa0a86..31167d6f8a37e1bf7c8af915e3982c6b170ad5f6 100644
--- a/cc/trees/layer_tree_host_unittest_context.cc
+++ b/cc/trees/layer_tree_host_unittest_context.cc
@@ -1003,6 +1003,11 @@ 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 after draw on the second commit. This will cause
+ // a third commit to recover.
+ context3d_->set_times_bind_texture_succeeds(0);
+ }
return draw_result;
}
@@ -1018,13 +1023,6 @@ 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();
« no previous file with comments | « 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