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

Side by Side Diff: cc/tiles/picture_layer_tiling_set.h

Issue 2175553002: Raster PictureLayerTiling with fractional translation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Raster PictureLayerTiling with fractional translation Created 4 years, 5 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
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_TILES_PICTURE_LAYER_TILING_SET_H_ 5 #ifndef CC_TILES_PICTURE_LAYER_TILING_SET_H_
6 #define CC_TILES_PICTURE_LAYER_TILING_SET_H_ 6 #define CC_TILES_PICTURE_LAYER_TILING_SET_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <set> 10 #include <set>
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 const Region& layer_invalidation, 70 const Region& layer_invalidation,
71 float minimum_contents_scale, 71 float minimum_contents_scale,
72 float maximum_contents_scale); 72 float maximum_contents_scale);
73 73
74 // This function is called on the sync tree right after commit. 74 // This function is called on the sync tree right after commit.
75 void UpdateRasterSourceDueToLCDChange( 75 void UpdateRasterSourceDueToLCDChange(
76 scoped_refptr<RasterSource> raster_source, 76 scoped_refptr<RasterSource> raster_source,
77 const Region& layer_invalidation); 77 const Region& layer_invalidation);
78 78
79 PictureLayerTiling* AddTiling(float contents_scale, 79 PictureLayerTiling* AddTiling(float contents_scale,
80 const gfx::Vector2dF& contents_translation,
80 scoped_refptr<RasterSource> raster_source); 81 scoped_refptr<RasterSource> raster_source);
81 size_t num_tilings() const { return tilings_.size(); } 82 size_t num_tilings() const { return tilings_.size(); }
82 int NumHighResTilings() const; 83 int NumHighResTilings() const;
83 PictureLayerTiling* tiling_at(size_t idx) { return tilings_[idx].get(); } 84 PictureLayerTiling* tiling_at(size_t idx) { return tilings_[idx].get(); }
84 const PictureLayerTiling* tiling_at(size_t idx) const { 85 const PictureLayerTiling* tiling_at(size_t idx) const {
85 return tilings_[idx].get(); 86 return tilings_[idx].get();
86 } 87 }
87 WhichTree tree() const { return tree_; } 88 WhichTree tree() const { return tree_; }
88 89
89 PictureLayerTiling* FindTilingWithScale(float scale) const; 90 PictureLayerTiling* FindTilingWithScale(float scale) const;
(...skipping 17 matching lines...) Expand all
107 108
108 // Removes all tilings with a contents scale > |maximum_scale|. 109 // Removes all tilings with a contents scale > |maximum_scale|.
109 void RemoveTilingsAboveScale(float maximum_scale); 110 void RemoveTilingsAboveScale(float maximum_scale);
110 111
111 // Remove all tilings. 112 // Remove all tilings.
112 void RemoveAllTilings(); 113 void RemoveAllTilings();
113 114
114 // Remove all tiles; keep all tilings. 115 // Remove all tiles; keep all tilings.
115 void RemoveAllTiles(); 116 void RemoveAllTiles();
116 117
118 // Remove one tiling.
119 void Remove(PictureLayerTiling* tiling);
120
117 // Update the rects and priorities for tiles based on the given information. 121 // Update the rects and priorities for tiles based on the given information.
118 // Returns true if PrepareTiles is required. 122 // Returns true if PrepareTiles is required.
119 bool UpdateTilePriorities(const gfx::Rect& required_rect_in_layer_space, 123 bool UpdateTilePriorities(const gfx::Rect& required_rect_in_layer_space,
120 float ideal_contents_scale, 124 float ideal_contents_scale,
121 double current_frame_time_in_seconds, 125 double current_frame_time_in_seconds,
122 const Occlusion& occlusion_in_layer_space, 126 const Occlusion& occlusion_in_layer_space,
123 bool can_require_tiles_for_activation); 127 bool can_require_tiles_for_activation);
124 128
125 void GetAllPrioritizedTilesForTracing( 129 void GetAllPrioritizedTilesForTracing(
126 std::vector<PrioritizedTile>* prioritized_tiles) const; 130 std::vector<PrioritizedTile>* prioritized_tiles) const;
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 PictureLayerTilingClient* client, 210 PictureLayerTilingClient* client,
207 int tiling_interest_area_padding, 211 int tiling_interest_area_padding,
208 float skewport_target_time_in_seconds, 212 float skewport_target_time_in_seconds,
209 int skewport_extrapolation_limit_in_screen_pixels); 213 int skewport_extrapolation_limit_in_screen_pixels);
210 214
211 void CopyTilingsAndPropertiesFromPendingTwin( 215 void CopyTilingsAndPropertiesFromPendingTwin(
212 const PictureLayerTilingSet* pending_twin_set, 216 const PictureLayerTilingSet* pending_twin_set,
213 scoped_refptr<RasterSource> raster_source, 217 scoped_refptr<RasterSource> raster_source,
214 const Region& layer_invalidation); 218 const Region& layer_invalidation);
215 219
216 // Remove one tiling.
217 void Remove(PictureLayerTiling* tiling);
218 void VerifyTilings(const PictureLayerTilingSet* pending_twin_set) const; 220 void VerifyTilings(const PictureLayerTilingSet* pending_twin_set) const;
219 221
220 bool TilingsNeedUpdate(const gfx::Rect& required_rect_in_layer_space, 222 bool TilingsNeedUpdate(const gfx::Rect& required_rect_in_layer_space,
221 double current_frame_time_in_Seconds); 223 double current_frame_time_in_Seconds);
222 gfx::Rect ComputeSkewport(const gfx::Rect& visible_rect_in_layer_space, 224 gfx::Rect ComputeSkewport(const gfx::Rect& visible_rect_in_layer_space,
223 double current_frame_time_in_seconds, 225 double current_frame_time_in_seconds,
224 float ideal_contents_scale); 226 float ideal_contents_scale);
225 gfx::Rect ComputeSoonBorderRect(const gfx::Rect& visible_rect_in_layer_space, 227 gfx::Rect ComputeSoonBorderRect(const gfx::Rect& visible_rect_in_layer_space,
226 float ideal_contents_scale); 228 float ideal_contents_scale);
227 void UpdatePriorityRects(const gfx::Rect& visible_rect_in_layer_space, 229 void UpdatePriorityRects(const gfx::Rect& visible_rect_in_layer_space,
(...skipping 21 matching lines...) Expand all
249 251
250 friend class Iterator; 252 friend class Iterator;
251 253
252 private: 254 private:
253 DISALLOW_COPY_AND_ASSIGN(PictureLayerTilingSet); 255 DISALLOW_COPY_AND_ASSIGN(PictureLayerTilingSet);
254 }; 256 };
255 257
256 } // namespace cc 258 } // namespace cc
257 259
258 #endif // CC_TILES_PICTURE_LAYER_TILING_SET_H_ 260 #endif // CC_TILES_PICTURE_LAYER_TILING_SET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698