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

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

Issue 716283003: cc: Remove GetRasterSource from PictureLayerTilingClient. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 1 month 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 1, gfx::Size(256 * 50, 256 * 50), &picture_layer_tiling_client_); 51 1, gfx::Size(256 * 50, 256 * 50), &picture_layer_tiling_client_);
52 picture_layer_tiling_->CreateAllTilesForTesting(); 52 picture_layer_tiling_->CreateAllTilesForTesting();
53 } 53 }
54 54
55 void TearDown() override { picture_layer_tiling_.reset(NULL); } 55 void TearDown() override { picture_layer_tiling_.reset(NULL); }
56 56
57 void RunInvalidateTest(const std::string& test_name, const Region& region) { 57 void RunInvalidateTest(const std::string& test_name, const Region& region) {
58 timer_.Reset(); 58 timer_.Reset();
59 do { 59 do {
60 picture_layer_tiling_->UpdateTilesToCurrentRasterSource( 60 picture_layer_tiling_->UpdateTilesToCurrentRasterSource(
61 region, picture_layer_tiling_->tiling_size()); 61 picture_layer_tiling_client_.raster_source(), region,
62 picture_layer_tiling_->tiling_size());
62 timer_.NextLap(); 63 timer_.NextLap();
63 } while (!timer_.HasTimeLimitExpired()); 64 } while (!timer_.HasTimeLimitExpired());
64 65
65 perf_test::PrintResult( 66 perf_test::PrintResult(
66 "invalidation", "", test_name, timer_.LapsPerSecond(), "runs/s", true); 67 "invalidation", "", test_name, timer_.LapsPerSecond(), "runs/s", true);
67 } 68 }
68 69
69 void RunComputeTilePriorityRectsStationaryTest( 70 void RunComputeTilePriorityRectsStationaryTest(
70 const std::string& test_name, 71 const std::string& test_name,
71 const gfx::Transform& transform) { 72 const gfx::Transform& transform) {
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 "32_500x500", 32, gfx::Rect(0, 0, 500, 500)); 350 "32_500x500", 32, gfx::Rect(0, 0, 500, 500));
350 RunEvictionIteratorConstructAndIterateTest( 351 RunEvictionIteratorConstructAndIterateTest(
351 "64_100x100", 64, gfx::Rect(0, 0, 100, 100)); 352 "64_100x100", 64, gfx::Rect(0, 0, 100, 100));
352 RunEvictionIteratorConstructAndIterateTest( 353 RunEvictionIteratorConstructAndIterateTest(
353 "64_500x500", 64, gfx::Rect(0, 0, 500, 500)); 354 "64_500x500", 64, gfx::Rect(0, 0, 500, 500));
354 } 355 }
355 356
356 } // namespace 357 } // namespace
357 358
358 } // namespace cc 359 } // 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