| 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 5c2ebccd2f425e81aa294eb639d8df4803148e66..2c9df0272ad48a056587f67a85815c9ebeac7dc2 100644
|
| --- a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
|
| +++ b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
|
| @@ -4096,7 +4096,7 @@
|
| targetLevel = 0;
|
| targetInternalformat = GL_RGBA;
|
| targetType = GL_UNSIGNED_BYTE;
|
| - contextGL()->GenTextures(1, &targetTexture);
|
| + targetTexture = webContext()->createTexture();
|
| contextGL()->BindTexture(GL_TEXTURE_2D, targetTexture);
|
| contextGL()->TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
| contextGL()->TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
| @@ -4122,8 +4122,7 @@
|
| }
|
|
|
| if (!possibleDirectCopy) {
|
| - GLuint tmpFBO;
|
| - contextGL()->GenFramebuffers(1, &tmpFBO);
|
| + WebGLId tmpFBO = webContext()->createFramebuffer();
|
| contextGL()->BindFramebuffer(GL_FRAMEBUFFER, tmpFBO);
|
| contextGL()->FramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, targetTexture, 0);
|
| contextGL()->BindTexture(texture->getTarget(), texture->object());
|
| @@ -4136,8 +4135,8 @@
|
| }
|
| contextGL()->FramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, 0, 0);
|
| restoreCurrentFramebuffer();
|
| - contextGL()->DeleteFramebuffers(1, &tmpFBO);
|
| - contextGL()->DeleteTextures(1, &targetTexture);
|
| + webContext()->deleteFramebuffer(tmpFBO);
|
| + webContext()->deleteTexture(targetTexture);
|
| }
|
| }
|
|
|
|
|