| 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 <stdlib.h> | 5 #include <stdlib.h> |
| 6 | 6 |
| 7 #include "main.h" | 7 #include "main.h" |
| 8 #include "testbase.h" | 8 #include "testbase.h" |
| 9 #include "utils.h" | 9 #include "utils.h" |
| 10 | 10 |
| 11 | 11 |
| 12 namespace glbench { | 12 namespace glbench { |
| 13 | 13 |
| 14 | 14 |
| 15 class TriangleSetupTest : public DrawElementsTestFunc { | 15 class TriangleSetupTest : public DrawElementsTestFunc { |
| 16 public: | 16 public: |
| 17 TriangleSetupTest() {} | 17 TriangleSetupTest() {} |
| 18 virtual ~TriangleSetupTest() {} | 18 virtual ~TriangleSetupTest() {} |
| 19 virtual bool Run(); | 19 virtual bool Run(); |
| 20 virtual const char* Name() const { return "triangle_setup"; } |
| 20 | 21 |
| 21 private: | 22 private: |
| 22 DISALLOW_COPY_AND_ASSIGN(TriangleSetupTest); | 23 DISALLOW_COPY_AND_ASSIGN(TriangleSetupTest); |
| 23 }; | 24 }; |
| 24 | 25 |
| 25 | 26 |
| 26 bool TriangleSetupTest::Run() { | 27 bool TriangleSetupTest::Run() { |
| 27 glViewport(-g_width, -g_height, g_width*2, g_height*2); | 28 glViewport(-g_width, -g_height, g_width*2, g_height*2); |
| 28 | 29 |
| 29 // Larger meshes make this test too slow for devices that do 1 mtri/sec. | 30 // Larger meshes make this test too slow for devices that do 1 mtri/sec. |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 return true; | 77 return true; |
| 77 } | 78 } |
| 78 | 79 |
| 79 | 80 |
| 80 TestBase* GetTriangleSetupTest() { | 81 TestBase* GetTriangleSetupTest() { |
| 81 return new TriangleSetupTest; | 82 return new TriangleSetupTest; |
| 82 } | 83 } |
| 83 | 84 |
| 84 | 85 |
| 85 } // namespace glbench | 86 } // namespace glbench |
| OLD | NEW |