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 #ifndef BENCH_GL_TEARTEST_H_ | 5 #ifndef BENCH_GL_TEARTEST_H_ |
6 #define BENCH_GL_TEARTEST_H_ | 6 #define BENCH_GL_TEARTEST_H_ |
7 | 7 |
8 #include <X11/Xlib.h> | 8 #include <X11/Xlib.h> |
9 | 9 |
10 enum TestState { | 10 |
11 TestStart, | 11 class Test { |
12 TestLoop, | 12 public: |
13 TestStop | 13 virtual bool Start() = 0; |
| 14 virtual bool Loop(int shift) = 0; |
| 15 virtual void Stop() = 0; |
| 16 virtual ~Test() {} |
14 }; | 17 }; |
15 | 18 |
16 typedef bool (*Test)(TestState state, int arg); | |
17 | 19 |
18 void InitializePixmap(); | 20 Pixmap AllocatePixmap(); |
19 void UpdatePixmap(int i); | 21 void InitializePixmap(Pixmap pixmap); |
20 void CopyPixmapToTexture(); | 22 void UpdatePixmap(Pixmap pixmap, int i); |
| 23 void CopyPixmapToTexture(Pixmap pixmap); |
21 | 24 |
22 // TODO: implement EGL counterpart. | 25 Test* GetUniformTest(); |
23 void InitNative(Pixmap pixmap); | 26 Test* GetTexImage2DTest(); |
24 bool UpdateBindTexImage(TestState state, int arg); | 27 #ifdef USE_EGL |
| 28 Test* GetPixmapToTextureTestEGL(); |
| 29 #else |
| 30 Test* GetPixmapToTextureTest(); |
| 31 #endif |
| 32 |
25 | 33 |
26 #endif // BENCH_GL_TEARTEST_H_ | 34 #endif // BENCH_GL_TEARTEST_H_ |
OLD | NEW |