Flutter Engine
The Flutter Engine
GrGLMakeNativeInterface_iOS.cpp
Go to the documentation of this file.
1/*
2 * Copyright 2014 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_IOS
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 GrGLMakeAssembledGLESInterface(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_IOS
SK_API sk_sp< const GrGLInterface > GrGLMakeAssembledGLESInterface(void *ctx, GrGLGetProc get)
SK_API sk_sp< const GrGLInterface > GrGLMakeNativeInterface()
SK_API sk_sp< const GrGLInterface > MakeIOS()
DEF_SWITCHES_START aot vmservice shared library name
Definition: switches.h:32
@ kPath
Definition: SkGlyph.h:317