diff options
author | piman@google.com <piman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-07 02:15:36 +0000 |
---|---|---|
committer | piman@google.com <piman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-07 02:15:36 +0000 |
commit | 6ff5e470ee453056b3a85be99715dbda314575c2 (patch) | |
tree | 5a47e7035095cb560d921759eb3fdc6394daad09 /ppapi | |
parent | 15e093c9972a9ab2c7dedf23e8a8766fdfc3a41d (diff) | |
download | chromium_src-6ff5e470ee453056b3a85be99715dbda314575c2.zip chromium_src-6ff5e470ee453056b3a85be99715dbda314575c2.tar.gz chromium_src-6ff5e470ee453056b3a85be99715dbda314575c2.tar.bz2 |
Expose Map/UnmapTexSubImage2DCHROMIUM to pepper plugins
This is done as a separate interface, but similar to PPB_OpenGLES2_Dev
BUG=none
TEST=With Flash
Review URL: http://codereview.chromium.org/6080012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70706 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi')
-rw-r--r-- | ppapi/c/dev/ppb_gles_chromium_texture_mapping_dev.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/ppapi/c/dev/ppb_gles_chromium_texture_mapping_dev.h b/ppapi/c/dev/ppb_gles_chromium_texture_mapping_dev.h new file mode 100644 index 0000000..119ebf1 --- /dev/null +++ b/ppapi/c/dev/ppb_gles_chromium_texture_mapping_dev.h @@ -0,0 +1,41 @@ +// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef PPAPI_C_DEV_PPB_GLES_CHROMIUM_TEXTURE_MAPPING_DEV_H_ +#define PPAPI_C_DEV_PPB_GLES_CHROMIUM_TEXTURE_MAPPING_DEV_H_ + +#include "ppapi/c/pp_resource.h" +#include "ppapi/c/dev/ppb_opengles_dev.h" + +#define PPB_GLES_CHROMIUM_TEXTURE_MAPPING_DEV_INTERFACE "PPB_GLESChromiumTextureMapping(Dev);0.1" + +struct PPB_GLESChromiumTextureMapping_Dev { + // Maps the sub-image of a texture. 'level', 'xoffset', 'yoffset', 'width', + // 'height', 'format' and 'type' correspond to the similarly named parameters + // of TexSubImage2D, and define the sub-image region, as well as the format of + // the data. 'access' must be one of GL_READ_ONLY, GL_WRITE_ONLY or + // GL_READ_WRITE. If READ is included, the returned buffer will contain the + // pixel data for the sub-image. If WRITE is included, the pixel data for the + // sub-image will be updated to the contents of the buffer when + // UnmapTexSubImage2DCHROMIUM is called. NOTE: for a GL_WRITE_ONLY map, it + // means that all the values of the buffer must be written. + void* (*MapTexSubImage2DCHROMIUM)( + PP_Resource context, + GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + GLenum access); + + // Unmaps the sub-image of a texture. If the sub-image was mapped with one of + // the WRITE accesses, the pixels are updated at this time to the contents of + // the buffer. 'mem' must be the pointer returned by MapTexSubImage2DCHROMIUM. + void (*UnmapTexSubImage2DCHROMIUM)(PP_Resource context, const void* mem); +}; + +#endif // PPAPI_C_DEV_PPB_GLES_CHROMIUM_TEXTURE_MAPPING_DEV_H_ |