| 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 bool RequiresHighResToDraw() const override; | 108 bool RequiresHighResToDraw() const override; |
| 109 | 109 |
| 110 // PushPropertiesTo active tree => pending tree. | 110 // PushPropertiesTo active tree => pending tree. |
| 111 void SyncTiling(const PictureLayerTiling* tiling); | 111 void SyncTiling(const PictureLayerTiling* tiling); |
| 112 | 112 |
| 113 // Mask-related functions. | 113 // Mask-related functions. |
| 114 void GetContentsResourceId(ResourceProvider::ResourceId* resource_id, | 114 void GetContentsResourceId(ResourceProvider::ResourceId* resource_id, |
| 115 gfx::Size* resource_size) const override; | 115 gfx::Size* resource_size) const override; |
| 116 void set_is_mask(bool is_mask) { is_mask_ = is_mask; } | 116 void set_is_mask(bool is_mask) { is_mask_ = is_mask; } |
| 117 | 117 |
| 118 void SetNearestNeighbor(bool nearest_neighbor); |
| 119 |
| 118 size_t GPUMemoryUsageInBytes() const override; | 120 size_t GPUMemoryUsageInBytes() const override; |
| 119 | 121 |
| 120 void RunMicroBenchmark(MicroBenchmarkImpl* benchmark) override; | 122 void RunMicroBenchmark(MicroBenchmarkImpl* benchmark) override; |
| 121 | 123 |
| 122 bool CanHaveTilings() const; | 124 bool CanHaveTilings() const; |
| 123 | 125 |
| 124 // Functions used by tile manager. | 126 // Functions used by tile manager. |
| 125 PictureLayerImpl* GetPendingOrActiveTwinLayer() const; | 127 PictureLayerImpl* GetPendingOrActiveTwinLayer() const; |
| 126 bool IsOnActiveOrPendingTree() const; | 128 bool IsOnActiveOrPendingTree() const; |
| 127 // Virtual for testing. | 129 // Virtual for testing. |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 | 196 |
| 195 bool raster_source_scale_is_fixed_; | 197 bool raster_source_scale_is_fixed_; |
| 196 bool was_screen_space_transform_animating_; | 198 bool was_screen_space_transform_animating_; |
| 197 bool needs_post_commit_initialization_; | 199 bool needs_post_commit_initialization_; |
| 198 // A sanity state check to make sure UpdateTilePriorities only gets called | 200 // A sanity state check to make sure UpdateTilePriorities only gets called |
| 199 // after a CalculateContentsScale/ManageTilings. | 201 // after a CalculateContentsScale/ManageTilings. |
| 200 bool should_update_tile_priorities_; | 202 bool should_update_tile_priorities_; |
| 201 bool only_used_low_res_last_append_quads_; | 203 bool only_used_low_res_last_append_quads_; |
| 202 bool is_mask_; | 204 bool is_mask_; |
| 203 | 205 |
| 206 bool nearest_neighbor_; |
| 207 |
| 204 // Any draw properties derived from |transform|, |viewport|, and |clip| | 208 // Any draw properties derived from |transform|, |viewport|, and |clip| |
| 205 // parameters in LayerTreeHostImpl::SetExternalDrawConstraints are not valid | 209 // parameters in LayerTreeHostImpl::SetExternalDrawConstraints are not valid |
| 206 // for prioritizing tiles during resourceless software draws. This is because | 210 // for prioritizing tiles during resourceless software draws. This is because |
| 207 // resourceless software draws can have wildly different transforms/viewports | 211 // resourceless software draws can have wildly different transforms/viewports |
| 208 // from regular draws. Save a copy of the required draw properties of the last | 212 // from regular draws. Save a copy of the required draw properties of the last |
| 209 // frame that has a valid viewport for prioritizing tiles. | 213 // frame that has a valid viewport for prioritizing tiles. |
| 210 gfx::Rect visible_rect_for_tile_priority_; | 214 gfx::Rect visible_rect_for_tile_priority_; |
| 211 | 215 |
| 212 friend class PictureLayer; | 216 friend class PictureLayer; |
| 213 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); | 217 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); |
| 214 }; | 218 }; |
| 215 | 219 |
| 216 } // namespace cc | 220 } // namespace cc |
| 217 | 221 |
| 218 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ | 222 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ |
| OLD | NEW |