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

Side by Side Diff: client/deps/glbench/src/swaptest.cc

Issue 2794002: Added gflags switches: duration, tests, save, out. (Closed) Base URL: ssh://git@chromiumos-git//autotest.git
Patch Set: addressed comments Created 10 years, 6 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 | « client/deps/glbench/src/readpixeltest.cc ('k') | client/deps/glbench/src/testbase.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 (c) 2010 The Chromium OS Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium OS 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 "main.h" 5 #include "main.h"
6 #include "testbase.h" 6 #include "testbase.h"
7 7
8 8
9 namespace glbench { 9 namespace glbench {
10 10
11 11
12 class SwapTest : public TestBase { 12 class SwapTest : public TestBase {
13 public: 13 public:
14 SwapTest() {} 14 SwapTest() {}
15 virtual ~SwapTest() {} 15 virtual ~SwapTest() {}
16 virtual bool TestFunc(int iter); 16 virtual bool TestFunc(int iter);
17 virtual bool Run(); 17 virtual bool Run();
18 virtual const char* Name() const { return "swap"; }
18 19
19 private: 20 private:
20 DISALLOW_COPY_AND_ASSIGN(SwapTest); 21 DISALLOW_COPY_AND_ASSIGN(SwapTest);
21 }; 22 };
22 23
23 24
24 bool SwapTest::TestFunc(int iter) { 25 bool SwapTest::TestFunc(int iter) {
25 for (int i = 0 ; i < iter; ++i) { 26 for (int i = 0 ; i < iter; ++i) {
26 SwapBuffers(); 27 SwapBuffers();
27 } 28 }
28 return true; 29 return true;
29 } 30 }
30 31
31 32
32 bool SwapTest::Run() { 33 bool SwapTest::Run() {
33 RunTest(this, "us_swap_swap", 1.f, false); 34 RunTest(this, "us_swap_swap", 1.f, false);
34 return true; 35 return true;
35 } 36 }
36 37
37 38
38 TestBase* GetSwapTest() { 39 TestBase* GetSwapTest() {
39 return new SwapTest; 40 return new SwapTest;
40 } 41 }
41 42
42 } // namespace glbench 43 } // namespace glbench
OLDNEW
« no previous file with comments | « client/deps/glbench/src/readpixeltest.cc ('k') | client/deps/glbench/src/testbase.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698