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

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

Issue 140513006: cc: Simplify picture layer tiling update tile priorities. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: removed dead code Created 6 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 | Annotate | Revision Log
« no previous file with comments | « cc/resources/tile_priority_unittest.cc ('k') | cc/test/fake_picture_layer_tiling_client.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 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 layer_tree_impl()->IsActiveTree() ? ACTIVE_TREE : PENDING_TREE; 75 layer_tree_impl()->IsActiveTree() ? ACTIVE_TREE : PENDING_TREE;
76 76
77 for (size_t tiling_idx = 0; tiling_idx < tilings_->num_tilings(); 77 for (size_t tiling_idx = 0; tiling_idx < tilings_->num_tilings();
78 ++tiling_idx) { 78 ++tiling_idx) {
79 PictureLayerTiling* tiling = tilings_->tiling_at(tiling_idx); 79 PictureLayerTiling* tiling = tilings_->tiling_at(tiling_idx);
80 std::vector<Tile*> tiles = tiling->AllTilesForTesting(); 80 std::vector<Tile*> tiles = tiling->AllTilesForTesting();
81 for (size_t tile_idx = 0; tile_idx < tiles.size(); ++tile_idx) { 81 for (size_t tile_idx = 0; tile_idx < tiles.size(); ++tile_idx) {
82 Tile* tile = tiles[tile_idx]; 82 Tile* tile = tiles[tile_idx];
83 TilePriority priority; 83 TilePriority priority;
84 priority.resolution = HIGH_RESOLUTION; 84 priority.resolution = HIGH_RESOLUTION;
85 priority.time_to_visible_in_seconds = 0.f; 85 priority.priority_bin = TilePriority::NOW;
86 priority.distance_to_visible_in_pixels = 0.f; 86 priority.distance_to_visible = 0.f;
87 tile->SetPriority(tree, priority); 87 tile->SetPriority(tree, priority);
88 } 88 }
89 } 89 }
90 } 90 }
91 91
92 void FakePictureLayerImpl::SetAllTilesReady() { 92 void FakePictureLayerImpl::SetAllTilesReady() {
93 for (size_t tiling_idx = 0; tiling_idx < tilings_->num_tilings(); 93 for (size_t tiling_idx = 0; tiling_idx < tilings_->num_tilings();
94 ++tiling_idx) { 94 ++tiling_idx) {
95 PictureLayerTiling* tiling = tilings_->tiling_at(tiling_idx); 95 PictureLayerTiling* tiling = tilings_->tiling_at(tiling_idx);
96 SetAllTilesReadyInTiling(tiling); 96 SetAllTilesReadyInTiling(tiling);
(...skipping 20 matching lines...) Expand all
117 DCHECK_EQ(tilings()->tiling_at(0)->resolution(), HIGH_RESOLUTION); 117 DCHECK_EQ(tilings()->tiling_at(0)->resolution(), HIGH_RESOLUTION);
118 DCHECK_EQ(tilings()->tiling_at(1)->resolution(), LOW_RESOLUTION); 118 DCHECK_EQ(tilings()->tiling_at(1)->resolution(), LOW_RESOLUTION);
119 HighResTiling()->CreateAllTilesForTesting(); 119 HighResTiling()->CreateAllTilesForTesting();
120 LowResTiling()->CreateAllTilesForTesting(); 120 LowResTiling()->CreateAllTilesForTesting();
121 } else { 121 } else {
122 DCHECK_EQ(tilings()->num_tilings(), 0u); 122 DCHECK_EQ(tilings()->num_tilings(), 0u);
123 } 123 }
124 } 124 }
125 125
126 } // namespace cc 126 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/tile_priority_unittest.cc ('k') | cc/test/fake_picture_layer_tiling_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698