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

Side by Side Diff: cc/resources/picture_pile_impl.cc

Issue 14874004: cc: Inflate invalidation in each picture list (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « cc/resources/picture_pile.cc ('k') | cc/resources/picture_pile_unittest.cc » ('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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 <algorithm> 5 #include <algorithm>
6 #include <limits> 6 #include <limits>
7 7
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "cc/base/region.h" 9 #include "cc/base/region.h"
10 #include "cc/debug/debug_colors.h" 10 #include "cc/debug/debug_colors.h"
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 // pictures on top are not overdrawn by pictures on the bottom. 144 // pictures on top are not overdrawn by pictures on the bottom.
145 for (PictureList::reverse_iterator i = pic_list.rbegin(); 145 for (PictureList::reverse_iterator i = pic_list.rbegin();
146 i != pic_list.rend(); ++i) { 146 i != pic_list.rend(); ++i) {
147 // This is intentionally *enclosed* rect, so that the clip is aligned on 147 // This is intentionally *enclosed* rect, so that the clip is aligned on
148 // integral post-scale content pixels and does not extend past the edges 148 // integral post-scale content pixels and does not extend past the edges
149 // of the picture's layer rect. The min_contents_scale enforces that 149 // of the picture's layer rect. The min_contents_scale enforces that
150 // enough buffer pixels have been added such that the enclosed rect 150 // enough buffer pixels have been added such that the enclosed rect
151 // encompasses all invalidated pixels at any larger scale level. 151 // encompasses all invalidated pixels at any larger scale level.
152 gfx::Rect content_clip = gfx::ToEnclosedRect( 152 gfx::Rect content_clip = gfx::ToEnclosedRect(
153 gfx::ScaleRect((*i)->LayerRect(), contents_scale)); 153 gfx::ScaleRect((*i)->LayerRect(), contents_scale));
154 DCHECK(!content_clip.IsEmpty()); 154 DCHECK(!content_clip.IsEmpty()) <<
155 "Layer rect: " << (*i)->LayerRect().ToString() <<
156 "Contents scale: " << contents_scale;
155 if (!unclipped.Intersects(content_clip)) 157 if (!unclipped.Intersects(content_clip))
156 continue; 158 continue;
157 159
158 base::TimeDelta total_duration = 160 base::TimeDelta total_duration =
159 base::TimeDelta::FromInternalValue(0); 161 base::TimeDelta::FromInternalValue(0);
160 base::TimeDelta best_duration = 162 base::TimeDelta best_duration =
161 base::TimeDelta::FromInternalValue(std::numeric_limits<int64>::max()); 163 base::TimeDelta::FromInternalValue(std::numeric_limits<int64>::max());
162 int repeat_count = std::max(1, slow_down_raster_scale_factor_for_debug_); 164 int repeat_count = std::max(1, slow_down_raster_scale_factor_for_debug_);
163 165
164 for (int j = 0; j < repeat_count; ++j) { 166 for (int j = 0; j < repeat_count; ++j) {
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 layer_rect_, 330 layer_rect_,
329 *picture_list_iterator_); 331 *picture_list_iterator_);
330 if (pixel_ref_iterator_) 332 if (pixel_ref_iterator_)
331 return; 333 return;
332 } 334 }
333 ++tile_iterator_; 335 ++tile_iterator_;
334 } while (AdvanceToTileWithPictures()); 336 } while (AdvanceToTileWithPictures());
335 } 337 }
336 338
337 } // namespace cc 339 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/picture_pile.cc ('k') | cc/resources/picture_pile_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698