OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "main.h" |
| 6 #include "testbase.h" |
| 7 |
| 8 |
| 9 namespace glbench { |
| 10 |
| 11 |
| 12 class SwapTest : public TestBase { |
| 13 public: |
| 14 SwapTest() {} |
| 15 virtual ~SwapTest() {} |
| 16 virtual bool TestFunc(int iter); |
| 17 virtual bool Run(); |
| 18 |
| 19 private: |
| 20 DISALLOW_COPY_AND_ASSIGN(SwapTest); |
| 21 }; |
| 22 |
| 23 |
| 24 bool SwapTest::TestFunc(int iter) { |
| 25 for (int i = 0 ; i < iter; ++i) { |
| 26 SwapBuffers(); |
| 27 } |
| 28 return true; |
| 29 } |
| 30 |
| 31 |
| 32 bool SwapTest::Run() { |
| 33 RunTest(this, "us_swap_swap", 1.f, false); |
| 34 return true; |
| 35 } |
| 36 |
| 37 |
| 38 TestBase* GetSwapTest() { |
| 39 return new SwapTest; |
| 40 } |
| 41 |
| 42 } // namespace glbench |
OLD | NEW |