OLD | NEW |
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_PICTURE_LAYER_TILING_H_ | 5 #ifndef CC_PICTURE_LAYER_TILING_H_ |
6 #define CC_PICTURE_LAYER_TILING_H_ | 6 #define CC_PICTURE_LAYER_TILING_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/hash_tables.h" | 9 #include "base/hash_tables.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 // regardless of the contents scale of the tiling. | 56 // regardless of the contents scale of the tiling. |
57 gfx::Rect geometry_rect() const; | 57 gfx::Rect geometry_rect() const; |
58 // Texture rect (in texels) for geometry_rect | 58 // Texture rect (in texels) for geometry_rect |
59 gfx::RectF texture_rect() const; | 59 gfx::RectF texture_rect() const; |
60 gfx::Size texture_size() const; | 60 gfx::Size texture_size() const; |
61 | 61 |
62 Tile* operator->() const { return current_tile_; } | 62 Tile* operator->() const { return current_tile_; } |
63 Tile* operator*() const { return current_tile_; } | 63 Tile* operator*() const { return current_tile_; } |
64 | 64 |
65 Iterator& operator++(); | 65 Iterator& operator++(); |
66 operator bool() const { return current_tile_; } | 66 operator bool() const { return tile_j_ <= bottom_; } |
67 | 67 |
68 private: | 68 private: |
69 PictureLayerTiling* tiling_; | 69 PictureLayerTiling* tiling_; |
70 gfx::Rect dest_rect_; | 70 gfx::Rect dest_rect_; |
71 float dest_to_content_scale_; | 71 float dest_to_content_scale_; |
72 | 72 |
73 Tile* current_tile_; | 73 Tile* current_tile_; |
74 gfx::Rect current_geometry_rect_; | 74 gfx::Rect current_geometry_rect_; |
75 int tile_i_; | 75 int tile_i_; |
76 int tile_j_; | 76 int tile_j_; |
(...skipping 29 matching lines...) Expand all Loading... |
106 gfx::Size layer_bounds_; | 106 gfx::Size layer_bounds_; |
107 TileMap tiles_; | 107 TileMap tiles_; |
108 TilingData tiling_data_; | 108 TilingData tiling_data_; |
109 | 109 |
110 friend class Iterator; | 110 friend class Iterator; |
111 }; | 111 }; |
112 | 112 |
113 } // namespace cc | 113 } // namespace cc |
114 | 114 |
115 #endif // CC_PICTURE_LAYER_TILING_H_ | 115 #endif // CC_PICTURE_LAYER_TILING_H_ |
OLD | NEW |