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

Side by Side Diff: cc/resources/picture_layer_tiling.h

Issue 397303003: cc: Remove invalidated recycle tree tiles on activation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update Created 6 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 | Annotate | Revision Log
« no previous file with comments | « cc/layers/picture_layer_impl.cc ('k') | cc/resources/picture_layer_tiling.cc » ('j') | no next file with comments »
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_RESOURCES_PICTURE_LAYER_TILING_H_ 5 #ifndef CC_RESOURCES_PICTURE_LAYER_TILING_H_
6 #define CC_RESOURCES_PICTURE_LAYER_TILING_H_ 6 #define CC_RESOURCES_PICTURE_LAYER_TILING_H_
7 7
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 123
124 // Create a tiling with no tiles. CreateTiles must be called to add some. 124 // Create a tiling with no tiles. CreateTiles must be called to add some.
125 static scoped_ptr<PictureLayerTiling> Create( 125 static scoped_ptr<PictureLayerTiling> Create(
126 float contents_scale, 126 float contents_scale,
127 const gfx::Size& layer_bounds, 127 const gfx::Size& layer_bounds,
128 PictureLayerTilingClient* client); 128 PictureLayerTilingClient* client);
129 gfx::Size layer_bounds() const { return layer_bounds_; } 129 gfx::Size layer_bounds() const { return layer_bounds_; }
130 void UpdateTilesToCurrentPile(const Region& layer_invalidation, 130 void UpdateTilesToCurrentPile(const Region& layer_invalidation,
131 const gfx::Size& new_layer_bounds); 131 const gfx::Size& new_layer_bounds);
132 void CreateMissingTilesInLiveTilesRect(); 132 void CreateMissingTilesInLiveTilesRect();
133 void RemoveTilesInRegion(const Region& layer_region);
133 134
134 void SetClient(PictureLayerTilingClient* client); 135 void SetClient(PictureLayerTilingClient* client);
135 void set_resolution(TileResolution resolution) { resolution_ = resolution; } 136 void set_resolution(TileResolution resolution) { resolution_ = resolution; }
136 TileResolution resolution() const { return resolution_; } 137 TileResolution resolution() const { return resolution_; }
137 138
138 gfx::Size tiling_size() const { return tiling_data_.tiling_size(); } 139 gfx::Size tiling_size() const { return tiling_data_.tiling_size(); }
139 gfx::Rect live_tiles_rect() const { return live_tiles_rect_; } 140 gfx::Rect live_tiles_rect() const { return live_tiles_rect_; }
140 gfx::Size tile_size() const { return tiling_data_.max_texture_size(); } 141 gfx::Size tile_size() const { return tiling_data_.max_texture_size(); }
141 float contents_scale() const { return contents_scale_; } 142 float contents_scale() const { return contents_scale_; }
142 143
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 // rect and the current visible rect to expand the skewport to where it 277 // rect and the current visible rect to expand the skewport to where it
277 // would be in |skewport_target_time| seconds. Note that the skewport 278 // would be in |skewport_target_time| seconds. Note that the skewport
278 // is guaranteed to contain the current visible rect. 279 // is guaranteed to contain the current visible rect.
279 gfx::Rect ComputeSkewport(double current_frame_time_in_seconds, 280 gfx::Rect ComputeSkewport(double current_frame_time_in_seconds,
280 const gfx::Rect& visible_rect_in_content_space) 281 const gfx::Rect& visible_rect_in_content_space)
281 const; 282 const;
282 283
283 void UpdateEvictionCacheIfNeeded(TreePriority tree_priority); 284 void UpdateEvictionCacheIfNeeded(TreePriority tree_priority);
284 void Invalidate(const Region& layer_region); 285 void Invalidate(const Region& layer_region);
285 286
287 void DoInvalidate(const Region& layer_region,
288 bool recreate_invalidated_tiles);
289
286 // Given properties. 290 // Given properties.
287 float contents_scale_; 291 float contents_scale_;
288 gfx::Size layer_bounds_; 292 gfx::Size layer_bounds_;
289 TileResolution resolution_; 293 TileResolution resolution_;
290 PictureLayerTilingClient* client_; 294 PictureLayerTilingClient* client_;
291 295
292 // Internal data. 296 // Internal data.
293 TilingData tiling_data_; 297 TilingData tiling_data_;
294 TileMap tiles_; // It is not legal to have a NULL tile in the tiles_ map. 298 TileMap tiles_; // It is not legal to have a NULL tile in the tiles_ map.
295 gfx::Rect live_tiles_rect_; 299 gfx::Rect live_tiles_rect_;
(...skipping 13 matching lines...) Expand all
309 313
310 private: 314 private:
311 DISALLOW_ASSIGN(PictureLayerTiling); 315 DISALLOW_ASSIGN(PictureLayerTiling);
312 316
313 RectExpansionCache expansion_cache_; 317 RectExpansionCache expansion_cache_;
314 }; 318 };
315 319
316 } // namespace cc 320 } // namespace cc
317 321
318 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_H_ 322 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_H_
OLDNEW
« no previous file with comments | « cc/layers/picture_layer_impl.cc ('k') | cc/resources/picture_layer_tiling.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698