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

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

Issue 502453003: cc: Remove tiles from recycle tree that were deleted on active. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: don't maintain recycled twin Created 6 years, 4 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 | « cc/layers/picture_layer_impl_unittest.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 26 matching lines...) Expand all
37 // tiling) This might return null if the client cannot create such a tile. 37 // tiling) This might return null if the client cannot create such a tile.
38 virtual scoped_refptr<Tile> CreateTile( 38 virtual scoped_refptr<Tile> CreateTile(
39 PictureLayerTiling* tiling, 39 PictureLayerTiling* tiling,
40 const gfx::Rect& content_rect) = 0; 40 const gfx::Rect& content_rect) = 0;
41 virtual PicturePileImpl* GetPile() = 0; 41 virtual PicturePileImpl* GetPile() = 0;
42 virtual gfx::Size CalculateTileSize( 42 virtual gfx::Size CalculateTileSize(
43 const gfx::Size& content_bounds) const = 0; 43 const gfx::Size& content_bounds) const = 0;
44 virtual const Region* GetInvalidation() = 0; 44 virtual const Region* GetInvalidation() = 0;
45 virtual const PictureLayerTiling* GetTwinTiling( 45 virtual const PictureLayerTiling* GetTwinTiling(
46 const PictureLayerTiling* tiling) const = 0; 46 const PictureLayerTiling* tiling) const = 0;
47 virtual PictureLayerTiling* GetRecycledTwinTiling(
48 const PictureLayerTiling* tiling) = 0;
47 virtual size_t GetMaxTilesForInterestArea() const = 0; 49 virtual size_t GetMaxTilesForInterestArea() const = 0;
48 virtual float GetSkewportTargetTimeInSeconds() const = 0; 50 virtual float GetSkewportTargetTimeInSeconds() const = 0;
49 virtual int GetSkewportExtrapolationLimitInContentPixels() const = 0; 51 virtual int GetSkewportExtrapolationLimitInContentPixels() const = 0;
50 virtual WhichTree GetTree() const = 0; 52 virtual WhichTree GetTree() const = 0;
51 53
52 protected: 54 protected:
53 virtual ~PictureLayerTilingClient() {} 55 virtual ~PictureLayerTilingClient() {}
54 }; 56 };
55 57
56 class CC_EXPORT PictureLayerTiling { 58 class CC_EXPORT PictureLayerTiling {
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 friend class TilingEvictionTileIterator; 290 friend class TilingEvictionTileIterator;
289 291
290 typedef std::pair<int, int> TileMapKey; 292 typedef std::pair<int, int> TileMapKey;
291 typedef base::hash_map<TileMapKey, scoped_refptr<Tile> > TileMap; 293 typedef base::hash_map<TileMapKey, scoped_refptr<Tile> > TileMap;
292 294
293 PictureLayerTiling(float contents_scale, 295 PictureLayerTiling(float contents_scale,
294 const gfx::Size& layer_bounds, 296 const gfx::Size& layer_bounds,
295 PictureLayerTilingClient* client); 297 PictureLayerTilingClient* client);
296 void SetLiveTilesRect(const gfx::Rect& live_tiles_rect); 298 void SetLiveTilesRect(const gfx::Rect& live_tiles_rect);
297 Tile* CreateTile(int i, int j, const PictureLayerTiling* twin_tiling); 299 Tile* CreateTile(int i, int j, const PictureLayerTiling* twin_tiling);
300 void RemoveTileAt(int i, int j);
298 301
299 // Computes a skewport. The calculation extrapolates the last visible 302 // Computes a skewport. The calculation extrapolates the last visible
300 // rect and the current visible rect to expand the skewport to where it 303 // rect and the current visible rect to expand the skewport to where it
301 // would be in |skewport_target_time| seconds. Note that the skewport 304 // would be in |skewport_target_time| seconds. Note that the skewport
302 // is guaranteed to contain the current visible rect. 305 // is guaranteed to contain the current visible rect.
303 gfx::Rect ComputeSkewport(double current_frame_time_in_seconds, 306 gfx::Rect ComputeSkewport(double current_frame_time_in_seconds,
304 const gfx::Rect& visible_rect_in_content_space) 307 const gfx::Rect& visible_rect_in_content_space)
305 const; 308 const;
306 309
307 void UpdateEvictionCacheIfNeeded(TreePriority tree_priority); 310 void UpdateEvictionCacheIfNeeded(TreePriority tree_priority);
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 357
355 private: 358 private:
356 DISALLOW_ASSIGN(PictureLayerTiling); 359 DISALLOW_ASSIGN(PictureLayerTiling);
357 360
358 RectExpansionCache expansion_cache_; 361 RectExpansionCache expansion_cache_;
359 }; 362 };
360 363
361 } // namespace cc 364 } // namespace cc
362 365
363 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_H_ 366 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_H_
OLDNEW
« no previous file with comments | « cc/layers/picture_layer_impl_unittest.cc ('k') | cc/resources/picture_layer_tiling.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698