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_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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 return frame_time_in_seconds != last_impl_frame_time_in_seconds_; | 149 return frame_time_in_seconds != last_impl_frame_time_in_seconds_; |
150 } | 150 } |
151 | 151 |
152 scoped_ptr<base::Value> AsValue() const; | 152 scoped_ptr<base::Value> AsValue() const; |
153 | 153 |
154 static gfx::Rect ExpandRectEquallyToAreaBoundedBy( | 154 static gfx::Rect ExpandRectEquallyToAreaBoundedBy( |
155 gfx::Rect starting_rect, | 155 gfx::Rect starting_rect, |
156 int64 target_area, | 156 int64 target_area, |
157 gfx::Rect bounding_rect); | 157 gfx::Rect bounding_rect); |
158 | 158 |
| 159 bool has_ever_been_updated() const { |
| 160 return last_impl_frame_time_in_seconds_ != 0.0; |
| 161 } |
| 162 |
159 protected: | 163 protected: |
160 typedef std::pair<int, int> TileMapKey; | 164 typedef std::pair<int, int> TileMapKey; |
161 typedef base::hash_map<TileMapKey, scoped_refptr<Tile> > TileMap; | 165 typedef base::hash_map<TileMapKey, scoped_refptr<Tile> > TileMap; |
162 | 166 |
163 PictureLayerTiling(float contents_scale, | 167 PictureLayerTiling(float contents_scale, |
164 gfx::Size layer_bounds, | 168 gfx::Size layer_bounds, |
165 PictureLayerTilingClient* client); | 169 PictureLayerTilingClient* client); |
166 void SetLiveTilesRect(gfx::Rect live_tiles_rect); | 170 void SetLiveTilesRect(gfx::Rect live_tiles_rect); |
167 void CreateTile(int i, int j); | 171 void CreateTile(int i, int j); |
168 Tile* TileAt(int, int) const; | 172 Tile* TileAt(int, int) const; |
(...skipping 14 matching lines...) Expand all Loading... |
183 | 187 |
184 friend class CoverageIterator; | 188 friend class CoverageIterator; |
185 | 189 |
186 private: | 190 private: |
187 DISALLOW_ASSIGN(PictureLayerTiling); | 191 DISALLOW_ASSIGN(PictureLayerTiling); |
188 }; | 192 }; |
189 | 193 |
190 } // namespace cc | 194 } // namespace cc |
191 | 195 |
192 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_H_ | 196 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_H_ |
OLD | NEW |