diff options
author | jbauman@chromium.org <jbauman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-26 19:05:20 +0000 |
---|---|---|
committer | jbauman@chromium.org <jbauman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-26 19:05:20 +0000 |
commit | 94653576aefb53eb73c86e67f4044c4d1bf01221 (patch) | |
tree | fa14971f3b30742b05946ab0346c63736fac8168 /ppapi/thunk | |
parent | 6965d7dcbce91c55c492ff34983a8a3a35f14740 (diff) | |
download | chromium_src-94653576aefb53eb73c86e67f4044c4d1bf01221.zip chromium_src-94653576aefb53eb73c86e67f4044c4d1bf01221.tar.gz chromium_src-94653576aefb53eb73c86e67f4044c4d1bf01221.tar.bz2 |
Revert 123696 - Add Pepper support for several GL extensions
Add support to the command buffer code generator to generate multiple pepper interfaces, and use that to generate interfaces for ANGLE_instanced_arrays, ANGLE_framebuffer_blit, ANGLE_framebuffer_multisample, CHROMIUM_enable_feature, and CHROMIUM_map_sub.
BUG=93148
TEST=
Review URL: https://chromiumcodereview.appspot.com/9420017
TBR=jbauman@chromium.org
Review URL: https://chromiumcodereview.appspot.com/9466042
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@123697 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/thunk')
-rw-r--r-- | ppapi/thunk/interfaces_ppb_public_dev.h | 3 | ||||
-rw-r--r-- | ppapi/thunk/ppb_gles_chromium_texture_mapping_thunk.cc | 55 | ||||
-rw-r--r-- | ppapi/thunk/ppb_graphics_3d_api.h | 13 |
3 files changed, 71 insertions, 0 deletions
diff --git a/ppapi/thunk/interfaces_ppb_public_dev.h b/ppapi/thunk/interfaces_ppb_public_dev.h index 7fefec0..94696e4 100644 --- a/ppapi/thunk/interfaces_ppb_public_dev.h +++ b/ppapi/thunk/interfaces_ppb_public_dev.h @@ -27,6 +27,9 @@ PROXIED_IFACE(PPB_AudioInput, PPB_AUDIO_INPUT_DEV_INTERFACE_0_1, PROXIED_IFACE(NoAPIName, PPB_IME_INPUT_EVENT_DEV_INTERFACE_0_1, PPB_IMEInputEvent_Dev_0_1) PROXIED_IFACE(PPB_Buffer, PPB_BUFFER_DEV_INTERFACE_0_4, PPB_Buffer_Dev_0_4) +PROXIED_IFACE(PPB_Graphics3D, + PPB_GLES_CHROMIUM_TEXTURE_MAPPING_DEV_INTERFACE_0_1, + PPB_GLESChromiumTextureMapping_Dev_0_1) PROXIED_IFACE(NoAPIName, PPB_CRYPTO_DEV_INTERFACE_0_1, PPB_Crypto_Dev_0_1) PROXIED_IFACE(PPB_CursorControl, PPB_CURSOR_CONTROL_DEV_INTERFACE_0_4, PPB_CursorControl_Dev_0_4) diff --git a/ppapi/thunk/ppb_gles_chromium_texture_mapping_thunk.cc b/ppapi/thunk/ppb_gles_chromium_texture_mapping_thunk.cc new file mode 100644 index 0000000..a9ecd05 --- /dev/null +++ b/ppapi/thunk/ppb_gles_chromium_texture_mapping_thunk.cc @@ -0,0 +1,55 @@ +// Copyright (c) 2012 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. + +#include "ppapi/thunk/thunk.h" +#include "ppapi/thunk/enter.h" +#include "ppapi/thunk/ppb_graphics_3d_api.h" +#include "ppapi/thunk/resource_creation_api.h" + +namespace ppapi { +namespace thunk { + +namespace { + +typedef EnterResource<PPB_Graphics3D_API> EnterGraphics3D; + +void* MapTexSubImage2DCHROMIUM(PP_Resource context, + GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + GLenum access) { + EnterGraphics3D enter(context, true); + if (enter.succeeded()) { + return enter.object()->MapTexSubImage2DCHROMIUM( + target, level, xoffset, yoffset, width, height, format, type, access); + } + return NULL; +} + +void UnmapTexSubImage2DCHROMIUM(PP_Resource context, const void* mem) { + EnterGraphics3D enter(context, true); + if (enter.succeeded()) + enter.object()->UnmapTexSubImage2DCHROMIUM(mem); +} + +const PPB_GLESChromiumTextureMapping_Dev +g_ppb_gles_chromium_texture_mapping_thunk = { + &MapTexSubImage2DCHROMIUM, + &UnmapTexSubImage2DCHROMIUM +}; + +} // namespace + +const PPB_GLESChromiumTextureMapping_Dev_0_1* +GetPPB_GLESChromiumTextureMapping_Dev_0_1_Thunk() { + return &g_ppb_gles_chromium_texture_mapping_thunk; +} + +} // namespace thunk +} // namespace ppapi diff --git a/ppapi/thunk/ppb_graphics_3d_api.h b/ppapi/thunk/ppb_graphics_3d_api.h index ea865e2..84dc829 100644 --- a/ppapi/thunk/ppb_graphics_3d_api.h +++ b/ppapi/thunk/ppb_graphics_3d_api.h @@ -7,6 +7,7 @@ #include "ppapi/c/ppb_graphics_3d.h" #include "ppapi/c/trusted/ppb_graphics_3d_trusted.h" +#include "ppapi/c/dev/ppb_gles_chromium_texture_mapping_dev.h" #include "ppapi/thunk/ppapi_thunk_export.h" namespace ppapi { @@ -36,6 +37,18 @@ class PPAPI_THUNK_EXPORT PPB_Graphics3D_API { virtual PP_Graphics3DTrustedState FlushSync(int32_t put_offset) = 0; virtual PP_Graphics3DTrustedState FlushSyncFast(int32_t put_offset, int32_t last_known_get) = 0; + + // GLESChromiumTextureMapping. + virtual void* MapTexSubImage2DCHROMIUM(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + GLenum access) = 0; + virtual void UnmapTexSubImage2DCHROMIUM(const void* mem) = 0; }; } // namespace thunk |