Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: cc/layers/picture_layer_impl.h

Issue 819643004: Cache viewport rect for tile priority in UpdateTiles (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | cc/layers/picture_layer_impl.cc » ('j') | cc/layers/picture_layer_impl.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 gfx::Rect viewport_rect_for_tile_priority_in_content_space() const {
danakj 2015/01/21 22:32:18 I meant you can have this accessor on the FakePict
hush (inactive) 2015/01/21 22:40:46 Oh. I see. Done.
123 return viewport_rect_for_tile_priority_in_content_space_;
124 }
125 void CacheViewportForTilePriorityInContentSpace();
123 PictureLayerImpl* GetRecycledTwinLayer() const; 126 PictureLayerImpl* GetRecycledTwinLayer() const;
124 127
125 void SanityCheckTilingState() const; 128 void SanityCheckTilingState() const;
126 // Checks if all tiles required for a certain action (e.g. activation) are 129 // 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 130 // 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. 131 // tiles and returns true if the tile is required for the action.
129 bool AllTilesRequiredAreReadyToDraw( 132 bool AllTilesRequiredAreReadyToDraw(
130 TileRequirementCheck is_tile_required_callback) const; 133 TileRequirementCheck is_tile_required_callback) const;
131 134
132 bool ShouldAdjustRasterScaleDuringScaleAnimations() const; 135 bool ShouldAdjustRasterScaleDuringScaleAnimations() const;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 169
167 bool nearest_neighbor_; 170 bool nearest_neighbor_;
168 171
169 // Any draw properties derived from |transform|, |viewport|, and |clip| 172 // Any draw properties derived from |transform|, |viewport|, and |clip|
170 // parameters in LayerTreeHostImpl::SetExternalDrawConstraints are not valid 173 // parameters in LayerTreeHostImpl::SetExternalDrawConstraints are not valid
171 // for prioritizing tiles during resourceless software draws. This is because 174 // for prioritizing tiles during resourceless software draws. This is because
172 // resourceless software draws can have wildly different transforms/viewports 175 // resourceless software draws can have wildly different transforms/viewports
173 // from regular draws. Save a copy of the required draw properties of the last 176 // from regular draws. Save a copy of the required draw properties of the last
174 // frame that has a valid viewport for prioritizing tiles. 177 // frame that has a valid viewport for prioritizing tiles.
175 gfx::Rect visible_rect_for_tile_priority_; 178 gfx::Rect visible_rect_for_tile_priority_;
179 gfx::Rect viewport_rect_for_tile_priority_in_content_space_;
176 180
177 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); 181 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl);
178 }; 182 };
179 183
180 } // namespace cc 184 } // namespace cc
181 185
182 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ 186 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | cc/layers/picture_layer_impl.cc » ('j') | cc/layers/picture_layer_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698