summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2016-11-06 13:04:59 +0200
committerBruno de Oliveira Abinader <bruno@mapbox.com>2016-11-08 18:02:38 +0200
commit297c303e88416274d3d2c14b5f6abf1c850c3cf8 (patch)
tree7be5fb4768733727423871d8329a9a94ea1bd214 /include
parent5a828cb80fb69f88840d3085b79c9e756bf0e66d (diff)
downloadqtlocation-mapboxgl-297c303e88416274d3d2c14b5f6abf1c850c3cf8.tar.gz
[core] Refactor HeadlessDisplay
Diffstat (limited to 'include')
-rw-r--r--include/mbgl/platform/default/headless_display.hpp19
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