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

Unified 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, 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/layers/picture_layer_impl_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/fake_picture_layer_impl.cc
diff --git a/cc/test/fake_picture_layer_impl.cc b/cc/test/fake_picture_layer_impl.cc
index 88dde4dbdc638e4b838773c4567e5eef0cbd90a8..3f5b82a7bc2929bf0495764ec9ae7034a8d8863d 100644
--- a/cc/test/fake_picture_layer_impl.cc
+++ b/cc/test/fake_picture_layer_impl.cc
@@ -136,11 +136,14 @@ void FakePictureLayerImpl::CreateDefaultTilingsAndTiles() {
layer_tree_impl()->UpdateDrawProperties();
if (CanHaveTilings()) {
- DCHECK_EQ(tilings()->num_tilings(), 2u);
+ DCHECK_EQ(tilings()->num_tilings(),
+ layer_tree_impl()->settings().create_low_res_tiling ? 2u : 1u);
DCHECK_EQ(tilings()->tiling_at(0)->resolution(), HIGH_RESOLUTION);
- DCHECK_EQ(tilings()->tiling_at(1)->resolution(), LOW_RESOLUTION);
HighResTiling()->CreateAllTilesForTesting();
- LowResTiling()->CreateAllTilesForTesting();
+ if (layer_tree_impl()->settings().create_low_res_tiling) {
+ DCHECK_EQ(tilings()->tiling_at(1)->resolution(), LOW_RESOLUTION);
+ LowResTiling()->CreateAllTilesForTesting();
+ }
} else {
DCHECK_EQ(tilings()->num_tilings(), 0u);
}
« 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