| 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 void RemoveAllTilings(); | 112 void RemoveAllTilings(); |
| 113 void AddTilingsForRasterScale(); | 113 void AddTilingsForRasterScale(); |
| 114 bool UpdateTilePriorities(const Occlusion& occlusion_in_content_space); | 114 bool UpdateTilePriorities(const Occlusion& occlusion_in_content_space); |
| 115 virtual bool ShouldAdjustRasterScale() const; | 115 virtual bool ShouldAdjustRasterScale() const; |
| 116 virtual void RecalculateRasterScales(); | 116 virtual void RecalculateRasterScales(); |
| 117 void CleanUpTilingsOnActiveLayer( | 117 void CleanUpTilingsOnActiveLayer( |
| 118 std::vector<PictureLayerTiling*> used_tilings); | 118 std::vector<PictureLayerTiling*> used_tilings); |
| 119 float MinimumContentsScale() const; | 119 float MinimumContentsScale() const; |
| 120 float MaximumContentsScale() const; | 120 float MaximumContentsScale() const; |
| 121 void ResetRasterScale(); | 121 void ResetRasterScale(); |
| 122 gfx::Rect GetViewportForTilePriorityInContentSpace() const; | 122 void UpdateViewportRectForTilePriorityInContentSpace(); |
| 123 PictureLayerImpl* GetRecycledTwinLayer() const; | 123 PictureLayerImpl* GetRecycledTwinLayer() const; |
| 124 | 124 |
| 125 void SanityCheckTilingState() const; | 125 void SanityCheckTilingState() const; |
| 126 // Checks if all tiles required for a certain action (e.g. activation) are | 126 // Checks if all tiles required for a certain action (e.g. activation) are |
| 127 // ready to draw. is_tile_required_callback gets called on all candidate | 127 // ready to draw. is_tile_required_callback gets called on all candidate |
| 128 // tiles and returns true if the tile is required for the action. | 128 // tiles and returns true if the tile is required for the action. |
| 129 bool AllTilesRequiredAreReadyToDraw( | 129 bool AllTilesRequiredAreReadyToDraw( |
| 130 TileRequirementCheck is_tile_required_callback) const; | 130 TileRequirementCheck is_tile_required_callback) const; |
| 131 | 131 |
| 132 bool ShouldAdjustRasterScaleDuringScaleAnimations() const; | 132 bool ShouldAdjustRasterScaleDuringScaleAnimations() const; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 | 166 |
| 167 bool nearest_neighbor_; | 167 bool nearest_neighbor_; |
| 168 | 168 |
| 169 // Any draw properties derived from |transform|, |viewport|, and |clip| | 169 // Any draw properties derived from |transform|, |viewport|, and |clip| |
| 170 // parameters in LayerTreeHostImpl::SetExternalDrawConstraints are not valid | 170 // parameters in LayerTreeHostImpl::SetExternalDrawConstraints are not valid |
| 171 // for prioritizing tiles during resourceless software draws. This is because | 171 // for prioritizing tiles during resourceless software draws. This is because |
| 172 // resourceless software draws can have wildly different transforms/viewports | 172 // resourceless software draws can have wildly different transforms/viewports |
| 173 // from regular draws. Save a copy of the required draw properties of the last | 173 // from regular draws. Save a copy of the required draw properties of the last |
| 174 // frame that has a valid viewport for prioritizing tiles. | 174 // frame that has a valid viewport for prioritizing tiles. |
| 175 gfx::Rect visible_rect_for_tile_priority_; | 175 gfx::Rect visible_rect_for_tile_priority_; |
| 176 gfx::Rect viewport_rect_for_tile_priority_in_content_space_; |
| 176 | 177 |
| 177 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); | 178 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); |
| 178 }; | 179 }; |
| 179 | 180 |
| 180 } // namespace cc | 181 } // namespace cc |
| 181 | 182 |
| 182 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ | 183 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ |
| OLD | NEW |