Commit 1f068a7d authored by Zhenyao Mo's avatar Zhenyao Mo Committed by Commit Bot

Check GL context creation succeeds before using the context.

BUG=902684
TEST=bots
R=piman@chromium.org

Change-Id: I0c7267b6c23313e9613d38ecdf399707cbd8b11c
Reviewed-on: https://chromium-review.googlesource.com/c/1338494
Commit-Queue: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: default avatarAntoine Labour <piman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608627}
parent a1492716
...@@ -737,7 +737,7 @@ bool GLSurfaceEGL::InitializeOneOffCommon() { ...@@ -737,7 +737,7 @@ bool GLSurfaceEGL::InitializeOneOffCommon() {
scoped_refptr<GLSurface> surface = new SurfacelessEGL(gfx::Size(1, 1)); scoped_refptr<GLSurface> surface = new SurfacelessEGL(gfx::Size(1, 1));
scoped_refptr<GLContext> context = InitializeGLContext( scoped_refptr<GLContext> context = InitializeGLContext(
new GLContextEGL(nullptr), surface.get(), GLContextAttribs()); new GLContextEGL(nullptr), surface.get(), GLContextAttribs());
if (!context->MakeCurrent(surface.get())) if (!context || !context->MakeCurrent(surface.get()))
g_egl_surfaceless_context_supported = false; g_egl_surfaceless_context_supported = false;
// Ensure context supports GL_OES_surfaceless_context. // Ensure context supports GL_OES_surfaceless_context.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment