diff options
author | Tor Arne Vestbø <torarnv@gmail.com> | 2020-02-10 21:55:55 +0100 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2020-02-11 23:22:10 +0000 |
commit | c3c5a58f654537059366ecd3fe9811716bc202d2 (patch) | |
tree | d8a51a369ffad34b9685d2fdd7446589da63d15a /src/plugins/platforms | |
parent | dd04fb639bf357e66d0586faed78a3043a62819e (diff) |
macOS: Tag sub-layer images with color space on flush
Failing to tag the image results in costly CPU-based color-space
conversions.
Change-Id: Ib65547f4b99b83e10d3603c27388f50eb4d3840c
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoabackingstore.mm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoabackingstore.mm b/src/plugins/platforms/cocoa/qcocoabackingstore.mm index 2e15d11564..cb019c3775 100644 --- a/src/plugins/platforms/cocoa/qcocoabackingstore.mm +++ b/src/plugins/platforms/cocoa/qcocoabackingstore.mm @@ -574,7 +574,8 @@ void QCALayerBackingStore::flush(QWindow *flushedWindow, const QRegion ®ion, qCInfo(lcQpaBackingStore) << "Flushing" << subImage << "to" << flushedView.layer << "of subview" << flushedView; - QCFType<CGImageRef> cgImage = subImage.toCGImage(); + QCFType<CGImageRef> cgImage = CGImageCreateCopyWithColorSpace( + QCFType<CGImageRef>(subImage.toCGImage()), colorSpace()); flushedView.layer.contents = (__bridge id)static_cast<CGImageRef>(cgImage); } |