Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(974)

Unified Diff: third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp

Issue 1814263004: Remove create/delete methods from WebGraphicsContext3D. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@complex-casts
Patch Set: complex-create: rebase Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 7db995173db3a9bd4bb66a2259531c2aea1f6757..a1d0eeff9caa63202a93b50e983f27460b8f8a54 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
@@ -4103,7 +4103,7 @@ void WebGLRenderingContextBase::texImageCanvasByGPU(TexImageByGPUType functionTy
targetLevel = 0;
targetInternalformat = GL_RGBA;
targetType = GL_UNSIGNED_BYTE;
- targetTexture = webContext()->createTexture();
+ contextGL()->GenTextures(1, &targetTexture);
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);
@@ -4129,7 +4129,8 @@ void WebGLRenderingContextBase::texImageCanvasByGPU(TexImageByGPUType functionTy
}
if (!possibleDirectCopy) {
- WebGLId tmpFBO = webContext()->createFramebuffer();
+ GLuint tmpFBO;
+ contextGL()->GenFramebuffers(1, &tmpFBO);
contextGL()->BindFramebuffer(GL_FRAMEBUFFER, tmpFBO);
contextGL()->FramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, targetTexture, 0);
contextGL()->BindTexture(texture->getTarget(), texture->object());
@@ -4142,8 +4143,8 @@ void WebGLRenderingContextBase::texImageCanvasByGPU(TexImageByGPUType functionTy
}
contextGL()->FramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, 0, 0);
restoreCurrentFramebuffer();
- webContext()->deleteFramebuffer(tmpFBO);
- webContext()->deleteTexture(targetTexture);
+ contextGL()->DeleteFramebuffers(1, &tmpFBO);
+ contextGL()->DeleteTextures(1, &targetTexture);
}
}

Powered by Google App Engine
This is Rietveld 408576698