SkOSLibrary_posix.cpp 511 B

123456789101112131415161718192021
  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. #include "src/ports/SkOSLibrary.h"
  10. #include <dlfcn.h>
  11. void* DynamicLoadLibrary(const char* libraryName) {
  12. return dlopen(libraryName, RTLD_LAZY);
  13. }
  14. void* GetProcedureAddress(void* library, const char* functionName) {
  15. return dlsym(library, functionName);
  16. }
  17. #endif//!defined(SK_BUILD_FOR_WIN)