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

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

Issue 1107033002: cc: Rename picture layer tiling method to reflect its new functionality. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 7 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.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 <map> 8 #include <map>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 } 110 }
111 const TilingData& TilingDataForTesting() const { return tiling_data_; } 111 const TilingData& TilingDataForTesting() const { return tiling_data_; }
112 std::vector<Tile*> AllTilesForTesting() const { 112 std::vector<Tile*> AllTilesForTesting() const {
113 std::vector<Tile*> all_tiles; 113 std::vector<Tile*> all_tiles;
114 for (TileMap::const_iterator it = tiles_.begin(); it != tiles_.end(); ++it) 114 for (TileMap::const_iterator it = tiles_.begin(); it != tiles_.end(); ++it)
115 all_tiles.push_back(it->second.get()); 115 all_tiles.push_back(it->second.get());
116 return all_tiles; 116 return all_tiles;
117 } 117 }
118 void UpdateAllTilePrioritiesForTesting() { 118 void UpdateAllTilePrioritiesForTesting() {
119 for (TileMap::const_iterator it = tiles_.begin(); it != tiles_.end(); ++it) 119 for (TileMap::const_iterator it = tiles_.begin(); it != tiles_.end(); ++it)
120 UpdateTileAndTwinPriority(it->second.get()); 120 UpdateTilePriority(it->second.get());
121 } 121 }
122 std::vector<scoped_refptr<Tile>> AllRefTilesForTesting() const { 122 std::vector<scoped_refptr<Tile>> AllRefTilesForTesting() const {
123 std::vector<scoped_refptr<Tile>> all_tiles; 123 std::vector<scoped_refptr<Tile>> all_tiles;
124 for (TileMap::const_iterator it = tiles_.begin(); it != tiles_.end(); ++it) 124 for (TileMap::const_iterator it = tiles_.begin(); it != tiles_.end(); ++it)
125 all_tiles.push_back(it->second); 125 all_tiles.push_back(it->second);
126 return all_tiles; 126 return all_tiles;
127 } 127 }
128 void SetAllTilesOccludedForTesting() { 128 void SetAllTilesOccludedForTesting() {
129 gfx::Rect viewport_in_layer_space = 129 gfx::Rect viewport_in_layer_space =
130 ScaleToEnclosingRect(current_visible_rect_, 1.0f / contents_scale_); 130 ScaleToEnclosingRect(current_visible_rect_, 1.0f / contents_scale_);
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 visible_rect_history_[0].frame_time_in_seconds = frame_time_in_seconds; 268 visible_rect_history_[0].frame_time_in_seconds = frame_time_in_seconds;
269 visible_rect_history_[0].visible_rect_in_content_space = 269 visible_rect_history_[0].visible_rect_in_content_space =
270 visible_rect_in_content_space; 270 visible_rect_in_content_space;
271 // If we don't have a second history item, set it to the most recent one. 271 // If we don't have a second history item, set it to the most recent one.
272 if (visible_rect_history_[1].frame_time_in_seconds == 0.0) 272 if (visible_rect_history_[1].frame_time_in_seconds == 0.0)
273 visible_rect_history_[1] = visible_rect_history_[0]; 273 visible_rect_history_[1] = visible_rect_history_[0];
274 } 274 }
275 bool IsTileOccludedOnCurrentTree(const Tile* tile) const; 275 bool IsTileOccludedOnCurrentTree(const Tile* tile) const;
276 bool ShouldCreateTileAt(int i, int j) const; 276 bool ShouldCreateTileAt(int i, int j) const;
277 bool IsTileOccluded(const Tile* tile) const; 277 bool IsTileOccluded(const Tile* tile) const;
278 void UpdateTileAndTwinPriority(Tile* tile) const; 278 void UpdateTilePriority(Tile* tile) const;
279 TilePriority ComputePriorityForTile(const Tile* tile) const; 279 TilePriority ComputePriorityForTile(const Tile* tile) const;
280 bool has_visible_rect_tiles() const { return has_visible_rect_tiles_; } 280 bool has_visible_rect_tiles() const { return has_visible_rect_tiles_; }
281 bool has_skewport_rect_tiles() const { return has_skewport_rect_tiles_; } 281 bool has_skewport_rect_tiles() const { return has_skewport_rect_tiles_; }
282 bool has_soon_border_rect_tiles() const { 282 bool has_soon_border_rect_tiles() const {
283 return has_soon_border_rect_tiles_; 283 return has_soon_border_rect_tiles_;
284 } 284 }
285 bool has_eventually_rect_tiles() const { return has_eventually_rect_tiles_; } 285 bool has_eventually_rect_tiles() const { return has_eventually_rect_tiles_; }
286 286
287 const gfx::Rect& current_visible_rect() const { 287 const gfx::Rect& current_visible_rect() const {
288 return current_visible_rect_; 288 return current_visible_rect_;
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 347
348 private: 348 private:
349 DISALLOW_ASSIGN(PictureLayerTiling); 349 DISALLOW_ASSIGN(PictureLayerTiling);
350 350
351 RectExpansionCache expansion_cache_; 351 RectExpansionCache expansion_cache_;
352 }; 352 };
353 353
354 } // namespace cc 354 } // namespace cc
355 355
356 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_H_ 356 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_H_
OLDNEW
« no previous file with comments | « no previous file | cc/resources/picture_layer_tiling.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698