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

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

Issue 1139673008: cc: Make IsReadyToDraw/NeedsRaster usage consistent. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 std::vector<Tile*> tiles = tiling->AllTilesForTesting(); 160 std::vector<Tile*> tiles = tiling->AllTilesForTesting();
161 for (size_t tile_idx = 0; tile_idx < tiles.size(); ++tile_idx) { 161 for (size_t tile_idx = 0; tile_idx < tiles.size(); ++tile_idx) {
162 Tile* tile = tiles[tile_idx]; 162 Tile* tile = tiles[tile_idx];
163 SetTileReady(tile); 163 SetTileReady(tile);
164 } 164 }
165 } 165 }
166 166
167 void FakePictureLayerImpl::SetTileReady(Tile* tile) { 167 void FakePictureLayerImpl::SetTileReady(Tile* tile) {
168 TileDrawInfo& draw_info = tile->draw_info(); 168 TileDrawInfo& draw_info = tile->draw_info();
169 draw_info.SetSolidColorForTesting(true); 169 draw_info.SetSolidColorForTesting(true);
170 DCHECK(tile->IsReadyToDraw()); 170 DCHECK(draw_info.IsReadyToDraw());
171 } 171 }
172 172
173 void FakePictureLayerImpl::DidBecomeActive() { 173 void FakePictureLayerImpl::DidBecomeActive() {
174 PictureLayerImpl::DidBecomeActive(); 174 PictureLayerImpl::DidBecomeActive();
175 ++did_become_active_call_count_; 175 ++did_become_active_call_count_;
176 } 176 }
177 177
178 bool FakePictureLayerImpl::HasValidTilePriorities() const { 178 bool FakePictureLayerImpl::HasValidTilePriorities() const {
179 return use_set_valid_tile_priorities_flag_ 179 return use_set_valid_tile_priorities_flag_
180 ? has_valid_tile_priorities_ 180 ? has_valid_tile_priorities_
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 237
238 return CountTilesRequired(&PictureLayerTiling::IsTileRequiredForDraw); 238 return CountTilesRequired(&PictureLayerTiling::IsTileRequiredForDraw);
239 } 239 }
240 240
241 void FakePictureLayerImpl::ReleaseResources() { 241 void FakePictureLayerImpl::ReleaseResources() {
242 PictureLayerImpl::ReleaseResources(); 242 PictureLayerImpl::ReleaseResources();
243 ++release_resources_count_; 243 ++release_resources_count_;
244 } 244 }
245 245
246 } // namespace cc 246 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/tiling_set_raster_queue_required.cc ('k') | cc/trees/layer_tree_host_unittest_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698