diff options
Diffstat (limited to 'platform/default/mbgl/gl')
-rw-r--r-- | platform/default/mbgl/gl/headless_backend.cpp | 4 | ||||
-rw-r--r-- | platform/default/mbgl/gl/headless_backend.hpp | 4 | ||||
-rw-r--r-- | platform/default/mbgl/gl/headless_display.cpp | 15 | ||||
-rw-r--r-- | platform/default/mbgl/gl/headless_display.hpp | 34 |
4 files changed, 0 insertions, 57 deletions
diff --git a/platform/default/mbgl/gl/headless_backend.cpp b/platform/default/mbgl/gl/headless_backend.cpp index edf637a560..2c81005686 100644 --- a/platform/default/mbgl/gl/headless_backend.cpp +++ b/platform/default/mbgl/gl/headless_backend.cpp @@ -1,5 +1,4 @@ #include <mbgl/gl/headless_backend.hpp> -#include <mbgl/gl/headless_display.hpp> #include <mbgl/gl/context.hpp> #include <mbgl/renderer/backend_scope.hpp> @@ -36,9 +35,6 @@ void HeadlessBackend::activate() { active = true; if (!hasContext()) { - if (!hasDisplay()) { - throw std::runtime_error("Display is not set"); - } createContext(); } diff --git a/platform/default/mbgl/gl/headless_backend.hpp b/platform/default/mbgl/gl/headless_backend.hpp index 66f861e213..f96b01300b 100644 --- a/platform/default/mbgl/gl/headless_backend.hpp +++ b/platform/default/mbgl/gl/headless_backend.hpp @@ -7,8 +7,6 @@ namespace mbgl { -class HeadlessDisplay; - class HeadlessBackend : public RendererBackend { public: HeadlessBackend(Size = { 256, 256 }); @@ -35,11 +33,9 @@ private: void deactivate() override; bool hasContext() const { return bool(impl); } - bool hasDisplay(); void createContext(); - std::shared_ptr<HeadlessDisplay> display; std::unique_ptr<Impl> impl; Size size; diff --git a/platform/default/mbgl/gl/headless_display.cpp b/platform/default/mbgl/gl/headless_display.cpp deleted file mode 100644 index 6247046c29..0000000000 --- a/platform/default/mbgl/gl/headless_display.cpp +++ /dev/null @@ -1,15 +0,0 @@ -#include <mbgl/gl/headless_display.hpp> - -namespace mbgl { - -class HeadlessDisplay::Impl {}; - -HeadlessDisplay::HeadlessDisplay() { - // no-op -} - -HeadlessDisplay::~HeadlessDisplay() { - // no-op -} - -} // namespace mbgl diff --git a/platform/default/mbgl/gl/headless_display.hpp b/platform/default/mbgl/gl/headless_display.hpp deleted file mode 100644 index 8c294655e5..0000000000 --- a/platform/default/mbgl/gl/headless_display.hpp +++ /dev/null @@ -1,34 +0,0 @@ -#pragma once - -#include <memory> - -namespace mbgl { - -class HeadlessDisplay { -public: - static std::shared_ptr<HeadlessDisplay> create() { - static std::weak_ptr<HeadlessDisplay> instance; - - auto shared = instance.lock(); - - if (!shared) { - instance = shared = std::shared_ptr<HeadlessDisplay>(new HeadlessDisplay()); - } - - return shared; - } - - - ~HeadlessDisplay(); - - template <typename DisplayAttribute> - DisplayAttribute attribute() const; - -private: - HeadlessDisplay(); - - class Impl; - std::unique_ptr<Impl> impl; -}; - -} // namespace mbgl |