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

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

Issue 1415873007: Fixed minor memory leak in framebuffer attachments. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 33cce6b0aec3bf0ce5f711a30d53b3592f3aa381..23300c34ea66664651918c2c6ae4ed1fa6a87ae4 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
@@ -2421,11 +2421,13 @@ void WebGLRenderingContextBase::framebufferRenderbuffer(ScriptState* scriptState
// We divide it here so in WebGLFramebuffer, we don't have to handle DEPTH_STENCIL_ATTACHMENT in WebGL 2.
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 {
framebufferBinding->setAttachmentForBoundFramebuffer(target, attachment, buffer);
+ preserveObjectWrapper(scriptState, framebufferBinding, "attachment", attachment, buffer);
}
applyStencilTest();
- preserveObjectWrapper(scriptState, framebufferBinding, "renderbuffer", attachment, buffer);
}
void WebGLRenderingContextBase::framebufferTexture2D(ScriptState* scriptState, GLenum target, GLenum attachment, GLenum textarget, WebGLTexture* texture, GLint level)
@@ -2468,7 +2470,7 @@ void WebGLRenderingContextBase::framebufferTexture2D(ScriptState* scriptState, G
}
framebufferBinding->setAttachmentForBoundFramebuffer(target, attachment, textarget, texture, level);
applyStencilTest();
- preserveObjectWrapper(scriptState, framebufferBinding, "texture2d", attachment, texture);
+ preserveObjectWrapper(scriptState, framebufferBinding, "attachment", attachment, texture);
}
void WebGLRenderingContextBase::frontFace(GLenum mode)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698