| 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_SET_H_ | 5 #ifndef CC_PICTURE_LAYER_TILING_SET_H_ |
| 6 #define CC_PICTURE_LAYER_TILING_SET_H_ | 6 #define CC_PICTURE_LAYER_TILING_SET_H_ |
| 7 | 7 |
| 8 #include "cc/picture_layer_tiling.h" | 8 #include "cc/picture_layer_tiling.h" |
| 9 #include "cc/region.h" | 9 #include "cc/region.h" |
| 10 #include "cc/scoped_ptr_vector.h" | 10 #include "cc/scoped_ptr_vector.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 explicit PictureLayerTilingSet(PictureLayerTilingClient* client); |
| 18 ~PictureLayerTilingSet(); | 18 ~PictureLayerTilingSet(); |
| 19 | 19 |
| 20 void SetClient(PictureLayerTilingClient* client); |
| 21 |
| 20 // Shallow copies all data (except client and bounds from other). | 22 // Shallow copies all data (except client and bounds from other). |
| 21 void CloneAll( | 23 void CloneAll( |
| 22 const PictureLayerTilingSet& other, | 24 const PictureLayerTilingSet& other, |
| 23 const Region& invalidation); | 25 const Region& invalidation); |
| 24 void Clone(const PictureLayerTiling* tiling, const Region& invalidation); | 26 void Clone(const PictureLayerTiling* tiling, const Region& invalidation); |
| 25 | 27 |
| 26 void SetLayerBounds(gfx::Size layer_bounds); | 28 void SetLayerBounds(gfx::Size layer_bounds); |
| 27 gfx::Size LayerBounds() const; | 29 gfx::Size LayerBounds() const; |
| 28 | 30 |
| 29 PictureLayerTiling* AddTiling( | 31 PictureLayerTiling* AddTiling( |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 | 99 |
| 98 Region current_region_; | 100 Region current_region_; |
| 99 Region missing_region_; | 101 Region missing_region_; |
| 100 Region::Iterator region_iter_; | 102 Region::Iterator region_iter_; |
| 101 }; | 103 }; |
| 102 | 104 |
| 103 private: | 105 private: |
| 104 PictureLayerTilingClient* client_; | 106 PictureLayerTilingClient* client_; |
| 105 gfx::Size layer_bounds_; | 107 gfx::Size layer_bounds_; |
| 106 ScopedPtrVector<PictureLayerTiling> tilings_; | 108 ScopedPtrVector<PictureLayerTiling> tilings_; |
| 107 Region invalidation_; | |
| 108 | 109 |
| 109 friend class Iterator; | 110 friend class Iterator; |
| 110 }; | 111 }; |
| 111 | 112 |
| 112 } // namespace cc | 113 } // namespace cc |
| 113 | 114 |
| 114 #endif // CC_PICTURE_LAYER_TILING_SET_H_ | 115 #endif // CC_PICTURE_LAYER_TILING_SET_H_ |
| OLD | NEW |