| 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 bool HasValidTilePriorities() const override; | 64 bool HasValidTilePriorities() const override; |
| 65 bool RequiresHighResToDraw() const override; | 65 bool RequiresHighResToDraw() const override; |
| 66 gfx::Rect GetEnclosingRectInTargetSpace() const override; | 66 gfx::Rect GetEnclosingRectInTargetSpace() const override; |
| 67 | 67 |
| 68 void set_gpu_raster_max_texture_size(gfx::Size gpu_raster_max_texture_size) { | 68 void set_gpu_raster_max_texture_size(gfx::Size gpu_raster_max_texture_size) { |
| 69 gpu_raster_max_texture_size_ = gpu_raster_max_texture_size; | 69 gpu_raster_max_texture_size_ = gpu_raster_max_texture_size; |
| 70 } | 70 } |
| 71 void UpdateRasterSource(scoped_refptr<DisplayListRasterSource> raster_source, | 71 void UpdateRasterSource(scoped_refptr<DisplayListRasterSource> raster_source, |
| 72 Region* new_invalidation, | 72 Region* new_invalidation, |
| 73 const PictureLayerTilingSet* pending_set); | 73 const PictureLayerTilingSet* pending_set); |
| 74 bool UpdateTiles(bool resourceless_software_draw); | 74 bool UpdateTiles(); |
| 75 void UpdateCanUseLCDTextAfterCommit(); | 75 void UpdateCanUseLCDTextAfterCommit(); |
| 76 bool RasterSourceUsesLCDText() const; | 76 bool RasterSourceUsesLCDText() const; |
| 77 WhichTree GetTree() const; | 77 WhichTree GetTree() const; |
| 78 | 78 |
| 79 // Mask-related functions. | 79 // Mask-related functions. |
| 80 void GetContentsResourceId(ResourceId* resource_id, | 80 void GetContentsResourceId(ResourceId* resource_id, |
| 81 gfx::Size* resource_size) const override; | 81 gfx::Size* resource_size) const override; |
| 82 | 82 |
| 83 void SetNearestNeighbor(bool nearest_neighbor); | 83 void SetNearestNeighbor(bool nearest_neighbor); |
| 84 | 84 |
| (...skipping 64 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 |