If the platform requests setting up the resource context without making the context current, don’t attempt to create the GL native interface. (flutter/engine#3059)

This commit is contained in:
Chinmay Garde 2016-09-26 12:24:04 -07:00 committed by GitHub
parent 692aabce8f
commit 360755d6c8

View File

@ -128,12 +128,13 @@ void PlatformView::SetupResourceContextOnIOThreadPerform(
if (!current) {
LOG(WARNING)
<< "WARNING: Could not setup an OpenGL context on the resource loader.";
latch->Signal();
return;
}
blink::ResourceContext::Set(GrContext::Create(
GrBackend::kOpenGL_GrBackend,
reinterpret_cast<GrBackendContext>(GrGLCreateNativeInterface())));
latch->Signal();
}