summaryrefslogtreecommitdiff
path: root/src/mbgl/style/image_impl.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/style/image_impl.hpp')
-rw-r--r--src/mbgl/style/image_impl.hpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/mbgl/style/image_impl.hpp b/src/mbgl/style/image_impl.hpp
new file mode 100644
index 0000000000..e439e42695
--- /dev/null
+++ b/src/mbgl/style/image_impl.hpp
@@ -0,0 +1,33 @@
+#pragma once
+
+#include <mbgl/style/image.hpp>
+
+#include <string>
+#include <unordered_map>
+#include <set>
+
+namespace mbgl {
+namespace style {
+
+class Image::Impl {
+public:
+ Impl(std::string id, PremultipliedImage&&, float pixelRatio, bool sdf = false);
+
+ const std::string id;
+
+ PremultipliedImage image;
+
+ // Pixel ratio of the sprite image.
+ const float pixelRatio;
+
+ // Whether this image should be interpreted as a signed distance field icon.
+ const bool sdf;
+};
+
+} // namespace style
+
+using ImageMap = std::unordered_map<std::string, Immutable<style::Image::Impl>>;
+using ImageDependencies = std::set<std::string>;
+using ImageRequestPair = std::pair<ImageDependencies, uint64_t>;
+
+} // namespace mbgl