diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/mbgl/platform/default/headless_display.hpp | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/include/mbgl/platform/default/headless_display.hpp b/include/mbgl/platform/default/headless_display.hpp index f43e61340f..433df952fd 100644 --- a/include/mbgl/platform/default/headless_display.hpp +++ b/include/mbgl/platform/default/headless_display.hpp @@ -2,12 +2,7 @@ #include <mbgl/gl/implementation.hpp> -#if MBGL_USE_CGL -#include <OpenGL/OpenGL.h> -#elif MBGL_USE_GLX -typedef struct _XDisplay Display; -typedef struct __GLXFBConfigRec* GLXFBConfig; -#endif +#include <memory> namespace mbgl { @@ -16,14 +11,12 @@ public: HeadlessDisplay(); ~HeadlessDisplay(); -#if MBGL_USE_CGL - CGLPixelFormatObj pixelFormat = nullptr; -#endif + template <typename DisplayAttribute> + DisplayAttribute attribute() const; -#if MBGL_USE_GLX - Display *xDisplay = nullptr; - GLXFBConfig *fbConfigs = nullptr; -#endif +private: + class Impl; + std::unique_ptr<Impl> impl; }; } // namespace mbgl |