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

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

Issue 235753002: cc: Give TilingData a Rect instead of a Size (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Git cl format 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/resources/picture_layer_tiling_unittest.cc ('k') | cc/resources/picture_pile_base.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 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 "cc/resources/picture_pile.h" 5 #include "cc/resources/picture_pile.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 contents_opaque_ = contents_opaque; 158 contents_opaque_ = contents_opaque;
159 contents_fill_bounds_completely_ = contents_fill_bounds_completely; 159 contents_fill_bounds_completely_ = contents_fill_bounds_completely;
160 160
161 gfx::Rect interest_rect = visible_layer_rect; 161 gfx::Rect interest_rect = visible_layer_rect;
162 interest_rect.Inset( 162 interest_rect.Inset(
163 -kPixelDistanceToRecord, 163 -kPixelDistanceToRecord,
164 -kPixelDistanceToRecord, 164 -kPixelDistanceToRecord,
165 -kPixelDistanceToRecord, 165 -kPixelDistanceToRecord,
166 -kPixelDistanceToRecord); 166 -kPixelDistanceToRecord);
167 recorded_viewport_ = interest_rect; 167 recorded_viewport_ = interest_rect;
168 recorded_viewport_.Intersect(gfx::Rect(size())); 168 recorded_viewport_.Intersect(tiling_rect());
169 169
170 bool invalidated = false; 170 bool invalidated = false;
171 for (Region::Iterator i(invalidation); i.has_rect(); i.next()) { 171 for (Region::Iterator i(invalidation); i.has_rect(); i.next()) {
172 gfx::Rect invalidation = i.rect(); 172 gfx::Rect invalidation = i.rect();
173 // Split this inflated invalidation across tile boundaries and apply it 173 // Split this inflated invalidation across tile boundaries and apply it
174 // to all tiles that it touches. 174 // to all tiles that it touches.
175 bool include_borders = true; 175 bool include_borders = true;
176 for (TilingData::Iterator iter(&tiling_, invalidation, include_borders); 176 for (TilingData::Iterator iter(&tiling_, invalidation, include_borders);
177 iter; 177 iter;
178 ++iter) { 178 ++iter) {
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 } 276 }
277 DCHECK(found_tile_for_recorded_picture); 277 DCHECK(found_tile_for_recorded_picture);
278 } 278 }
279 279
280 has_any_recordings_ = true; 280 has_any_recordings_ = true;
281 DCHECK(CanRasterSlowTileCheck(recorded_viewport_)); 281 DCHECK(CanRasterSlowTileCheck(recorded_viewport_));
282 return true; 282 return true;
283 } 283 }
284 284
285 } // namespace cc 285 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/picture_layer_tiling_unittest.cc ('k') | cc/resources/picture_pile_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698