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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 219963005: cc: Add support for partial swaps when using impl-side painting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: WIP - comments + nits 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
« cc/trees/damage_tracker.cc ('K') | « cc/trees/layer_tree_host_impl.h ('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 4a945a224384de89251c3b1d7a2b888f932c4999..fb6926e40367822690141eaaa15d19a50315065d 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -1212,9 +1212,6 @@ void LayerTreeHostImpl::DidModifyTilePriorities() {
}
void LayerTreeHostImpl::DidInitializeVisibleTile() {
- // TODO(reveman): Determine tiles that changed and only damage
- // what's necessary.
- SetFullRootLayerDamage();
if (client_ && !client_->IsInsideDraw())
client_->DidInitializeVisibleTileOnImplThread();
}
@@ -1223,6 +1220,19 @@ void LayerTreeHostImpl::NotifyReadyToActivate() {
client_->NotifyReadyToActivate();
}
+void LayerTreeHostImpl::NotifyTileInitialized(const Tile* tile) {
+ if (!active_tree_)
+ return;
+
+ LayerImpl* layer_impl =
+ active_tree_->FindActiveTreeLayerById(tile->layer_id());
+ if (layer_impl) {
+ gfx::RectF tile_in_layer_content_rect =
reveman 2014/04/15 16:25:59 is this supposed to be tile_content_rect_in_layer_
enne (OOO) 2014/04/15 17:27:27 I think this should just be called layer_rect or l
+ gfx::ScaleRect(tile->content_rect(), 1 / tile->contents_scale());
enne (OOO) 2014/04/15 17:27:27 nit: 1 => 1.f
+ layer_impl->UnionDamageContentRect(tile_in_layer_content_rect);
enne (OOO) 2014/04/15 17:27:27 This function seems misnamed. It should be UnionD
+ }
+}
+
void LayerTreeHostImpl::SetMemoryPolicy(const ManagedMemoryPolicy& policy) {
SetManagedMemoryPolicy(policy, zero_budget_);
}
« cc/trees/damage_tracker.cc ('K') | « cc/trees/layer_tree_host_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698