| 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 PictureLayerTilingSet(PictureLayerTilingClient* client); |
| 18 ~PictureLayerTilingSet(); | 18 ~PictureLayerTilingSet(); |
| 19 | 19 |
| 20 // Shallow copies all data (except client) from other. | 20 // Shallow copies all data (except client) from other. |
| 21 void CloneFrom(const PictureLayerTilingSet& other); | 21 void CloneAll( |
| 22 const PictureLayerTilingSet& other, |
| 23 const Region& invalidation); |
| 24 void Clone(const PictureLayerTiling* tiling, const Region& invalidation); |
| 25 |
| 26 // TODO(enne): Remove this once syncing happens to the pending tree. |
| 27 void Invalidate(const Region& invalidation); |
| 22 | 28 |
| 23 void SetLayerBounds(gfx::Size layer_bounds); | 29 void SetLayerBounds(gfx::Size layer_bounds); |
| 24 gfx::Size LayerBounds() const; | 30 gfx::Size LayerBounds() const; |
| 25 | 31 |
| 26 void Invalidate(const Region& invalidation); | 32 const PictureLayerTiling* AddTiling( |
| 27 | 33 float contents_scale, |
| 28 void AddTiling(float contents_scale, gfx::Size tile_size); | 34 gfx::Size tile_size); |
| 29 size_t num_tilings() const { return tilings_.size(); } | 35 size_t num_tilings() const { return tilings_.size(); } |
| 30 | 36 |
| 31 void Reset(); | 37 void Reset(); |
| 32 | 38 |
| 33 void UpdateTilePriorities(const gfx::Size& device_viewport, | 39 void UpdateTilePriorities(const gfx::Size& device_viewport, |
| 34 float layer_content_scale_x, | 40 float layer_content_scale_x, |
| 35 float layer_content_scale_y, | 41 float layer_content_scale_y, |
| 36 const gfx::Transform& last_screen_transform, | 42 const gfx::Transform& last_screen_transform, |
| 37 const gfx::Transform& current_screen_transform, | 43 const gfx::Transform& current_screen_transform, |
| 38 double time_delta); | 44 double time_delta); |
| (...skipping 30 matching lines...) Expand all Loading... |
| 69 | 75 |
| 70 Region current_region_; | 76 Region current_region_; |
| 71 Region missing_region_; | 77 Region missing_region_; |
| 72 Region::Iterator region_iter_; | 78 Region::Iterator region_iter_; |
| 73 }; | 79 }; |
| 74 | 80 |
| 75 private: | 81 private: |
| 76 PictureLayerTilingClient* client_; | 82 PictureLayerTilingClient* client_; |
| 77 gfx::Size layer_bounds_; | 83 gfx::Size layer_bounds_; |
| 78 ScopedPtrVector<PictureLayerTiling> tilings_; | 84 ScopedPtrVector<PictureLayerTiling> tilings_; |
| 85 Region invalidation_; |
| 79 | 86 |
| 80 friend class Iterator; | 87 friend class Iterator; |
| 81 }; | 88 }; |
| 82 | 89 |
| 83 } // namespace cc | 90 } // namespace cc |
| 84 | 91 |
| 85 #endif // CC_PICTURE_LAYER_TILING_SET_H_ | 92 #endif // CC_PICTURE_LAYER_TILING_SET_H_ |
| OLD | NEW |