aboutsummaryrefslogtreecommitdiff
path: root/src/osx/graphics/quartz/Image.cpp
blob: 901b3ff42db31ab579e24a8377fe24a716a034c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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