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

Side by Side Diff: cc/trees/damage_tracker.cc

Issue 2751783002: cc: Replace LayerIterator with iterator that walks layer list and effect tree (Closed)
Patch Set: Rebase Created 3 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 unified diff | Download patch
« no previous file with comments | « cc/layers/render_surface_impl.cc ('k') | cc/trees/debug_rect_history.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/trees/damage_tracker.h" 5 #include "cc/trees/damage_tracker.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 } else { 121 } else {
122 // TODO(shawnsingh): can we clamp this damage to the surface's content rect? 122 // TODO(shawnsingh): can we clamp this damage to the surface's content rect?
123 // (affects performance, but not correctness) 123 // (affects performance, but not correctness)
124 damage_for_this_update.Union(damage_from_active_layers); 124 damage_for_this_update.Union(damage_from_active_layers);
125 damage_for_this_update.Union(damage_from_surface_mask); 125 damage_for_this_update.Union(damage_from_surface_mask);
126 damage_for_this_update.Union(damage_from_leftover_rects); 126 damage_for_this_update.Union(damage_from_leftover_rects);
127 127
128 gfx::Rect damage_rect; 128 gfx::Rect damage_rect;
129 bool is_rect_valid = damage_for_this_update.GetAsRect(&damage_rect); 129 bool is_rect_valid = damage_for_this_update.GetAsRect(&damage_rect);
130 if (is_rect_valid) { 130 if (is_rect_valid) {
131 damage_rect = filters.MapRect( 131 damage_rect =
132 damage_rect, target_surface->FiltersTransform().matrix()); 132 filters.MapRect(damage_rect, target_surface->SurfaceScale().matrix());
133 damage_for_this_update = DamageAccumulator(); 133 damage_for_this_update = DamageAccumulator();
134 damage_for_this_update.Union(damage_rect); 134 damage_for_this_update.Union(damage_rect);
135 } 135 }
136 } 136 }
137 137
138 // Damage accumulates until we are notified that we actually did draw on that 138 // Damage accumulates until we are notified that we actually did draw on that
139 // frame. 139 // frame.
140 current_damage_.Union(damage_for_this_update); 140 current_damage_.Union(damage_for_this_update);
141 } 141 }
142 142
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 } 439 }
440 440
441 rect->set_x(x_); 441 rect->set_x(x_);
442 rect->set_y(y_); 442 rect->set_y(y_);
443 rect->set_width(width.ValueOrDie()); 443 rect->set_width(width.ValueOrDie());
444 rect->set_height(height.ValueOrDie()); 444 rect->set_height(height.ValueOrDie());
445 return true; 445 return true;
446 } 446 }
447 447
448 } // namespace cc 448 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/render_surface_impl.cc ('k') | cc/trees/debug_rect_history.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698