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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 1239843002: cc: Call PrepareTiles when becoming visible in browser only. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile error - size_t infects everything! Created 5 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 | « no previous file | cc/trees/layer_tree_host_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 ee9afe43ec75dd81cd7d6b416e1add1182c2fdf9..84740087d8d2cdf59b20190e768628f070a9f3e6 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -1988,11 +1988,9 @@ void LayerTreeHostImpl::SetVisible(bool visible) {
else
EvictAllUIResources();
- // Call PrepareTiles unconditionally on visibility change since this tab may
- // never get another draw or timer tick. When becoming visible we care about
- // unblocking the scheduler which might be waiting for activation / ready to
- // draw. When becoming invisible we care about evicting tiles immediately.
- PrepareTiles();
+ // PrepareTiles when becoming invisible so that we evict tiles immediately.
+ if (!visible_)
+ PrepareTiles();
if (!renderer_)
return;
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698