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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 public: | 43 public: |
44 ~PictureLayerTiling(); | 44 ~PictureLayerTiling(); |
45 | 45 |
46 // Create a tiling with no tiles. CreateTiles must be called to add some. | 46 // Create a tiling with no tiles. CreateTiles must be called to add some. |
47 static scoped_ptr<PictureLayerTiling> Create(float contents_scale); | 47 static scoped_ptr<PictureLayerTiling> Create(float contents_scale); |
48 scoped_ptr<PictureLayerTiling> Clone() const; | 48 scoped_ptr<PictureLayerTiling> Clone() const; |
49 | 49 |
50 gfx::Size layer_bounds() const { return layer_bounds_; } | 50 gfx::Size layer_bounds() const { return layer_bounds_; } |
51 void SetLayerBounds(gfx::Size layer_bounds); | 51 void SetLayerBounds(gfx::Size layer_bounds); |
52 void Invalidate(const Region& layer_invalidation); | 52 void Invalidate(const Region& layer_invalidation); |
| 53 void InvalidateTilesWithText(); |
53 | 54 |
54 // Add any tiles that intersect with |layer_rect|. If any tiles already | 55 // Add any tiles that intersect with |layer_rect|. If any tiles already |
55 // exist, then this leaves them as-is. | 56 // exist, then this leaves them as-is. |
56 void CreateTilesFromLayerRect(gfx::Rect layer_rect); | 57 void CreateTilesFromLayerRect(gfx::Rect layer_rect); |
57 | 58 |
58 void SetClient(PictureLayerTilingClient* client); | 59 void SetClient(PictureLayerTilingClient* client); |
59 void set_resolution(TileResolution resolution) { resolution_ = resolution; } | 60 void set_resolution(TileResolution resolution) { resolution_ = resolution; } |
60 TileResolution resolution() const { return resolution_; } | 61 TileResolution resolution() const { return resolution_; } |
61 | 62 |
62 gfx::Rect ContentRect() const; | 63 gfx::Rect ContentRect() const; |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 | 171 |
171 friend class CoverageIterator; | 172 friend class CoverageIterator; |
172 | 173 |
173 private: | 174 private: |
174 DISALLOW_ASSIGN(PictureLayerTiling); | 175 DISALLOW_ASSIGN(PictureLayerTiling); |
175 }; | 176 }; |
176 | 177 |
177 } // namespace cc | 178 } // namespace cc |
178 | 179 |
179 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_H_ | 180 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_H_ |
OLD | NEW |