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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 float raster_source_scale_; | 149 float raster_source_scale_; |
150 float raster_contents_scale_; | 150 float raster_contents_scale_; |
151 float low_res_raster_contents_scale_; | 151 float low_res_raster_contents_scale_; |
152 | 152 |
153 bool was_screen_space_transform_animating_; | 153 bool was_screen_space_transform_animating_; |
154 bool only_used_low_res_last_append_quads_; | 154 bool only_used_low_res_last_append_quads_; |
155 const bool is_mask_; | 155 const bool is_mask_; |
156 | 156 |
157 bool nearest_neighbor_; | 157 bool nearest_neighbor_; |
158 | 158 |
159 // Any draw properties derived from |transform|, |viewport|, and |clip| | 159 // Use this instead of |visible_layer_rect()| for tiling calculations. This |
160 // parameters in LayerTreeHostImpl::OnDraw are not valid for prioritizing | 160 // takes external viewport and transform for tile priority into account. |
161 // tiles during resourceless software draws. This is because resourceless | |
162 // software draws can have wildly different transforms/viewports from regular | |
163 // draws. Save a copy of the required draw properties of the last frame that | |
164 // has a valid viewport for prioritizing tiles. | |
165 gfx::Rect visible_rect_for_tile_priority_; | |
166 gfx::Rect viewport_rect_for_tile_priority_in_content_space_; | 161 gfx::Rect viewport_rect_for_tile_priority_in_content_space_; |
167 gfx::Transform screen_space_transform_for_tile_priority_; | |
168 | 162 |
169 gfx::Size gpu_raster_max_texture_size_; | 163 gfx::Size gpu_raster_max_texture_size_; |
170 | 164 |
171 // 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 |
172 // 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 |
173 // 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 |
174 // of comparing pointers, since objects pointed to are not guaranteed to | 168 // of comparing pointers, since objects pointed to are not guaranteed to |
175 // exist. | 169 // exist. |
176 std::vector<PictureLayerTiling*> last_append_quads_tilings_; | 170 std::vector<PictureLayerTiling*> last_append_quads_tilings_; |
177 | 171 |
178 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); | 172 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); |
179 }; | 173 }; |
180 | 174 |
181 } // namespace cc | 175 } // namespace cc |
182 | 176 |
183 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ | 177 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ |
OLD | NEW |