From a378ba2223b842dadfe1a4dad89764c48c9111c4 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. (flutter/engine#6624) --- engine/src/flutter/shell/platform/embedder/embedder.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/engine/src/flutter/shell/platform/embedder/embedder.cc b/engine/src/flutter/shell/platform/embedder/embedder.cc index b8483616b1..2e226a3d2c 100644 --- a/engine/src/flutter/shell/platform/embedder/embedder.cc +++ b/engine/src/flutter/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,