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

Unified Diff: webkit/tools/pepper_test_plugin/pepper_3d_test.h

Issue 1073003: Added a test for pepper3d. It ensures that we can successfully load a pepper ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 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 | « webkit/glue/plugins/test/resource.h ('k') | webkit/tools/pepper_test_plugin/pepper_3d_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/tools/pepper_test_plugin/pepper_3d_test.h
===================================================================
--- webkit/tools/pepper_test_plugin/pepper_3d_test.h (revision 0)
+++ webkit/tools/pepper_test_plugin/pepper_3d_test.h (revision 0)
@@ -0,0 +1,56 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef WEBKIT_GLUE_PLUGINS_TEST_PLUGIN_PEPPER_3D_TEST_H
+#define WEBKIT_GLUE_PLUGINS_TEST_PLUGIN_PEPPER_3D_TEST_H
+
+#include "gpu/pgl/pgl.h"
+#include "third_party/gles2_book/Chapter_11/Stencil_Test/Stencil_Test.h"
+#include "webkit/glue/plugins/test/plugin_test.h"
+
+namespace NPAPIClient {
+
+// This class contains a list of windowed plugin tests. Please add additional
+// tests to this class.
+class Pepper3DTest : public PluginTest {
+ public:
+ Pepper3DTest(NPP id, NPNetscapeFuncs *host_functions);
+ ~Pepper3DTest();
+
+ // Pepper tests run in windowless plugin mode.
+ virtual bool IsWindowless() const { return true; }
+
+ // NPAPI functions.
+ virtual NPError New(uint16 mode, int16 argc, const char* argn[],
+ const char* argv[], NPSavedData* saved);
+ virtual NPError Destroy();
+ virtual NPError SetWindow(NPWindow* window);
+
+ private:
+ static void RepaintCallback(NPP, NPDeviceContext3D*);
+
+ void CreateContext();
+ void DestroyContext();
+ void MakeContextCurrent();
+ void Paint();
+ void SwapBuffers();
+
+ void InitGL();
+ void ReleaseGL();
+ void DrawGL();
+ void TestGL();
+ void TestPixel(int x, int y, const GLubyte expected_color[3]);
+
+ NPExtensions* pepper_extensions_;
+ NPDevice* device_3d_;
+ NPDeviceContext3D context_3d_;
+ PGLContext pgl_context_;
+
+ ESContext es_context_;
+ STUserData es_data_;
+};
+
+} // namespace NPAPIClient
+
+#endif // WEBKIT_GLUE_PLUGINS_TEST_PLUGIN_PEPPER_3D_TEST_H
Property changes on: webkit\tools\pepper_test_plugin\pepper_3d_test.h
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « webkit/glue/plugins/test/resource.h ('k') | webkit/tools/pepper_test_plugin/pepper_3d_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698