| Index: cc/trees/damage_tracker.cc
|
| diff --git a/cc/trees/damage_tracker.cc b/cc/trees/damage_tracker.cc
|
| index 6a8891bf5af14e69c61f471ddb626ad44c6659a0..c56133a88658d3723068932e528c69e8047f0242 100644
|
| --- a/cc/trees/damage_tracker.cc
|
| +++ b/cc/trees/damage_tracker.cc
|
| @@ -280,8 +280,13 @@ void DamageTracker::ExtendDamageForLayer(LayerImpl* layer,
|
| RectMapData& data = RectDataForLayer(layer->id(), &layer_is_new);
|
| gfx::Rect old_rect_in_target_space = data.rect_;
|
|
|
| + if (!layer_is_new && data.is_render_surface_) {
|
| + // This was a render surface in the previous frame. Since the surface is now
|
| + // removed, we need to add it the damage rect.
|
| + target_damage_rect->Union(data.rect_);
|
| + }
|
| gfx::Rect rect_in_target_space = layer->GetEnclosingRectInTargetSpace();
|
| - data.Update(rect_in_target_space, mailboxId_);
|
| + data.Update(rect_in_target_space, mailboxId_, false /*is_render_surface*/);
|
|
|
| if (layer_is_new || layer->LayerPropertyChanged()) {
|
| // If a layer is new or has changed, then its entire layer rect affects the
|
| @@ -333,7 +338,8 @@ void DamageTracker::ExtendDamageForRenderSurface(
|
| // The drawableContextRect() already includes the replica if it exists.
|
| gfx::Rect surface_rect_in_target_space =
|
| gfx::ToEnclosingRect(render_surface->DrawableContentRect());
|
| - data.Update(surface_rect_in_target_space, mailboxId_);
|
| + data.Update(surface_rect_in_target_space, mailboxId_,
|
| + true /*is_render_surface*/);
|
|
|
| if (surface_is_new || render_surface->SurfacePropertyChanged()) {
|
| // The entire surface contributes damage.
|
| @@ -376,7 +382,8 @@ void DamageTracker::ExtendDamageForRenderSurface(
|
| render_surface->replica_draw_transform();
|
| gfx::Rect replica_mask_layer_rect = MathUtil::MapEnclosingClippedRect(
|
| replica_draw_transform, gfx::Rect(replica_mask_layer->bounds()));
|
| - data.Update(replica_mask_layer_rect, mailboxId_);
|
| + data.Update(replica_mask_layer_rect, mailboxId_,
|
| + false /*is_render_surface*/);
|
|
|
| // In the current implementation, a change in the replica mask damages the
|
| // entire replica region.
|
|
|