Skip to content

Commit 52e48ab

Browse files
clarkezonejason-simmons
authored andcommitted
Fix Windows embedding. Appears that flutter#6523 or flutter#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#6624)
1 parent c9197e4 commit 52e48ab

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

shell/platform/embedder/embedder.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,17 +89,17 @@ static bool IsRendererValid(const FlutterRendererConfig* config) {
8989
return false;
9090
}
9191

92-
#if OS_LINUX || OS_WIN
93-
9492
static void* DefaultGLProcResolver(const char* name) {
9593
static fml::RefPtr<fml::NativeLibrary> proc_library =
94+
#if OS_LINUX
9695
fml::NativeLibrary::CreateForCurrentProcess();
96+
#elif OS_WIN // OS_LINUX
97+
fml::NativeLibrary::Create("opengl32.dll");
98+
#endif // OS_WIN
9799
return static_cast<void*>(
98100
const_cast<uint8_t*>(proc_library->ResolveSymbol(name)));
99101
}
100102

101-
#endif // OS_LINUX || OS_WIN
102-
103103
static shell::Shell::CreateCallback<shell::PlatformView>
104104
InferOpenGLPlatformViewCreationCallback(
105105
const FlutterRendererConfig* config,

0 commit comments

Comments
 (0)