summaryrefslogtreecommitdiff
path: root/platform/darwin/include/mbgl/util/image+MGLAdditions.hpp
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2018-12-13 18:45:29 +0100
committerKonstantin Käfer <mail@kkaefer.com>2018-12-13 20:39:43 +0100
commit2049ff09c2b41a5ccff693a4a64e517d47a08e4a (patch)
tree25b8f9acdb5e1b6629293bcc6f014ea4bcb6d1a3 /platform/darwin/include/mbgl/util/image+MGLAdditions.hpp
parentb6b1067caf6ba911efbb4a64a43425ce2d729a1a (diff)
downloadqtlocation-mapboxgl-upstream/build-changes.tar.gz
[build] rework platform/default directory and add -files.txt for vendored libsupstream/build-changes
Diffstat (limited to 'platform/darwin/include/mbgl/util/image+MGLAdditions.hpp')
-rw-r--r--platform/darwin/include/mbgl/util/image+MGLAdditions.hpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/platform/darwin/include/mbgl/util/image+MGLAdditions.hpp b/platform/darwin/include/mbgl/util/image+MGLAdditions.hpp
new file mode 100644
index 0000000000..c5343af4de
--- /dev/null
+++ b/platform/darwin/include/mbgl/util/image+MGLAdditions.hpp
@@ -0,0 +1,12 @@
+#pragma once
+
+#include <mbgl/util/image.hpp>
+
+#include <CoreGraphics/CGImage.h>
+
+// Creates a CGImage from a PremultipliedImage, taking over the memory ownership.
+CGImageRef CGImageCreateWithMGLPremultipliedImage(mbgl::PremultipliedImage&&);
+
+// Creates a PremultipliedImage by copying the pixels of the CGImage.
+// Does not alter the retain count of the supplied CGImage.
+mbgl::PremultipliedImage MGLPremultipliedImageFromCGImage(CGImageRef);