Flutter Engine
The Flutter Engine
third_party
skia
src
gpu
ganesh
gl
iOS
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
*/
7
#include "
include/core/SkTypes.h
"
8
#ifdef SK_BUILD_FOR_IOS
9
10
#include "
include/gpu/ganesh/gl/ios/GrGLMakeIOSInterface.h
"
11
#include "
include/gpu/gl/GrGLAssembleInterface.h
"
12
#include "
include/gpu/gl/GrGLInterface.h
"
13
#include "
include/private/base/SkTemplates.h
"
14
15
#include <dlfcn.h>
16
#include <memory>
17
18
namespace
GrGLInterfaces
{
19
sk_sp<const GrGLInterface>
MakeIOS
() {
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)
30
sk_sp<const GrGLInterface>
GrGLMakeNativeInterface
() {
31
return
GrGLInterfaces::MakeIOS
();
32
}
33
#endif
34
35
#endif
// SK_BUILD_FOR_IOS
GrGLAssembleInterface.h
GrGLMakeAssembledGLESInterface
SK_API sk_sp< const GrGLInterface > GrGLMakeAssembledGLESInterface(void *ctx, GrGLGetProc get)
Definition:
GrGLAssembleGLESInterfaceAutogen.cpp:27
GrGLInterface.h
GrGLMakeNativeInterface
SK_API sk_sp< const GrGLInterface > GrGLMakeNativeInterface()
Definition:
GrGLMakeNativeInterface_egl.cpp:12
GrGLMakeIOSInterface.h
SkTemplates.h
SkTypes.h
sk_sp< const GrGLInterface >
GrGLInterfaces
Definition:
GrGLMakeEGLInterface.h:15
GrGLInterfaces::MakeIOS
SK_API sk_sp< const GrGLInterface > MakeIOS()
flutter::name
DEF_SWITCHES_START aot vmservice shared library name
Definition:
switches.h:32
skglyph::kPath
@ kPath
Definition:
SkGlyph.h:317
Generated on Sun Jun 23 2024 21:56:19 for Flutter Engine by
1.9.4