use CoreImage for decoding/encoding images on osx/ios
This commit is contained in:
@@ -181,11 +181,11 @@ void HeadlessView::resize(uint16_t width, uint16_t height, float pixelRatio) {
|
||||
make_inactive();
|
||||
}
|
||||
|
||||
const std::unique_ptr<uint32_t[]> HeadlessView::readPixels() {
|
||||
std::unique_ptr<uint32_t[]> HeadlessView::readPixels() {
|
||||
const unsigned int w = width_ * pixelRatio_;
|
||||
const unsigned int h = height_ * pixelRatio_;
|
||||
|
||||
std::unique_ptr<uint32_t[]> pixels(new uint32_t[w * h]);
|
||||
auto pixels = std::unique_ptr<uint32_t[]>(new uint32_t[w * h]);
|
||||
|
||||
make_active();
|
||||
glReadPixels(0, 0, width_, height_, GL_RGBA, GL_UNSIGNED_BYTE, pixels.get());
|
||||
|
||||
Reference in New Issue
Block a user