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

Side by Side Diff: cc/layers/picture_layer_impl_unittest.cc

Issue 1418663006: Turn on property tree verification for PictureLayerImplTests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 | « no previous file | cc/trees/layer_tree_host_common.cc » ('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/layers/picture_layer_impl.h" 5 #include "cc/layers/picture_layer_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <set> 9 #include <set>
10 #include <utility> 10 #include <utility>
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 rects_.push_back(rect); 73 rects_.push_back(rect);
74 } 74 }
75 75
76 std::vector<SkRect> rects_; 76 std::vector<SkRect> rects_;
77 }; 77 };
78 78
79 class PictureLayerImplTestSettings : public GpuRasterizationEnabledSettings { 79 class PictureLayerImplTestSettings : public GpuRasterizationEnabledSettings {
80 public: 80 public:
81 PictureLayerImplTestSettings() { 81 PictureLayerImplTestSettings() {
82 layer_transforms_should_scale_layer_contents = true; 82 layer_transforms_should_scale_layer_contents = true;
83 verify_property_trees = true;
83 } 84 }
84 }; 85 };
85 86
86 class NoLowResTilingsSettings : public PictureLayerImplTestSettings {}; 87 class NoLowResTilingsSettings : public PictureLayerImplTestSettings {};
87 88
88 class LowResTilingsSettings : public PictureLayerImplTestSettings { 89 class LowResTilingsSettings : public PictureLayerImplTestSettings {
89 public: 90 public:
90 LowResTilingsSettings() { create_low_res_tiling = true; } 91 LowResTilingsSettings() { create_low_res_tiling = true; }
91 }; 92 };
92 93
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 const Region& invalidation) { 142 const Region& invalidation) {
142 scoped_refptr<FakeDisplayListRasterSource> pending_raster_source = 143 scoped_refptr<FakeDisplayListRasterSource> pending_raster_source =
143 FakeDisplayListRasterSource::CreateFilled(layer_bounds); 144 FakeDisplayListRasterSource::CreateFilled(layer_bounds);
144 scoped_refptr<FakeDisplayListRasterSource> active_raster_source = 145 scoped_refptr<FakeDisplayListRasterSource> active_raster_source =
145 FakeDisplayListRasterSource::CreateFilled(layer_bounds); 146 FakeDisplayListRasterSource::CreateFilled(layer_bounds);
146 147
147 SetupTreesWithInvalidation(pending_raster_source, active_raster_source, 148 SetupTreesWithInvalidation(pending_raster_source, active_raster_source,
148 invalidation); 149 invalidation);
149 } 150 }
150 151
152 void RebuildPropertyTreesOnPendingTree() {
153 host_impl_.pending_tree()->property_trees()->needs_rebuild = true;
154 host_impl_.pending_tree()->BuildPropertyTreesForTesting();
155 }
156
151 void ActivateTree() { 157 void ActivateTree() {
158 RebuildPropertyTreesOnPendingTree();
152 host_impl_.ActivateSyncTree(); 159 host_impl_.ActivateSyncTree();
153 CHECK(!host_impl_.pending_tree()); 160 CHECK(!host_impl_.pending_tree());
154 CHECK(host_impl_.recycle_tree()); 161 CHECK(host_impl_.recycle_tree());
155 old_pending_layer_ = pending_layer_; 162 old_pending_layer_ = pending_layer_;
156 pending_layer_ = nullptr; 163 pending_layer_ = nullptr;
157 active_layer_ = static_cast<FakePictureLayerImpl*>( 164 active_layer_ = static_cast<FakePictureLayerImpl*>(
158 host_impl_.active_tree()->LayerById(id_)); 165 host_impl_.active_tree()->LayerById(id_));
159 166
160 bool update_lcd_text = false; 167 bool update_lcd_text = false;
161 host_impl_.active_tree()->UpdateDrawProperties(update_lcd_text); 168 host_impl_.active_tree()->UpdateDrawProperties(update_lcd_text);
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 pending_layer->SetRasterSourceOnPending(raster_source, invalidation); 258 pending_layer->SetRasterSourceOnPending(raster_source, invalidation);
252 259
253 pending_root->AddChild(pending_layer.Pass()); 260 pending_root->AddChild(pending_layer.Pass());
254 pending_tree->SetRootLayer(pending_root.Pass()); 261 pending_tree->SetRootLayer(pending_root.Pass());
255 262
256 pending_layer_ = static_cast<FakePictureLayerImpl*>( 263 pending_layer_ = static_cast<FakePictureLayerImpl*>(
257 host_impl_.pending_tree()->LayerById(id_)); 264 host_impl_.pending_tree()->LayerById(id_));
258 265
259 // Add tilings/tiles for the layer. 266 // Add tilings/tiles for the layer.
260 bool update_lcd_text = false; 267 bool update_lcd_text = false;
268 RebuildPropertyTreesOnPendingTree();
261 host_impl_.pending_tree()->UpdateDrawProperties(update_lcd_text); 269 host_impl_.pending_tree()->UpdateDrawProperties(update_lcd_text);
262 } 270 }
263 271
264 void SetupDrawPropertiesAndUpdateTiles( 272 void SetupDrawPropertiesAndUpdateTiles(
265 FakePictureLayerImpl* layer, 273 FakePictureLayerImpl* layer,
266 float ideal_contents_scale, 274 float ideal_contents_scale,
267 float device_scale_factor, 275 float device_scale_factor,
268 float page_scale_factor, 276 float page_scale_factor,
269 float maximum_animation_contents_scale, 277 float maximum_animation_contents_scale,
270 float starting_animation_contents_scale, 278 float starting_animation_contents_scale,
(...skipping 1079 matching lines...) Expand 10 before | Expand all | Expand 10 after
1350 SetupPendingTree(valid_raster_source); 1358 SetupPendingTree(valid_raster_source);
1351 1359
1352 scoped_ptr<FakePictureLayerImpl> mask_ptr = 1360 scoped_ptr<FakePictureLayerImpl> mask_ptr =
1353 FakePictureLayerImpl::CreateMaskWithRasterSource( 1361 FakePictureLayerImpl::CreateMaskWithRasterSource(
1354 host_impl_.pending_tree(), 3, valid_raster_source); 1362 host_impl_.pending_tree(), 3, valid_raster_source);
1355 mask_ptr->SetBounds(layer_bounds); 1363 mask_ptr->SetBounds(layer_bounds);
1356 mask_ptr->SetDrawsContent(true); 1364 mask_ptr->SetDrawsContent(true);
1357 pending_layer_->SetMaskLayer(mask_ptr.Pass()); 1365 pending_layer_->SetMaskLayer(mask_ptr.Pass());
1358 pending_layer_->SetHasRenderSurface(true); 1366 pending_layer_->SetHasRenderSurface(true);
1359 1367
1360 host_impl_.pending_tree()->BuildPropertyTreesForTesting(); 1368 RebuildPropertyTreesOnPendingTree();
1361 host_impl_.AdvanceToNextFrame(base::TimeDelta::FromMilliseconds(1)); 1369 host_impl_.AdvanceToNextFrame(base::TimeDelta::FromMilliseconds(1));
1362 bool update_lcd_text = false; 1370 bool update_lcd_text = false;
1363 host_impl_.pending_tree()->UpdateDrawProperties(update_lcd_text); 1371 host_impl_.pending_tree()->UpdateDrawProperties(update_lcd_text);
1364 1372
1365 FakePictureLayerImpl* pending_mask = 1373 FakePictureLayerImpl* pending_mask =
1366 static_cast<FakePictureLayerImpl*>(pending_layer_->mask_layer()); 1374 static_cast<FakePictureLayerImpl*>(pending_layer_->mask_layer());
1367 1375
1368 EXPECT_EQ(1.f, pending_mask->HighResTiling()->contents_scale()); 1376 EXPECT_EQ(1.f, pending_mask->HighResTiling()->contents_scale());
1369 EXPECT_EQ(1u, pending_mask->num_tilings()); 1377 EXPECT_EQ(1u, pending_mask->num_tilings());
1370 1378
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
1479 SetupPendingTree(valid_raster_source); 1487 SetupPendingTree(valid_raster_source);
1480 1488
1481 scoped_ptr<FakePictureLayerImpl> mask_ptr = 1489 scoped_ptr<FakePictureLayerImpl> mask_ptr =
1482 FakePictureLayerImpl::CreateMaskWithRasterSource( 1490 FakePictureLayerImpl::CreateMaskWithRasterSource(
1483 host_impl_.pending_tree(), 3, valid_raster_source); 1491 host_impl_.pending_tree(), 3, valid_raster_source);
1484 mask_ptr->SetBounds(layer_bounds); 1492 mask_ptr->SetBounds(layer_bounds);
1485 mask_ptr->SetDrawsContent(true); 1493 mask_ptr->SetDrawsContent(true);
1486 pending_layer_->SetMaskLayer(mask_ptr.Pass()); 1494 pending_layer_->SetMaskLayer(mask_ptr.Pass());
1487 pending_layer_->SetHasRenderSurface(true); 1495 pending_layer_->SetHasRenderSurface(true);
1488 1496
1489 host_impl_.pending_tree()->BuildPropertyTreesForTesting(); 1497 RebuildPropertyTreesOnPendingTree();
1490 host_impl_.AdvanceToNextFrame(base::TimeDelta::FromMilliseconds(1)); 1498 host_impl_.AdvanceToNextFrame(base::TimeDelta::FromMilliseconds(1));
1491 bool update_lcd_text = false; 1499 bool update_lcd_text = false;
1492 host_impl_.pending_tree()->UpdateDrawProperties(update_lcd_text); 1500 host_impl_.pending_tree()->UpdateDrawProperties(update_lcd_text);
1493 1501
1494 FakePictureLayerImpl* pending_mask = 1502 FakePictureLayerImpl* pending_mask =
1495 static_cast<FakePictureLayerImpl*>(pending_layer_->mask_layer()); 1503 static_cast<FakePictureLayerImpl*>(pending_layer_->mask_layer());
1496 1504
1497 // Masks are scaled, and do not have a low res tiling. 1505 // Masks are scaled, and do not have a low res tiling.
1498 EXPECT_EQ(1.3f, pending_mask->HighResTiling()->contents_scale()); 1506 EXPECT_EQ(1.3f, pending_mask->HighResTiling()->contents_scale());
1499 EXPECT_EQ(1u, pending_mask->num_tilings()); 1507 EXPECT_EQ(1u, pending_mask->num_tilings());
(...skipping 2465 matching lines...) Expand 10 before | Expand all | Expand 10 after
3965 EXPECT_EQ(unoccluded_tile_count, 25); 3973 EXPECT_EQ(unoccluded_tile_count, 25);
3966 3974
3967 // Partial occlusion. 3975 // Partial occlusion.
3968 pending_layer_->AddChild(LayerImpl::Create(host_impl_.pending_tree(), 1)); 3976 pending_layer_->AddChild(LayerImpl::Create(host_impl_.pending_tree(), 1));
3969 LayerImpl* layer1 = pending_layer_->children()[0]; 3977 LayerImpl* layer1 = pending_layer_->children()[0];
3970 layer1->SetBounds(layer_bounds); 3978 layer1->SetBounds(layer_bounds);
3971 layer1->SetDrawsContent(true); 3979 layer1->SetDrawsContent(true);
3972 layer1->SetContentsOpaque(true); 3980 layer1->SetContentsOpaque(true);
3973 layer1->SetPosition(occluding_layer_position); 3981 layer1->SetPosition(occluding_layer_position);
3974 3982
3983 RebuildPropertyTreesOnPendingTree();
3975 host_impl_.AdvanceToNextFrame(base::TimeDelta::FromMilliseconds(200)); 3984 host_impl_.AdvanceToNextFrame(base::TimeDelta::FromMilliseconds(200));
3976 bool update_lcd_text = false; 3985 bool update_lcd_text = false;
3977 host_impl_.pending_tree()->UpdateDrawProperties(update_lcd_text); 3986 host_impl_.pending_tree()->UpdateDrawProperties(update_lcd_text);
3978 3987
3979 unoccluded_tile_count = 0; 3988 unoccluded_tile_count = 0;
3980 queue.reset(new TilingSetRasterQueueAll( 3989 queue.reset(new TilingSetRasterQueueAll(
3981 pending_layer_->picture_layer_tiling_set(), false)); 3990 pending_layer_->picture_layer_tiling_set(), false));
3982 while (!queue->IsEmpty()) { 3991 while (!queue->IsEmpty()) {
3983 PrioritizedTile prioritized_tile = queue->Top(); 3992 PrioritizedTile prioritized_tile = queue->Top();
3984 Tile* tile = prioritized_tile.tile(); 3993 Tile* tile = prioritized_tile.tile();
3985 3994
3986 EXPECT_FALSE(prioritized_tile.is_occluded()); 3995 EXPECT_FALSE(prioritized_tile.is_occluded());
3987 3996
3988 bool tile_is_visible = 3997 bool tile_is_visible =
3989 tile->content_rect().Intersects(pending_layer_->visible_layer_rect()); 3998 tile->content_rect().Intersects(pending_layer_->visible_layer_rect());
3990 if (tile_is_visible) 3999 if (tile_is_visible)
3991 unoccluded_tile_count++; 4000 unoccluded_tile_count++;
3992 queue->Pop(); 4001 queue->Pop();
3993 } 4002 }
3994 EXPECT_EQ(20, unoccluded_tile_count); 4003 EXPECT_EQ(20, unoccluded_tile_count);
3995 4004
3996 // Full occlusion. 4005 // Full occlusion.
3997 layer1->SetPosition(gfx::PointF()); 4006 layer1->SetPosition(gfx::PointF());
3998 4007
4008 RebuildPropertyTreesOnPendingTree();
3999 host_impl_.AdvanceToNextFrame(base::TimeDelta::FromMilliseconds(200)); 4009 host_impl_.AdvanceToNextFrame(base::TimeDelta::FromMilliseconds(200));
4000 host_impl_.pending_tree()->UpdateDrawProperties(update_lcd_text); 4010 host_impl_.pending_tree()->UpdateDrawProperties(update_lcd_text);
4001 4011
4002 unoccluded_tile_count = 0; 4012 unoccluded_tile_count = 0;
4003 queue.reset(new TilingSetRasterQueueAll( 4013 queue.reset(new TilingSetRasterQueueAll(
4004 pending_layer_->picture_layer_tiling_set(), false)); 4014 pending_layer_->picture_layer_tiling_set(), false));
4005 while (!queue->IsEmpty()) { 4015 while (!queue->IsEmpty()) {
4006 PrioritizedTile prioritized_tile = queue->Top(); 4016 PrioritizedTile prioritized_tile = queue->Top();
4007 Tile* tile = prioritized_tile.tile(); 4017 Tile* tile = prioritized_tile.tile();
4008 4018
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
4057 } 4067 }
4058 4068
4059 // Partial occlusion. 4069 // Partial occlusion.
4060 pending_layer_->AddChild(LayerImpl::Create(host_impl_.pending_tree(), 1)); 4070 pending_layer_->AddChild(LayerImpl::Create(host_impl_.pending_tree(), 1));
4061 LayerImpl* layer1 = pending_layer_->children()[0]; 4071 LayerImpl* layer1 = pending_layer_->children()[0];
4062 layer1->SetBounds(layer_bounds); 4072 layer1->SetBounds(layer_bounds);
4063 layer1->SetDrawsContent(true); 4073 layer1->SetDrawsContent(true);
4064 layer1->SetContentsOpaque(true); 4074 layer1->SetContentsOpaque(true);
4065 layer1->SetPosition(occluding_layer_position); 4075 layer1->SetPosition(occluding_layer_position);
4066 4076
4077 RebuildPropertyTreesOnPendingTree();
4067 host_impl_.AdvanceToNextFrame(base::TimeDelta::FromMilliseconds(200)); 4078 host_impl_.AdvanceToNextFrame(base::TimeDelta::FromMilliseconds(200));
4068 bool update_lcd_text = false; 4079 bool update_lcd_text = false;
4069 host_impl_.pending_tree()->UpdateDrawProperties(update_lcd_text); 4080 host_impl_.pending_tree()->UpdateDrawProperties(update_lcd_text);
4070 4081
4071 for (size_t i = 0; i < pending_layer_->num_tilings(); ++i) { 4082 for (size_t i = 0; i < pending_layer_->num_tilings(); ++i) {
4072 PictureLayerTiling* tiling = pending_layer_->tilings()->tiling_at(i); 4083 PictureLayerTiling* tiling = pending_layer_->tilings()->tiling_at(i);
4073 auto prioritized_tiles = 4084 auto prioritized_tiles =
4074 tiling->UpdateAndGetAllPrioritizedTilesForTesting(); 4085 tiling->UpdateAndGetAllPrioritizedTilesForTesting();
4075 4086
4076 occluded_tile_count = 0; 4087 occluded_tile_count = 0;
(...skipping 17 matching lines...) Expand all
4094 EXPECT_EQ(occluded_tile_count, 2); 4105 EXPECT_EQ(occluded_tile_count, 2);
4095 break; 4106 break;
4096 default: 4107 default:
4097 NOTREACHED(); 4108 NOTREACHED();
4098 } 4109 }
4099 } 4110 }
4100 4111
4101 // Full occlusion. 4112 // Full occlusion.
4102 layer1->SetPosition(gfx::PointF()); 4113 layer1->SetPosition(gfx::PointF());
4103 4114
4115 RebuildPropertyTreesOnPendingTree();
4104 host_impl_.AdvanceToNextFrame(base::TimeDelta::FromMilliseconds(200)); 4116 host_impl_.AdvanceToNextFrame(base::TimeDelta::FromMilliseconds(200));
4105 host_impl_.pending_tree()->UpdateDrawProperties(update_lcd_text); 4117 host_impl_.pending_tree()->UpdateDrawProperties(update_lcd_text);
4106 4118
4107 for (size_t i = 0; i < pending_layer_->num_tilings(); ++i) { 4119 for (size_t i = 0; i < pending_layer_->num_tilings(); ++i) {
4108 PictureLayerTiling* tiling = pending_layer_->tilings()->tiling_at(i); 4120 PictureLayerTiling* tiling = pending_layer_->tilings()->tiling_at(i);
4109 auto prioritized_tiles = 4121 auto prioritized_tiles =
4110 tiling->UpdateAndGetAllPrioritizedTilesForTesting(); 4122 tiling->UpdateAndGetAllPrioritizedTilesForTesting();
4111 4123
4112 occluded_tile_count = 0; 4124 occluded_tile_count = 0;
4113 for (PictureLayerTiling::CoverageIterator iter(tiling, 1.f, 4125 for (PictureLayerTiling::CoverageIterator iter(tiling, 1.f,
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
4159 layer1->SetPosition(occluding_layer_position); 4171 layer1->SetPosition(occluding_layer_position);
4160 4172
4161 pending_layer_->tilings()->RemoveAllTilings(); 4173 pending_layer_->tilings()->RemoveAllTilings();
4162 float low_res_factor = host_impl_.settings().low_res_contents_scale_factor; 4174 float low_res_factor = host_impl_.settings().low_res_contents_scale_factor;
4163 pending_layer_->AddTiling(low_res_factor)->set_resolution(LOW_RESOLUTION); 4175 pending_layer_->AddTiling(low_res_factor)->set_resolution(LOW_RESOLUTION);
4164 pending_layer_->AddTiling(0.3f)->set_resolution(HIGH_RESOLUTION); 4176 pending_layer_->AddTiling(0.3f)->set_resolution(HIGH_RESOLUTION);
4165 pending_layer_->AddTiling(0.7f)->set_resolution(HIGH_RESOLUTION); 4177 pending_layer_->AddTiling(0.7f)->set_resolution(HIGH_RESOLUTION);
4166 pending_layer_->AddTiling(1.0f)->set_resolution(HIGH_RESOLUTION); 4178 pending_layer_->AddTiling(1.0f)->set_resolution(HIGH_RESOLUTION);
4167 pending_layer_->AddTiling(2.0f)->set_resolution(HIGH_RESOLUTION); 4179 pending_layer_->AddTiling(2.0f)->set_resolution(HIGH_RESOLUTION);
4168 4180
4181 RebuildPropertyTreesOnPendingTree();
4169 host_impl_.AdvanceToNextFrame(base::TimeDelta::FromMilliseconds(1)); 4182 host_impl_.AdvanceToNextFrame(base::TimeDelta::FromMilliseconds(1));
4170 // UpdateDrawProperties with the occluding layer. 4183 // UpdateDrawProperties with the occluding layer.
4171 bool update_lcd_text = false; 4184 bool update_lcd_text = false;
4172 host_impl_.pending_tree()->UpdateDrawProperties(update_lcd_text); 4185 host_impl_.pending_tree()->UpdateDrawProperties(update_lcd_text);
4173 4186
4174 EXPECT_EQ(5u, pending_layer_->num_tilings()); 4187 EXPECT_EQ(5u, pending_layer_->num_tilings());
4175 4188
4176 int occluded_tile_count = 0; 4189 int occluded_tile_count = 0;
4177 for (size_t i = 0; i < pending_layer_->num_tilings(); ++i) { 4190 for (size_t i = 0; i < pending_layer_->num_tilings(); ++i) {
4178 PictureLayerTiling* tiling = pending_layer_->tilings()->tiling_at(i); 4191 PictureLayerTiling* tiling = pending_layer_->tilings()->tiling_at(i);
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
4336 pending_layer_->AddChild(LayerImpl::Create(host_impl_.pending_tree(), 3)); 4349 pending_layer_->AddChild(LayerImpl::Create(host_impl_.pending_tree(), 3));
4337 LayerImpl* pending_occluding_layer = pending_layer_->children()[0]; 4350 LayerImpl* pending_occluding_layer = pending_layer_->children()[0];
4338 pending_occluding_layer->SetBounds(layer_bounds); 4351 pending_occluding_layer->SetBounds(layer_bounds);
4339 pending_occluding_layer->SetDrawsContent(true); 4352 pending_occluding_layer->SetDrawsContent(true);
4340 pending_occluding_layer->SetContentsOpaque(true); 4353 pending_occluding_layer->SetContentsOpaque(true);
4341 pending_occluding_layer->SetPosition(pending_occluding_layer_position); 4354 pending_occluding_layer->SetPosition(pending_occluding_layer_position);
4342 4355
4343 EXPECT_EQ(1u, pending_layer_->num_tilings()); 4356 EXPECT_EQ(1u, pending_layer_->num_tilings());
4344 EXPECT_EQ(2u, active_layer_->num_tilings()); 4357 EXPECT_EQ(2u, active_layer_->num_tilings());
4345 4358
4359 RebuildPropertyTreesOnPendingTree();
4346 host_impl_.AdvanceToNextFrame(base::TimeDelta::FromMilliseconds(1)); 4360 host_impl_.AdvanceToNextFrame(base::TimeDelta::FromMilliseconds(1));
4347 // UpdateDrawProperties with the occluding layer. 4361 // UpdateDrawProperties with the occluding layer.
4348 bool update_lcd_text = false; 4362 bool update_lcd_text = false;
4349 host_impl_.pending_tree()->UpdateDrawProperties(update_lcd_text); 4363 host_impl_.pending_tree()->UpdateDrawProperties(update_lcd_text);
4350 4364
4351 // The expected number of occluded tiles on each of the 2 tilings for each of 4365 // The expected number of occluded tiles on each of the 2 tilings for each of
4352 // the 3 tree priorities. 4366 // the 3 tree priorities.
4353 size_t expected_occluded_tile_count_on_pending[] = {4u, 0u}; 4367 size_t expected_occluded_tile_count_on_pending[] = {4u, 0u};
4354 size_t expected_occluded_tile_count_on_active[] = {12u, 3u}; 4368 size_t expected_occluded_tile_count_on_active[] = {12u, 3u};
4355 size_t total_expected_occluded_tile_count_on_trees[] = {15u, 4u}; 4369 size_t total_expected_occluded_tile_count_on_trees[] = {15u, 4u};
(...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after
5026 // New low res tiling. 5040 // New low res tiling.
5027 EXPECT_TRUE(tilings->tiling_at(2)->may_contain_low_resolution_tiles()); 5041 EXPECT_TRUE(tilings->tiling_at(2)->may_contain_low_resolution_tiles());
5028 5042
5029 // This tiling will be high res now, it won't contain low res content since it 5043 // This tiling will be high res now, it won't contain low res content since it
5030 // was all destroyed. 5044 // was all destroyed.
5031 EXPECT_FALSE(tilings->tiling_at(1)->may_contain_low_resolution_tiles()); 5045 EXPECT_FALSE(tilings->tiling_at(1)->may_contain_low_resolution_tiles());
5032 } 5046 }
5033 5047
5034 } // namespace 5048 } // namespace
5035 } // namespace cc 5049 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698