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