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

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

Issue 505913003: cc: Remove and Create the correct tiles when resizing live tiles rect (Closed) Base URL: http://chromium.googlesource.com/chromium/src.git@master
Patch Set: livetiles: betterdchecks Created 6 years, 3 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_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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 friend class TilingRasterTileIterator; 289 friend class TilingRasterTileIterator;
290 friend class TilingEvictionTileIterator; 290 friend class TilingEvictionTileIterator;
291 291
292 typedef std::pair<int, int> TileMapKey; 292 typedef std::pair<int, int> TileMapKey;
293 typedef base::hash_map<TileMapKey, scoped_refptr<Tile> > TileMap; 293 typedef base::hash_map<TileMapKey, scoped_refptr<Tile> > TileMap;
294 294
295 PictureLayerTiling(float contents_scale, 295 PictureLayerTiling(float contents_scale,
296 const gfx::Size& layer_bounds, 296 const gfx::Size& layer_bounds,
297 PictureLayerTilingClient* client); 297 PictureLayerTilingClient* client);
298 void SetLiveTilesRect(const gfx::Rect& live_tiles_rect); 298 void SetLiveTilesRect(const gfx::Rect& live_tiles_rect);
299 void VerifyLiveTilesRect();
299 Tile* CreateTile(int i, int j, const PictureLayerTiling* twin_tiling); 300 Tile* CreateTile(int i, int j, const PictureLayerTiling* twin_tiling);
300 void RemoveTileAt(int i, int j); 301 // Returns true if the Tile existed and was removed from the tiling.
302 bool RemoveTileAt(int i, int j, PictureLayerTiling* recycled_twin);
301 303
302 // Computes a skewport. The calculation extrapolates the last visible 304 // Computes a skewport. The calculation extrapolates the last visible
303 // rect and the current visible rect to expand the skewport to where it 305 // rect and the current visible rect to expand the skewport to where it
304 // would be in |skewport_target_time| seconds. Note that the skewport 306 // would be in |skewport_target_time| seconds. Note that the skewport
305 // is guaranteed to contain the current visible rect. 307 // is guaranteed to contain the current visible rect.
306 gfx::Rect ComputeSkewport(double current_frame_time_in_seconds, 308 gfx::Rect ComputeSkewport(double current_frame_time_in_seconds,
307 const gfx::Rect& visible_rect_in_content_space) 309 const gfx::Rect& visible_rect_in_content_space)
308 const; 310 const;
309 311
310 void UpdateEvictionCacheIfNeeded(TreePriority tree_priority); 312 void UpdateEvictionCacheIfNeeded(TreePriority tree_priority);
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 359
358 private: 360 private:
359 DISALLOW_ASSIGN(PictureLayerTiling); 361 DISALLOW_ASSIGN(PictureLayerTiling);
360 362
361 RectExpansionCache expansion_cache_; 363 RectExpansionCache expansion_cache_;
362 }; 364 };
363 365
364 } // namespace cc 366 } // namespace cc
365 367
366 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_H_ 368 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698