| Index: ppapi/shared_impl/ppb_opengles2_shared.cc
|
| diff --git a/ppapi/shared_impl/ppb_opengles2_shared.cc b/ppapi/shared_impl/ppb_opengles2_shared.cc
|
| index 635ea410ce7047607b219dfc7ee71537ae16f7bd..049e8da58e8a6163c3d03a28b1244fc1f13c69cc 100644
|
| --- a/ppapi/shared_impl/ppb_opengles2_shared.cc
|
| +++ b/ppapi/shared_impl/ppb_opengles2_shared.cc
|
| @@ -1,4 +1,4 @@
|
| -// Copyright (c) 2011 The Chromium Authors. All rights reserved.
|
| +// Copyright (c) 2012 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.
|
|
|
| @@ -743,8 +743,74 @@ void Viewport(
|
| GetGLES(context_id)->Viewport(x, y, width, height);
|
| }
|
|
|
| +void BlitFramebufferEXT(
|
| + PP_Resource context_id, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
|
| + GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask,
|
| + GLenum filter) {
|
| + GetGLES(
|
| + context_id)->BlitFramebufferEXT(
|
| + srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask,
|
| + filter);
|
| +}
|
| +
|
| +void RenderbufferStorageMultisampleEXT(
|
| + PP_Resource context_id, GLenum target, GLsizei samples,
|
| + GLenum internalformat, GLsizei width, GLsizei height) {
|
| + GetGLES(
|
| + context_id)->RenderbufferStorageMultisampleEXT(
|
| + target, samples, internalformat, width, height);
|
| +}
|
| +
|
| +GLboolean EnableFeatureCHROMIUM(PP_Resource context_id, const char* feature) {
|
| + return GetGLES(context_id)->EnableFeatureCHROMIUM(feature);
|
| +}
|
|
|
| -const struct PPB_OpenGLES2 ppb_opengles2 = {
|
| +void* MapBufferSubDataCHROMIUM(
|
| + PP_Resource context_id, GLuint target, GLintptr offset, GLsizeiptr size,
|
| + GLenum access) {
|
| + return GetGLES(
|
| + context_id)->MapBufferSubDataCHROMIUM(target, offset, size, access);
|
| +}
|
| +
|
| +void UnmapBufferSubDataCHROMIUM(PP_Resource context_id, const void* mem) {
|
| + GetGLES(context_id)->UnmapBufferSubDataCHROMIUM(mem);
|
| +}
|
| +
|
| +void* MapTexSubImage2DCHROMIUM(
|
| + PP_Resource context_id, GLenum target, GLint level, GLint xoffset,
|
| + GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type,
|
| + GLenum access) {
|
| + return GetGLES(
|
| + context_id)->MapTexSubImage2DCHROMIUM(
|
| + target, level, xoffset, yoffset, width, height, format, type,
|
| + access);
|
| +}
|
| +
|
| +void UnmapTexSubImage2DCHROMIUM(PP_Resource context_id, const void* mem) {
|
| + GetGLES(context_id)->UnmapTexSubImage2DCHROMIUM(mem);
|
| +}
|
| +
|
| +void DrawArraysInstancedANGLE(
|
| + PP_Resource context_id, GLenum mode, GLint first, GLsizei count,
|
| + GLsizei primcount) {
|
| + GetGLES(context_id)->DrawArraysInstancedANGLE(mode, first, count, primcount);
|
| +}
|
| +
|
| +void DrawElementsInstancedANGLE(
|
| + PP_Resource context_id, GLenum mode, GLsizei count, GLenum type,
|
| + const void* indices, GLsizei primcount) {
|
| + GetGLES(
|
| + context_id)->DrawElementsInstancedANGLE(
|
| + mode, count, type, indices, primcount);
|
| +}
|
| +
|
| +void VertexAttribDivisorANGLE(
|
| + PP_Resource context_id, GLuint index, GLuint divisor) {
|
| + GetGLES(context_id)->VertexAttribDivisorANGLE(index, divisor);
|
| +}
|
| +
|
| +
|
| +const struct PPB_OpenGLES2 ppb_opengles2_ = {
|
| &ActiveTexture,
|
| &AttachShader,
|
| &BindAttribLocation,
|
| @@ -889,10 +955,72 @@ const struct PPB_OpenGLES2 ppb_opengles2 = {
|
| &Viewport
|
| };
|
|
|
| +
|
| +const struct PPB_OpenGLES2InstancedArrays ppb_opengles2_instancedarrays = {
|
| + &DrawArraysInstancedANGLE,
|
| + &DrawElementsInstancedANGLE,
|
| + &VertexAttribDivisorANGLE
|
| +};
|
| +
|
| +
|
| +const struct PPB_OpenGLES2FramebufferBlit ppb_opengles2_framebufferblit = {
|
| + &BlitFramebufferEXT
|
| +};
|
| +
|
| +
|
| +const struct PPB_OpenGLES2FramebufferMultisample
|
| + ppb_opengles2_framebuffermultisample = {
|
| + &RenderbufferStorageMultisampleEXT
|
| +};
|
| +
|
| +
|
| +const struct PPB_OpenGLES2ChromiumEnableFeature
|
| + ppb_opengles2_chromiumenablefeature = {
|
| + &EnableFeatureCHROMIUM
|
| +};
|
| +
|
| +
|
| +const struct PPB_OpenGLES2ChromiumMapSub ppb_opengles2_chromiummapsub = {
|
| + &MapBufferSubDataCHROMIUM,
|
| + &UnmapBufferSubDataCHROMIUM,
|
| + &MapTexSubImage2DCHROMIUM,
|
| + &UnmapTexSubImage2DCHROMIUM
|
| +};
|
| +
|
| } // namespace
|
|
|
| const PPB_OpenGLES2* PPB_OpenGLES2_Shared::GetInterface() {
|
| - return &ppb_opengles2;
|
| + return &ppb_opengles2_;
|
| +}
|
| +
|
| +
|
| +const PPB_OpenGLES2InstancedArrays*
|
| + PPB_OpenGLES2_Shared::GetInstancedArraysInterface() {
|
| + return &ppb_opengles2_instancedarrays;
|
| +}
|
| +
|
| +
|
| +const PPB_OpenGLES2FramebufferBlit*
|
| + PPB_OpenGLES2_Shared::GetFramebufferBlitInterface() {
|
| + return &ppb_opengles2_framebufferblit;
|
| +}
|
| +
|
| +
|
| +const PPB_OpenGLES2FramebufferMultisample*
|
| + PPB_OpenGLES2_Shared::GetFramebufferMultisampleInterface() {
|
| + return &ppb_opengles2_framebuffermultisample;
|
| +}
|
| +
|
| +
|
| +const PPB_OpenGLES2ChromiumEnableFeature*
|
| + PPB_OpenGLES2_Shared::GetChromiumEnableFeatureInterface() {
|
| + return &ppb_opengles2_chromiumenablefeature;
|
| +}
|
| +
|
| +
|
| +const PPB_OpenGLES2ChromiumMapSub*
|
| + PPB_OpenGLES2_Shared::GetChromiumMapSubInterface() {
|
| + return &ppb_opengles2_chromiummapsub;
|
| }
|
|
|
| } // namespace ppapi
|
|
|