| Index: Source/core/html/canvas/WebGLRenderingContext.cpp
|
| diff --git a/Source/core/html/canvas/WebGLRenderingContext.cpp b/Source/core/html/canvas/WebGLRenderingContext.cpp
|
| index 5311d24d3f974cf327380b8d164c5ee854b224cc..c2580d2ee8bfd3d8f8a0a9cf7032c1d476d5f79b 100644
|
| --- a/Source/core/html/canvas/WebGLRenderingContext.cpp
|
| +++ b/Source/core/html/canvas/WebGLRenderingContext.cpp
|
| @@ -705,6 +705,11 @@ void WebGLRenderingContext::addCompressedTextureFormat(GC3Denum format)
|
| m_compressedTextureFormats.append(format);
|
| }
|
|
|
| +void WebGLRenderingContext::removeAllCompressedTextureFormats()
|
| +{
|
| + m_compressedTextureFormats.clear();
|
| +}
|
| +
|
| WebGLRenderingContext::~WebGLRenderingContext()
|
| {
|
| // Remove all references to WebGLObjects so if they are the last reference
|
| @@ -726,6 +731,11 @@ WebGLRenderingContext::~WebGLRenderingContext()
|
| m_blackTextureCubeMap = 0;
|
|
|
| detachAndRemoveAllObjects();
|
| +
|
| + // release all extensions
|
| + for (size_t i = 0; i < m_extensions.size(); ++i)
|
| + delete m_extensions[i];
|
| +
|
| destroyGraphicsContext3D();
|
| m_contextGroup->removeContext(this);
|
|
|
| @@ -4154,6 +4164,14 @@ void WebGLRenderingContext::loseContextImpl(WebGLRenderingContext::LostContextMo
|
|
|
| detachAndRemoveAllObjects();
|
|
|
| + // Lose all the extensions.
|
| + for (size_t i = 0; i < m_extensions.size(); ++i) {
|
| + ExtensionTracker* tracker = m_extensions[i];
|
| + tracker->loseExtension();
|
| + }
|
| +
|
| + removeAllCompressedTextureFormats();
|
| +
|
| if (mode != RealLostContext)
|
| destroyGraphicsContext3D();
|
|
|
|
|