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 11 matching lines...) Expand all Loading... |
22 public PictureLayerTilingClient { | 22 public PictureLayerTilingClient { |
23 public: | 23 public: |
24 static scoped_ptr<PictureLayerImpl> create(LayerTreeImpl* treeImpl, int id) | 24 static scoped_ptr<PictureLayerImpl> create(LayerTreeImpl* treeImpl, int id) |
25 { | 25 { |
26 return make_scoped_ptr(new PictureLayerImpl(treeImpl, id)); | 26 return make_scoped_ptr(new PictureLayerImpl(treeImpl, id)); |
27 } | 27 } |
28 virtual ~PictureLayerImpl(); | 28 virtual ~PictureLayerImpl(); |
29 | 29 |
30 // LayerImpl overrides. | 30 // LayerImpl overrides. |
31 virtual const char* layerTypeAsString() const OVERRIDE; | 31 virtual const char* layerTypeAsString() const OVERRIDE; |
| 32 virtual scoped_ptr<LayerImpl> createLayerImpl( |
| 33 LayerTreeImpl* treeImpl) OVERRIDE; |
| 34 virtual void pushPropertiesTo(LayerImpl* layer) OVERRIDE; |
32 virtual void appendQuads(QuadSink&, AppendQuadsData&) OVERRIDE; | 35 virtual void appendQuads(QuadSink&, AppendQuadsData&) OVERRIDE; |
33 virtual void dumpLayerProperties(std::string*, int indent) const OVERRIDE; | 36 virtual void dumpLayerProperties(std::string*, int indent) const OVERRIDE; |
34 virtual void didUpdateTransforms() OVERRIDE; | 37 virtual void didUpdateTransforms() OVERRIDE; |
35 virtual void didBecomeActive() OVERRIDE; | 38 virtual void didBecomeActive() OVERRIDE; |
36 virtual void didLoseOutputSurface() OVERRIDE; | 39 virtual void didLoseOutputSurface() OVERRIDE; |
37 virtual void calculateContentsScale( | 40 virtual void calculateContentsScale( |
38 float ideal_contents_scale, | 41 float ideal_contents_scale, |
39 float* contents_scale_x, | 42 float* contents_scale_x, |
40 float* contents_scale_y, | 43 float* contents_scale_y, |
41 gfx::Size* content_bounds) OVERRIDE; | 44 gfx::Size* content_bounds) OVERRIDE; |
(...skipping 14 matching lines...) Expand all Loading... |
56 virtual bool areVisibleResourcesReady() const OVERRIDE; | 59 virtual bool areVisibleResourcesReady() const OVERRIDE; |
57 | 60 |
58 protected: | 61 protected: |
59 PictureLayerImpl(LayerTreeImpl* treeImpl, int id); | 62 PictureLayerImpl(LayerTreeImpl* treeImpl, int id); |
60 PictureLayerTiling* AddTiling(float contents_scale); | 63 PictureLayerTiling* AddTiling(float contents_scale); |
61 void SyncFromActiveLayer(const PictureLayerImpl* other); | 64 void SyncFromActiveLayer(const PictureLayerImpl* other); |
62 gfx::Size TileSize() const; | 65 gfx::Size TileSize() const; |
63 void ManageTilings(float ideal_contents_scale); | 66 void ManageTilings(float ideal_contents_scale); |
64 void CleanUpUnusedTilings(std::vector<PictureLayerTiling*> used_tilings); | 67 void CleanUpUnusedTilings(std::vector<PictureLayerTiling*> used_tilings); |
65 | 68 |
66 PictureLayerTilingSet tilings_; | 69 scoped_ptr<PictureLayerTilingSet> tilings_; |
67 scoped_refptr<PicturePileImpl> pile_; | 70 scoped_refptr<PicturePileImpl> pile_; |
68 Region invalidation_; | 71 Region invalidation_; |
69 | 72 |
70 gfx::Transform last_screen_space_transform_; | 73 gfx::Transform last_screen_space_transform_; |
71 double last_update_time_; | 74 double last_update_time_; |
72 gfx::Size last_bounds_; | 75 gfx::Size last_bounds_; |
73 gfx::Size last_content_bounds_; | 76 gfx::Size last_content_bounds_; |
74 float last_content_scale_; | 77 float last_content_scale_; |
75 float ideal_contents_scale_; | 78 float ideal_contents_scale_; |
76 bool is_mask_; | 79 bool is_mask_; |
77 | 80 |
78 friend class PictureLayer; | 81 friend class PictureLayer; |
79 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); | 82 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); |
80 }; | 83 }; |
81 | 84 |
82 } | 85 } |
83 | 86 |
84 #endif // CC_PICTURE_LAYER_IMPL_H_ | 87 #endif // CC_PICTURE_LAYER_IMPL_H_ |
OLD | NEW |