summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2016-11-22 15:17:51 +0100
committerKonstantin Käfer <mail@kkaefer.com>2016-11-22 20:58:51 +0100
commit117863f1114551407c481abc752f5fcfd139c878 (patch)
tree4c408a8a3809df59fdfac1bc622ea79fbdbe611e /include
parent3bc79e316e343d59f77811bca4ed6c594431e91c (diff)
downloadqtlocation-mapboxgl-117863f1114551407c481abc752f5fcfd139c878.tar.gz
[build] move headless rendering files to platform/default
Diffstat (limited to 'include')
-rw-r--r--include/mbgl/platform/default/headless_backend.hpp57
-rw-r--r--include/mbgl/platform/default/headless_display.hpp20
-rw-r--r--include/mbgl/platform/default/offscreen_view.hpp33
3 files changed, 0 insertions, 110 deletions
diff --git a/include/mbgl/platform/default/headless_backend.hpp b/include/mbgl/platform/default/headless_backend.hpp
deleted file mode 100644
index da8c55e044..0000000000
--- a/include/mbgl/platform/default/headless_backend.hpp
+++ /dev/null
@@ -1,57 +0,0 @@
-#pragma once
-
-#include <mbgl/gl/extension.hpp>
-
-#include <mbgl/map/backend.hpp>
-
-#include <memory>
-#include <functional>
-
-namespace mbgl {
-
-class HeadlessDisplay;
-
-class HeadlessBackend : public Backend {
-public:
- HeadlessBackend();
- HeadlessBackend(std::shared_ptr<HeadlessDisplay>);
- ~HeadlessBackend() override;
-
- void invalidate() override;
- void activate() override;
- void deactivate() override;
- void notifyMapChange(MapChange) override;
-
- void setMapChangeCallback(std::function<void(MapChange)>&& cb) { mapChangeCallback = std::move(cb); }
-
- struct Impl {
- virtual ~Impl() {}
- virtual void activateContext() = 0;
- virtual void deactivateContext() {}
- };
-
-private:
- // Implementation specific functions
- static gl::glProc initializeExtension(const char*);
-
- bool hasContext() const { return bool(impl); }
- bool hasDisplay();
-
- void createContext();
-
-private:
- void destroyContext();
-
- void activateContext();
- void deactivateContext();
-
- std::unique_ptr<Impl> impl;
- std::shared_ptr<HeadlessDisplay> display;
-
- bool extensionsLoaded = false;
- bool active = false;
-
- std::function<void(MapChange)> mapChangeCallback;
-};
-
-} // namespace mbgl
diff --git a/include/mbgl/platform/default/headless_display.hpp b/include/mbgl/platform/default/headless_display.hpp
deleted file mode 100644
index a5c95085b8..0000000000
--- a/include/mbgl/platform/default/headless_display.hpp
+++ /dev/null
@@ -1,20 +0,0 @@
-#pragma once
-
-#include <memory>
-
-namespace mbgl {
-
-class HeadlessDisplay {
-public:
- HeadlessDisplay();
- ~HeadlessDisplay();
-
- template <typename DisplayAttribute>
- DisplayAttribute attribute() const;
-
-private:
- class Impl;
- std::unique_ptr<Impl> impl;
-};
-
-} // namespace mbgl
diff --git a/include/mbgl/platform/default/offscreen_view.hpp b/include/mbgl/platform/default/offscreen_view.hpp
deleted file mode 100644
index 0e839e14cc..0000000000
--- a/include/mbgl/platform/default/offscreen_view.hpp
+++ /dev/null
@@ -1,33 +0,0 @@
-#pragma once
-
-#include <mbgl/map/view.hpp>
-#include <mbgl/gl/framebuffer.hpp>
-#include <mbgl/gl/renderbuffer.hpp>
-#include <mbgl/util/optional.hpp>
-#include <mbgl/util/image.hpp>
-
-namespace mbgl {
-
-namespace gl {
-class Context;
-} // namespace gl
-
-class OffscreenView : public View {
-public:
- OffscreenView(gl::Context&, Size size = { 256, 256 });
-
- void bind() override;
-
- PremultipliedImage readStillImage();
-
-public:
- const Size size;
-
-private:
- gl::Context& context;
- optional<gl::Framebuffer> framebuffer;
- optional<gl::Renderbuffer<gl::RenderbufferType::RGBA>> color;
- optional<gl::Renderbuffer<gl::RenderbufferType::DepthStencil>> depthStencil;
-};
-
-} // namespace mbgl