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

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

Issue 163773007: WebGL: Transfer ownership of WebGraphicsContext3D from WebGLRenderingContext to DrawingBuffer. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@correct_webgl_destroy
Patch Set: rebase to upstream Created 6 years, 10 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/WebGLRenderingContextBase.h
diff --git a/Source/core/html/canvas/WebGLRenderingContextBase.h b/Source/core/html/canvas/WebGLRenderingContextBase.h
index c0ca96c1a8492a05cd07db547725006a9013fad4..3d755798890659c3d0fa6d5433f54f0cacd4558a 100644
--- a/Source/core/html/canvas/WebGLRenderingContextBase.h
+++ b/Source/core/html/canvas/WebGLRenderingContextBase.h
@@ -204,7 +204,7 @@ public:
void hint(GLenum target, GLenum mode);
GLboolean isBuffer(WebGLBuffer*);
- bool isContextLost();
+ bool isContextLost() const;
GLboolean isEnabled(GLenum cap);
GLboolean isFramebuffer(WebGLFramebuffer*);
GLboolean isProgram(WebGLProgram*);
@@ -323,7 +323,7 @@ public:
void forceRestoreContext();
void loseContextImpl(LostContextMode);
- blink::WebGraphicsContext3D* webGraphicsContext3D() const { return m_context.get(); }
+ blink::WebGraphicsContext3D* webGraphicsContext3D() const;
WebGLContextGroup* contextGroup() const { return m_contextGroup.get(); }
virtual blink::WebLayer* platformLayer() const OVERRIDE;
Extensions3DUtil* extensionsUtil();
@@ -390,12 +390,10 @@ protected:
WebGLRenderbuffer* ensureEmulatedStencilBuffer(GLenum target, WebGLRenderbuffer*);
- OwnPtr<blink::WebGraphicsContext3D> m_context;
- RefPtr<WebGLContextGroup> m_contextGroup;
-
// Structure for rendering to a DrawingBuffer, instead of directly
// to the back-buffer of m_context.
RefPtr<DrawingBuffer> m_drawingBuffer;
+ RefPtr<WebGLContextGroup> m_contextGroup;
// Dispatches a context lost event once it is determined that one is needed.
// This is used both for synthetic and real context losses. For real ones, it's

Powered by Google App Engine
This is Rietveld 408576698