Chromium Code Reviews| Index: Source/core/html/canvas/WebGLObject.cpp |
| diff --git a/Source/core/html/canvas/WebGLObject.cpp b/Source/core/html/canvas/WebGLObject.cpp |
| index 14dd8ba5ee8d78eeea2c29b7f2dfc08ece0c7a8f..43d0b32e37e2307080920f62c088e2dadc343371 100644 |
| --- a/Source/core/html/canvas/WebGLObject.cpp |
| +++ b/Source/core/html/canvas/WebGLObject.cpp |
| @@ -27,9 +27,11 @@ |
| #include "core/html/canvas/WebGLObject.h" |
| +#include "core/html/canvas/WebGLRenderingContextBase.h" |
|
Ken Russell (switch to Gerrit)
2014/07/19 00:27:15
This #include looks unnecessary.
sof
2014/07/19 19:55:57
Thanks, removed.
|
| + |
| namespace WebCore { |
| -WebGLObject::WebGLObject(WebGLRenderingContextBase*) |
| +WebGLObject::WebGLObject(WebGLRenderingContextBase* base) |
| : m_object(0) |
| , m_attachmentCount(0) |
| , m_deleted(false) |
| @@ -38,6 +40,10 @@ WebGLObject::WebGLObject(WebGLRenderingContextBase*) |
| WebGLObject::~WebGLObject() |
| { |
| +#if ENABLE(OILPAN) |
| + // Verify that platform objects have been explicitly deleted. |
| + ASSERT(m_deleted); |
| +#endif |
| } |
| void WebGLObject::setObject(Platform3DObject object) |
| @@ -70,8 +76,13 @@ void WebGLObject::deleteObject(blink::WebGraphicsContext3D* context3d) |
| void WebGLObject::detach() |
| { |
| m_attachmentCount = 0; // Make sure OpenGL resource is deleted. |
| - } |
| +} |
| +void WebGLObject::detachAndDeleteObject() |
| +{ |
| + detach(); |
| + deleteObject(0); |
| +} |
| void WebGLObject::onDetached(blink::WebGraphicsContext3D* context3d) |
| { |