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

Unified Diff: cc/trees/damage_tracker.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 - avoid std::map in TileManager + comments 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
Index: cc/trees/damage_tracker.cc
diff --git a/cc/trees/damage_tracker.cc b/cc/trees/damage_tracker.cc
index 4d0e9353eff098a12f39f88da672c6ded7052b76..3953ab3c36dae7a3378cc727503ced6af024426f 100644
--- a/cc/trees/damage_tracker.cc
+++ b/cc/trees/damage_tracker.cc
@@ -289,6 +289,16 @@ void DamageTracker::ExtendDamageForLayer(LayerImpl* layer,
gfx::RectF(gfx::PointF(), layer->content_bounds()));
data.Update(rect_in_target_space, mailboxId_);
+ // Union layer's update_rect with damage_rect
+ if (!layer->damage_rect().IsEmpty()) {
+ gfx::RectF rect = layer->update_rect();
+ gfx::RectF layer_rect = gfx::ScaleRect(layer->damage_rect(),
+ 1 / layer->contents_scale_x(),
+ 1 / layer->contents_scale_y());
+ layer->SetUpdateRect(gfx::UnionRects(rect, layer_rect));
danakj 2014/04/14 17:17:07 instead of setting the UpdateRect on the layer, ju
sohanjg 2014/04/15 10:03:48 Done.
+ layer->ResetDamageRect();
danakj 2014/04/14 17:17:07 Instead of clearing the damage rect here, you can
sohanjg 2014/04/15 10:03:48 Done.
+ }
+
if (layer_is_new || layer->LayerPropertyChanged()) {
// If a layer is new or has changed, then its entire layer rect affects the
// target surface.

Powered by Google App Engine
This is Rietveld 408576698