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

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

Issue 734063004: Update from https://crrev.com/304418 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: 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/quads/list_container_unittest.cc ('k') | cc/resources/picture_pile.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 25 matching lines...) Expand all
36 shared_bitmap_manager_.reset(new TestSharedBitmapManager()); 36 shared_bitmap_manager_.reset(new TestSharedBitmapManager());
37 resource_provider_ = ResourceProvider::Create(output_surface_.get(), 37 resource_provider_ = ResourceProvider::Create(output_surface_.get(),
38 shared_bitmap_manager_.get(), 38 shared_bitmap_manager_.get(),
39 NULL, 39 NULL,
40 NULL, 40 NULL,
41 0, 41 0,
42 false, 42 false,
43 1).Pass(); 43 1).Pass();
44 } 44 }
45 45
46 virtual void SetUp() override { 46 void SetUp() override {
47 picture_layer_tiling_client_.SetTileSize(gfx::Size(256, 256)); 47 picture_layer_tiling_client_.SetTileSize(gfx::Size(256, 256));
48 picture_layer_tiling_client_.set_max_tiles_for_interest_area(250); 48 picture_layer_tiling_client_.set_max_tiles_for_interest_area(250);
49 picture_layer_tiling_client_.set_tree(PENDING_TREE); 49 picture_layer_tiling_client_.set_tree(PENDING_TREE);
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 virtual void TearDown() override { 55 void TearDown() override { picture_layer_tiling_.reset(NULL); }
56 picture_layer_tiling_.reset(NULL);
57 }
58 56
59 void RunInvalidateTest(const std::string& test_name, const Region& region) { 57 void RunInvalidateTest(const std::string& test_name, const Region& region) {
60 timer_.Reset(); 58 timer_.Reset();
61 do { 59 do {
62 picture_layer_tiling_->UpdateTilesToCurrentRasterSource( 60 picture_layer_tiling_->UpdateTilesToCurrentRasterSource(
63 region, picture_layer_tiling_->tiling_size()); 61 region, picture_layer_tiling_->tiling_size());
64 timer_.NextLap(); 62 timer_.NextLap();
65 } while (!timer_.HasTimeLimitExpired()); 63 } while (!timer_.HasTimeLimitExpired());
66 64
67 perf_test::PrintResult( 65 perf_test::PrintResult(
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 "32_500x500", 32, gfx::Rect(0, 0, 500, 500)); 349 "32_500x500", 32, gfx::Rect(0, 0, 500, 500));
352 RunEvictionIteratorConstructAndIterateTest( 350 RunEvictionIteratorConstructAndIterateTest(
353 "64_100x100", 64, gfx::Rect(0, 0, 100, 100)); 351 "64_100x100", 64, gfx::Rect(0, 0, 100, 100));
354 RunEvictionIteratorConstructAndIterateTest( 352 RunEvictionIteratorConstructAndIterateTest(
355 "64_500x500", 64, gfx::Rect(0, 0, 500, 500)); 353 "64_500x500", 64, gfx::Rect(0, 0, 500, 500));
356 } 354 }
357 355
358 } // namespace 356 } // namespace
359 357
360 } // namespace cc 358 } // namespace cc
OLDNEW
« no previous file with comments | « cc/quads/list_container_unittest.cc ('k') | cc/resources/picture_pile.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698