mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
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)
This commit is contained in:
parent
c9197e4498
commit
52e48ab84a
@ -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<fml::NativeLibrary> proc_library =
|
||||
#if OS_LINUX
|
||||
fml::NativeLibrary::CreateForCurrentProcess();
|
||||
#elif OS_WIN // OS_LINUX
|
||||
fml::NativeLibrary::Create("opengl32.dll");
|
||||
#endif // OS_WIN
|
||||
return static_cast<void*>(
|
||||
const_cast<uint8_t*>(proc_library->ResolveSymbol(name)));
|
||||
}
|
||||
|
||||
#endif // OS_LINUX || OS_WIN
|
||||
|
||||
static shell::Shell::CreateCallback<shell::PlatformView>
|
||||
InferOpenGLPlatformViewCreationCallback(
|
||||
const FlutterRendererConfig* config,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user