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 ppb_gles2_chromium_tm = { |
| 41 MapTexSubImage2DCHROMIUM, |
| 42 UnmapTexSubImage2DCHROMIUM |
| 43 }; |
| 44 |
| 45 } // namespace |
| 46 |
| 47 PPB_GLESChromiumTextureMapping_Proxy::PPB_GLESChromiumTextureMapping_Proxy( |
| 48 Dispatcher* dispatcher, |
| 49 const void* target_interface) |
| 50 : InterfaceProxy(dispatcher, target_interface) { |
| 51 } |
| 52 |
| 53 PPB_GLESChromiumTextureMapping_Proxy::~PPB_GLESChromiumTextureMapping_Proxy() { |
| 54 } |
| 55 |
| 56 const void* PPB_GLESChromiumTextureMapping_Proxy::GetSourceInterface() const { |
| 57 return &ppb_gles2_chromium_tm; |
| 58 } |
| 59 |
| 60 InterfaceID PPB_GLESChromiumTextureMapping_Proxy::GetInterfaceId() const { |
| 61 return INTERFACE_ID_NONE; |
| 62 } |
| 63 |
| 64 bool PPB_GLESChromiumTextureMapping_Proxy::OnMessageReceived( |
| 65 const IPC::Message& msg) { |
| 66 return false; |
| 67 } |
| 68 |
| 69 } // namespace proxy |
| 70 } // namespace pp |
OLD | NEW |