From 52e48ab84a73e1f4cae415b3a853ef64cfcd4cd1 Mon Sep 17 00:00:00 2001 From: James Clarke Date: Tue, 23 Oct 2018 09:47:53 -0700 Subject: [PATCH] Fix Windows embedding. Appears that #6523 or #6525 introduced a bug for embedder scenarios causing the window native library to be incorrectly initialized and thus incapable of correctly resolving GL functions. This change fixes that. (#6624) --- shell/platform/embedder/embedder.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/shell/platform/embedder/embedder.cc b/shell/platform/embedder/embedder.cc index b8483616b14..2e226a3d2c0 100644 --- a/shell/platform/embedder/embedder.cc +++ b/shell/platform/embedder/embedder.cc @@ -89,17 +89,17 @@ static bool IsRendererValid(const FlutterRendererConfig* config) { return false; } -#if OS_LINUX || OS_WIN - static void* DefaultGLProcResolver(const char* name) { static fml::RefPtr proc_library = +#if OS_LINUX fml::NativeLibrary::CreateForCurrentProcess(); +#elif OS_WIN // OS_LINUX + fml::NativeLibrary::Create("opengl32.dll"); +#endif // OS_WIN return static_cast( const_cast(proc_library->ResolveSymbol(name))); } -#endif // OS_LINUX || OS_WIN - static shell::Shell::CreateCallback InferOpenGLPlatformViewCreationCallback( const FlutterRendererConfig* config,