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

Side by Side Diff: cc/resources/picture_layer_tiling.h

Issue 295933008: cc: Fix tiling raster tile iterator to handle initializing tiles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: compile fix Created 6 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 | « no previous file | cc/resources/picture_layer_tiling.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 #ifndef CC_RESOURCES_PICTURE_LAYER_TILING_H_ 5 #ifndef CC_RESOURCES_PICTURE_LAYER_TILING_H_
6 #define CC_RESOURCES_PICTURE_LAYER_TILING_H_ 6 #define CC_RESOURCES_PICTURE_LAYER_TILING_H_
7 7
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 }; 44 };
45 45
46 class CC_EXPORT PictureLayerTiling { 46 class CC_EXPORT PictureLayerTiling {
47 public: 47 public:
48 class CC_EXPORT TilingRasterTileIterator { 48 class CC_EXPORT TilingRasterTileIterator {
49 public: 49 public:
50 TilingRasterTileIterator(); 50 TilingRasterTileIterator();
51 TilingRasterTileIterator(PictureLayerTiling* tiling, WhichTree tree); 51 TilingRasterTileIterator(PictureLayerTiling* tiling, WhichTree tree);
52 ~TilingRasterTileIterator(); 52 ~TilingRasterTileIterator();
53 53
54 operator bool() const { 54 operator bool() const { return !!current_tile_; }
55 return current_tile_ && TileNeedsRaster(current_tile_);
56 }
57 Tile* operator*() { return current_tile_; } 55 Tile* operator*() { return current_tile_; }
58 TilePriority::PriorityBin get_type() const { return type_; } 56 TilePriority::PriorityBin get_type() const { return type_; }
59 57
60 TilingRasterTileIterator& operator++(); 58 TilingRasterTileIterator& operator++();
61 59
62 gfx::Rect TileBounds() const { 60 gfx::Rect TileBounds() const {
63 DCHECK(*this); 61 DCHECK(*this);
64 if (type_ == TilePriority::NOW) { 62 if (type_ == TilePriority::NOW) {
65 return tiling_->tiling_data_.TileBounds(visible_iterator_.index_x(), 63 return tiling_->tiling_data_.TileBounds(visible_iterator_.index_x(),
66 visible_iterator_.index_y()); 64 visible_iterator_.index_y());
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 305
308 private: 306 private:
309 DISALLOW_ASSIGN(PictureLayerTiling); 307 DISALLOW_ASSIGN(PictureLayerTiling);
310 308
311 RectExpansionCache expansion_cache_; 309 RectExpansionCache expansion_cache_;
312 }; 310 };
313 311
314 } // namespace cc 312 } // namespace cc
315 313
316 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_H_ 314 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_H_
OLDNEW
« no previous file with comments | « no previous file | cc/resources/picture_layer_tiling.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698