aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/angle
diff options
context:
space:
mode:
authorGravatar hendrikw <hendrikw@chromium.org>2015-10-01 18:29:34 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-10-01 18:29:34 -0700
commitb1ac52fb0f8c5f03844ef3bbb198ba32427194b5 (patch)
tree0069759ea9576ba179656c7a5c7224bb6b56f538 /src/gpu/gl/angle
parent9442ab8a40dd0effde253e3b2d166bcf47222e92 (diff)
Skia: Add Command Buffer support to Linux/Mac
Code added to load libcommand_buffer_gles2.so on linux or mac. Review URL: https://codereview.chromium.org/1346423002
Diffstat (limited to 'src/gpu/gl/angle')
-rw-r--r--src/gpu/gl/angle/GrGLCreateANGLEInterface.cpp19
1 files changed, 4 insertions, 15 deletions
diff --git a/src/gpu/gl/angle/GrGLCreateANGLEInterface.cpp b/src/gpu/gl/angle/GrGLCreateANGLEInterface.cpp
index 9a4dffb4b1..1ebd376288 100644
--- a/src/gpu/gl/angle/GrGLCreateANGLEInterface.cpp
+++ b/src/gpu/gl/angle/GrGLCreateANGLEInterface.cpp
@@ -6,25 +6,14 @@
* found in the LICENSE file.
*/
-
#include "gl/GrGLInterface.h"
#include "gl/GrGLAssembleInterface.h"
-
-#if defined _WIN32
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#else
-#include <dlfcn.h>
-#endif // defined _WIN32
+#include "../ports/SkOSLibrary.h"
#include <EGL/egl.h>
static GrGLFuncPtr angle_get_gl_proc(void* ctx, const char name[]) {
-#if defined _WIN32
- GrGLFuncPtr proc = (GrGLFuncPtr) GetProcAddress((HMODULE)ctx, name);
-#else
- GrGLFuncPtr proc = (GrGLFuncPtr) dlsym(ctx, name);
-#endif // defined _WIN32
+ GrGLFuncPtr proc = (GrGLFuncPtr) GetProcedureAddress(ctx, name);
if (proc) {
return proc;
}
@@ -37,9 +26,9 @@ const GrGLInterface* GrGLCreateANGLEInterface() {
if (nullptr == gANGLELib) {
// We load the ANGLE library and never let it go
#if defined _WIN32
- gANGLELib = LoadLibrary("libGLESv2.dll");
+ gANGLELib = DynamicLoadLibrary("libGLESv2.dll");
#else
- gANGLELib = dlopen("libGLESv2.so", RTLD_LAZY);
+ gANGLELib = DynamicLoadLibrary("libGLESv2.so");
#endif // defined _WIN32
}