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

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

Issue 799463005: cc: Mirror LiveTilesRect and tiles between active and recycled trees. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: noswap-ltr: mirror live tiles rect Created 6 years 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_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 <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 typedef std::pair<int, int> TileMapKey; 289 typedef std::pair<int, int> TileMapKey;
290 typedef base::hash_map<TileMapKey, scoped_refptr<Tile>> TileMap; 290 typedef base::hash_map<TileMapKey, scoped_refptr<Tile>> TileMap;
291 291
292 PictureLayerTiling(float contents_scale, 292 PictureLayerTiling(float contents_scale,
293 const gfx::Size& layer_bounds, 293 const gfx::Size& layer_bounds,
294 PictureLayerTilingClient* client, 294 PictureLayerTilingClient* client,
295 size_t max_tiles_for_interest_area, 295 size_t max_tiles_for_interest_area,
296 float skewport_target_time_in_seconds, 296 float skewport_target_time_in_seconds,
297 int skewport_extrapolation_limit_in_content_pixels); 297 int skewport_extrapolation_limit_in_content_pixels);
298 void SetLiveTilesRect(const gfx::Rect& live_tiles_rect); 298 void SetLiveTilesRect(const gfx::Rect& live_tiles_rect);
299 void VerifyLiveTilesRect(); 299 void VerifyLiveTilesRect() const;
300 Tile* CreateTile(int i, int j, const PictureLayerTiling* twin_tiling); 300 Tile* CreateTile(int i,
301 int j,
302 const PictureLayerTiling* twin_tiling,
303 PictureLayerTiling* recycled_twin);
301 // Returns true if the Tile existed and was removed from the tiling. 304 // Returns true if the Tile existed and was removed from the tiling.
302 bool RemoveTileAt(int i, int j, PictureLayerTiling* recycled_twin); 305 bool RemoveTileAt(int i, int j, PictureLayerTiling* recycled_twin);
303 306
304 // Computes a skewport. The calculation extrapolates the last visible 307 // Computes a skewport. The calculation extrapolates the last visible
305 // rect and the current visible rect to expand the skewport to where it 308 // rect and the current visible rect to expand the skewport to where it
306 // would be in |skewport_target_time| seconds. Note that the skewport 309 // would be in |skewport_target_time| seconds. Note that the skewport
307 // is guaranteed to contain the current visible rect. 310 // is guaranteed to contain the current visible rect.
308 gfx::Rect ComputeSkewport(double current_frame_time_in_seconds, 311 gfx::Rect ComputeSkewport(double current_frame_time_in_seconds,
309 const gfx::Rect& visible_rect_in_content_space) 312 const gfx::Rect& visible_rect_in_content_space)
310 const; 313 const;
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 378
376 private: 379 private:
377 DISALLOW_ASSIGN(PictureLayerTiling); 380 DISALLOW_ASSIGN(PictureLayerTiling);
378 381
379 RectExpansionCache expansion_cache_; 382 RectExpansionCache expansion_cache_;
380 }; 383 };
381 384
382 } // namespace cc 385 } // namespace cc
383 386
384 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_H_ 387 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698