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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/deps/glbench/src/swaptest.cc
diff --git a/client/deps/glbench/src/swaptest.cc b/client/deps/glbench/src/swaptest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..f02acbe19ec0864d77ef9154c89958e558691f63
--- /dev/null
+++ b/client/deps/glbench/src/swaptest.cc
@@ -0,0 +1,42 @@
+// Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "main.h"
+#include "testbase.h"
+
+
+namespace glbench {
+
+
+class SwapTest : public TestBase {
+ public:
+ SwapTest() {}
+ virtual ~SwapTest() {}
+ virtual bool TestFunc(int iter);
+ virtual bool Run();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(SwapTest);
+};
+
+
+bool SwapTest::TestFunc(int iter) {
+ for (int i = 0 ; i < iter; ++i) {
+ SwapBuffers();
+ }
+ return true;
+}
+
+
+bool SwapTest::Run() {
+ RunTest(this, "us_swap_swap", 1.f, false);
+ return true;
+}
+
+
+TestBase* GetSwapTest() {
+ return new SwapTest;
+}
+
+} // namespace glbench
« 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