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

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

Issue 38553002: cc: Add tile pool to tile manager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « cc/base/ref_counted_managed.h ('k') | cc/resources/tile.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/resources/picture_layer_tiling.h" 5 #include "cc/resources/picture_layer_tiling.h"
6 #include "cc/test/fake_picture_layer_tiling_client.h" 6 #include "cc/test/fake_picture_layer_tiling_client.h"
7 7
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 #include "testing/perf/perf_test.h" 9 #include "testing/perf/perf_test.h"
10 10
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 139
140 base::TimeTicks start_time_; 140 base::TimeTicks start_time_;
141 base::TimeDelta elapsed_; 141 base::TimeDelta elapsed_;
142 int num_runs_; 142 int num_runs_;
143 }; 143 };
144 144
145 TEST_F(PictureLayerTilingPerfTest, Invalidate) { 145 TEST_F(PictureLayerTilingPerfTest, Invalidate) {
146 Region one_tile(gfx::Rect(256, 256)); 146 Region one_tile(gfx::Rect(256, 256));
147 RunInvalidateTest("1x1", one_tile); 147 RunInvalidateTest("1x1", one_tile);
148 148
149 Region screen_region(gfx::Rect(5 * 256, 5 * 256));
150 RunInvalidateTest("5x5", screen_region);
151
152 Region large_screen_region(gfx::Rect(15 * 256, 15 * 256));
153 RunInvalidateTest("15x15", large_screen_region);
154
149 Region half_region(gfx::Rect(25 * 256, 50 * 256)); 155 Region half_region(gfx::Rect(25 * 256, 50 * 256));
150 RunInvalidateTest("25x50", half_region); 156 RunInvalidateTest("25x50", half_region);
151 157
152 Region full_region(gfx::Rect(50 * 256, 50 * 256)); 158 Region full_region(gfx::Rect(50 * 256, 50 * 256));
153 RunInvalidateTest("50x50", full_region); 159 RunInvalidateTest("50x50", full_region);
154 } 160 }
155 161
156 #if defined(OS_ANDROID) 162 #if defined(OS_ANDROID)
157 // TODO(vmpstr): Investigate why this is noisy (crbug.com/310220). 163 // TODO(vmpstr): Investigate why this is noisy (crbug.com/310220).
158 TEST_F(PictureLayerTilingPerfTest, DISABLED_UpdateTilePriorities) { 164 TEST_F(PictureLayerTilingPerfTest, DISABLED_UpdateTilePriorities) {
159 #else 165 #else
160 TEST_F(PictureLayerTilingPerfTest, UpdateTilePriorities) { 166 TEST_F(PictureLayerTilingPerfTest, UpdateTilePriorities) {
161 #endif // defined(OS_ANDROID) 167 #endif // defined(OS_ANDROID)
162 gfx::Transform transform; 168 gfx::Transform transform;
163 RunUpdateTilePrioritiesStationaryTest("no_transform", transform); 169 RunUpdateTilePrioritiesStationaryTest("no_transform", transform);
164 RunUpdateTilePrioritiesScrollingTest("no_transform", transform); 170 RunUpdateTilePrioritiesScrollingTest("no_transform", transform);
165 171
166 transform.Rotate(10); 172 transform.Rotate(10);
167 RunUpdateTilePrioritiesStationaryTest("rotation", transform); 173 RunUpdateTilePrioritiesStationaryTest("rotation", transform);
168 RunUpdateTilePrioritiesScrollingTest("rotation", transform); 174 RunUpdateTilePrioritiesScrollingTest("rotation", transform);
169 175
170 transform.ApplyPerspectiveDepth(10); 176 transform.ApplyPerspectiveDepth(10);
171 RunUpdateTilePrioritiesStationaryTest("perspective", transform); 177 RunUpdateTilePrioritiesStationaryTest("perspective", transform);
172 RunUpdateTilePrioritiesScrollingTest("perspective", transform); 178 RunUpdateTilePrioritiesScrollingTest("perspective", transform);
173 } 179 }
174 180
175 } // namespace 181 } // namespace
176 182
177 } // namespace cc 183 } // namespace cc
OLDNEW
« no previous file with comments | « cc/base/ref_counted_managed.h ('k') | cc/resources/tile.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698