summaryrefslogtreecommitdiff
path: root/platform/darwin/src/image.mm
diff options
context:
space:
mode:
Diffstat (limited to 'platform/darwin/src/image.mm')
-rw-r--r--platform/darwin/src/image.mm7
1 files changed, 7 insertions, 0 deletions
diff --git a/platform/darwin/src/image.mm b/platform/darwin/src/image.mm
index 7065545763..8c0d5fa484 100644
--- a/platform/darwin/src/image.mm
+++ b/platform/darwin/src/image.mm
@@ -4,6 +4,13 @@
#import "CFHandle.hpp"
+using CGImageHandle = CFHandle<CGImageRef, CGImageRef, CGImageRelease>;
+using CFDataHandle = CFHandle<CFDataRef, CFTypeRef, CFRelease>;
+using CGImageSourceHandle = CFHandle<CGImageSourceRef, CFTypeRef, CFRelease>;
+using CGDataProviderHandle = CFHandle<CGDataProviderRef, CGDataProviderRef, CGDataProviderRelease>;
+using CGColorSpaceHandle = CFHandle<CGColorSpaceRef, CGColorSpaceRef, CGColorSpaceRelease>;
+using CGContextHandle = CFHandle<CGContextRef, CGContextRef, CGContextRelease>;
+
CGImageRef CGImageFromMGLPremultipliedImage(mbgl::PremultipliedImage&& src) {
// We're converting the PremultipliedImage's backing store to a CGDataProvider, and are taking
// over ownership of the memory.