summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2015-04-23 11:11:12 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2015-04-28 14:32:24 -0400
commit230027e5140a8aa3c6cb24ddf3f5aee20506ac8f (patch)
tree979fbd2cd84fedbb1bdb04c3968fafb1264264f9 /include
parenta625ba8a0976ef8417a2609700187c5633be2c58 (diff)
downloadqtlocation-mapboxgl-230027e5140a8aa3c6cb24ddf3f5aee20506ac8f.tar.gz
Resize view from map thread
Diffstat (limited to 'include')
-rw-r--r--include/mbgl/android/native_map_view.hpp2
-rw-r--r--include/mbgl/map/view.hpp3
-rw-r--r--include/mbgl/platform/default/headless_view.hpp3
3 files changed, 4 insertions, 4 deletions
diff --git a/include/mbgl/android/native_map_view.hpp b/include/mbgl/android/native_map_view.hpp
index 059f4b1116..a050ad1496 100644
--- a/include/mbgl/android/native_map_view.hpp
+++ b/include/mbgl/android/native_map_view.hpp
@@ -45,8 +45,6 @@ public:
void enableFps(bool enable);
void updateFps();
- void resize(uint16_t width, uint16_t height, float ratio, uint16_t fbWidth, uint16_t fbHeight);
-
private:
EGLConfig chooseConfig(const EGLConfig configs[], EGLint numConfigs);
diff --git a/include/mbgl/map/view.hpp b/include/mbgl/map/view.hpp
index b736290169..41d57bdc91 100644
--- a/include/mbgl/map/view.hpp
+++ b/include/mbgl/map/view.hpp
@@ -40,6 +40,9 @@ public:
virtual void notify() = 0;
+ // Called from the render thread. The implementation should resize the framebuffer.
+ virtual void resize(uint16_t width, uint16_t height, float pixelRatio);
+
// Called from the render thread. The implementation must trigger a rerender.
// (i.e. either the passed render() function for rendering immediately on the map thread,
// or map->renderSync() from the main thread must be called as a result of this)
diff --git a/include/mbgl/platform/default/headless_view.hpp b/include/mbgl/platform/default/headless_view.hpp
index a0a3847c83..66f13cf5bf 100644
--- a/include/mbgl/platform/default/headless_view.hpp
+++ b/include/mbgl/platform/default/headless_view.hpp
@@ -29,11 +29,10 @@ public:
HeadlessView(std::shared_ptr<HeadlessDisplay> display, uint16_t width = 256, uint16_t height = 256, float pixelRatio = 1);
~HeadlessView();
- void resize(uint16_t width, uint16_t height, float pixelRatio);
-
void activate() override;
void deactivate() override;
void notify() override;
+ void resize(uint16_t width, uint16_t height, float pixelRatio) override;
void invalidate(std::function<void()> render) override;
std::unique_ptr<StillImage> readStillImage() override;