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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(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
OLDNEW
« 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