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 1038793002: cc: Rework tiling set eviction iterator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: actual compile fix Created 5 years, 8 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 | « no previous file | cc/resources/picture_layer_tiling_set.h » ('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 <map> 8 #include <map>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 TileResolution resolution() const { return resolution_; } 84 TileResolution resolution() const { return resolution_; }
85 void set_can_require_tiles_for_activation(bool can_require_tiles) { 85 void set_can_require_tiles_for_activation(bool can_require_tiles) {
86 can_require_tiles_for_activation_ = can_require_tiles; 86 can_require_tiles_for_activation_ = can_require_tiles;
87 } 87 }
88 88
89 RasterSource* raster_source() const { return raster_source_.get(); } 89 RasterSource* raster_source() const { return raster_source_.get(); }
90 gfx::Size tiling_size() const { return tiling_data_.tiling_size(); } 90 gfx::Size tiling_size() const { return tiling_data_.tiling_size(); }
91 gfx::Rect live_tiles_rect() const { return live_tiles_rect_; } 91 gfx::Rect live_tiles_rect() const { return live_tiles_rect_; }
92 gfx::Size tile_size() const { return tiling_data_.max_texture_size(); } 92 gfx::Size tile_size() const { return tiling_data_.max_texture_size(); }
93 float contents_scale() const { return contents_scale_; } 93 float contents_scale() const { return contents_scale_; }
94 const TilingData* tiling_data() const { return &tiling_data_; }
94 95
95 Tile* TileAt(int i, int j) const { 96 Tile* TileAt(int i, int j) const {
96 TileMap::const_iterator iter = tiles_.find(TileMapKey(i, j)); 97 TileMap::const_iterator iter = tiles_.find(TileMapKey(i, j));
97 return (iter == tiles_.end()) ? NULL : iter->second.get(); 98 return (iter == tiles_.end()) ? NULL : iter->second.get();
98 } 99 }
99 100
100 void CreateAllTilesForTesting() { 101 void CreateAllTilesForTesting() {
101 SetLiveTilesRect(gfx::Rect(tiling_data_.tiling_size())); 102 SetLiveTilesRect(gfx::Rect(tiling_data_.tiling_size()));
102 } 103 }
103 104
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 342
342 private: 343 private:
343 DISALLOW_ASSIGN(PictureLayerTiling); 344 DISALLOW_ASSIGN(PictureLayerTiling);
344 345
345 RectExpansionCache expansion_cache_; 346 RectExpansionCache expansion_cache_;
346 }; 347 };
347 348
348 } // namespace cc 349 } // namespace cc
349 350
350 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_H_ 351 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_H_
OLDNEW
« no previous file with comments | « no previous file | cc/resources/picture_layer_tiling_set.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698