Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(967)

Unified Diff: Source/core/html/canvas/WebGLCompressedTextureATC.cpp

Issue 15876011: Make WebGL extensions get lost when context is lost. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/html/canvas/WebGLCompressedTextureATC.cpp
diff --git a/Source/core/html/canvas/WebGLCompressedTextureATC.cpp b/Source/core/html/canvas/WebGLCompressedTextureATC.cpp
index db998a9195b23c7dc8cb2680235ab6f893719850..1593ab356b7aac1462786215846c5d28130de3fd 100644
--- a/Source/core/html/canvas/WebGLCompressedTextureATC.cpp
+++ b/Source/core/html/canvas/WebGLCompressedTextureATC.cpp
@@ -35,15 +35,20 @@ WebGLCompressedTextureATC::WebGLCompressedTextureATC(WebGLRenderingContext* cont
: WebGLExtension(context)
{
ScriptWrappable::init(this);
- context->addCompressedTextureFormat(Extensions3D::COMPRESSED_ATC_RGB_AMD);
- context->addCompressedTextureFormat(Extensions3D::COMPRESSED_ATC_RGBA_EXPLICIT_ALPHA_AMD);
- context->addCompressedTextureFormat(Extensions3D::COMPRESSED_ATC_RGBA_INTERPOLATED_ALPHA_AMD);
+ enable();
}
WebGLCompressedTextureATC::~WebGLCompressedTextureATC()
{
}
+void WebGLCompressedTextureATC::enable()
+{
+ m_context->addCompressedTextureFormat(Extensions3D::COMPRESSED_ATC_RGB_AMD);
+ m_context->addCompressedTextureFormat(Extensions3D::COMPRESSED_ATC_RGBA_EXPLICIT_ALPHA_AMD);
+ m_context->addCompressedTextureFormat(Extensions3D::COMPRESSED_ATC_RGBA_INTERPOLATED_ALPHA_AMD);
+}
+
WebGLExtension::ExtensionName WebGLCompressedTextureATC::getName() const
{
return WebGLCompressedTextureATCName;

Powered by Google App Engine
This is Rietveld 408576698