From cb77a245b7845814a7726c5e5cc4f23c2a24da8a Mon Sep 17 00:00:00 2001 From: James Clarke Date: Sun, 21 Oct 2018 16:14:25 +0100 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. --- 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 b8483616b1464..2e226a3d2c034 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,