/src/skia/src/ports/SkOSLibrary_posix.cpp
Line | Count | Source (jump to first uncovered line) |
1 | | /* |
2 | | * Copyright 2015 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 | | #if !defined(SK_BUILD_FOR_WIN) |
9 | | |
10 | | #include "src/ports/SkOSLibrary.h" |
11 | | |
12 | | #include <dlfcn.h> |
13 | | |
14 | 0 | void* SkLoadDynamicLibrary(const char* libraryName) { |
15 | 0 | return dlopen(libraryName, RTLD_LAZY); |
16 | 0 | } |
17 | | |
18 | 0 | void* SkGetProcedureAddress(void* library, const char* functionName) { |
19 | 0 | return dlsym(library, functionName); |
20 | 0 | } |
21 | | |
22 | 0 | bool SkFreeDynamicLibrary(void* library) { |
23 | 0 | return dlclose(library) == 0; |
24 | 0 | } |
25 | | |
26 | | #endif//!defined(SK_BUILD_FOR_WIN) |