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

Side by Side Diff: cc/quads/draw_quad_perftest.cc

Issue 1866203004: Convert //cc from scoped_ptr to std::unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptrcc: rebase Created 4 years, 8 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
« no previous file with comments | « cc/quads/draw_polygon_unittest.cc ('k') | cc/quads/draw_quad_unittest.cc » ('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 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
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
OLDNEW
« no previous file with comments | « cc/quads/draw_polygon_unittest.cc ('k') | cc/quads/draw_quad_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698