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

Unified Diff: client/deps/glbench/src/teartest.h

Issue 1732030: Replaced funky state machines with classes. This is in preparation of doing the same to gl_Bench. (Closed) Base URL: ssh://git@chromiumos-git//autotest.git
Patch Set: Got rid of static test list initialization, fixed USE_EGL. Created 10 years, 8 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/main.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/teartest.h
diff --git a/client/deps/glbench/src/teartest.h b/client/deps/glbench/src/teartest.h
index 8d1659635c55c51765ac2298b11dd8fd00ff0e13..a11a97d4d341cfd232a151f0571c9566724e9160 100644
--- a/client/deps/glbench/src/teartest.h
+++ b/client/deps/glbench/src/teartest.h
@@ -7,20 +7,28 @@
#include <X11/Xlib.h>
-enum TestState {
- TestStart,
- TestLoop,
- TestStop
+
+class Test {
+ public:
+ virtual bool Start() = 0;
+ virtual bool Loop(int shift) = 0;
+ virtual void Stop() = 0;
+ virtual ~Test() {}
};
-typedef bool (*Test)(TestState state, int arg);
-void InitializePixmap();
-void UpdatePixmap(int i);
-void CopyPixmapToTexture();
+Pixmap AllocatePixmap();
+void InitializePixmap(Pixmap pixmap);
+void UpdatePixmap(Pixmap pixmap, int i);
+void CopyPixmapToTexture(Pixmap pixmap);
+
+Test* GetUniformTest();
+Test* GetTexImage2DTest();
+#ifdef USE_EGL
+Test* GetPixmapToTextureTestEGL();
+#else
+Test* GetPixmapToTextureTest();
+#endif
-// TODO: implement EGL counterpart.
-void InitNative(Pixmap pixmap);
-bool UpdateBindTexImage(TestState state, int arg);
#endif // BENCH_GL_TEARTEST_H_
« no previous file with comments | « client/deps/glbench/src/main.cc ('k') | client/deps/glbench/src/teartest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698