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

Side by Side Diff: cc/resources/picture_layer_tiling_unittest.cc

Issue 817653003: Update from https://crrev.com/309717 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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/resources/filter_display_item.h ('k') | cc/resources/prioritized_resource_unittest.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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/resources/picture_layer_tiling.h" 5 #include "cc/resources/picture_layer_tiling.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <set> 8 #include <set>
9 9
10 #include "cc/base/math_util.h" 10 #include "cc/base/math_util.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 raster_source, 69 raster_source,
70 client, 70 client,
71 max_tiles_for_interest_area, 71 max_tiles_for_interest_area,
72 skewport_target_time, 72 skewport_target_time,
73 skewport_extrapolation_limit) {} 73 skewport_extrapolation_limit) {}
74 }; 74 };
75 75
76 class PictureLayerTilingIteratorTest : public testing::Test { 76 class PictureLayerTilingIteratorTest : public testing::Test {
77 public: 77 public:
78 PictureLayerTilingIteratorTest() {} 78 PictureLayerTilingIteratorTest() {}
79 virtual ~PictureLayerTilingIteratorTest() {} 79 ~PictureLayerTilingIteratorTest() override {}
80 80
81 void Initialize(const gfx::Size& tile_size, 81 void Initialize(const gfx::Size& tile_size,
82 float contents_scale, 82 float contents_scale,
83 const gfx::Size& layer_bounds) { 83 const gfx::Size& layer_bounds) {
84 client_.SetTileSize(tile_size); 84 client_.SetTileSize(tile_size);
85 client_.set_tree(PENDING_TREE); 85 client_.set_tree(PENDING_TREE);
86 scoped_refptr<FakePicturePileImpl> pile = 86 scoped_refptr<FakePicturePileImpl> pile =
87 FakePicturePileImpl::CreateFilledPileWithDefaultTileSize(layer_bounds); 87 FakePicturePileImpl::CreateFilledPileWithDefaultTileSize(layer_bounds);
88 tiling_ = TestablePictureLayerTiling::Create(contents_scale, pile, &client_, 88 tiling_ = TestablePictureLayerTiling::Create(contents_scale, pile, &client_,
89 LayerTreeSettings()); 89 LayerTreeSettings());
(...skipping 1977 matching lines...) Expand 10 before | Expand all | Expand 10 after
2067 tiling_->SetRasterSourceAndResize(pile); 2067 tiling_->SetRasterSourceAndResize(pile);
2068 2068
2069 // Tile size in the tiling should be resized to 250x200. 2069 // Tile size in the tiling should be resized to 250x200.
2070 EXPECT_EQ(250, tiling_->TilingDataForTesting().max_texture_size().width()); 2070 EXPECT_EQ(250, tiling_->TilingDataForTesting().max_texture_size().width());
2071 EXPECT_EQ(200, tiling_->TilingDataForTesting().max_texture_size().height()); 2071 EXPECT_EQ(200, tiling_->TilingDataForTesting().max_texture_size().height());
2072 EXPECT_EQ(0u, tiling_->AllRefTilesForTesting().size()); 2072 EXPECT_EQ(0u, tiling_->AllRefTilesForTesting().size());
2073 } 2073 }
2074 2074
2075 } // namespace 2075 } // namespace
2076 } // namespace cc 2076 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/filter_display_item.h ('k') | cc/resources/prioritized_resource_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698