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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 913203006: cc: Calculate "can use lcd text" on the compositor thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove tuple to fix Android compile Created 5 years, 10 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.h ('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 4c847ebf871de1f277b09c486441f2595e7b62e0..70dc582ff75dd6c824a41c3a72c9225b20886161 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -307,8 +307,11 @@ void LayerTreeHostImpl::CommitComplete() {
if (settings_.impl_side_painting) {
// Impl-side painting needs an update immediately post-commit to have the
// opportunity to create tilings. Other paths can call UpdateDrawProperties
- // more lazily when needed prior to drawing.
- sync_tree()->UpdateDrawProperties();
+ // more lazily when needed prior to drawing. Because invalidations may
+ // be coming from the main thread, it's safe to do an update for lcd text
+ // at this point and see if lcd text needs to be disabled on any layers.
+ bool update_lcd_text = true;
+ sync_tree()->UpdateDrawProperties(update_lcd_text);
// Start working on newly created tiles immediately if needed.
if (tile_manager_ && tile_priorities_dirty_)
PrepareTiles();
@@ -1046,7 +1049,8 @@ DrawResult LayerTreeHostImpl::PrepareToDraw(FrameData* frame) {
UMA_HISTOGRAM_CUSTOM_COUNTS(
"Compositing.NumActiveLayers", active_tree_->NumLayers(), 1, 400, 20);
- bool ok = active_tree_->UpdateDrawProperties();
+ bool update_lcd_text = false;
+ bool ok = active_tree_->UpdateDrawProperties(update_lcd_text);
DCHECK(ok) << "UpdateDrawProperties failed during draw";
// This will cause NotifyTileStateChanged() to be called for any visible tiles
« no previous file with comments | « cc/trees/layer_tree_host_impl.h ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698