OLD | NEW |
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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 public: | 51 public: |
52 virtual ~DrawArraysTestFunc() {} | 52 virtual ~DrawArraysTestFunc() {} |
53 virtual bool TestFunc(int); | 53 virtual bool TestFunc(int); |
54 | 54 |
55 // Runs the test and reports results in mpixels per second, assuming each | 55 // 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). | 56 // iteration updates the whole window (its size is g_width by g_height). |
57 void FillRateTestNormal(const char* name); | 57 void FillRateTestNormal(const char* name); |
58 // Runs the test and reports results in mpixels per second, assuming each | 58 // Runs the test and reports results in mpixels per second, assuming each |
59 // iteration updates a window of width by height pixels. | 59 // iteration updates a window of width by height pixels. |
60 void FillRateTestNormalSubWindow(const char* name, float width, float height); | 60 void FillRateTestNormalSubWindow(const char* name, float width, float height); |
61 #ifndef USE_EGL | 61 #if defined(USE_OPENGL) |
62 // Runs the test three times: with blending on; with depth test enabled and | 62 // Runs the test three times: with blending on; with depth test enabled and |
63 // depth function of GL_NOTEQUAL; with depth function GL_NEVER. Results are | 63 // depth function of GL_NOTEQUAL; with depth function GL_NEVER. Results are |
64 // reported as in FillRateTestNormal. | 64 // reported as in FillRateTestNormal. |
65 void FillRateTestBlendDepth(const char *name); | 65 void FillRateTestBlendDepth(const char *name); |
66 #endif | 66 #endif |
67 }; | 67 }; |
68 | 68 |
69 // Helper class to time glDrawElements. | 69 // Helper class to time glDrawElements. |
70 class DrawElementsTestFunc : public TestBase { | 70 class DrawElementsTestFunc : public TestBase { |
71 public: | 71 public: |
72 DrawElementsTestFunc() : count_(0) {} | 72 DrawElementsTestFunc() : count_(0) {} |
73 virtual ~DrawElementsTestFunc() {} | 73 virtual ~DrawElementsTestFunc() {} |
74 virtual bool TestFunc(int); | 74 virtual bool TestFunc(int); |
75 | 75 |
76 protected: | 76 protected: |
77 // Passed to glDrawElements. | 77 // Passed to glDrawElements. |
78 GLsizei count_; | 78 GLsizei count_; |
79 }; | 79 }; |
80 | 80 |
81 } // namespace glbench | 81 } // namespace glbench |
82 | 82 |
83 #endif // BENCH_GL_TESTBASE_H_ | 83 #endif // BENCH_GL_TESTBASE_H_ |
OLD | NEW |