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

Side by Side Diff: cc/picture_layer_tiling_set.cc

Issue 12353003: cc: Refactored Tile::GetResourceId (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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
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/picture_layer_tiling_set.h" 5 #include "cc/picture_layer_tiling_set.h"
6 6
7 namespace cc { 7 namespace cc {
8 8
9 namespace { 9 namespace {
10 10
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 bool first_time = current_tiling_ < 0; 200 bool first_time = current_tiling_ < 0;
201 201
202 if (!*this && !first_time) 202 if (!*this && !first_time)
203 return *this; 203 return *this;
204 204
205 if (tiling_iter_) 205 if (tiling_iter_)
206 ++tiling_iter_; 206 ++tiling_iter_;
207 207
208 // Loop until we find a valid place to stop. 208 // Loop until we find a valid place to stop.
209 while (true) { 209 while (true) {
210 while (tiling_iter_ && (!*tiling_iter_ || !tiling_iter_->GetResourceId())) { 210 while (tiling_iter_ && (!*tiling_iter_ ||
211 !tiling_iter_->drawing_info().IsReadyToDraw())) {
211 missing_region_.Union(tiling_iter_.geometry_rect()); 212 missing_region_.Union(tiling_iter_.geometry_rect());
212 ++tiling_iter_; 213 ++tiling_iter_;
213 } 214 }
214 if (tiling_iter_) 215 if (tiling_iter_)
215 return *this; 216 return *this;
216 217
217 // If the set of current rects for this tiling is done, go to the next 218 // If the set of current rects for this tiling is done, go to the next
218 // tiling and set up to iterate through all of the remaining holes. 219 // tiling and set up to iterate through all of the remaining holes.
219 // This will also happen the first time through the loop. 220 // This will also happen the first time through the loop.
220 if (!region_iter_.has_rect()) { 221 if (!region_iter_.has_rect()) {
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 } 302 }
302 303
303 scoped_ptr<base::Value> PictureLayerTilingSet::AsValue() const { 304 scoped_ptr<base::Value> PictureLayerTilingSet::AsValue() const {
304 scoped_ptr<base::ListValue> state(new base::ListValue()); 305 scoped_ptr<base::ListValue> state(new base::ListValue());
305 for (size_t i = 0; i < tilings_.size(); ++i) 306 for (size_t i = 0; i < tilings_.size(); ++i)
306 state->Append(tilings_[i]->AsValue().release()); 307 state->Append(tilings_[i]->AsValue().release());
307 return state.PassAs<base::Value>(); 308 return state.PassAs<base::Value>();
308 } 309 }
309 310
310 } // namespace cc 311 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698