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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 WhichTree GetTree() const override; | 81 WhichTree GetTree() const override; |
82 bool RequiresHighResToDraw() const override; | 82 bool RequiresHighResToDraw() const override; |
83 | 83 |
84 // PushPropertiesTo active tree => pending tree. | 84 // PushPropertiesTo active tree => pending tree. |
85 void SyncTiling(const PictureLayerTiling* tiling); | 85 void SyncTiling(const PictureLayerTiling* tiling); |
86 | 86 |
87 // Mask-related functions. | 87 // Mask-related functions. |
88 void GetContentsResourceId(ResourceProvider::ResourceId* resource_id, | 88 void GetContentsResourceId(ResourceProvider::ResourceId* resource_id, |
89 gfx::Size* resource_size) const override; | 89 gfx::Size* resource_size) const override; |
90 | 90 |
| 91 void SetNearestNeighbor(bool nearest_neighbor); |
| 92 |
91 size_t GPUMemoryUsageInBytes() const override; | 93 size_t GPUMemoryUsageInBytes() const override; |
92 | 94 |
93 void RunMicroBenchmark(MicroBenchmarkImpl* benchmark) override; | 95 void RunMicroBenchmark(MicroBenchmarkImpl* benchmark) override; |
94 | 96 |
95 bool CanHaveTilings() const; | 97 bool CanHaveTilings() const; |
96 | 98 |
97 // Functions used by tile manager. | 99 // Functions used by tile manager. |
98 PictureLayerImpl* GetPendingOrActiveTwinLayer() const; | 100 PictureLayerImpl* GetPendingOrActiveTwinLayer() const; |
99 bool IsOnActiveOrPendingTree() const; | 101 bool IsOnActiveOrPendingTree() const; |
100 // Virtual for testing. | 102 // Virtual for testing. |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 | 170 |
169 bool raster_source_scale_is_fixed_; | 171 bool raster_source_scale_is_fixed_; |
170 bool was_screen_space_transform_animating_; | 172 bool was_screen_space_transform_animating_; |
171 bool needs_post_commit_initialization_; | 173 bool needs_post_commit_initialization_; |
172 // A sanity state check to make sure UpdateTilePriorities only gets called | 174 // A sanity state check to make sure UpdateTilePriorities only gets called |
173 // after a CalculateContentsScale/ManageTilings. | 175 // after a CalculateContentsScale/ManageTilings. |
174 bool should_update_tile_priorities_; | 176 bool should_update_tile_priorities_; |
175 bool only_used_low_res_last_append_quads_; | 177 bool only_used_low_res_last_append_quads_; |
176 const bool is_mask_; | 178 const bool is_mask_; |
177 | 179 |
| 180 bool nearest_neighbor_; |
| 181 |
178 // Any draw properties derived from |transform|, |viewport|, and |clip| | 182 // Any draw properties derived from |transform|, |viewport|, and |clip| |
179 // parameters in LayerTreeHostImpl::SetExternalDrawConstraints are not valid | 183 // parameters in LayerTreeHostImpl::SetExternalDrawConstraints are not valid |
180 // for prioritizing tiles during resourceless software draws. This is because | 184 // for prioritizing tiles during resourceless software draws. This is because |
181 // resourceless software draws can have wildly different transforms/viewports | 185 // resourceless software draws can have wildly different transforms/viewports |
182 // from regular draws. Save a copy of the required draw properties of the last | 186 // from regular draws. Save a copy of the required draw properties of the last |
183 // frame that has a valid viewport for prioritizing tiles. | 187 // frame that has a valid viewport for prioritizing tiles. |
184 gfx::Rect visible_rect_for_tile_priority_; | 188 gfx::Rect visible_rect_for_tile_priority_; |
185 | 189 |
186 friend class PictureLayer; | 190 friend class PictureLayer; |
187 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); | 191 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); |
188 }; | 192 }; |
189 | 193 |
190 } // namespace cc | 194 } // namespace cc |
191 | 195 |
192 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ | 196 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ |
OLD | NEW |