diff options
-rw-r--r-- | include/mbgl/platform/default/headless_view.hpp | 9 | ||||
-rw-r--r-- | mbgl.gypi | 8 | ||||
-rw-r--r-- | platform/android/platform.gyp | 2 |
3 files changed, 18 insertions, 1 deletions
diff --git a/include/mbgl/platform/default/headless_view.hpp b/include/mbgl/platform/default/headless_view.hpp index e3acc8e379..b8b91213c2 100644 --- a/include/mbgl/platform/default/headless_view.hpp +++ b/include/mbgl/platform/default/headless_view.hpp @@ -7,6 +7,9 @@ #else #define MBGL_USE_CGL 1 #endif +#elif __ANDROID__ +#include <EGL/egl.h> +#define MBGL_USE_EGL 1 #else #define GL_GLEXT_PROTOTYPES #define MBGL_USE_GLX 1 @@ -78,6 +81,12 @@ private: GLXPbuffer glxPbuffer = 0; #endif +#if MBGL_USE_EGL + EGLDisplay glDisplay = EGL_NO_DISPLAY; + EGLSurface glSurface = EGL_NO_SURFACE; + EGLContext glContext = EGL_NO_CONTEXT; +#endif + GLuint fbo = 0; GLuint fboDepthStencil = 0; GLuint fboColor = 0; @@ -259,6 +259,14 @@ }, }], + ['headless_lib == "egl"', { + 'sources': [ + 'platform/default/headless_display.cpp', + 'platform/default/headless_view.cpp', + 'platform/android/src/headless_view_egl.cpp', + ], + }], + ['loop_lib == "darwin"', { 'sources': [ 'platform/darwin/src/async_task.cpp', diff --git a/platform/android/platform.gyp b/platform/android/platform.gyp index 137d9c67fe..4fcf334f0e 100644 --- a/platform/android/platform.gyp +++ b/platform/android/platform.gyp @@ -1,7 +1,7 @@ { 'variables': { 'loop_lib': 'android', - 'headless_lib': 'none', + 'headless_lib': 'egl', 'coverage': 0, }, 'includes': [ |