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

Side by Side Diff: gpu/demos/framework/plugin.h

Issue 554053: Added infrastructure to run gpu demos under Pepper3D. Created a Demo class th... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 11 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 | « gpu/demos/framework/platform.h ('k') | gpu/demos/framework/plugin.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 GPU_DEMOS_FRAMEWORK_PLUGIN_H_
6 #define GPU_DEMOS_FRAMEWORK_PLUGIN_H_
7
8 #include "base/basictypes.h"
9 #include "base/scoped_ptr.h"
10 #include "gpu/demos/framework/demo.h"
11 #include "gpu/pgl/pgl.h"
12 #include "webkit/glue/plugins/nphostapi.h"
13
14 namespace gpu {
15 namespace demos {
16
17 // Acts as a framework for pepper3d demos. It is in fact a pepper plugin with
18 // a pepper3d device. It delegates all rendering tasks to demo object.
19 class Plugin : public NPObject {
20 public:
21 explicit Plugin(NPP npp);
22 ~Plugin();
23
24 static NPClass* GetPluginClass();
25
26 NPP npp() const { return npp_; }
27 void New(NPMIMEType pluginType, int16 argc, char* argn[], char* argv[]);
28 void SetWindow(const NPWindow& window);
29
30 // Called by the browser to paint the window.
31 void Paint();
32
33 private:
34 // This class object needs to be safely casted to NPObject* and cross
35 // c-c++ module boundaries. To accomplish that this class should not have
36 // any virtual member function.
37 NPP npp_;
38
39 NPDevice* device3d_;
40 NPDeviceContext3D context3d_;
41 PGLContext pgl_context_;
42 scoped_ptr<Demo> demo_;
43
44 DISALLOW_COPY_AND_ASSIGN(Plugin);
45 };
46
47 extern NPNetscapeFuncs* g_browser;
48
49 } // namespace demos
50 } // namespace gpu
51 #endif // GPU_DEMOS_FRAMEWORK_PLUGIN_H_
OLDNEW
« no previous file with comments | « gpu/demos/framework/platform.h ('k') | gpu/demos/framework/plugin.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698