| 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 <set> | 8 #include <set> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 // Create a tiling with no tiles. CreateTiles must be called to add some. | 123 // Create a tiling with no tiles. CreateTiles must be called to add some. |
| 124 static scoped_ptr<PictureLayerTiling> Create( | 124 static scoped_ptr<PictureLayerTiling> Create( |
| 125 float contents_scale, | 125 float contents_scale, |
| 126 const gfx::Size& layer_bounds, | 126 const gfx::Size& layer_bounds, |
| 127 PictureLayerTilingClient* client); | 127 PictureLayerTilingClient* client); |
| 128 gfx::Size layer_bounds() const { return layer_bounds_; } | 128 gfx::Size layer_bounds() const { return layer_bounds_; } |
| 129 void UpdateTilesToCurrentRasterSource(RasterSource* raster_source, | 129 void UpdateTilesToCurrentRasterSource(RasterSource* raster_source, |
| 130 const Region& layer_invalidation, | 130 const Region& layer_invalidation, |
| 131 const gfx::Size& new_layer_bounds); | 131 const gfx::Size& new_layer_bounds); |
| 132 void CreateMissingTilesInLiveTilesRect(); | 132 void CreateMissingTilesInLiveTilesRect(); |
| 133 void RemoveTilesInRegion(const Region& layer_region); | |
| 134 | 133 |
| 135 void SetClient(PictureLayerTilingClient* client); | 134 void CreateSharedTilesFromPending(const PictureLayerTiling& other); |
| 135 |
| 136 void set_resolution(TileResolution resolution) { resolution_ = resolution; } | 136 void set_resolution(TileResolution resolution) { resolution_ = resolution; } |
| 137 TileResolution resolution() const { return resolution_; } | 137 TileResolution resolution() const { return resolution_; } |
| 138 void set_can_require_tiles_for_activation(bool can_require_tiles) { | 138 void set_can_require_tiles_for_activation(bool can_require_tiles) { |
| 139 can_require_tiles_for_activation_ = can_require_tiles; | 139 can_require_tiles_for_activation_ = can_require_tiles; |
| 140 } | 140 } |
| 141 | 141 |
| 142 gfx::Size tiling_size() const { return tiling_data_.tiling_size(); } | 142 gfx::Size tiling_size() const { return tiling_data_.tiling_size(); } |
| 143 gfx::Rect live_tiles_rect() const { return live_tiles_rect_; } | 143 gfx::Rect live_tiles_rect() const { return live_tiles_rect_; } |
| 144 gfx::Size tile_size() const { return tiling_data_.max_texture_size(); } | 144 gfx::Size tile_size() const { return tiling_data_.max_texture_size(); } |
| 145 float contents_scale() const { return contents_scale_; } | 145 float contents_scale() const { return contents_scale_; } |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 | 362 |
| 363 private: | 363 private: |
| 364 DISALLOW_ASSIGN(PictureLayerTiling); | 364 DISALLOW_ASSIGN(PictureLayerTiling); |
| 365 | 365 |
| 366 RectExpansionCache expansion_cache_; | 366 RectExpansionCache expansion_cache_; |
| 367 }; | 367 }; |
| 368 | 368 |
| 369 } // namespace cc | 369 } // namespace cc |
| 370 | 370 |
| 371 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_H_ | 371 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_H_ |
| OLD | NEW |