| Index: Source/core/html/canvas/WebGLLoseContext.cpp
|
| ===================================================================
|
| --- Source/core/html/canvas/WebGLLoseContext.cpp (revision 187498)
|
| +++ Source/core/html/canvas/WebGLLoseContext.cpp (working copy)
|
| @@ -58,14 +58,16 @@
|
|
|
| void WebGLLoseContext::loseContext()
|
| {
|
| - if (!isLost())
|
| - m_context->forceLostContext(WebGLRenderingContextBase::WebGLLoseContextLostContext, WebGLRenderingContextBase::Manual);
|
| + WebGLExtensionScopedContext scoped(this);
|
| + if (!scoped.isLost())
|
| + scoped.context()->forceLostContext(WebGLRenderingContextBase::WebGLLoseContextLostContext, WebGLRenderingContextBase::Manual);
|
| }
|
|
|
| void WebGLLoseContext::restoreContext()
|
| {
|
| - if (!isLost())
|
| - m_context->forceRestoreContext();
|
| + WebGLExtensionScopedContext scoped(this);
|
| + if (!scoped.isLost())
|
| + scoped.context()->forceRestoreContext();
|
| }
|
|
|
| bool WebGLLoseContext::supported(WebGLRenderingContextBase*)
|
|
|