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