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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 475633008: cc: Use impl-side painting in LTH context lost tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: set high res to draw when new output surface is used. Created 6 years, 3 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/fake_picture_layer_impl.cc ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index afba687b2d8d3bcdc42ae39e27fdb42e95d1e043..3af5ba4cfe564ee567c02f565550b488042c55c3 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -1608,6 +1608,9 @@ void LayerTreeHostImpl::DidDrawAllLayers(const FrameData& frame) {
// Once all layers have been drawn, pending texture uploads should no
// longer block future uploads.
resource_provider_->MarkPendingUploadsAsNonBlocking();
+
+ if (active_tree()->RequiresHighResToDraw())
+ active_tree()->ResetRequiresHighResToDraw();
sohanjg 2014/09/10 06:28:07 we reset this on swap buffers too, but tests don't
}
void LayerTreeHostImpl::FinishAllRendering() {
@@ -2062,6 +2065,12 @@ bool LayerTreeHostImpl::InitializeRenderer(
return false;
output_surface_ = output_surface.Pass();
+
+ // There will not be anything to draw here, so set high res
+ // to avoid checkerboards, typically when we are recovering
+ // from lost context.
+ active_tree_->SetRequiresHighResToDraw();
+
have_valid_output_surface_ = true;
resource_provider_ =
ResourceProvider::Create(output_surface_.get(),
« no previous file with comments | « cc/test/fake_picture_layer_impl.cc ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698