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

Side by Side Diff: webkit/tools/pepper_test_plugin/plugin_object.h

Issue 367002: Added Pepper 3D render context that instantiates the GPU plugin.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 10 matching lines...) Expand all
21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */ 24 */
25 25
26 #ifndef WEBKIT_TOOLS_PEPPER_TEST_PLUGIN_PLUGIN_OBJECT_H_ 26 #ifndef WEBKIT_TOOLS_PEPPER_TEST_PLUGIN_PLUGIN_OBJECT_H_
27 #define WEBKIT_TOOLS_PEPPER_TEST_PLUGIN_PLUGIN_OBJECT_H_ 27 #define WEBKIT_TOOLS_PEPPER_TEST_PLUGIN_PLUGIN_OBJECT_H_
28 28
29 #include "base/basictypes.h" 29 #include "base/basictypes.h"
30 #include "base/gfx/size.h" 30 #include "base/gfx/size.h"
31 #include "base/scoped_ptr.h"
32 #include "gpu/command_buffer/client/gles2_implementation.h"
33 #include "webkit/tools/pepper_test_plugin/command_buffer_pepper.h"
31 #include "webkit/glue/plugins/nphostapi.h" 34 #include "webkit/glue/plugins/nphostapi.h"
32 35
33 extern NPNetscapeFuncs* browser; 36 extern NPNetscapeFuncs* browser;
34 37
35 class PluginObject { 38 class PluginObject {
36 public: 39 public:
37 PluginObject(NPP npp); 40 explicit PluginObject(NPP npp);
38 ~PluginObject(); 41 ~PluginObject();
39 42
40 static NPClass* GetPluginClass(); 43 static NPClass* GetPluginClass();
41 44
42 NPObject* header() { return &header_; } 45 NPObject* header() { return &header_; }
43 NPP npp() const { return npp_; } 46 NPP npp() const { return npp_; }
44 47
48 void New(NPMIMEType pluginType, int16 argc, char* argn[], char* argv[]);
45 void SetWindow(const NPWindow& window); 49 void SetWindow(const NPWindow& window);
50 void Draw3D();
46 51
47 private: 52 private:
53 bool InitializeCommandBuffer();
54
48 NPObject header_; 55 NPObject header_;
49 NPP npp_; 56 NPP npp_;
50 NPObject* test_object_; 57 NPObject* test_object_;
58 int dimensions_;
51 59
52 NPDevice* device2d_; 60 NPDevice* device2d_;
53 61
62 // TODO(apatrick): this destruction order causes the plugin to crash on
63 // shutdown.
64 scoped_ptr<CommandBufferPepper> command_buffer_;
65 scoped_ptr<gpu::gles2::GLES2Implementation> gles2_implementation_;
66 scoped_ptr<gpu::gles2::GLES2CmdHelper> helper_;
67
54 gfx::Size size_; 68 gfx::Size size_;
55 69
56 DISALLOW_COPY_AND_ASSIGN(PluginObject); 70 DISALLOW_COPY_AND_ASSIGN(PluginObject);
57 }; 71 };
58 72
59 73
60 #endif // WEBKIT_TOOLS_PEPPER_TEST_PLUGIN_PLUGIN_OBJECT_H_ 74 #endif // WEBKIT_TOOLS_PEPPER_TEST_PLUGIN_PLUGIN_OBJECT_H_
OLDNEW
« no previous file with comments | « webkit/tools/pepper_test_plugin/pepper_test_plugin.gyp ('k') | webkit/tools/pepper_test_plugin/plugin_object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698