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)
This commit is contained in:
committed by
Jason Simmons
parent
98d0e06b68
commit
a378ba2223
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user