| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium 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 PAPPI_TESTS_TEST_GRAPHICS_3D_H_ | 5 #ifndef PAPPI_TESTS_TEST_GRAPHICS_3D_H_ |
| 6 #define PAPPI_TESTS_TEST_GRAPHICS_3D_H_ | 6 #define PAPPI_TESTS_TEST_GRAPHICS_3D_H_ |
| 7 | 7 |
| 8 #include "ppapi/tests/test_case.h" | 8 #include "ppapi/tests/test_case.h" |
| 9 | 9 |
| 10 struct PPB_Graphics3D_Dev; | 10 struct PPB_Graphics3D_Dev; |
| 11 struct PPB_OpenGLES2_Dev; | 11 struct PPB_OpenGLES2_Dev; |
| 12 | 12 |
| 13 class TestGraphics3D : public TestCase { | 13 class TestGraphics3D : public TestCase { |
| 14 public: | 14 public: |
| 15 TestGraphics3D(TestingInstance* instance) : TestCase(instance) {} | 15 TestGraphics3D(TestingInstance* instance) : TestCase(instance) {} |
| 16 | 16 |
| 17 // TestCase implementation. | 17 // TestCase implementation. |
| 18 virtual bool Init(); | 18 virtual bool Init(); |
| 19 virtual void RunTest(); | 19 virtual void RunTest(); |
| 20 | 20 |
| 21 private: | 21 private: |
| 22 // Various tests. |
| 23 std::string TestFrame(); |
| 24 |
| 25 // Utils used by various tests. |
| 26 int32_t SwapBuffersSync(PP_Resource context); |
| 27 std::string TestPixel(PP_Resource context, |
| 28 int x, int y, const uint8_t expected_color[4]); |
| 29 |
| 22 // Used by the tests that access the C API directly. | 30 // Used by the tests that access the C API directly. |
| 23 const PPB_Graphics3D_Dev* graphics_3d_; | 31 const PPB_Graphics3D_Dev* graphics_3d_; |
| 24 const PPB_OpenGLES2_Dev* opengl_es2_; | 32 const PPB_OpenGLES2_Dev* opengl_es2_; |
| 25 }; | 33 }; |
| 26 | 34 |
| 27 #endif // PAPPI_TESTS_TEST_GRAPHICS_3D_H_ | 35 #endif // PAPPI_TESTS_TEST_GRAPHICS_3D_H_ |
| OLD | NEW |