| 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 17 matching lines...) Expand all Loading... |
| 28 PictureLayerTiling* tiling, | 28 PictureLayerTiling* tiling, |
| 29 gfx::Rect content_rect) = 0; | 29 gfx::Rect content_rect) = 0; |
| 30 virtual void UpdatePile(Tile* tile) = 0; | 30 virtual void UpdatePile(Tile* tile) = 0; |
| 31 virtual gfx::Size CalculateTileSize( | 31 virtual gfx::Size CalculateTileSize( |
| 32 gfx::Size current_tile_size, | 32 gfx::Size current_tile_size, |
| 33 gfx::Size content_bounds) = 0; | 33 gfx::Size content_bounds) = 0; |
| 34 }; | 34 }; |
| 35 | 35 |
| 36 class CC_EXPORT PictureLayerTiling { | 36 class CC_EXPORT PictureLayerTiling { |
| 37 public: | 37 public: |
| 38 static void SetStoreScrenSpaceQuadsOnTiles(bool); |
| 38 ~PictureLayerTiling(); | 39 ~PictureLayerTiling(); |
| 39 | 40 |
| 40 // Create a tiling with no tiles. CreateTiles must be called to add some. | 41 // Create a tiling with no tiles. CreateTiles must be called to add some. |
| 41 static scoped_ptr<PictureLayerTiling> Create(float contents_scale); | 42 static scoped_ptr<PictureLayerTiling> Create(float contents_scale); |
| 42 scoped_ptr<PictureLayerTiling> Clone() const; | 43 scoped_ptr<PictureLayerTiling> Clone() const; |
| 43 | 44 |
| 44 gfx::Size layer_bounds() const { return layer_bounds_; } | 45 gfx::Size layer_bounds() const { return layer_bounds_; } |
| 45 void SetLayerBounds(gfx::Size layer_bounds); | 46 void SetLayerBounds(gfx::Size layer_bounds); |
| 46 void Invalidate(const Region& layer_invalidation); | 47 void Invalidate(const Region& layer_invalidation); |
| 47 | 48 |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 TileResolution resolution_; | 157 TileResolution resolution_; |
| 157 int last_source_frame_number_; | 158 int last_source_frame_number_; |
| 158 double last_impl_frame_time_; | 159 double last_impl_frame_time_; |
| 159 | 160 |
| 160 friend class Iterator; | 161 friend class Iterator; |
| 161 }; | 162 }; |
| 162 | 163 |
| 163 } // namespace cc | 164 } // namespace cc |
| 164 | 165 |
| 165 #endif // CC_PICTURE_LAYER_TILING_H_ | 166 #endif // CC_PICTURE_LAYER_TILING_H_ |
| OLD | NEW |