diff options
Diffstat (limited to 'include/mbgl/platform')
-rw-r--r-- | include/mbgl/platform/default/glfw_view.hpp | 3 | ||||
-rw-r--r-- | include/mbgl/platform/default/headless_view.hpp | 5 |
2 files changed, 6 insertions, 2 deletions
diff --git a/include/mbgl/platform/default/glfw_view.hpp b/include/mbgl/platform/default/glfw_view.hpp index ec99080732..17050d64db 100644 --- a/include/mbgl/platform/default/glfw_view.hpp +++ b/include/mbgl/platform/default/glfw_view.hpp @@ -24,7 +24,8 @@ public: void deactivate() override; void notify() override; void invalidate() override; - void swap() override; + void beforeRender() override; + void afterRender() override; static void onKey(GLFWwindow *window, int key, int scancode, int action, int mods); static void onScroll(GLFWwindow *window, double xoffset, double yoffset); diff --git a/include/mbgl/platform/default/headless_view.hpp b/include/mbgl/platform/default/headless_view.hpp index ce0ff2a685..50edc48428 100644 --- a/include/mbgl/platform/default/headless_view.hpp +++ b/include/mbgl/platform/default/headless_view.hpp @@ -37,9 +37,11 @@ public: void deactivate() override; void notify() override; void invalidate() override; - void swap() override; + void beforeRender() override; + void afterRender() override; std::unique_ptr<StillImage> readStillImage() override; + void resizeFramebuffer(); void resize(uint16_t width, uint16_t height); private: @@ -52,6 +54,7 @@ private: std::shared_ptr<HeadlessDisplay> display; const float pixelRatio; std::array<uint16_t, 2> dimensions; + bool needsResize; #if MBGL_USE_CGL CGLContextObj glContext = nullptr; |