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

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

Issue 1484163002: Raster display item lists via a visual rect RTree. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update test expectations. Created 4 years, 5 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/layers/picture_layer_impl.h" 5 #include "cc/layers/picture_layer_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <limits> 10 #include <limits>
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 void AssertNoTilesRequired(PictureLayerTiling* tiling) { 261 void AssertNoTilesRequired(PictureLayerTiling* tiling) {
262 std::vector<Tile*> tiles = tiling->AllTilesForTesting(); 262 std::vector<Tile*> tiles = tiling->AllTilesForTesting();
263 for (size_t i = 0; i < tiles.size(); ++i) 263 for (size_t i = 0; i < tiles.size(); ++i)
264 EXPECT_FALSE(tiles[i]->required_for_activation()) << "i: " << i; 264 EXPECT_FALSE(tiles[i]->required_for_activation()) << "i: " << i;
265 EXPECT_GT(tiles.size(), 0u); 265 EXPECT_GT(tiles.size(), 0u);
266 } 266 }
267 267
268 void SetInitialDeviceScaleFactor(float device_scale_factor) { 268 void SetInitialDeviceScaleFactor(float device_scale_factor) {
269 // Device scale factor is a per-tree property. However, tests can't directly 269 // Device scale factor is a per-tree property. However, tests can't directly
270 // set the pending tree's device scale factor before the pending tree is 270 // set the pending tree's device scale factor before the pending tree is
271 // created, and setting it after SetupPendingTreeis too late, since 271 // created, and setting it after SetupPendingTree is too late, since
272 // draw properties will already have been updated on the tree. To handle 272 // draw properties will already have been updated on the tree. To handle
273 // this, we initially set only the active tree's device scale factor, and we 273 // this, we initially set only the active tree's device scale factor, and we
274 // copy this over to the pending tree inside SetupPendingTree. 274 // copy this over to the pending tree inside SetupPendingTree.
275 host_impl()->active_tree()->SetDeviceScaleFactor(device_scale_factor); 275 host_impl()->active_tree()->SetDeviceScaleFactor(device_scale_factor);
276 } 276 }
277 277
278 void TestQuadsForSolidColor(bool test_for_solid); 278 void TestQuadsForSolidColor(bool test_for_solid);
279 }; 279 };
280 280
281 class NoLowResPictureLayerImplTest : public PictureLayerImplTest { 281 class NoLowResPictureLayerImplTest : public PictureLayerImplTest {
(...skipping 4719 matching lines...) Expand 10 before | Expand all | Expand 10 after
5001 EXPECT_FLOAT_EQ(expected_contents_scale, 5001 EXPECT_FLOAT_EQ(expected_contents_scale,
5002 pending_layer_ptr->picture_layer_tiling_set() 5002 pending_layer_ptr->picture_layer_tiling_set()
5003 ->FindTilingWithResolution(HIGH_RESOLUTION) 5003 ->FindTilingWithResolution(HIGH_RESOLUTION)
5004 ->contents_scale()) 5004 ->contents_scale())
5005 << "ideal_contents_scale: " << ideal_contents_scale; 5005 << "ideal_contents_scale: " << ideal_contents_scale;
5006 } 5006 }
5007 } 5007 }
5008 5008
5009 } // namespace 5009 } // namespace
5010 } // namespace cc 5010 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698