OLD | NEW |
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/resource_provider.h" | 6 #include "cc/resources/resource_provider.h" |
7 #include "cc/resources/scoped_resource.h" | 7 #include "cc/resources/scoped_resource.h" |
8 #include "cc/test/fake_output_surface.h" | 8 #include "cc/test/fake_output_surface.h" |
9 #include "cc/test/fake_output_surface_client.h" | 9 #include "cc/test/fake_output_surface_client.h" |
10 #include "cc/test/fake_picture_layer_tiling_client.h" | 10 #include "cc/test/fake_picture_layer_tiling_client.h" |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 perf_test::PrintResult("compute_tile_priority_rects_scrolling", | 117 perf_test::PrintResult("compute_tile_priority_rects_scrolling", |
118 "", | 118 "", |
119 test_name, | 119 test_name, |
120 timer_.LapsPerSecond(), | 120 timer_.LapsPerSecond(), |
121 "runs/s", | 121 "runs/s", |
122 true); | 122 true); |
123 } | 123 } |
124 | 124 |
125 private: | 125 private: |
126 FakePictureLayerTilingClient picture_layer_tiling_client_; | 126 FakePictureLayerTilingClient picture_layer_tiling_client_; |
127 scoped_ptr<PictureLayerTiling> picture_layer_tiling_; | 127 std::unique_ptr<PictureLayerTiling> picture_layer_tiling_; |
128 | 128 |
129 LapTimer timer_; | 129 LapTimer timer_; |
130 | 130 |
131 scoped_refptr<ContextProvider> context_provider_; | 131 scoped_refptr<ContextProvider> context_provider_; |
132 FakeOutputSurfaceClient output_surface_client_; | 132 FakeOutputSurfaceClient output_surface_client_; |
133 scoped_ptr<FakeOutputSurface> output_surface_; | 133 std::unique_ptr<FakeOutputSurface> output_surface_; |
134 scoped_ptr<SharedBitmapManager> shared_bitmap_manager_; | 134 std::unique_ptr<SharedBitmapManager> shared_bitmap_manager_; |
135 scoped_ptr<ResourceProvider> resource_provider_; | 135 std::unique_ptr<ResourceProvider> resource_provider_; |
136 }; | 136 }; |
137 | 137 |
138 TEST_F(PictureLayerTilingPerfTest, Invalidate) { | 138 TEST_F(PictureLayerTilingPerfTest, Invalidate) { |
139 Region one_tile(gfx::Rect(256, 256)); | 139 Region one_tile(gfx::Rect(256, 256)); |
140 RunInvalidateTest("1x1", one_tile); | 140 RunInvalidateTest("1x1", one_tile); |
141 | 141 |
142 Region half_region(gfx::Rect(25 * 256, 50 * 256)); | 142 Region half_region(gfx::Rect(25 * 256, 50 * 256)); |
143 RunInvalidateTest("25x50", half_region); | 143 RunInvalidateTest("25x50", half_region); |
144 | 144 |
145 Region full_region(gfx::Rect(50 * 256, 50 * 256)); | 145 Region full_region(gfx::Rect(50 * 256, 50 * 256)); |
(...skipping 15 matching lines...) Expand all Loading... |
161 RunComputeTilePriorityRectsStationaryTest("rotation", transform); | 161 RunComputeTilePriorityRectsStationaryTest("rotation", transform); |
162 RunComputeTilePriorityRectsScrollingTest("rotation", transform); | 162 RunComputeTilePriorityRectsScrollingTest("rotation", transform); |
163 | 163 |
164 transform.ApplyPerspectiveDepth(10); | 164 transform.ApplyPerspectiveDepth(10); |
165 RunComputeTilePriorityRectsStationaryTest("perspective", transform); | 165 RunComputeTilePriorityRectsStationaryTest("perspective", transform); |
166 RunComputeTilePriorityRectsScrollingTest("perspective", transform); | 166 RunComputeTilePriorityRectsScrollingTest("perspective", transform); |
167 } | 167 } |
168 | 168 |
169 } // namespace | 169 } // namespace |
170 } // namespace cc | 170 } // namespace cc |
OLD | NEW |