Index: third_party/WebKit/Source/modules/webgl/WebGLObject.cpp |
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLObject.cpp b/third_party/WebKit/Source/modules/webgl/WebGLObject.cpp |
index a0f2d61681cf470f908cd21a87073ea157b55740..5ef85c10856ae31fe0c86424aa1fc65993f6ca04 100644 |
--- a/third_party/WebKit/Source/modules/webgl/WebGLObject.cpp |
+++ b/third_party/WebKit/Source/modules/webgl/WebGLObject.cpp |
@@ -25,6 +25,7 @@ |
#include "modules/webgl/WebGLObject.h" |
+#include "modules/webgl/WebGLRenderingContextBase.h" |
#include "public/platform/WebGraphicsContext3D.h" |
namespace blink { |
@@ -41,7 +42,7 @@ WebGLObject::~WebGLObject() |
ASSERT(m_deleted); |
} |
-void WebGLObject::deleteObject(WebGraphicsContext3D* context3d, gpu::gles2::GLES2Interface* gl) |
+void WebGLObject::deleteObject(gpu::gles2::GLES2Interface* gl) |
{ |
m_deleted = true; |
if (!hasObject()) |
@@ -51,13 +52,10 @@ void WebGLObject::deleteObject(WebGraphicsContext3D* context3d, gpu::gles2::GLES |
return; |
if (!m_attachmentCount) { |
- if (!context3d) { |
- context3d = getAWebGraphicsContext3D(); |
- gl = context3d ? context3d->getGLES2Interface() : nullptr; |
- } |
- |
- if (context3d) { |
- deleteObjectImpl(context3d, gl); |
+ if (!gl) |
+ gl = getAGLInterface(); |
+ if (gl) { |
+ deleteObjectImpl(gl); |
// Ensure the inherited class no longer claims to have a valid object |
ASSERT(!hasObject()); |
} |
@@ -77,15 +75,15 @@ void WebGLObject::detachAndDeleteObject() |
// The individual WebGL destructors need to call detachAndDeleteObject() |
// rather than do it based on Oilpan GC. |
detach(); |
- deleteObject(nullptr, nullptr); |
+ deleteObject(nullptr); |
} |
-void WebGLObject::onDetached(WebGraphicsContext3D* context3d, gpu::gles2::GLES2Interface* gl) |
+void WebGLObject::onDetached(gpu::gles2::GLES2Interface* gl) |
{ |
if (m_attachmentCount) |
--m_attachmentCount; |
if (m_deleted) |
- deleteObject(context3d, gl); |
+ deleteObject(gl); |
} |
} // namespace blink |