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

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

Issue 640063010: cc: Don't swap PictureLayerTilingSet on activate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: noswap: rebase Created 6 years 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 picture_layer_tiling_ = PictureLayerTiling::Create( 50 picture_layer_tiling_ = PictureLayerTiling::Create(
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_->Invalidate(region);
61 picture_layer_tiling_client_.raster_source(), region,
62 picture_layer_tiling_->tiling_size());
63 timer_.NextLap(); 61 timer_.NextLap();
64 } while (!timer_.HasTimeLimitExpired()); 62 } while (!timer_.HasTimeLimitExpired());
65 63
66 perf_test::PrintResult( 64 perf_test::PrintResult(
67 "invalidation", "", test_name, timer_.LapsPerSecond(), "runs/s", true); 65 "invalidation", "", test_name, timer_.LapsPerSecond(), "runs/s", true);
68 } 66 }
69 67
70 void RunComputeTilePriorityRectsStationaryTest( 68 void RunComputeTilePriorityRectsStationaryTest(
71 const std::string& test_name, 69 const std::string& test_name,
72 const gfx::Transform& transform) { 70 const gfx::Transform& transform) {
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 "32_500x500", 32, gfx::Rect(0, 0, 500, 500)); 235 "32_500x500", 32, gfx::Rect(0, 0, 500, 500));
238 RunRasterIteratorConstructAndIterateTest( 236 RunRasterIteratorConstructAndIterateTest(
239 "64_100x100", 64, gfx::Rect(0, 0, 100, 100)); 237 "64_100x100", 64, gfx::Rect(0, 0, 100, 100));
240 RunRasterIteratorConstructAndIterateTest( 238 RunRasterIteratorConstructAndIterateTest(
241 "64_500x500", 64, gfx::Rect(0, 0, 500, 500)); 239 "64_500x500", 64, gfx::Rect(0, 0, 500, 500));
242 } 240 }
243 241
244 } // namespace 242 } // namespace
245 243
246 } // namespace cc 244 } // 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