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

Unified Diff: Source/core/html/canvas/WebGLFramebuffer.h

Issue 365653002: Oilpan: move 2D Canvas and WebGL objects to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Smaller adjustments Created 6 years, 5 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: Source/core/html/canvas/WebGLFramebuffer.h
diff --git a/Source/core/html/canvas/WebGLFramebuffer.h b/Source/core/html/canvas/WebGLFramebuffer.h
index 60e3399345114be08f83d7da554bdba4cda7897a..8a32a38ac668fee51cdedb7b95145138fb2f2bb5 100644
--- a/Source/core/html/canvas/WebGLFramebuffer.h
+++ b/Source/core/html/canvas/WebGLFramebuffer.h
@@ -39,7 +39,7 @@ class WebGLTexture;
class WebGLFramebuffer FINAL : public WebGLContextObject, public ScriptWrappable {
public:
- class WebGLAttachment : public RefCounted<WebGLAttachment> {
+ class WebGLAttachment : public RefCountedWillBeGarbageCollectedFinalized<WebGLAttachment> {
public:
virtual ~WebGLAttachment();
@@ -58,13 +58,15 @@ public:
virtual void attach(blink::WebGraphicsContext3D*, GLenum attachment) = 0;
virtual void unattach(blink::WebGraphicsContext3D*, GLenum attachment) = 0;
+ virtual void trace(Visitor*) { }
+
protected:
WebGLAttachment();
};
virtual ~WebGLFramebuffer();
- static PassRefPtr<WebGLFramebuffer> create(WebGLRenderingContextBase*);
+ static PassRefPtrWillBeRawPtr<WebGLFramebuffer> create(WebGLRenderingContextBase*);
void setAttachmentForBoundFramebuffer(GLenum attachment, GLenum texTarget, WebGLTexture*, GLint level);
void setAttachmentForBoundFramebuffer(GLenum attachment, WebGLRenderbuffer*);
@@ -99,8 +101,10 @@ public:
GLenum getDrawBuffer(GLenum);
+ virtual void trace(Visitor*) OVERRIDE;
+
protected:
- WebGLFramebuffer(WebGLRenderingContextBase*);
+ explicit WebGLFramebuffer(WebGLRenderingContextBase*);
virtual void deleteObjectImpl(blink::WebGraphicsContext3D*, Platform3DObject) OVERRIDE;
@@ -117,7 +121,7 @@ private:
// Check if a new drawBuffers call should be issued. This is called when we add or remove an attachment.
void drawBuffersIfNecessary(bool force);
- typedef WTF::HashMap<GLenum, RefPtr<WebGLAttachment> > AttachmentMap;
+ typedef WillBeHeapHashMap<GLenum, RefPtrWillBeMember<WebGLAttachment> > AttachmentMap;
AttachmentMap m_attachments;

Powered by Google App Engine
This is Rietveld 408576698