summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2015-04-21 15:02:30 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2015-04-28 14:32:22 -0400
commit6c7a01a503530843f88d240988514dc3f40795a7 (patch)
tree8009756e3d5edb66a50daed49d96e97b540959f7 /include
parent75ae956b0e598685117f7f72231677d8841cbea3 (diff)
downloadqtlocation-mapboxgl-6c7a01a503530843f88d240988514dc3f40795a7.tar.gz
Following kkaefer's view changes
Diffstat (limited to 'include')
-rw-r--r--include/mbgl/map/map.hpp5
-rw-r--r--include/mbgl/map/view.hpp8
-rw-r--r--include/mbgl/platform/default/headless_view.hpp8
3 files changed, 2 insertions, 19 deletions
diff --git a/include/mbgl/map/map.hpp b/include/mbgl/map/map.hpp
index b217a685f9..2374f0a442 100644
--- a/include/mbgl/map/map.hpp
+++ b/include/mbgl/map/map.hpp
@@ -107,6 +107,7 @@ public:
void resetNorth();
// Size
+ void resize(uint16_t width, uint16_t height, float ratio = 1);
uint16_t getWidth() const;
uint16_t getHeight() const;
@@ -146,10 +147,6 @@ public:
private:
void triggerUpdate(Update update = Update::Nothing);
- // This may only be called by the View object.
- void resize(uint16_t width, uint16_t height, float ratio = 1);
- void resize(uint16_t width, uint16_t height, float ratio, uint16_t fbWidth, uint16_t fbHeight);
-
const std::unique_ptr<Environment> env;
std::unique_ptr<EnvironmentScope> scope;
View &view;
diff --git a/include/mbgl/map/view.hpp b/include/mbgl/map/view.hpp
index 9fdbd62784..b736290169 100644
--- a/include/mbgl/map/view.hpp
+++ b/include/mbgl/map/view.hpp
@@ -45,10 +45,6 @@ public:
// or map->renderSync() from the main thread must be called as a result of this)
virtual void invalidate(std::function<void()> render) = 0;
- // Called from the render (=GL) thread. Signals that the contents of the contents
- // may be discarded. The default is a no-op.
- virtual void discard();
-
// Reads the pixel data from the current framebuffer. If your View implementation
// doesn't support reading from the framebuffer, return a null pointer.
virtual std::unique_ptr<StillImage> readStillImage();
@@ -61,10 +57,6 @@ public:
Duration delay = Duration::zero());
protected:
- // Resizes the view
- void resize(uint16_t width, uint16_t height, float ratio, uint16_t fbWidth, uint16_t fbHeight);
-
-protected:
mbgl::Map *map = nullptr;
};
}
diff --git a/include/mbgl/platform/default/headless_view.hpp b/include/mbgl/platform/default/headless_view.hpp
index fd7a69f96d..a0a3847c83 100644
--- a/include/mbgl/platform/default/headless_view.hpp
+++ b/include/mbgl/platform/default/headless_view.hpp
@@ -35,7 +35,6 @@ public:
void deactivate() override;
void notify() override;
void invalidate(std::function<void()> render) override;
- void discard() override;
std::unique_ptr<StillImage> readStillImage() override;
private:
@@ -57,12 +56,7 @@ private:
float pixelRatio = 0;
};
- // These are the values that represent the state of the current framebuffer.
- Dimensions current;
-
- // These are the values that will be used after the next discard() event.
- std::mutex prospectiveMutex;
- Dimensions prospective;
+ Dimensions dimensions;
#if MBGL_USE_CGL
CGLContextObj glContext = nullptr;