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_SET_H_ | 5 #ifndef CC_RESOURCES_PICTURE_LAYER_TILING_SET_H_ |
6 #define CC_RESOURCES_PICTURE_LAYER_TILING_SET_H_ | 6 #define CC_RESOURCES_PICTURE_LAYER_TILING_SET_H_ |
7 | 7 |
8 #include "cc/base/region.h" | 8 #include "cc/base/region.h" |
9 #include "cc/base/scoped_ptr_vector.h" | 9 #include "cc/base/scoped_ptr_vector.h" |
10 #include "cc/resources/picture_layer_tiling.h" | 10 #include "cc/resources/picture_layer_tiling.h" |
11 #include "ui/gfx/size.h" | 11 #include "ui/gfx/size.h" |
12 | 12 |
13 namespace cc { | 13 namespace cc { |
14 | 14 |
15 class CC_EXPORT PictureLayerTilingSet { | 15 class CC_EXPORT PictureLayerTilingSet { |
16 public: | 16 public: |
17 PictureLayerTilingSet(PictureLayerTilingClient* client, | 17 PictureLayerTilingSet(PictureLayerTilingClient* client, |
18 const gfx::Size& layer_bounds); | 18 const gfx::Size& layer_bounds); |
19 ~PictureLayerTilingSet(); | 19 ~PictureLayerTilingSet(); |
20 | 20 |
21 void SetClient(PictureLayerTilingClient* client); | 21 void SetClient(PictureLayerTilingClient* client); |
22 const PictureLayerTilingClient* client() const { return client_; } | 22 const PictureLayerTilingClient* client() const { return client_; } |
23 | 23 |
| 24 void RemoveTilesInRegion(const Region& region); |
| 25 |
24 // Make this set of tilings match the same set of content scales from |other|. | 26 // Make this set of tilings match the same set of content scales from |other|. |
25 // Delete any tilings that don't meet |minimum_contents_scale|. Recreate | 27 // Delete any tilings that don't meet |minimum_contents_scale|. Recreate |
26 // any tiles that intersect |layer_invalidation|. Update the size of all | 28 // any tiles that intersect |layer_invalidation|. Update the size of all |
27 // tilings to |new_layer_bounds|. | 29 // tilings to |new_layer_bounds|. |
28 // Returns true if we had at least one high res tiling synced. | 30 // Returns true if we had at least one high res tiling synced. |
29 bool SyncTilings(const PictureLayerTilingSet& other, | 31 bool SyncTilings(const PictureLayerTilingSet& other, |
30 const gfx::Size& new_layer_bounds, | 32 const gfx::Size& new_layer_bounds, |
31 const Region& layer_invalidation, | 33 const Region& layer_invalidation, |
32 float minimum_contents_scale); | 34 float minimum_contents_scale); |
33 | 35 |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 gfx::Size layer_bounds_; | 109 gfx::Size layer_bounds_; |
108 ScopedPtrVector<PictureLayerTiling> tilings_; | 110 ScopedPtrVector<PictureLayerTiling> tilings_; |
109 | 111 |
110 friend class Iterator; | 112 friend class Iterator; |
111 DISALLOW_COPY_AND_ASSIGN(PictureLayerTilingSet); | 113 DISALLOW_COPY_AND_ASSIGN(PictureLayerTilingSet); |
112 }; | 114 }; |
113 | 115 |
114 } // namespace cc | 116 } // namespace cc |
115 | 117 |
116 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_SET_H_ | 118 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_SET_H_ |
OLD | NEW |