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

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: check isReadyToDraw for evict texture test. 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
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 2278a4ac23330a062951732300ed9ce145b70cb4..eab2328a95f567205c7c10c51166bd367ea4890b 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -1620,6 +1620,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();
danakj 2014/09/10 16:03:31 Can you just make the tests call Swap if they need
sohanjg 2014/09/11 06:07:57 Done.
}
void LayerTreeHostImpl::FinishAllRendering() {
@@ -2080,6 +2083,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();
danakj 2014/09/10 16:03:31 can you move this down below us creating all the t
sohanjg 2014/09/11 06:07:57 Done.
+
resource_provider_ =
ResourceProvider::Create(output_surface_.get(),
shared_bitmap_manager_,

Powered by Google App Engine
This is Rietveld 408576698