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_LAYERS_PICTURE_LAYER_IMPL_H_ | 5 #ifndef CC_LAYERS_PICTURE_LAYER_IMPL_H_ |
6 #define CC_LAYERS_PICTURE_LAYER_IMPL_H_ | 6 #define CC_LAYERS_PICTURE_LAYER_IMPL_H_ |
7 | 7 |
8 #include "cc/base/scoped_ptr_vector.h" | 8 #include "cc/base/scoped_ptr_vector.h" |
9 #include "cc/layers/layer_impl.h" | 9 #include "cc/layers/layer_impl.h" |
10 #include "cc/resources/picture_layer_tiling.h" | 10 #include "cc/resources/picture_layer_tiling.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 virtual bool AreVisibleResourcesReady() const OVERRIDE; | 68 virtual bool AreVisibleResourcesReady() const OVERRIDE; |
69 | 69 |
70 virtual scoped_ptr<base::Value> AsValue() const OVERRIDE; | 70 virtual scoped_ptr<base::Value> AsValue() const OVERRIDE; |
71 | 71 |
72 protected: | 72 protected: |
73 PictureLayerImpl(LayerTreeImpl* tree_impl, int id); | 73 PictureLayerImpl(LayerTreeImpl* tree_impl, int id); |
74 PictureLayerTiling* AddTiling(float contents_scale); | 74 PictureLayerTiling* AddTiling(float contents_scale); |
75 void RemoveTiling(float contents_scale); | 75 void RemoveTiling(float contents_scale); |
76 void SyncFromActiveLayer(const PictureLayerImpl* other); | 76 void SyncFromActiveLayer(const PictureLayerImpl* other); |
77 void ManageTilings(bool animating_transform_to_screen); | 77 void ManageTilings(bool animating_transform_to_screen); |
| 78 virtual bool ShouldAdjustRasterScale( |
| 79 bool animating_transform_to_screen) const; |
78 virtual void CalculateRasterContentsScale( | 80 virtual void CalculateRasterContentsScale( |
79 bool animating_transform_to_screen, | 81 bool animating_transform_to_screen, |
80 float* raster_contents_scale, | 82 float* raster_contents_scale, |
81 float* low_res_raster_contents_scale); | 83 float* low_res_raster_contents_scale) const; |
82 void CleanUpTilingsOnActiveLayer( | 84 void CleanUpTilingsOnActiveLayer( |
83 std::vector<PictureLayerTiling*> used_tilings); | 85 std::vector<PictureLayerTiling*> used_tilings); |
84 PictureLayerImpl* PendingTwin() const; | 86 PictureLayerImpl* PendingTwin() const; |
85 PictureLayerImpl* ActiveTwin() const; | 87 PictureLayerImpl* ActiveTwin() const; |
86 float MinimumContentsScale() const; | 88 float MinimumContentsScale() const; |
87 void UpdateLCDTextStatus(); | 89 void UpdateLCDTextStatus(); |
88 | 90 |
89 virtual void GetDebugBorderProperties( | 91 virtual void GetDebugBorderProperties( |
90 SkColor* color, float* width) const OVERRIDE; | 92 SkColor* color, float* width) const OVERRIDE; |
91 | 93 |
92 scoped_ptr<PictureLayerTilingSet> tilings_; | 94 scoped_ptr<PictureLayerTilingSet> tilings_; |
93 scoped_refptr<PicturePileImpl> pile_; | 95 scoped_refptr<PicturePileImpl> pile_; |
94 Region invalidation_; | 96 Region invalidation_; |
95 | 97 |
96 gfx::Transform last_screen_space_transform_; | 98 gfx::Transform last_screen_space_transform_; |
97 gfx::Size last_bounds_; | 99 gfx::Size last_bounds_; |
98 float last_content_scale_; | 100 float last_content_scale_; |
99 float ideal_contents_scale_; | |
100 bool is_mask_; | 101 bool is_mask_; |
101 | 102 |
102 float ideal_page_scale_; | 103 float ideal_page_scale_; |
103 float ideal_device_scale_; | 104 float ideal_device_scale_; |
104 float ideal_source_scale_; | 105 float ideal_source_scale_; |
| 106 float ideal_contents_scale_; |
105 | 107 |
106 float raster_page_scale_; | 108 float raster_page_scale_; |
107 float raster_device_scale_; | 109 float raster_device_scale_; |
108 float raster_source_scale_; | 110 float raster_source_scale_; |
| 111 float raster_contents_scale_; |
| 112 float low_res_raster_contents_scale_; |
| 113 |
109 bool raster_source_scale_was_animating_; | 114 bool raster_source_scale_was_animating_; |
110 bool is_using_lcd_text_; | 115 bool is_using_lcd_text_; |
111 | 116 |
112 friend class PictureLayer; | 117 friend class PictureLayer; |
113 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); | 118 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); |
114 }; | 119 }; |
115 | 120 |
116 } | 121 } |
117 | 122 |
118 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ | 123 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ |
OLD | NEW |