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

Side by Side Diff: client/deps/glbench/src/swaptest.cc

Issue 2123013: Split tests into individual files. Got rid of globals by converting them to classes. (Closed) Base URL: ssh://git@chromiumos-git//autotest.git
Patch Set: addressed comments Created 10 years, 7 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/shaders.cc ('k') | client/deps/glbench/src/teartest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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
OLDNEW
« no previous file with comments | « client/deps/glbench/src/shaders.cc ('k') | client/deps/glbench/src/teartest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698