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

Side by Side Diff: client/deps/glbench/src/testbase.h

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/swaptest.cc ('k') | client/deps/glbench/src/testbase.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 (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 #ifndef BENCH_GL_TESTBASE_H_ 5 #ifndef BENCH_GL_TESTBASE_H_
6 #define BENCH_GL_TESTBASE_H_ 6 #define BENCH_GL_TESTBASE_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 9
10 #include "main.h" 10 #include "main.h"
(...skipping 26 matching lines...) Expand all
37 void RunTest(TestBase* test, const char *name, float coefficient, bool inverse); 37 void RunTest(TestBase* test, const char *name, float coefficient, bool inverse);
38 38
39 39
40 class TestBase { 40 class TestBase {
41 public: 41 public:
42 virtual ~TestBase() {} 42 virtual ~TestBase() {}
43 // Runs the test case n times. 43 // Runs the test case n times.
44 virtual bool TestFunc(int n) = 0; 44 virtual bool TestFunc(int n) = 0;
45 // Main entry point into the test. 45 // Main entry point into the test.
46 virtual bool Run() = 0; 46 virtual bool Run() = 0;
47 virtual const char* Name() const = 0;
47 }; 48 };
48 49
49 // Helper class to time glDrawArrays. 50 // Helper class to time glDrawArrays.
50 class DrawArraysTestFunc : public TestBase { 51 class DrawArraysTestFunc : public TestBase {
51 public: 52 public:
52 virtual ~DrawArraysTestFunc() {} 53 virtual ~DrawArraysTestFunc() {}
53 virtual bool TestFunc(int); 54 virtual bool TestFunc(int);
54 55
55 // Runs the test and reports results in mpixels per second, assuming each 56 // Runs the test and reports results in mpixels per second, assuming each
56 // iteration updates the whole window (its size is g_width by g_height). 57 // iteration updates the whole window (its size is g_width by g_height).
(...skipping 17 matching lines...) Expand all
74 virtual bool TestFunc(int); 75 virtual bool TestFunc(int);
75 76
76 protected: 77 protected:
77 // Passed to glDrawElements. 78 // Passed to glDrawElements.
78 GLsizei count_; 79 GLsizei count_;
79 }; 80 };
80 81
81 } // namespace glbench 82 } // namespace glbench
82 83
83 #endif // BENCH_GL_TESTBASE_H_ 84 #endif // BENCH_GL_TESTBASE_H_
OLDNEW
« no previous file with comments | « client/deps/glbench/src/swaptest.cc ('k') | client/deps/glbench/src/testbase.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698