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 #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 ClearTest : public TestBase { | 12 class ClearTest : public TestBase { |
13 public: | 13 public: |
14 ClearTest() : mask_(0) {} | 14 ClearTest() : mask_(0) {} |
15 virtual ~ClearTest() {} | 15 virtual ~ClearTest() {} |
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 "clear"; } |
18 | 19 |
19 private: | 20 private: |
20 GLbitfield mask_; | 21 GLbitfield mask_; |
21 DISALLOW_COPY_AND_ASSIGN(ClearTest); | 22 DISALLOW_COPY_AND_ASSIGN(ClearTest); |
22 }; | 23 }; |
23 | 24 |
24 | 25 |
25 bool ClearTest::TestFunc(int iter) { | 26 bool ClearTest::TestFunc(int iter) { |
26 GLbitfield mask = mask_; | 27 GLbitfield mask = mask_; |
27 glClear(mask); | 28 glClear(mask); |
(...skipping 25 matching lines...) Expand all Loading... |
53 g_width * g_height, true); | 54 g_width * g_height, true); |
54 return true; | 55 return true; |
55 } | 56 } |
56 | 57 |
57 | 58 |
58 TestBase* GetClearTest() { | 59 TestBase* GetClearTest() { |
59 return new ClearTest; | 60 return new ClearTest; |
60 } | 61 } |
61 | 62 |
62 } // namespace glbench | 63 } // namespace glbench |
OLD | NEW |