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

Side by Side Diff: cc/picture_layer_tiling_set.cc

Issue 12316084: cc: Consolidate the analysis_canvas operations (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: win warning fix 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
« no previous file with comments | « cc/picture_layer_impl.cc ('k') | cc/picture_pile_impl.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/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_ || !tiling_iter_->IsReadyToDraw())) {
211 missing_region_.Union(tiling_iter_.geometry_rect()); 211 missing_region_.Union(tiling_iter_.geometry_rect());
212 ++tiling_iter_; 212 ++tiling_iter_;
213 } 213 }
214 if (tiling_iter_) 214 if (tiling_iter_)
215 return *this; 215 return *this;
216 216
217 // If the set of current rects for this tiling is done, go to the next 217 // 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. 218 // tiling and set up to iterate through all of the remaining holes.
219 // This will also happen the first time through the loop. 219 // This will also happen the first time through the loop.
220 if (!region_iter_.has_rect()) { 220 if (!region_iter_.has_rect()) {
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 } 301 }
302 302
303 scoped_ptr<base::Value> PictureLayerTilingSet::AsValue() const { 303 scoped_ptr<base::Value> PictureLayerTilingSet::AsValue() const {
304 scoped_ptr<base::ListValue> state(new base::ListValue()); 304 scoped_ptr<base::ListValue> state(new base::ListValue());
305 for (size_t i = 0; i < tilings_.size(); ++i) 305 for (size_t i = 0; i < tilings_.size(); ++i)
306 state->Append(tilings_[i]->AsValue().release()); 306 state->Append(tilings_[i]->AsValue().release());
307 return state.PassAs<base::Value>(); 307 return state.PassAs<base::Value>();
308 } 308 }
309 309
310 } // namespace cc 310 } // namespace cc
OLDNEW
« no previous file with comments | « cc/picture_layer_impl.cc ('k') | cc/picture_pile_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698