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

Unified Diff: webkit/glue/plugins/npapi_extension_thunk.cc

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/npapi/bindings/npapi_extensions.h ('k') | webkit/glue/plugins/plugin_constants_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/plugins/npapi_extension_thunk.cc
===================================================================
--- webkit/glue/plugins/npapi_extension_thunk.cc (revision 35153)
+++ webkit/glue/plugins/npapi_extension_thunk.cc (working copy)
@@ -114,6 +114,26 @@
return NPERR_GENERIC_ERROR;
}
+static NPError Device2DCreateBuffer(NPP id,
+ NPDeviceContext* context,
+ size_t size,
+ int32* buffer_id) {
+ return NPERR_GENERIC_ERROR;
+}
+
+static NPError Device2DDestroyBuffer(NPP id,
+ NPDeviceContext* context,
+ int32 buffer_id) {
+ return NPERR_GENERIC_ERROR;
+}
+
+static NPError Device2DMapBuffer(NPP id,
+ NPDeviceContext* context,
+ int32 buffer_id,
+ NPDeviceBuffer* buffer) {
+ return NPERR_GENERIC_ERROR;
+}
+
// 3D device API ---------------------------------------------------------------
static NPError Device3DQueryCapability(NPP id, int32 capability, int32* value) {
@@ -196,6 +216,41 @@
return NPERR_GENERIC_ERROR;
}
+static NPError Device3DCreateBuffer(NPP id,
+ NPDeviceContext* context,
+ size_t size,
+ int32* buffer_id) {
+ scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ if (plugin) {
+ return plugin->webplugin()->delegate()->Device3DCreateBuffer(
+ static_cast<NPDeviceContext3D*>(context), size, buffer_id);
+ }
+ return NPERR_GENERIC_ERROR;
+}
+
+static NPError Device3DDestroyBuffer(NPP id,
+ NPDeviceContext* context,
+ int32 buffer_id) {
+ scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ if (plugin) {
+ return plugin->webplugin()->delegate()->Device3DDestroyBuffer(
+ static_cast<NPDeviceContext3D*>(context), buffer_id);
+ }
+ return NPERR_GENERIC_ERROR;
+}
+
+static NPError Device3DMapBuffer(NPP id,
+ NPDeviceContext* context,
+ int32 buffer_id,
+ NPDeviceBuffer* buffer) {
+ scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ if (plugin) {
+ return plugin->webplugin()->delegate()->Device3DMapBuffer(
+ static_cast<NPDeviceContext3D*>(context), buffer_id, buffer);
+ }
+ return NPERR_GENERIC_ERROR;
+}
+
// -----------------------------------------------------------------------------
static NPDevice* AcquireDevice(NPP id, NPDeviceID device_id) {
@@ -207,6 +262,9 @@
Device2DGetStateContext,
Device2DFlushContext,
Device2DDestroyContext,
+ Device2DCreateBuffer,
+ Device2DDestroyBuffer,
+ Device2DMapBuffer,
};
static NPDevice device_3d = {
Device3DQueryCapability,
@@ -216,6 +274,9 @@
Device3DGetStateContext,
Device3DFlushContext,
Device3DDestroyContext,
+ Device3DCreateBuffer,
+ Device3DDestroyBuffer,
+ Device3DMapBuffer,
};
switch (device_id) {
« no previous file with comments | « third_party/npapi/bindings/npapi_extensions.h ('k') | webkit/glue/plugins/plugin_constants_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698