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_IMPL_H_ | 5 #ifndef CC_PICTURE_LAYER_IMPL_H_ |
6 #define CC_PICTURE_LAYER_IMPL_H_ | 6 #define CC_PICTURE_LAYER_IMPL_H_ |
7 | 7 |
8 #include "cc/layer_impl.h" | 8 #include "cc/layer_impl.h" |
9 #include "cc/picture_layer_tiling.h" | 9 #include "cc/picture_layer_tiling.h" |
10 #include "cc/picture_layer_tiling_set.h" | 10 #include "cc/picture_layer_tiling_set.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 // PushPropertiesTo active tree => pending tree | 46 // PushPropertiesTo active tree => pending tree |
47 void SyncFromActiveLayer(); | 47 void SyncFromActiveLayer(); |
48 void SyncTiling(const PictureLayerTiling* tiling); | 48 void SyncTiling(const PictureLayerTiling* tiling); |
49 | 49 |
50 // Mask-related functions | 50 // Mask-related functions |
51 void SetIsMask(bool is_mask); | 51 void SetIsMask(bool is_mask); |
52 virtual ResourceProvider::ResourceId contentsResourceId() const OVERRIDE; | 52 virtual ResourceProvider::ResourceId contentsResourceId() const OVERRIDE; |
53 | 53 |
54 protected: | 54 protected: |
55 PictureLayerImpl(LayerTreeImpl* treeImpl, int id); | 55 PictureLayerImpl(LayerTreeImpl* treeImpl, int id); |
56 void AddTiling(float contents_scale, gfx::Size tile_size); | 56 PictureLayerTiling* AddTiling(float contents_scale); |
57 void SyncFromActiveLayer(const PictureLayerImpl* other); | 57 void SyncFromActiveLayer(const PictureLayerImpl* other); |
58 gfx::Size TileSize() const; | 58 gfx::Size TileSize() const; |
59 void ManageTilings(float ideal_contents_scale); | 59 void ManageTilings(float ideal_contents_scale); |
| 60 void CleanUpUnusedTilings(std::vector<PictureLayerTiling*> used_tilings); |
60 | 61 |
61 PictureLayerTilingSet tilings_; | 62 PictureLayerTilingSet tilings_; |
62 scoped_refptr<PicturePileImpl> pile_; | 63 scoped_refptr<PicturePileImpl> pile_; |
63 Region invalidation_; | 64 Region invalidation_; |
64 | 65 |
65 gfx::Transform last_screen_space_transform_; | 66 gfx::Transform last_screen_space_transform_; |
66 double last_update_time_; | 67 double last_update_time_; |
67 gfx::Size last_bounds_; | 68 gfx::Size last_bounds_; |
68 gfx::Size last_content_bounds_; | 69 gfx::Size last_content_bounds_; |
69 float last_content_scale_x_; | 70 float last_content_scale_; |
70 float last_content_scale_y_; | 71 float ideal_contents_scale_; |
71 bool is_mask_; | 72 bool is_mask_; |
72 | 73 |
73 friend class PictureLayer; | 74 friend class PictureLayer; |
74 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); | 75 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); |
75 }; | 76 }; |
76 | 77 |
77 } | 78 } |
78 | 79 |
79 #endif // CC_PICTURE_LAYER_IMPL_H_ | 80 #endif // CC_PICTURE_LAYER_IMPL_H_ |
OLD | NEW |