OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 <vector> | 5 #include <vector> |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/time/time.h" | 8 #include "base/time/time.h" |
9 #include "cc/debug/lap_timer.h" | 9 #include "cc/debug/lap_timer.h" |
10 #include "cc/quads/draw_quad.h" | 10 #include "cc/quads/draw_quad.h" |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 } | 91 } |
92 timer_.NextLap(); | 92 timer_.NextLap(); |
93 } while (!timer_.HasTimeLimitExpired()); | 93 } while (!timer_.HasTimeLimitExpired()); |
94 | 94 |
95 perf_test::PrintResult("draw_quad_iterate_resources", "", test_name, | 95 perf_test::PrintResult("draw_quad_iterate_resources", "", test_name, |
96 timer_.LapsPerSecond(), "runs/s", true); | 96 timer_.LapsPerSecond(), "runs/s", true); |
97 CleanUpRenderPass(); | 97 CleanUpRenderPass(); |
98 } | 98 } |
99 | 99 |
100 private: | 100 private: |
101 scoped_ptr<RenderPass> render_pass_; | 101 std::unique_ptr<RenderPass> render_pass_; |
102 SharedQuadState* shared_state_; | 102 SharedQuadState* shared_state_; |
103 LapTimer timer_; | 103 LapTimer timer_; |
104 }; | 104 }; |
105 | 105 |
106 TEST_F(DrawQuadPerfTest, IterateResources) { | 106 TEST_F(DrawQuadPerfTest, IterateResources) { |
107 RunIterateResourceTest("10_quads", 10); | 107 RunIterateResourceTest("10_quads", 10); |
108 RunIterateResourceTest("100_quads", 100); | 108 RunIterateResourceTest("100_quads", 100); |
109 RunIterateResourceTest("500_quads", 500); | 109 RunIterateResourceTest("500_quads", 500); |
110 } | 110 } |
111 | 111 |
112 } // namespace | 112 } // namespace |
113 } // namespace cc | 113 } // namespace cc |
OLD | NEW |