Chromium Code Reviews| 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 27 matching lines...) Expand all Loading... | |
| 38 gfx::Rect) OVERRIDE; | 38 gfx::Rect) OVERRIDE; |
| 39 | 39 |
| 40 // PushPropertiesTo active tree => pending tree | 40 // PushPropertiesTo active tree => pending tree |
| 41 void SyncFromActiveLayer(); | 41 void SyncFromActiveLayer(); |
| 42 void SyncTiling(const PictureLayerTiling* tiling); | 42 void SyncTiling(const PictureLayerTiling* tiling); |
| 43 | 43 |
| 44 // Mask-related functions | 44 // Mask-related functions |
| 45 void SetIsMask(bool is_mask); | 45 void SetIsMask(bool is_mask); |
| 46 virtual ResourceProvider::ResourceId contentsResourceId() const OVERRIDE; | 46 virtual ResourceProvider::ResourceId contentsResourceId() const OVERRIDE; |
| 47 | 47 |
| 48 const PicturePileImpl* pile() const { return pile_.get(); } | |
|
enne (OOO)
2013/01/02 19:35:22
You should just return a clone here so that caller
Leandro GraciĆ” Gil
2013/01/03 20:32:10
Done.
| |
| 49 | |
| 48 protected: | 50 protected: |
| 49 PictureLayerImpl(LayerTreeImpl* treeImpl, int id); | 51 PictureLayerImpl(LayerTreeImpl* treeImpl, int id); |
| 50 void AddTiling(float contents_scale, gfx::Size tile_size); | 52 void AddTiling(float contents_scale, gfx::Size tile_size); |
| 51 void SyncFromActiveLayer(const PictureLayerImpl* other); | 53 void SyncFromActiveLayer(const PictureLayerImpl* other); |
| 52 gfx::Size TileSize() const; | 54 gfx::Size TileSize() const; |
| 53 | 55 |
| 54 PictureLayerTilingSet tilings_; | 56 PictureLayerTilingSet tilings_; |
| 55 scoped_refptr<PicturePileImpl> pile_; | 57 scoped_refptr<PicturePileImpl> pile_; |
| 56 Region invalidation_; | 58 Region invalidation_; |
| 57 | 59 |
| 58 gfx::Transform last_screen_space_transform_; | 60 gfx::Transform last_screen_space_transform_; |
| 59 double last_update_time_; | 61 double last_update_time_; |
| 60 gfx::Size last_bounds_; | 62 gfx::Size last_bounds_; |
| 61 gfx::Size last_content_bounds_; | 63 gfx::Size last_content_bounds_; |
| 62 float last_content_scale_x_; | 64 float last_content_scale_x_; |
| 63 float last_content_scale_y_; | 65 float last_content_scale_y_; |
| 64 bool is_mask_; | 66 bool is_mask_; |
| 65 | 67 |
| 66 friend class PictureLayer; | 68 friend class PictureLayer; |
| 67 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); | 69 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); |
| 68 }; | 70 }; |
| 69 | 71 |
| 70 } | 72 } |
| 71 | 73 |
| 72 #endif // CC_PICTURE_LAYER_IMPL_H_ | 74 #endif // CC_PICTURE_LAYER_IMPL_H_ |
| OLD | NEW |