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

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

Issue 1126793002: cc: Make tiling interest rect calc based on viewport. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove switch entry from chromeos cmdline. Created 5 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 unified diff | Download patch
« no previous file with comments | « cc/resources/picture_layer_tiling.cc ('k') | cc/resources/picture_layer_tiling_set.h » ('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/debug/lap_timer.h" 5 #include "cc/debug/lap_timer.h"
6 #include "cc/resources/picture_layer_tiling.h" 6 #include "cc/resources/picture_layer_tiling.h"
7 #include "cc/resources/resource_provider.h" 7 #include "cc/resources/resource_provider.h"
8 #include "cc/resources/scoped_resource.h" 8 #include "cc/resources/scoped_resource.h"
9 #include "cc/test/fake_output_surface.h" 9 #include "cc/test/fake_output_surface.h"
10 #include "cc/test/fake_output_surface_client.h" 10 #include "cc/test/fake_output_surface_client.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 } 45 }
46 46
47 void SetUp() override { 47 void SetUp() override {
48 LayerTreeSettings defaults; 48 LayerTreeSettings defaults;
49 picture_layer_tiling_client_.SetTileSize(gfx::Size(256, 256)); 49 picture_layer_tiling_client_.SetTileSize(gfx::Size(256, 256));
50 scoped_refptr<FakePicturePileImpl> pile = 50 scoped_refptr<FakePicturePileImpl> pile =
51 FakePicturePileImpl::CreateFilledPileWithDefaultTileSize( 51 FakePicturePileImpl::CreateFilledPileWithDefaultTileSize(
52 gfx::Size(256 * 50, 256 * 50)); 52 gfx::Size(256 * 50, 256 * 50));
53 picture_layer_tiling_ = PictureLayerTiling::Create( 53 picture_layer_tiling_ = PictureLayerTiling::Create(
54 PENDING_TREE, 1.f, pile, &picture_layer_tiling_client_, 54 PENDING_TREE, 1.f, pile, &picture_layer_tiling_client_,
55 defaults.max_tiles_for_interest_area, 55 defaults.tiling_interest_area_viewport_multiplier,
56 defaults.skewport_target_time_in_seconds, 56 defaults.skewport_target_time_in_seconds,
57 defaults.skewport_extrapolation_limit_in_content_pixels); 57 defaults.skewport_extrapolation_limit_in_content_pixels);
58 picture_layer_tiling_->CreateAllTilesForTesting(); 58 picture_layer_tiling_->CreateAllTilesForTesting();
59 } 59 }
60 60
61 void TearDown() override { picture_layer_tiling_.reset(NULL); } 61 void TearDown() override { picture_layer_tiling_.reset(NULL); }
62 62
63 void RunInvalidateTest(const std::string& test_name, const Region& region) { 63 void RunInvalidateTest(const std::string& test_name, const Region& region) {
64 timer_.Reset(); 64 timer_.Reset();
65 do { 65 do {
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 RunComputeTilePriorityRectsStationaryTest("rotation", transform); 165 RunComputeTilePriorityRectsStationaryTest("rotation", transform);
166 RunComputeTilePriorityRectsScrollingTest("rotation", transform); 166 RunComputeTilePriorityRectsScrollingTest("rotation", transform);
167 167
168 transform.ApplyPerspectiveDepth(10); 168 transform.ApplyPerspectiveDepth(10);
169 RunComputeTilePriorityRectsStationaryTest("perspective", transform); 169 RunComputeTilePriorityRectsStationaryTest("perspective", transform);
170 RunComputeTilePriorityRectsScrollingTest("perspective", transform); 170 RunComputeTilePriorityRectsScrollingTest("perspective", transform);
171 } 171 }
172 172
173 } // namespace 173 } // namespace
174 } // namespace cc 174 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/picture_layer_tiling.cc ('k') | cc/resources/picture_layer_tiling_set.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698