| Index: ppapi/thunk/ppb_gles_chromium_texture_mapping_thunk.cc
|
| diff --git a/ppapi/thunk/ppb_gles_chromium_texture_mapping_thunk.cc b/ppapi/thunk/ppb_gles_chromium_texture_mapping_thunk.cc
|
| index 295190a39e5f03b9d73137d4bd26695945654ff4..6e8e7c5aa10f1f8820c599a215d4e268fc74a782 100644
|
| --- a/ppapi/thunk/ppb_gles_chromium_texture_mapping_thunk.cc
|
| +++ b/ppapi/thunk/ppb_gles_chromium_texture_mapping_thunk.cc
|
| @@ -5,6 +5,7 @@
|
| #include "ppapi/thunk/thunk.h"
|
| #include "ppapi/thunk/enter.h"
|
| #include "ppapi/thunk/ppb_context_3d_api.h"
|
| +#include "ppapi/thunk/ppb_graphics_3d_api.h"
|
| #include "ppapi/thunk/resource_creation_api.h"
|
|
|
| namespace ppapi {
|
| @@ -13,6 +14,7 @@ namespace thunk {
|
| namespace {
|
|
|
| typedef EnterResource<PPB_Context3D_API> EnterContext3D;
|
| +typedef EnterResource<PPB_Graphics3D_API> EnterGraphics3D;
|
|
|
| void* MapTexSubImage2DCHROMIUM(PP_Resource context,
|
| GLenum target,
|
| @@ -24,17 +26,38 @@ void* MapTexSubImage2DCHROMIUM(PP_Resource context,
|
| GLenum format,
|
| GLenum type,
|
| GLenum access) {
|
| - EnterContext3D enter(context, true);
|
| - if (enter.failed())
|
| - return NULL;
|
| - return enter.object()->MapTexSubImage2DCHROMIUM(
|
| - target, level, xoffset, yoffset, width, height, format, type, access);
|
| + {
|
| + EnterContext3D enter(context, false);
|
| + if (enter.succeeded()) {
|
| + return enter.object()->MapTexSubImage2DCHROMIUM(
|
| + target, level, xoffset, yoffset, width, height, format, type, 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) {
|
| - EnterContext3D enter(context, true);
|
| - if (enter.succeeded())
|
| - enter.object()->UnmapTexSubImage2DCHROMIUM(mem);
|
| + {
|
| + EnterContext3D enter(context, false);
|
| + if (enter.succeeded()) {
|
| + enter.object()->UnmapTexSubImage2DCHROMIUM(mem);
|
| + return;
|
| + }
|
| + }
|
| + {
|
| + EnterGraphics3D enter(context, true);
|
| + if (enter.succeeded()) {
|
| + enter.object()->UnmapTexSubImage2DCHROMIUM(mem);
|
| + return;
|
| + }
|
| + }
|
| }
|
|
|
| const PPB_GLESChromiumTextureMapping_Dev
|
|
|