Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
GrGLMakeNativeInterface_mac.cpp
Go to the documentation of this file.
1/*
2 * Copyright 2011 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
8#ifdef SK_BUILD_FOR_MAC
9
14
15#include <dlfcn.h>
16#include <memory>
17
18namespace GrGLInterfaces {
20 static const char kPath[] =
21 "/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib";
22 std::unique_ptr<void, SkFunctionObject<dlclose>> lib(dlopen(kPath, RTLD_LAZY));
23 return GrGLMakeAssembledGLInterface(lib.get(), [](void* ctx, const char* name) {
24 return (GrGLFuncPtr)dlsym(ctx ? ctx : RTLD_DEFAULT, name); });
25}
26
27} // namespace GrGLInterfaces
28
29#if !defined(SK_DISABLE_LEGACY_GL_MAKE_NATIVE_INTERFACE)
32}
33#endif
34
35#endif // SK_BUILD_FOR_MAC
SK_API sk_sp< const GrGLInterface > GrGLMakeAssembledGLInterface(void *ctx, GrGLGetProc get)
SK_API sk_sp< const GrGLInterface > GrGLMakeNativeInterface()
const char * name
Definition fuchsia.cc:50
SK_API sk_sp< const GrGLInterface > MakeMac()