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

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

Issue 2547813002: Remove WebGLObject maps from WebGLRenderingContextBase and WebGLContextGroup. (Closed)
Patch Set: Fixed WebGLContextObject::validate. Made WebGLExtension non-finalized. Created 4 years 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/WebGLFramebuffer.cpp
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLFramebuffer.cpp b/third_party/WebKit/Source/modules/webgl/WebGLFramebuffer.cpp
index 9a4b8221b9a2d54dadf53312df978e56eb32787d..178f8d14a49e5103f29408adc77ba5d348b1202a 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLFramebuffer.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGLFramebuffer.cpp
@@ -43,7 +43,6 @@ class WebGLRenderbufferAttachment final
private:
explicit WebGLRenderbufferAttachment(WebGLRenderbuffer*);
- WebGLRenderbufferAttachment() {}
WebGLSharedObject* object() const override;
bool isSharedObject(WebGLSharedObject*) const override;
@@ -117,7 +116,6 @@ class WebGLTextureAttachment final : public WebGLFramebuffer::WebGLAttachment {
GLenum target,
GLint level,
GLint layer);
- WebGLTextureAttachment() {}
WebGLSharedObject* object() const override;
bool isSharedObject(WebGLSharedObject*) const override;
@@ -197,8 +195,6 @@ void WebGLTextureAttachment::unattach(gpu::gles2::GLES2Interface* gl,
WebGLFramebuffer::WebGLAttachment::WebGLAttachment() {}
-WebGLFramebuffer::WebGLAttachment::~WebGLAttachment() {}
-
WebGLFramebuffer* WebGLFramebuffer::create(WebGLRenderingContextBase* ctx) {
return new WebGLFramebuffer(ctx);
}
@@ -206,7 +202,6 @@ WebGLFramebuffer* WebGLFramebuffer::create(WebGLRenderingContextBase* ctx) {
WebGLFramebuffer::WebGLFramebuffer(WebGLRenderingContextBase* ctx)
: WebGLContextObject(ctx),
m_object(0),
- m_destructionInProgress(false),
m_hasEverBeenBound(false),
m_webGL1DepthStencilConsistent(true),
m_readBuffer(GL_COLOR_ATTACHMENT0) {
@@ -214,13 +209,7 @@ WebGLFramebuffer::WebGLFramebuffer(WebGLRenderingContextBase* ctx)
}
WebGLFramebuffer::~WebGLFramebuffer() {
- // Attachments in |m_attachments| will be deleted from other
- // places, and we must not touch that map in deleteObjectImpl once
- // the destructor has been entered.
- m_destructionInProgress = true;
-
- // See the comment in WebGLObject::detachAndDeleteObject().
- detachAndDeleteObject();
+ runDestructor();
}
void WebGLFramebuffer::setAttachmentForBoundFramebuffer(GLenum target,
@@ -383,7 +372,7 @@ void WebGLFramebuffer::deleteObjectImpl(gpu::gles2::GLES2Interface* gl) {
// entered, as they may have been finalized already during the
// same GC sweep. These attachments' OpenGL objects will be fully
// destroyed once their JavaScript wrappers are collected.
- if (!m_destructionInProgress) {
+ if (!destructionInProgress()) {
for (const auto& attachment : m_attachments)
attachment.value->onDetached(gl);
}

Powered by Google App Engine
This is Rietveld 408576698