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

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

Issue 260963008: Fixing crash in PictureLayerImpl::MarkVisibleResourcesAsRequired when low-res tiles are disabled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge resolve Created 6 years, 6 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 | « cc/layers/picture_layer_impl_unittest.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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 for (size_t mode_idx = 0; mode_idx < NUM_RASTER_MODES; ++mode_idx) 129 for (size_t mode_idx = 0; mode_idx < NUM_RASTER_MODES; ++mode_idx)
130 state.tile_versions[mode_idx].SetSolidColorForTesting(true); 130 state.tile_versions[mode_idx].SetSolidColorForTesting(true);
131 DCHECK(tile->IsReadyToDraw()); 131 DCHECK(tile->IsReadyToDraw());
132 } 132 }
133 } 133 }
134 134
135 void FakePictureLayerImpl::CreateDefaultTilingsAndTiles() { 135 void FakePictureLayerImpl::CreateDefaultTilingsAndTiles() {
136 layer_tree_impl()->UpdateDrawProperties(); 136 layer_tree_impl()->UpdateDrawProperties();
137 137
138 if (CanHaveTilings()) { 138 if (CanHaveTilings()) {
139 DCHECK_EQ(tilings()->num_tilings(), 2u); 139 DCHECK_EQ(tilings()->num_tilings(),
140 layer_tree_impl()->settings().create_low_res_tiling ? 2u : 1u);
140 DCHECK_EQ(tilings()->tiling_at(0)->resolution(), HIGH_RESOLUTION); 141 DCHECK_EQ(tilings()->tiling_at(0)->resolution(), HIGH_RESOLUTION);
141 DCHECK_EQ(tilings()->tiling_at(1)->resolution(), LOW_RESOLUTION);
142 HighResTiling()->CreateAllTilesForTesting(); 142 HighResTiling()->CreateAllTilesForTesting();
143 LowResTiling()->CreateAllTilesForTesting(); 143 if (layer_tree_impl()->settings().create_low_res_tiling) {
144 DCHECK_EQ(tilings()->tiling_at(1)->resolution(), LOW_RESOLUTION);
145 LowResTiling()->CreateAllTilesForTesting();
146 }
144 } else { 147 } else {
145 DCHECK_EQ(tilings()->num_tilings(), 0u); 148 DCHECK_EQ(tilings()->num_tilings(), 0u);
146 } 149 }
147 } 150 }
148 151
149 } // namespace cc 152 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/picture_layer_impl_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698