Index: Source/modules/webgl/WebGLFramebuffer.cpp |
diff --git a/Source/modules/webgl/WebGLFramebuffer.cpp b/Source/modules/webgl/WebGLFramebuffer.cpp |
index e9dee4049417d46953014e526d414bf565c1c9bd..59ed0adc96e99835b4de45cf5a18198d0425d7f6 100644 |
--- a/Source/modules/webgl/WebGLFramebuffer.cpp |
+++ b/Source/modules/webgl/WebGLFramebuffer.cpp |
@@ -38,7 +38,7 @@ namespace { |
class WebGLRenderbufferAttachment final : public WebGLFramebuffer::WebGLAttachment { |
public: |
- static PassRefPtrWillBeRawPtr<WebGLFramebuffer::WebGLAttachment> create(WebGLRenderbuffer*); |
+ static WebGLFramebuffer::WebGLAttachment* create(WebGLRenderbuffer*); |
DECLARE_VIRTUAL_TRACE(); |
@@ -57,12 +57,12 @@ private: |
void attach(WebGraphicsContext3D*, GLenum target, GLenum attachment) override; |
void unattach(WebGraphicsContext3D*, GLenum target, GLenum attachment) override; |
- RefPtrWillBeMember<WebGLRenderbuffer> m_renderbuffer; |
+ Member<WebGLRenderbuffer> m_renderbuffer; |
}; |
-PassRefPtrWillBeRawPtr<WebGLFramebuffer::WebGLAttachment> WebGLRenderbufferAttachment::create(WebGLRenderbuffer* renderbuffer) |
+WebGLFramebuffer::WebGLAttachment* WebGLRenderbufferAttachment::create(WebGLRenderbuffer* renderbuffer) |
{ |
- return adoptRefWillBeNoop(new WebGLRenderbufferAttachment(renderbuffer)); |
+ return new WebGLRenderbufferAttachment(renderbuffer); |
} |
DEFINE_TRACE(WebGLRenderbufferAttachment) |
@@ -140,12 +140,13 @@ void WebGLRenderbufferAttachment::unattach(WebGraphicsContext3D* context, GLenum |
GLenum WebGLRenderbufferAttachment::type() const |
{ |
+ notImplemented(); |
return 0; |
} |
class WebGLTextureAttachment final : public WebGLFramebuffer::WebGLAttachment { |
public: |
- static PassRefPtrWillBeRawPtr<WebGLFramebuffer::WebGLAttachment> create(WebGLTexture*, GLenum target, GLint level); |
+ static WebGLFramebuffer::WebGLAttachment* create(WebGLTexture*, GLenum target, GLint level); |
DECLARE_VIRTUAL_TRACE(); |
@@ -164,14 +165,14 @@ private: |
void attach(WebGraphicsContext3D*, GLenum target, GLenum attachment) override; |
void unattach(WebGraphicsContext3D*, GLenum target, GLenum attachment) override; |
- RefPtrWillBeMember<WebGLTexture> m_texture; |
+ Member<WebGLTexture> m_texture; |
GLenum m_target; |
GLint m_level; |
}; |
-PassRefPtrWillBeRawPtr<WebGLFramebuffer::WebGLAttachment> WebGLTextureAttachment::create(WebGLTexture* texture, GLenum target, GLint level) |
+WebGLFramebuffer::WebGLAttachment* WebGLTextureAttachment::create(WebGLTexture* texture, GLenum target, GLint level) |
{ |
- return adoptRefWillBeNoop(new WebGLTextureAttachment(texture, target, level)); |
+ return new WebGLTextureAttachment(texture, target, level); |
} |
DEFINE_TRACE(WebGLTextureAttachment) |
@@ -324,9 +325,9 @@ WebGLFramebuffer::WebGLAttachment::~WebGLAttachment() |
{ |
} |
-PassRefPtrWillBeRawPtr<WebGLFramebuffer> WebGLFramebuffer::create(WebGLRenderingContextBase* ctx) |
+WebGLFramebuffer* WebGLFramebuffer::create(WebGLRenderingContextBase* ctx) |
{ |
- return adoptRefWillBeNoop(new WebGLFramebuffer(ctx)); |
+ return new WebGLFramebuffer(ctx); |
} |
WebGLFramebuffer::WebGLFramebuffer(WebGLRenderingContextBase* ctx) |
@@ -339,14 +340,10 @@ WebGLFramebuffer::WebGLFramebuffer(WebGLRenderingContextBase* ctx) |
WebGLFramebuffer::~WebGLFramebuffer() |
{ |
- // Delete the platform framebuffer resource. Explicit detachment |
- // is for the benefit of Oilpan, where the framebuffer object |
- // isn't detached when it and the WebGLRenderingContextBase object |
- // it is registered with are both finalized. Without Oilpan, the |
- // object will have been detached. |
- // |
- // To keep the code regular, the trivial detach()ment is always |
- // performed. |
+ // Delete the platform framebuffer resource. |
+ // When the framebuffer object and the WebGLRenderingContextBase object |
+ // which is registered with are both finalized, the framebuffer object isn't detached. |
+ // Thus we detach() it here. |
detachAndDeleteObject(); |
} |
@@ -663,9 +660,7 @@ bool WebGLFramebuffer::getReadBufferFormatAndType(GLenum* format, GLenum* type) |
DEFINE_TRACE(WebGLFramebuffer) |
{ |
-#if ENABLE(OILPAN) |
visitor->trace(m_attachments); |
-#endif |
WebGLContextObject::trace(visitor); |
} |