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 <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
69 gfx::Size CalculateTileSize(const gfx::Size& content_bounds) const override; | 69 gfx::Size CalculateTileSize(const gfx::Size& content_bounds) const override; |
70 const Region* GetPendingInvalidation() override; | 70 const Region* GetPendingInvalidation() override; |
71 const PictureLayerTiling* GetPendingOrActiveTwinTiling( | 71 const PictureLayerTiling* GetPendingOrActiveTwinTiling( |
72 const PictureLayerTiling* tiling) const override; | 72 const PictureLayerTiling* tiling) const override; |
73 PictureLayerTiling* GetRecycledTwinTiling( | 73 PictureLayerTiling* GetRecycledTwinTiling( |
74 const PictureLayerTiling* tiling) override; | 74 const PictureLayerTiling* tiling) override; |
75 TilePriority::PriorityBin GetMaxTilePriorityBin() const override; | 75 TilePriority::PriorityBin GetMaxTilePriorityBin() const override; |
76 WhichTree GetTree() const override; | 76 WhichTree GetTree() const override; |
77 bool RequiresHighResToDraw() const override; | 77 bool RequiresHighResToDraw() const override; |
78 | 78 |
79 void set_gpu_raster_max_texture_size(gfx::Size gpu_raster_max_texture_size) { | |
80 gpu_raster_max_texture_size_ = gpu_raster_max_texture_size; | |
vmpstr
2015/03/19 23:31:51
Do we need a SetNeedsPushProperties with this?
hendrikw
2015/03/19 23:34:33
No, the only time we need a push with this is when
enne (OOO)
2015/03/20 22:18:40
Sorry, so this is intentional that viewport size m
| |
81 } | |
79 void UpdateRasterSource(scoped_refptr<RasterSource> raster_source, | 82 void UpdateRasterSource(scoped_refptr<RasterSource> raster_source, |
80 Region* new_invalidation, | 83 Region* new_invalidation, |
81 const PictureLayerTilingSet* pending_set); | 84 const PictureLayerTilingSet* pending_set); |
82 bool UpdateTiles(bool resourceless_software_draw); | 85 bool UpdateTiles(bool resourceless_software_draw); |
83 void UpdateCanUseLCDTextAfterCommit(); | 86 void UpdateCanUseLCDTextAfterCommit(); |
84 bool RasterSourceUsesLCDText() const; | 87 bool RasterSourceUsesLCDText() const; |
85 | 88 |
86 // Mask-related functions. | 89 // Mask-related functions. |
87 void GetContentsResourceId(ResourceProvider::ResourceId* resource_id, | 90 void GetContentsResourceId(ResourceProvider::ResourceId* resource_id, |
88 gfx::Size* resource_size) const override; | 91 gfx::Size* resource_size) const override; |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
164 | 167 |
165 // Any draw properties derived from |transform|, |viewport|, and |clip| | 168 // Any draw properties derived from |transform|, |viewport|, and |clip| |
166 // parameters in LayerTreeHostImpl::SetExternalDrawConstraints are not valid | 169 // parameters in LayerTreeHostImpl::SetExternalDrawConstraints are not valid |
167 // for prioritizing tiles during resourceless software draws. This is because | 170 // for prioritizing tiles during resourceless software draws. This is because |
168 // resourceless software draws can have wildly different transforms/viewports | 171 // resourceless software draws can have wildly different transforms/viewports |
169 // from regular draws. Save a copy of the required draw properties of the last | 172 // from regular draws. Save a copy of the required draw properties of the last |
170 // frame that has a valid viewport for prioritizing tiles. | 173 // frame that has a valid viewport for prioritizing tiles. |
171 gfx::Rect visible_rect_for_tile_priority_; | 174 gfx::Rect visible_rect_for_tile_priority_; |
172 gfx::Rect viewport_rect_for_tile_priority_in_content_space_; | 175 gfx::Rect viewport_rect_for_tile_priority_in_content_space_; |
173 | 176 |
177 gfx::Size gpu_raster_max_texture_size_; | |
178 | |
174 // List of tilings that were used last time we appended quads. This can be | 179 // List of tilings that were used last time we appended quads. This can be |
175 // used as an optimization not to remove tilings if they are still being | 180 // used as an optimization not to remove tilings if they are still being |
176 // drawn. Note that accessing this vector should only be done in the context | 181 // drawn. Note that accessing this vector should only be done in the context |
177 // of comparing pointers, since objects pointed to are not guaranteed to | 182 // of comparing pointers, since objects pointed to are not guaranteed to |
178 // exist. | 183 // exist. |
179 std::vector<PictureLayerTiling*> last_append_quads_tilings_; | 184 std::vector<PictureLayerTiling*> last_append_quads_tilings_; |
180 | 185 |
181 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); | 186 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); |
182 }; | 187 }; |
183 | 188 |
184 } // namespace cc | 189 } // namespace cc |
185 | 190 |
186 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ | 191 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ |
OLD | NEW |