summaryrefslogtreecommitdiff
path: root/src/mbgl/style/image.cpp
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2017-05-15 14:09:06 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2017-05-16 12:26:35 -0700
commitcc1ea759a681cadcfd06fd7bdda79ca6deb38c62 (patch)
tree97ece422b0516b11979c84b8136f95aeabb1aa91 /src/mbgl/style/image.cpp
parentc0f6e5ccefc67dbdaa6ab7c7ea75a2a2d0c3f2ae (diff)
downloadqtlocation-mapboxgl-cc1ea759a681cadcfd06fd7bdda79ca6deb38c62.tar.gz
[core, node, darwin, android, qt] Make image ID part of Image
More like Source and Layer.
Diffstat (limited to 'src/mbgl/style/image.cpp')
-rw-r--r--src/mbgl/style/image.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mbgl/style/image.cpp b/src/mbgl/style/image.cpp
index 606d9907a4..3b35fa76f1 100644
--- a/src/mbgl/style/image.cpp
+++ b/src/mbgl/style/image.cpp
@@ -5,10 +5,15 @@
namespace mbgl {
namespace style {
-Image::Image(PremultipliedImage &&image,
+Image::Image(std::string id,
+ PremultipliedImage &&image,
const float pixelRatio,
bool sdf)
- : impl(makeMutable<Impl>(std::move(image), pixelRatio, sdf)) {
+ : impl(makeMutable<Impl>(std::move(id), std::move(image), pixelRatio, sdf)) {
+}
+
+std::string Image::getID() const {
+ return impl->id;
}
const PremultipliedImage& Image::getImage() const {