| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2011 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 #include "ppapi/proxy/ppb_gles_chromium_texture_mapping_proxy.h" | |
| 6 | |
| 7 #include "gpu/command_buffer/client/gles2_implementation.h" | |
| 8 #include "ppapi/c/pp_errors.h" | |
| 9 #include "ppapi/c/pp_resource.h" | |
| 10 #include "ppapi/c/dev/ppb_gles_chromium_texture_mapping_dev.h" | |
| 11 #include "ppapi/proxy/plugin_dispatcher.h" | |
| 12 #include "ppapi/proxy/plugin_resource.h" | |
| 13 #include "ppapi/proxy/ppb_context_3d_proxy.h" | |
| 14 | |
| 15 namespace pp { | |
| 16 namespace proxy { | |
| 17 | |
| 18 namespace { | |
| 19 | |
| 20 void* MapTexSubImage2DCHROMIUM(PP_Resource context_id, | |
| 21 GLenum target, | |
| 22 GLint level, | |
| 23 GLint xoffset, | |
| 24 GLint yoffset, | |
| 25 GLsizei width, | |
| 26 GLsizei height, | |
| 27 GLenum format, | |
| 28 GLenum type, | |
| 29 GLenum access) { | |
| 30 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | |
| 31 return context->gles2_impl()->MapTexSubImage2DCHROMIUM( | |
| 32 target, level, xoffset, yoffset, width, height, format, type, access); | |
| 33 } | |
| 34 | |
| 35 void UnmapTexSubImage2DCHROMIUM(PP_Resource context_id, const void* mem) { | |
| 36 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | |
| 37 context->gles2_impl()->UnmapTexSubImage2DCHROMIUM(mem); | |
| 38 } | |
| 39 | |
| 40 const struct PPB_GLESChromiumTextureMapping_Dev gles2_chromium_tm_interface = { | |
| 41 MapTexSubImage2DCHROMIUM, | |
| 42 UnmapTexSubImage2DCHROMIUM | |
| 43 }; | |
| 44 | |
| 45 InterfaceProxy* CreateGLESChromiumTextureMappingProxy( | |
| 46 Dispatcher* dispatcher, | |
| 47 const void* target_interface) { | |
| 48 return new PPB_GLESChromiumTextureMapping_Proxy(dispatcher, target_interface); | |
| 49 } | |
| 50 | |
| 51 } // namespace | |
| 52 | |
| 53 PPB_GLESChromiumTextureMapping_Proxy::PPB_GLESChromiumTextureMapping_Proxy( | |
| 54 Dispatcher* dispatcher, | |
| 55 const void* target_interface) | |
| 56 : InterfaceProxy(dispatcher, target_interface) { | |
| 57 } | |
| 58 | |
| 59 PPB_GLESChromiumTextureMapping_Proxy::~PPB_GLESChromiumTextureMapping_Proxy() { | |
| 60 } | |
| 61 | |
| 62 // static | |
| 63 const InterfaceProxy::Info* PPB_GLESChromiumTextureMapping_Proxy::GetInfo() { | |
| 64 static const Info info = { | |
| 65 &gles2_chromium_tm_interface, | |
| 66 PPB_GLES_CHROMIUM_TEXTURE_MAPPING_DEV_INTERFACE, | |
| 67 INTERFACE_ID_PPB_GLES_CHROMIUM_TM, | |
| 68 false, | |
| 69 &CreateGLESChromiumTextureMappingProxy, | |
| 70 }; | |
| 71 return &info; | |
| 72 } | |
| 73 | |
| 74 bool PPB_GLESChromiumTextureMapping_Proxy::OnMessageReceived( | |
| 75 const IPC::Message& msg) { | |
| 76 return false; | |
| 77 } | |
| 78 | |
| 79 } // namespace proxy | |
| 80 } // namespace pp | |
| OLD | NEW |