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

Unified Diff: Source/core/html/canvas/WebGLLoseContext.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, 6 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/WebGLLoseContext.cpp
diff --git a/Source/core/html/canvas/WebGLLoseContext.cpp b/Source/core/html/canvas/WebGLLoseContext.cpp
index 49b3a72fcc5e3eddda884f7068e8ef4ecd791299..021f0d51754c2c4a4c0cf33597e6c74b4f8714ae 100644
--- a/Source/core/html/canvas/WebGLLoseContext.cpp
+++ b/Source/core/html/canvas/WebGLLoseContext.cpp
@@ -41,14 +41,19 @@ WebGLLoseContext::~WebGLLoseContext()
{
}
+void WebGLLoseContext::lose()
+{
+ // WebGLLostContext is special in that it is never lost.
Ken Russell (switch to Gerrit) 2013/06/11 21:50:54 We need to be very careful here. If the WebGLRende
greggman 2013/06/11 21:55:21 This is already handled. ~WebGLRenderingContext lo
Ken Russell (switch to Gerrit) 2013/06/11 22:07:31 I think there is still a problem: 1) JS code gets
greggman 2013/06/11 22:47:07 Fixed made lose() take a bool for "force". on con
+}
+
WebGLExtension::ExtensionName WebGLLoseContext::getName() const
{
return WebGLLoseContextName;
}
-PassOwnPtr<WebGLLoseContext> WebGLLoseContext::create(WebGLRenderingContext* context)
+PassRefPtr<WebGLLoseContext> WebGLLoseContext::create(WebGLRenderingContext* context)
{
- return adoptPtr(new WebGLLoseContext(context));
+ return adoptRef(new WebGLLoseContext(context));
}
void WebGLLoseContext::loseContext()

Powered by Google App Engine
This is Rietveld 408576698