Skip to content

Commit

Permalink
Fix Windows embedding. Appears that flutter#6523 or flutter#6525 intr…
Browse files Browse the repository at this point in the history
…oduced 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)
  • Loading branch information
clarkezone authored and jason-simmons committed Oct 23, 2018
1 parent c9197e4 commit 52e48ab
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions shell/platform/embedder/embedder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 52e48ab

Please sign in to comment.