Chromium Code Reviews| Index: Source/core/html/canvas/WebGLRenderingContextBase.cpp |
| diff --git a/Source/core/html/canvas/WebGLRenderingContextBase.cpp b/Source/core/html/canvas/WebGLRenderingContextBase.cpp |
| index 9946aa3ace7bcb0753ed967da2fa0bc9bb598338..2c4c9d129b7ab43304ff42ecfe3c095bf6c7f5e0 100644 |
| --- a/Source/core/html/canvas/WebGLRenderingContextBase.cpp |
| +++ b/Source/core/html/canvas/WebGLRenderingContextBase.cpp |
| @@ -5505,7 +5505,7 @@ void WebGLRenderingContextBase::maybeRestoreContext(Timer<WebGLRenderingContextB |
| OwnPtr<blink::WebGraphicsContext3D> context = adoptPtr(blink::Platform::current()->createOffscreenGraphicsContext3D(attributes, 0)); |
| RefPtr<DrawingBuffer> buffer; |
| // Even if a non-null WebGraphicsContext3D is created, until it's made current, it isn't known whether the context is still lost. |
| - if (context) { |
| + if (context && context->makeContextCurrent()) { |
|
dshwang
2014/08/26 18:21:47
Currently, this code skipped the first makeContext
|
| // Construct a new drawing buffer with the new WebGraphicsContext3D. |
| buffer = createDrawingBuffer(context.release()); |
| // If DrawingBuffer::create() fails to allocate a fbo, |drawingBuffer| is set to null. |