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

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

Issue 375923005: cc: Explicitly invalidate all dropped recordings on the main thread. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: invalid-resize: resizedeletestiles Created 6 years, 5 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 | Annotate | Revision Log
« 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/test/fake_picture_layer_tiling_client.h" 7 #include "cc/test/fake_picture_layer_tiling_client.h"
8 8
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 #include "testing/perf/perf_test.h" 10 #include "testing/perf/perf_test.h"
(...skipping 21 matching lines...) Expand all
32 picture_layer_tiling_->CreateAllTilesForTesting(); 32 picture_layer_tiling_->CreateAllTilesForTesting();
33 } 33 }
34 34
35 virtual void TearDown() OVERRIDE { 35 virtual void TearDown() OVERRIDE {
36 picture_layer_tiling_.reset(NULL); 36 picture_layer_tiling_.reset(NULL);
37 } 37 }
38 38
39 void RunInvalidateTest(const std::string& test_name, const Region& region) { 39 void RunInvalidateTest(const std::string& test_name, const Region& region) {
40 timer_.Reset(); 40 timer_.Reset();
41 do { 41 do {
42 picture_layer_tiling_->Invalidate(region); 42 picture_layer_tiling_->UpdateTilesToCurrentPile(
43 region, picture_layer_tiling_->TilingRect().size());
43 timer_.NextLap(); 44 timer_.NextLap();
44 } while (!timer_.HasTimeLimitExpired()); 45 } while (!timer_.HasTimeLimitExpired());
45 46
46 perf_test::PrintResult( 47 perf_test::PrintResult(
47 "invalidation", "", test_name, timer_.LapsPerSecond(), "runs/s", true); 48 "invalidation", "", test_name, timer_.LapsPerSecond(), "runs/s", true);
48 } 49 }
49 50
50 void RunUpdateTilePrioritiesStationaryTest(const std::string& test_name, 51 void RunUpdateTilePrioritiesStationaryTest(const std::string& test_name,
51 const gfx::Transform& transform) { 52 const gfx::Transform& transform) {
52 gfx::Rect viewport_rect(0, 0, 1024, 768); 53 gfx::Rect viewport_rect(0, 0, 1024, 768);
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 TEST_F(PictureLayerTilingPerfTest, TilingRasterTileIterator) { 182 TEST_F(PictureLayerTilingPerfTest, TilingRasterTileIterator) {
182 RunTilingRasterTileIteratorTest("32_100x100", 32, gfx::Rect(0, 0, 100, 100)); 183 RunTilingRasterTileIteratorTest("32_100x100", 32, gfx::Rect(0, 0, 100, 100));
183 RunTilingRasterTileIteratorTest("32_500x500", 32, gfx::Rect(0, 0, 500, 500)); 184 RunTilingRasterTileIteratorTest("32_500x500", 32, gfx::Rect(0, 0, 500, 500));
184 RunTilingRasterTileIteratorTest("64_100x100", 64, gfx::Rect(0, 0, 100, 100)); 185 RunTilingRasterTileIteratorTest("64_100x100", 64, gfx::Rect(0, 0, 100, 100));
185 RunTilingRasterTileIteratorTest("64_500x500", 64, gfx::Rect(0, 0, 500, 500)); 186 RunTilingRasterTileIteratorTest("64_500x500", 64, gfx::Rect(0, 0, 500, 500));
186 } 187 }
187 188
188 } // namespace 189 } // namespace
189 190
190 } // namespace cc 191 } // 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