aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Third2020-12-28 10:40:50 +0000
committerAlan Third2020-12-31 15:38:08 +0000
commit6312a8e9382105196fdf1edddfc68a678acd673e (patch)
tree7731f71da3f389a1ca274db64f1d54d0a9990bbe
parentaeb2475816bfdf7e52284fedf693d3f36940652a (diff)
downloademacs-scratch/ns/performance.tar.gz
emacs-scratch/ns/performance.zip
Change pixel formatscratch/ns/performance
* src/nsterm.m ([EmacsSurface getContext]): Use BGRA for the IOSurface and specify the CGContext explicitly for compatibility with a wider range of Macs.
-rw-r--r--src/nsterm.m5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nsterm.m b/src/nsterm.m
index 63f48cd242b..b5eb3ac03ba 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -9597,7 +9597,7 @@ not_in_argv (NSString *arg)
9597 (id)kIOSurfaceHeight:[NSNumber numberWithInt:size.height], 9597 (id)kIOSurfaceHeight:[NSNumber numberWithInt:size.height],
9598 (id)kIOSurfaceBytesPerRow:[NSNumber numberWithInt:bytesPerRow], 9598 (id)kIOSurfaceBytesPerRow:[NSNumber numberWithInt:bytesPerRow],
9599 (id)kIOSurfaceBytesPerElement:[NSNumber numberWithInt:4], 9599 (id)kIOSurfaceBytesPerElement:[NSNumber numberWithInt:4],
9600 (id)kIOSurfacePixelFormat:[NSNumber numberWithUnsignedInt:'RGBA']}); 9600 (id)kIOSurfacePixelFormat:[NSNumber numberWithUnsignedInt:'BGRA']});
9601 } 9601 }
9602 9602
9603 IOReturn lockStatus = IOSurfaceLock (surface, 0, nil); 9603 IOReturn lockStatus = IOSurfaceLock (surface, 0, nil);
@@ -9614,7 +9614,8 @@ not_in_argv (NSString *arg)
9614 8, 9614 8,
9615 IOSurfaceGetBytesPerRow (currentSurface), 9615 IOSurfaceGetBytesPerRow (currentSurface),
9616 colorSpace, 9616 colorSpace,
9617 IOSurfaceGetPixelFormat (currentSurface)); 9617 (kCGImageAlphaPremultipliedFirst
9618 | kCGBitmapByteOrder32Host));
9618 return context; 9619 return context;
9619} 9620}
9620 9621