OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2010 The Chromium 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 #ifndef WEBKIT_GLUE_PLUGINS_TEST_PLUGIN_PEPPER_3D_TEST_H |
| 6 #define WEBKIT_GLUE_PLUGINS_TEST_PLUGIN_PEPPER_3D_TEST_H |
| 7 |
| 8 #include "gpu/pgl/pgl.h" |
| 9 #include "third_party/gles2_book/Chapter_11/Stencil_Test/Stencil_Test.h" |
| 10 #include "webkit/glue/plugins/test/plugin_test.h" |
| 11 |
| 12 namespace NPAPIClient { |
| 13 |
| 14 // This class contains a list of windowed plugin tests. Please add additional |
| 15 // tests to this class. |
| 16 class Pepper3DTest : public PluginTest { |
| 17 public: |
| 18 Pepper3DTest(NPP id, NPNetscapeFuncs *host_functions); |
| 19 ~Pepper3DTest(); |
| 20 |
| 21 // Pepper tests run in windowless plugin mode. |
| 22 virtual bool IsWindowless() const { return true; } |
| 23 |
| 24 // NPAPI functions. |
| 25 virtual NPError New(uint16 mode, int16 argc, const char* argn[], |
| 26 const char* argv[], NPSavedData* saved); |
| 27 virtual NPError Destroy(); |
| 28 virtual NPError SetWindow(NPWindow* window); |
| 29 |
| 30 private: |
| 31 static void RepaintCallback(NPP, NPDeviceContext3D*); |
| 32 |
| 33 void CreateContext(); |
| 34 void DestroyContext(); |
| 35 void MakeContextCurrent(); |
| 36 void Paint(); |
| 37 void SwapBuffers(); |
| 38 |
| 39 void InitGL(); |
| 40 void ReleaseGL(); |
| 41 void DrawGL(); |
| 42 void TestGL(); |
| 43 void TestPixel(int x, int y, const GLubyte expected_color[3]); |
| 44 |
| 45 NPExtensions* pepper_extensions_; |
| 46 NPDevice* device_3d_; |
| 47 NPDeviceContext3D context_3d_; |
| 48 PGLContext pgl_context_; |
| 49 |
| 50 ESContext es_context_; |
| 51 STUserData es_data_; |
| 52 }; |
| 53 |
| 54 } // namespace NPAPIClient |
| 55 |
| 56 #endif // WEBKIT_GLUE_PLUGINS_TEST_PLUGIN_PEPPER_3D_TEST_H |
OLD | NEW |