diff options
Diffstat (limited to 'src/osx/graphics/quartz/Image.cpp')
-rw-r--r-- | src/osx/graphics/quartz/Image.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/osx/graphics/quartz/Image.cpp b/src/osx/graphics/quartz/Image.cpp new file mode 100644 index 00000000..901b3ff4 --- /dev/null +++ b/src/osx/graphics/quartz/Image.cpp @@ -0,0 +1,16 @@ +#include "cru/osx/graphics/quartz/Image.hpp" + +namespace cru::platform::graphics::osx::quartz { +QuartzImage::QuartzImage(IGraphicsFactory* graphics_factory, + IImageFactory* image_factory, CGImageRef image, + bool auto_release) + : OsxQuartzResource(graphics_factory), + image_(image), + auto_release_(auto_release) {} + +QuartzImage::~QuartzImage() { + if (auto_release_) { + CGImageRelease(image_); + } +} +} // namespace cru::platform::graphics::osx::quartz |