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

Unified Diff: Source/core/html/canvas/WebGLRenderingContext.cpp

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/WebGLRenderingContext.cpp
diff --git a/Source/core/html/canvas/WebGLRenderingContext.cpp b/Source/core/html/canvas/WebGLRenderingContext.cpp
index 25faec70772cc5e1fc23dbc69f8a459053ba2536..9f3a7cf017ffccf040facf891d10990124a44ae8 100644
--- a/Source/core/html/canvas/WebGLRenderingContext.cpp
+++ b/Source/core/html/canvas/WebGLRenderingContext.cpp
@@ -79,7 +79,7 @@ PassOwnPtrWillBeRawPtr<WebGLRenderingContext> WebGLRenderingContext::create(HTML
}
// The only situation that attrs is null is through Document::getCSSCanvasContext().
- RefPtr<WebGLContextAttributes> defaultAttrs;
+ RefPtrWillBeRawPtr<WebGLContextAttributes> defaultAttrs = nullptr;
if (!attrs) {
defaultAttrs = WebGLContextAttributes::create();
attrs = defaultAttrs.get();
@@ -101,7 +101,7 @@ PassOwnPtrWillBeRawPtr<WebGLRenderingContext> WebGLRenderingContext::create(HTML
renderingContext->registerContextExtensions();
renderingContext->suspendIfNeeded();
- if (!renderingContext->m_drawingBuffer) {
+ if (!renderingContext->drawingBuffer()) {
canvas->dispatchEvent(WebGLContextEvent::create(EventTypeNames::webglcontextcreationerror, false, true, "Could not create a WebGL context."));
return nullptr;
}
@@ -117,7 +117,6 @@ WebGLRenderingContext::WebGLRenderingContext(HTMLCanvasElement* passedCanvas, Pa
WebGLRenderingContext::~WebGLRenderingContext()
{
-
}
void WebGLRenderingContext::registerContextExtensions()
@@ -148,4 +147,30 @@ void WebGLRenderingContext::registerContextExtensions()
registerExtension<WebGLLoseContext>(m_webglLoseContext, ApprovedExtension, bothPrefixes);
}
+void WebGLRenderingContext::trace(Visitor* visitor)
+{
+ visitor->trace(m_angleInstancedArrays);
+ visitor->trace(m_extBlendMinMax);
+ visitor->trace(m_extFragDepth);
+ visitor->trace(m_extShaderTextureLOD);
+ visitor->trace(m_extTextureFilterAnisotropic);
+ visitor->trace(m_oesTextureFloat);
+ visitor->trace(m_oesTextureFloatLinear);
+ visitor->trace(m_oesTextureHalfFloat);
+ visitor->trace(m_oesTextureHalfFloatLinear);
+ visitor->trace(m_oesStandardDerivatives);
+ visitor->trace(m_oesVertexArrayObject);
+ visitor->trace(m_oesElementIndexUint);
+ visitor->trace(m_webglLoseContext);
+ visitor->trace(m_webglDebugRendererInfo);
+ visitor->trace(m_webglDebugShaders);
+ visitor->trace(m_webglDrawBuffers);
+ visitor->trace(m_webglCompressedTextureATC);
+ visitor->trace(m_webglCompressedTextureETC1);
+ visitor->trace(m_webglCompressedTexturePVRTC);
+ visitor->trace(m_webglCompressedTextureS3TC);
+ visitor->trace(m_webglDepthTexture);
+ WebGLRenderingContextBase::trace(visitor);
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698