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

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

Issue 1196553009: Revert "cc: Make tiling interest rect calc based on viewport." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revert extra bools. Created 5 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.cc ('k') | cc/layers/picture_layer_impl_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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "base/thread_task_runner_handle.h" 7 #include "base/thread_task_runner_handle.h"
8 #include "cc/debug/lap_timer.h" 8 #include "cc/debug/lap_timer.h"
9 #include "cc/test/fake_impl_proxy.h" 9 #include "cc/test/fake_impl_proxy.h"
10 #include "cc/test/fake_layer_tree_host_impl.h" 10 #include "cc/test/fake_layer_tree_host_impl.h"
(...skipping 18 matching lines...) Expand all
29 FakePictureLayerImpl* layer, 29 FakePictureLayerImpl* layer,
30 std::vector<Tile*>* all_tiles) { 30 std::vector<Tile*>* all_tiles) {
31 PictureLayerTiling* tiling = layer->AddTiling(scale); 31 PictureLayerTiling* tiling = layer->AddTiling(scale);
32 32
33 tiling->CreateAllTilesForTesting(); 33 tiling->CreateAllTilesForTesting();
34 std::vector<Tile*> tiling_tiles = tiling->AllTilesForTesting(); 34 std::vector<Tile*> tiling_tiles = tiling->AllTilesForTesting();
35 std::copy( 35 std::copy(
36 tiling_tiles.begin(), tiling_tiles.end(), std::back_inserter(*all_tiles)); 36 tiling_tiles.begin(), tiling_tiles.end(), std::back_inserter(*all_tiles));
37 } 37 }
38 38
39 class LayerTreeSettingsWithLargeInterestArea : public LayerTreeSettings {
40 public:
41 LayerTreeSettingsWithLargeInterestArea() {
42 tiling_interest_area_viewport_multiplier = 10000;
43 }
44 };
45
46 class PictureLayerImplPerfTest : public testing::Test { 39 class PictureLayerImplPerfTest : public testing::Test {
47 public: 40 public:
48 PictureLayerImplPerfTest() 41 PictureLayerImplPerfTest()
49 : proxy_(base::ThreadTaskRunnerHandle::Get()), 42 : proxy_(base::ThreadTaskRunnerHandle::Get()),
50 host_impl_(LayerTreeSettingsWithLargeInterestArea(), 43 host_impl_(LayerTreeSettings(),
51 &proxy_, 44 &proxy_,
52 &shared_bitmap_manager_, 45 &shared_bitmap_manager_,
53 &task_graph_runner_), 46 &task_graph_runner_),
54 timer_(kWarmupRuns, 47 timer_(kWarmupRuns,
55 base::TimeDelta::FromMilliseconds(kTimeLimitMillis), 48 base::TimeDelta::FromMilliseconds(kTimeLimitMillis),
56 kTimeCheckInterval) {} 49 kTimeCheckInterval) {}
57 50
58 void SetUp() override { 51 void SetUp() override {
59 host_impl_.InitializeRenderer(FakeOutputSurface::Create3d()); 52 host_impl_.InitializeRenderer(FakeOutputSurface::Create3d());
60 } 53 }
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 ASSERT_TRUE(host_impl_.tile_manager() != nullptr); 243 ASSERT_TRUE(host_impl_.tile_manager() != nullptr);
251 host_impl_.tile_manager()->InitializeTilesWithResourcesForTesting(all_tiles); 244 host_impl_.tile_manager()->InitializeTilesWithResourcesForTesting(all_tiles);
252 245
253 RunEvictionQueueConstructTest("0_0_100x100", gfx::Rect(0, 0, 100, 100)); 246 RunEvictionQueueConstructTest("0_0_100x100", gfx::Rect(0, 0, 100, 100));
254 RunEvictionQueueConstructTest("5000_0_100x100", gfx::Rect(5000, 0, 100, 100)); 247 RunEvictionQueueConstructTest("5000_0_100x100", gfx::Rect(5000, 0, 100, 100));
255 RunEvictionQueueConstructTest("9999_0_100x100", gfx::Rect(9999, 0, 100, 100)); 248 RunEvictionQueueConstructTest("9999_0_100x100", gfx::Rect(9999, 0, 100, 100));
256 } 249 }
257 250
258 } // namespace 251 } // namespace
259 } // namespace cc 252 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/picture_layer_impl.cc ('k') | cc/layers/picture_layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698