| Index: third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
|
| diff --git a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
|
| index 5ca7f02851af3d9a8950c6e5695d30daf779ca20..15f5c689063fa05ac84a48b436f5d6a9f7300bcb 100644
|
| --- a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
|
| +++ b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
|
| @@ -2219,14 +2219,14 @@ void WebGLRenderingContextBase::framebufferRenderbuffer(ScriptState* scriptState
|
| if (isWebGL2OrHigher() && attachment == GL_DEPTH_STENCIL_ATTACHMENT) {
|
| // On ES3, DEPTH_STENCIL_ATTACHMENT is like an alias for DEPTH_ATTACHMENT + STENCIL_ATTACHMENT.
|
| // We divide it here so in WebGLFramebuffer, we don't have to handle DEPTH_STENCIL_ATTACHMENT in WebGL 2.
|
| - webContext()->framebufferRenderbuffer(target, GL_DEPTH_ATTACHMENT, renderbuffertarget, bufferObject);
|
| - webContext()->framebufferRenderbuffer(target, GL_STENCIL_ATTACHMENT, renderbuffertarget, bufferObject);
|
| + contextGL()->FramebufferRenderbuffer(target, GL_DEPTH_ATTACHMENT, renderbuffertarget, bufferObject);
|
| + contextGL()->FramebufferRenderbuffer(target, GL_STENCIL_ATTACHMENT, renderbuffertarget, bufferObject);
|
| framebufferBinding->setAttachmentForBoundFramebuffer(target, GL_DEPTH_ATTACHMENT, buffer);
|
| framebufferBinding->setAttachmentForBoundFramebuffer(target, GL_STENCIL_ATTACHMENT, buffer);
|
| preserveObjectWrapper(scriptState, framebufferBinding, "attachment", GL_DEPTH_ATTACHMENT, buffer);
|
| preserveObjectWrapper(scriptState, framebufferBinding, "attachment", GL_STENCIL_ATTACHMENT, buffer);
|
| } else {
|
| - webContext()->framebufferRenderbuffer(target, attachment, renderbuffertarget, bufferObject);
|
| + contextGL()->FramebufferRenderbuffer(target, attachment, renderbuffertarget, bufferObject);
|
| framebufferBinding->setAttachmentForBoundFramebuffer(target, attachment, buffer);
|
| preserveObjectWrapper(scriptState, framebufferBinding, "attachment", attachment, buffer);
|
| }
|
| @@ -2253,14 +2253,14 @@ void WebGLRenderingContextBase::framebufferTexture2D(ScriptState* scriptState, G
|
| if (isWebGL2OrHigher() && attachment == GL_DEPTH_STENCIL_ATTACHMENT) {
|
| // On ES3, DEPTH_STENCIL_ATTACHMENT is like an alias for DEPTH_ATTACHMENT + STENCIL_ATTACHMENT.
|
| // We divide it here so in WebGLFramebuffer, we don't have to handle DEPTH_STENCIL_ATTACHMENT in WebGL 2.
|
| - webContext()->framebufferTexture2D(target, GL_DEPTH_ATTACHMENT, textarget, textureObject, level);
|
| - webContext()->framebufferTexture2D(target, GL_STENCIL_ATTACHMENT, textarget, textureObject, level);
|
| + contextGL()->FramebufferTexture2D(target, GL_DEPTH_ATTACHMENT, textarget, textureObject, level);
|
| + contextGL()->FramebufferTexture2D(target, GL_STENCIL_ATTACHMENT, textarget, textureObject, level);
|
| framebufferBinding->setAttachmentForBoundFramebuffer(target, GL_DEPTH_ATTACHMENT, textarget, texture, level, 0);
|
| framebufferBinding->setAttachmentForBoundFramebuffer(target, GL_STENCIL_ATTACHMENT, textarget, texture, level, 0);
|
| preserveObjectWrapper(scriptState, framebufferBinding, "attachment", GL_DEPTH_ATTACHMENT, texture);
|
| preserveObjectWrapper(scriptState, framebufferBinding, "attachment", GL_STENCIL_ATTACHMENT, texture);
|
| } else {
|
| - webContext()->framebufferTexture2D(target, attachment, textarget, textureObject, level);
|
| + contextGL()->FramebufferTexture2D(target, attachment, textarget, textureObject, level);
|
| framebufferBinding->setAttachmentForBoundFramebuffer(target, attachment, textarget, texture, level, 0);
|
| preserveObjectWrapper(scriptState, framebufferBinding, "attachment", attachment, texture);
|
| }
|
| @@ -4089,7 +4089,7 @@ void WebGLRenderingContextBase::texImageCanvasByGPU(TexImageByGPUType functionTy
|
| if (!possibleDirectCopy) {
|
| WebGLId tmpFBO = webContext()->createFramebuffer();
|
| webContext()->bindFramebuffer(GL_FRAMEBUFFER, tmpFBO);
|
| - webContext()->framebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, targetTexture, 0);
|
| + contextGL()->FramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, targetTexture, 0);
|
| webContext()->bindTexture(texture->getTarget(), texture->object());
|
| if (functionType == TexImage2DByGPU) {
|
| webContext()->copyTexSubImage2D(target, level, 0, 0, 0, 0, canvas->width(), canvas->height());
|
| @@ -4098,7 +4098,7 @@ void WebGLRenderingContextBase::texImageCanvasByGPU(TexImageByGPUType functionTy
|
| } else if (functionType == TexSubImage3DByGPU) {
|
| webContext()->copyTexSubImage3D(target, level, xoffset, yoffset, zoffset, 0, 0, canvas->width(), canvas->height());
|
| }
|
| - webContext()->framebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, 0, 0);
|
| + contextGL()->FramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, 0, 0);
|
| restoreCurrentFramebuffer();
|
| webContext()->deleteFramebuffer(tmpFBO);
|
| webContext()->deleteTexture(targetTexture);
|
|
|