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 <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 void UpdateCanUseLCDTextAfterCommit(); | 73 void UpdateCanUseLCDTextAfterCommit(); |
74 bool RasterSourceUsesLCDText() const; | 74 bool RasterSourceUsesLCDText() const; |
75 WhichTree GetTree() const; | 75 WhichTree GetTree() const; |
76 | 76 |
77 // Mask-related functions. | 77 // Mask-related functions. |
78 void GetContentsResourceId(ResourceId* resource_id, | 78 void GetContentsResourceId(ResourceId* resource_id, |
79 gfx::Size* resource_size) const override; | 79 gfx::Size* resource_size) const override; |
80 | 80 |
81 void SetNearestNeighbor(bool nearest_neighbor); | 81 void SetNearestNeighbor(bool nearest_neighbor); |
82 | 82 |
| 83 void SetUseTransformedRasterization(bool use); |
| 84 |
83 size_t GPUMemoryUsageInBytes() const override; | 85 size_t GPUMemoryUsageInBytes() const override; |
84 | 86 |
85 void RunMicroBenchmark(MicroBenchmarkImpl* benchmark) override; | 87 void RunMicroBenchmark(MicroBenchmarkImpl* benchmark) override; |
86 | 88 |
87 bool CanHaveTilings() const; | 89 bool CanHaveTilings() const; |
88 | 90 |
89 PictureLayerTilingSet* picture_layer_tiling_set() { return tilings_.get(); } | 91 PictureLayerTilingSet* picture_layer_tiling_set() { return tilings_.get(); } |
90 | 92 |
91 // Functions used by tile manager. | 93 // Functions used by tile manager. |
92 PictureLayerImpl* GetPendingOrActiveTwinLayer() const; | 94 PictureLayerImpl* GetPendingOrActiveTwinLayer() const; |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 float raster_device_scale_; | 146 float raster_device_scale_; |
145 float raster_source_scale_; | 147 float raster_source_scale_; |
146 float raster_contents_scale_; | 148 float raster_contents_scale_; |
147 float low_res_raster_contents_scale_; | 149 float low_res_raster_contents_scale_; |
148 | 150 |
149 bool was_screen_space_transform_animating_; | 151 bool was_screen_space_transform_animating_; |
150 bool only_used_low_res_last_append_quads_; | 152 bool only_used_low_res_last_append_quads_; |
151 const Layer::LayerMaskType mask_type_; | 153 const Layer::LayerMaskType mask_type_; |
152 | 154 |
153 bool nearest_neighbor_; | 155 bool nearest_neighbor_; |
| 156 bool use_transformed_rasterization_; |
154 bool is_directly_composited_image_; | 157 bool is_directly_composited_image_; |
155 | 158 |
156 // Use this instead of |visible_layer_rect()| for tiling calculations. This | 159 // Use this instead of |visible_layer_rect()| for tiling calculations. This |
157 // takes external viewport and transform for tile priority into account. | 160 // takes external viewport and transform for tile priority into account. |
158 gfx::Rect viewport_rect_for_tile_priority_in_content_space_; | 161 gfx::Rect viewport_rect_for_tile_priority_in_content_space_; |
159 | 162 |
160 gfx::Size gpu_raster_max_texture_size_; | 163 gfx::Size gpu_raster_max_texture_size_; |
161 | 164 |
162 // List of tilings that were used last time we appended quads. This can be | 165 // List of tilings that were used last time we appended quads. This can be |
163 // used as an optimization not to remove tilings if they are still being | 166 // used as an optimization not to remove tilings if they are still being |
164 // drawn. Note that accessing this vector should only be done in the context | 167 // drawn. Note that accessing this vector should only be done in the context |
165 // of comparing pointers, since objects pointed to are not guaranteed to | 168 // of comparing pointers, since objects pointed to are not guaranteed to |
166 // exist. | 169 // exist. |
167 std::vector<PictureLayerTiling*> last_append_quads_tilings_; | 170 std::vector<PictureLayerTiling*> last_append_quads_tilings_; |
168 | 171 |
169 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); | 172 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); |
170 }; | 173 }; |
171 | 174 |
172 } // namespace cc | 175 } // namespace cc |
173 | 176 |
174 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ | 177 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ |
OLD | NEW |