| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2010 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 "native_client/src/shared/ppapi_proxy/plugin_ppb_gles_extensions.h" |
| 6 |
| 7 #include "gpu/command_buffer/client/gles2_implementation.h" |
| 8 #include "native_client/src/shared/ppapi_proxy/plugin_context_3d.h" |
| 9 |
| 10 namespace ppapi_proxy { |
| 11 |
| 12 namespace GLESChromiumTextureMapping { |
| 13 |
| 14 namespace { |
| 15 |
| 16 void* MapTexSubImage2DCHROMIUM( |
| 17 PP_Resource context_id, |
| 18 GLenum target, |
| 19 GLint level, |
| 20 GLint xoffset, |
| 21 GLint yoffset, |
| 22 GLsizei width, |
| 23 GLsizei height, |
| 24 GLenum format, |
| 25 GLenum type, |
| 26 GLenum access) { |
| 27 return PluginResource::GetAs<PluginContext3D>(context_id)->impl()-> |
| 28 MapTexSubImage2DCHROMIUM(target, level, xoffset, yoffset, width, height, |
| 29 format, type, access); |
| 30 } |
| 31 |
| 32 void UnmapTexSubImage2DCHROMIUM(PP_Resource context_id, const void* mem) { |
| 33 PluginResource::GetAs<PluginContext3D>(context_id)->impl()-> |
| 34 UnmapTexSubImage2DCHROMIUM(mem); |
| 35 } |
| 36 |
| 37 } // namespace |
| 38 |
| 39 const PPB_GLESChromiumTextureMapping_Dev* GetInterface() { |
| 40 static const struct PPB_GLESChromiumTextureMapping_Dev interface_functions = { |
| 41 &MapTexSubImage2DCHROMIUM, |
| 42 &UnmapTexSubImage2DCHROMIUM |
| 43 }; |
| 44 return &interface_functions; |
| 45 } |
| 46 |
| 47 } // namespace GLESChromiumTextureMapping |
| 48 |
| 49 } // namespace ppapi_proxy |
| 50 |
| OLD | NEW |