| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2012 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 #ifndef PPAPI_C_DEV_PPB_GLES_CHROMIUM_TEXTURE_MAPPING_DEV_H_ | |
| 6 #define PPAPI_C_DEV_PPB_GLES_CHROMIUM_TEXTURE_MAPPING_DEV_H_ | |
| 7 | |
| 8 #include "ppapi/c/pp_resource.h" | |
| 9 #include "ppapi/c/ppb_opengles2.h" | |
| 10 | |
| 11 #define PPB_GLES_CHROMIUM_TEXTURE_MAPPING_DEV_INTERFACE_0_1 \ | |
| 12 "PPB_GLESChromiumTextureMapping(Dev);0.1" | |
| 13 #define PPB_GLES_CHROMIUM_TEXTURE_MAPPING_DEV_INTERFACE \ | |
| 14 PPB_GLES_CHROMIUM_TEXTURE_MAPPING_DEV_INTERFACE_0_1 | |
| 15 | |
| 16 struct PPB_GLESChromiumTextureMapping_Dev_0_1 { | |
| 17 // Maps the sub-image of a texture. 'level', 'xoffset', 'yoffset', 'width', | |
| 18 // 'height', 'format' and 'type' correspond to the similarly named parameters | |
| 19 // of TexSubImage2D, and define the sub-image region, as well as the format of | |
| 20 // the data. 'access' must be one of GL_READ_ONLY, GL_WRITE_ONLY or | |
| 21 // GL_READ_WRITE. If READ is included, the returned buffer will contain the | |
| 22 // pixel data for the sub-image. If WRITE is included, the pixel data for the | |
| 23 // sub-image will be updated to the contents of the buffer when | |
| 24 // UnmapTexSubImage2DCHROMIUM is called. NOTE: for a GL_WRITE_ONLY map, it | |
| 25 // means that all the values of the buffer must be written. | |
| 26 void* (*MapTexSubImage2DCHROMIUM)( | |
| 27 PP_Resource context, | |
| 28 GLenum target, | |
| 29 GLint level, | |
| 30 GLint xoffset, | |
| 31 GLint yoffset, | |
| 32 GLsizei width, | |
| 33 GLsizei height, | |
| 34 GLenum format, | |
| 35 GLenum type, | |
| 36 GLenum access); | |
| 37 | |
| 38 // Unmaps the sub-image of a texture. If the sub-image was mapped with one of | |
| 39 // the WRITE accesses, the pixels are updated at this time to the contents of | |
| 40 // the buffer. 'mem' must be the pointer returned by MapTexSubImage2DCHROMIUM. | |
| 41 void (*UnmapTexSubImage2DCHROMIUM)(PP_Resource context, const void* mem); | |
| 42 }; | |
| 43 | |
| 44 typedef struct PPB_GLESChromiumTextureMapping_Dev_0_1 | |
| 45 PPB_GLESChromiumTextureMapping_Dev; | |
| 46 | |
| 47 #endif // PPAPI_C_DEV_PPB_GLES_CHROMIUM_TEXTURE_MAPPING_DEV_H_ | |
| OLD | NEW |