diff options
author | Iain Merrick <husky@google.com> | 2010-08-19 17:55:56 +0100 |
---|---|---|
committer | Iain Merrick <husky@google.com> | 2010-08-23 11:05:40 +0100 |
commit | f486d19d62f1bc33246748b14b14a9dfa617b57f (patch) | |
tree | 195485454c93125455a30e553a73981c3816144d /WebCore/html/canvas/WebGLObject.cpp | |
parent | 6ba0b43722d16bc295606bec39f396f596e4fef1 (diff) | |
download | external_webkit-f486d19d62f1bc33246748b14b14a9dfa617b57f.zip external_webkit-f486d19d62f1bc33246748b14b14a9dfa617b57f.tar.gz external_webkit-f486d19d62f1bc33246748b14b14a9dfa617b57f.tar.bz2 |
Merge WebKit at r65615 : Initial merge by git.
Change-Id: Ifbf384f4531e3b58475a662e38195c2d9152ae79
Diffstat (limited to 'WebCore/html/canvas/WebGLObject.cpp')
-rw-r--r-- | WebCore/html/canvas/WebGLObject.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/WebCore/html/canvas/WebGLObject.cpp b/WebCore/html/canvas/WebGLObject.cpp index 6a34269..5fd5534 100644 --- a/WebCore/html/canvas/WebGLObject.cpp +++ b/WebCore/html/canvas/WebGLObject.cpp @@ -35,8 +35,9 @@ namespace WebCore { WebGLObject::WebGLObject(WebGLRenderingContext* context) : m_object(0) - , m_shouldDeleteObject(true) , m_context(context) + , m_attachmentCount(0) + , m_deleted(false) { } @@ -46,27 +47,26 @@ WebGLObject::~WebGLObject() m_context->removeObject(this); } -void WebGLObject::setObject(Platform3DObject object, bool shouldDeleteObject) +void WebGLObject::setObject(Platform3DObject object) { if (object == m_object) return; deleteObject(); m_object = object; - m_shouldDeleteObject = shouldDeleteObject; } void WebGLObject::deleteObject() { if (m_object) { - if (m_shouldDeleteObject) - if (m_context) { - m_context->graphicsContext3D()->makeContextCurrent(); - deleteObjectImpl(m_object); - } - m_object = 0; + if (m_context) { + m_context->graphicsContext3D()->makeContextCurrent(); + deleteObjectImpl(m_object); + } + if (!m_attachmentCount) + m_object = 0; + m_deleted = true; } - m_shouldDeleteObject = true; } } |