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

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

Issue 2711573002: cc: Fix tile priority inversion in picture layer tiling. (Closed)
Patch Set: Created 3 years, 10 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/tiles/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_TILES_PICTURE_LAYER_TILING_H_ 5 #ifndef CC_TILES_PICTURE_LAYER_TILING_H_
6 #define CC_TILES_PICTURE_LAYER_TILING_H_ 6 #define CC_TILES_PICTURE_LAYER_TILING_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 } 150 }
151 const TilingData& TilingDataForTesting() const { return tiling_data_; } 151 const TilingData& TilingDataForTesting() const { return tiling_data_; }
152 std::vector<Tile*> AllTilesForTesting() const { 152 std::vector<Tile*> AllTilesForTesting() const {
153 std::vector<Tile*> all_tiles; 153 std::vector<Tile*> all_tiles;
154 for (TileMap::const_iterator it = tiles_.begin(); it != tiles_.end(); ++it) 154 for (TileMap::const_iterator it = tiles_.begin(); it != tiles_.end(); ++it)
155 all_tiles.push_back(it->second.get()); 155 all_tiles.push_back(it->second.get());
156 return all_tiles; 156 return all_tiles;
157 } 157 }
158 158
159 void UpdateAllRequiredStateForTesting() { 159 void UpdateAllRequiredStateForTesting() {
160 for (const auto& key_tile_pair : tiles_) 160 for (const auto& key_tile_pair : tiles_) {
161 UpdateRequiredStatesOnTile(key_tile_pair.second.get()); 161 Tile* tile = key_tile_pair.second.get();
162 UpdateRequiredStatesOnTile(tile);
163 }
162 } 164 }
163 std::map<const Tile*, PrioritizedTile> 165 std::map<const Tile*, PrioritizedTile>
164 UpdateAndGetAllPrioritizedTilesForTesting() const; 166 UpdateAndGetAllPrioritizedTilesForTesting() const;
165 167
166 void SetAllTilesOccludedForTesting() { 168 void SetAllTilesOccludedForTesting() {
167 gfx::Rect viewport_in_layer_space = 169 gfx::Rect viewport_in_layer_space =
168 ScaleToEnclosingRect(current_visible_rect_, 1.f / contents_scale_); 170 ScaleToEnclosingRect(current_visible_rect_, 1.f / contents_scale_);
169 current_occlusion_in_layer_space_ = 171 current_occlusion_in_layer_space_ =
170 Occlusion(gfx::Transform(), 172 Occlusion(gfx::Transform(),
171 SimpleEnclosedRegion(viewport_in_layer_space), 173 SimpleEnclosedRegion(viewport_in_layer_space),
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 bool has_eventually_rect_tiles_ = false; 360 bool has_eventually_rect_tiles_ = false;
359 bool all_tiles_done_ = true; 361 bool all_tiles_done_ = true;
360 362
361 private: 363 private:
362 DISALLOW_COPY_AND_ASSIGN(PictureLayerTiling); 364 DISALLOW_COPY_AND_ASSIGN(PictureLayerTiling);
363 }; 365 };
364 366
365 } // namespace cc 367 } // namespace cc
366 368
367 #endif // CC_TILES_PICTURE_LAYER_TILING_H_ 369 #endif // CC_TILES_PICTURE_LAYER_TILING_H_
OLDNEW
« no previous file with comments | « no previous file | cc/tiles/picture_layer_tiling.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698