diff mbox series

[v4] ui/cocoa: Use kCGColorSpaceSRGB

Message ID 20210305121304.65096-1-akihiko.odaki@gmail.com (mailing list archive)
State New, archived
Headers show
Series [v4] ui/cocoa: Use kCGColorSpaceSRGB | expand

Commit Message

Akihiko Odaki March 5, 2021, 12:13 p.m. UTC
kCGColorSpaceGenericRGB | Apple Developer Documentation
https://developer.apple.com/documentation/coregraphics/kcgcolorspacegenericrgb
> Deprecated
> Use kCGColorSpaceSRGB instead.

This change also removes the legacy color space specification for
PowerPC.

Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
---
 ui/cocoa.m | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

Comments

Gerd Hoffmann March 9, 2021, 11:25 a.m. UTC | #1
On Fri, Mar 05, 2021 at 09:13:04PM +0900, Akihiko Odaki wrote:
> kCGColorSpaceGenericRGB | Apple Developer Documentation
> https://developer.apple.com/documentation/coregraphics/kcgcolorspacegenericrgb
> > Deprecated
> > Use kCGColorSpaceSRGB instead.
> 
> This change also removes the legacy color space specification for
> PowerPC.

Added to UI queue.

thanks,
  Gerd
diff mbox series

Patch

diff --git a/ui/cocoa.m b/ui/cocoa.m
index f27beb30e6e..3e1a7b7d519 100644
--- a/ui/cocoa.m
+++ b/ui/cocoa.m
@@ -463,13 +463,8 @@  - (void) drawRect:(NSRect) rect
             DIV_ROUND_UP(bitsPerPixel, 8) * 2, //bitsPerComponent
             bitsPerPixel, //bitsPerPixel
             stride, //bytesPerRow
-#ifdef __LITTLE_ENDIAN__
-            CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB), //colorspace for OS X >= 10.4
-            kCGBitmapByteOrder32Little | kCGImageAlphaNoneSkipFirst,
-#else
-            CGColorSpaceCreateDeviceRGB(), //colorspace for OS X < 10.4 (actually ppc)
-            kCGImageAlphaNoneSkipFirst, //bitmapInfo
-#endif
+            CGColorSpaceCreateWithName(kCGColorSpaceSRGB), //colorspace
+            kCGBitmapByteOrder32Little | kCGImageAlphaNoneSkipFirst, //bitmapInfo
             dataProviderRef, //provider
             NULL, //decode
             0, //interpolate