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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 252293003: cc: Make LTHI::NotifyTileInitialized more generic. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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/layers/picture_layer_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_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 3ed0aeebfffe76207ba59d15e1b4c94b33bde6fb..53ef7afc6e5f1b4cd756df5c7eb0071a2e84b125 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -1218,15 +1218,20 @@ void LayerTreeHostImpl::NotifyReadyToActivate() {
}
void LayerTreeHostImpl::NotifyTileInitialized(const Tile* tile) {
- if (!active_tree_)
- return;
+ TRACE_EVENT0("cc", "LayerTreeHostImpl::NotifyTileInitialized");
- LayerImpl* layer_impl =
- active_tree_->FindActiveTreeLayerById(tile->layer_id());
- if (layer_impl) {
- gfx::RectF layer_damage_rect =
- gfx::ScaleRect(tile->content_rect(), 1.f / tile->contents_scale());
- layer_impl->AddDamageRect(layer_damage_rect);
+ if (active_tree_) {
+ LayerImpl* layer_impl =
+ active_tree_->FindActiveTreeLayerById(tile->layer_id());
+ if (layer_impl)
+ layer_impl->NotifyTileInitialized(tile);
+ }
+
+ if (pending_tree_) {
+ LayerImpl* layer_impl =
+ pending_tree_->FindPendingTreeLayerById(tile->layer_id());
+ if (layer_impl)
+ layer_impl->NotifyTileInitialized(tile);
}
}
« no previous file with comments | « cc/layers/picture_layer_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698