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

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

Issue 1362663002: cc: Remove PicturePile and PicturePileImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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/debug/lap_timer.h" 5 #include "cc/debug/lap_timer.h"
6 #include "cc/resources/resource_provider.h" 6 #include "cc/resources/resource_provider.h"
7 #include "cc/resources/scoped_resource.h" 7 #include "cc/resources/scoped_resource.h"
8 #include "cc/test/fake_display_list_raster_source.h"
8 #include "cc/test/fake_output_surface.h" 9 #include "cc/test/fake_output_surface.h"
9 #include "cc/test/fake_output_surface_client.h" 10 #include "cc/test/fake_output_surface_client.h"
10 #include "cc/test/fake_picture_layer_tiling_client.h" 11 #include "cc/test/fake_picture_layer_tiling_client.h"
11 #include "cc/test/fake_picture_pile_impl.h"
12 #include "cc/test/fake_resource_provider.h" 12 #include "cc/test/fake_resource_provider.h"
13 #include "cc/test/test_context_provider.h" 13 #include "cc/test/test_context_provider.h"
14 #include "cc/test/test_shared_bitmap_manager.h" 14 #include "cc/test/test_shared_bitmap_manager.h"
15 #include "cc/tiles/picture_layer_tiling.h" 15 #include "cc/tiles/picture_layer_tiling.h"
16 #include "cc/trees/layer_tree_settings.h" 16 #include "cc/trees/layer_tree_settings.h"
17 17
18 #include "testing/gtest/include/gtest/gtest.h" 18 #include "testing/gtest/include/gtest/gtest.h"
19 #include "testing/perf/perf_test.h" 19 #include "testing/perf/perf_test.h"
20 20
21 namespace cc { 21 namespace cc {
(...skipping 15 matching lines...) Expand all
37 CHECK(output_surface_->BindToClient(&output_surface_client_)); 37 CHECK(output_surface_->BindToClient(&output_surface_client_));
38 38
39 shared_bitmap_manager_.reset(new TestSharedBitmapManager()); 39 shared_bitmap_manager_.reset(new TestSharedBitmapManager());
40 resource_provider_ = FakeResourceProvider::Create( 40 resource_provider_ = FakeResourceProvider::Create(
41 output_surface_.get(), shared_bitmap_manager_.get()); 41 output_surface_.get(), shared_bitmap_manager_.get());
42 } 42 }
43 43
44 void SetUp() override { 44 void SetUp() override {
45 LayerTreeSettings defaults; 45 LayerTreeSettings defaults;
46 picture_layer_tiling_client_.SetTileSize(gfx::Size(256, 256)); 46 picture_layer_tiling_client_.SetTileSize(gfx::Size(256, 256));
47 scoped_refptr<FakePicturePileImpl> pile = 47 scoped_refptr<FakeDisplayListRasterSource> raster_source =
48 FakePicturePileImpl::CreateFilledPileWithDefaultTileSize( 48 FakeDisplayListRasterSource::CreateFilled(
49 gfx::Size(256 * 50, 256 * 50)); 49 gfx::Size(256 * 50, 256 * 50));
50 picture_layer_tiling_ = PictureLayerTiling::Create( 50 picture_layer_tiling_ = PictureLayerTiling::Create(
51 PENDING_TREE, 1.f, pile, &picture_layer_tiling_client_, 51 PENDING_TREE, 1.f, raster_source, &picture_layer_tiling_client_,
52 defaults.tiling_interest_area_padding, 52 defaults.tiling_interest_area_padding,
53 defaults.skewport_target_time_in_seconds, 53 defaults.skewport_target_time_in_seconds,
54 defaults.skewport_extrapolation_limit_in_content_pixels); 54 defaults.skewport_extrapolation_limit_in_content_pixels);
55 picture_layer_tiling_->CreateAllTilesForTesting(); 55 picture_layer_tiling_->CreateAllTilesForTesting();
56 } 56 }
57 57
58 void TearDown() override { picture_layer_tiling_.reset(NULL); } 58 void TearDown() override { picture_layer_tiling_.reset(NULL); }
59 59
60 void RunInvalidateTest(const std::string& test_name, const Region& region) { 60 void RunInvalidateTest(const std::string& test_name, const Region& region) {
61 timer_.Reset(); 61 timer_.Reset();
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 RunComputeTilePriorityRectsStationaryTest("rotation", transform); 162 RunComputeTilePriorityRectsStationaryTest("rotation", transform);
163 RunComputeTilePriorityRectsScrollingTest("rotation", transform); 163 RunComputeTilePriorityRectsScrollingTest("rotation", transform);
164 164
165 transform.ApplyPerspectiveDepth(10); 165 transform.ApplyPerspectiveDepth(10);
166 RunComputeTilePriorityRectsStationaryTest("perspective", transform); 166 RunComputeTilePriorityRectsStationaryTest("perspective", transform);
167 RunComputeTilePriorityRectsScrollingTest("perspective", transform); 167 RunComputeTilePriorityRectsScrollingTest("perspective", transform);
168 } 168 }
169 169
170 } // namespace 170 } // namespace
171 } // namespace cc 171 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698