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

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

Issue 481433002: gpu: Remove WebGraphicsContext3D::makeContextCurrent() in Blink (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase to ToT Created 6 years, 4 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
« no previous file with comments | « Source/core/html/HTMLVideoElement.cpp ('k') | Source/platform/graphics/Canvas2DLayerBridge.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/canvas/WebGLRenderingContextBase.cpp
diff --git a/Source/core/html/canvas/WebGLRenderingContextBase.cpp b/Source/core/html/canvas/WebGLRenderingContextBase.cpp
index 2ce5ec217924c6997ca4d48bff875dfbc0a155ba..1e3d283beee62e52158bd5113423e1408b914dee 100644
--- a/Source/core/html/canvas/WebGLRenderingContextBase.cpp
+++ b/Source/core/html/canvas/WebGLRenderingContextBase.cpp
@@ -5511,7 +5511,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()) {
// 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.
« no previous file with comments | « Source/core/html/HTMLVideoElement.cpp ('k') | Source/platform/graphics/Canvas2DLayerBridge.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698