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

Side by Side Diff: cc/test/fake_picture_layer_impl.cc

Issue 793573006: Refactoring for merging ManagedTileState into Tile. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix a nit 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
« no previous file with comments | « cc/resources/tiling_set_eviction_queue.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include "cc/test/fake_picture_layer_impl.h" 5 #include "cc/test/fake_picture_layer_impl.h"
6 6
7 #include <vector> 7 #include <vector>
8 #include "cc/resources/tile.h" 8 #include "cc/resources/tile.h"
9 #include "cc/trees/layer_tree_impl.h" 9 #include "cc/trees/layer_tree_impl.h"
10 10
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 void FakePictureLayerImpl::SetAllTilesReadyInTiling( 167 void FakePictureLayerImpl::SetAllTilesReadyInTiling(
168 PictureLayerTiling* tiling) { 168 PictureLayerTiling* tiling) {
169 std::vector<Tile*> tiles = tiling->AllTilesForTesting(); 169 std::vector<Tile*> tiles = tiling->AllTilesForTesting();
170 for (size_t tile_idx = 0; tile_idx < tiles.size(); ++tile_idx) { 170 for (size_t tile_idx = 0; tile_idx < tiles.size(); ++tile_idx) {
171 Tile* tile = tiles[tile_idx]; 171 Tile* tile = tiles[tile_idx];
172 SetTileReady(tile); 172 SetTileReady(tile);
173 } 173 }
174 } 174 }
175 175
176 void FakePictureLayerImpl::SetTileReady(Tile* tile) { 176 void FakePictureLayerImpl::SetTileReady(Tile* tile) {
177 ManagedTileState& state = tile->managed_state(); 177 TileDrawInfo& draw_info = tile->draw_info();
178 state.draw_info.SetSolidColorForTesting(true); 178 draw_info.SetSolidColorForTesting(true);
179 DCHECK(tile->IsReadyToDraw()); 179 DCHECK(tile->IsReadyToDraw());
180 } 180 }
181 181
182 void FakePictureLayerImpl::DidBecomeActive() { 182 void FakePictureLayerImpl::DidBecomeActive() {
183 PictureLayerImpl::DidBecomeActive(); 183 PictureLayerImpl::DidBecomeActive();
184 ++did_become_active_call_count_; 184 ++did_become_active_call_count_;
185 } 185 }
186 186
187 bool FakePictureLayerImpl::HasValidTilePriorities() const { 187 bool FakePictureLayerImpl::HasValidTilePriorities() const {
188 return use_set_valid_tile_priorities_flag_ 188 return use_set_valid_tile_priorities_flag_
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 return CountTilesRequired( 248 return CountTilesRequired(
249 &PictureLayerTiling::IsTileRequiredForDrawIfVisible); 249 &PictureLayerTiling::IsTileRequiredForDrawIfVisible);
250 } 250 }
251 251
252 void FakePictureLayerImpl::ReleaseResources() { 252 void FakePictureLayerImpl::ReleaseResources() {
253 PictureLayerImpl::ReleaseResources(); 253 PictureLayerImpl::ReleaseResources();
254 ++release_resources_count_; 254 ++release_resources_count_;
255 } 255 }
256 256
257 } // namespace cc 257 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/tiling_set_eviction_queue.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698