[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
scratch/ns/performance 824b2dd: Change pixel format
From: |
Alan Third |
Subject: |
scratch/ns/performance 824b2dd: Change pixel format |
Date: |
Mon, 28 Dec 2020 05:42:32 -0500 (EST) |
branch: scratch/ns/performance
commit 824b2dd1a809d567278f67c8ad97d74e2e5fa6ff
Author: Alan Third <alan@idiocy.org>
Commit: Alan Third <alan@idiocy.org>
Change pixel format
* src/nsterm.m ([EmacsSurface getContext]): Use BGRA for the IOSurface
and specify the CGContext explicitly for compatibility with a wider
range of Macs.
---
src/nsterm.m | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/nsterm.m b/src/nsterm.m
index 30b92e0..07ab551 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -9596,7 +9596,7 @@ not_in_argv (NSString *arg)
(id)kIOSurfaceHeight:[NSNumber numberWithInt:size.height],
(id)kIOSurfaceBytesPerRow:[NSNumber numberWithInt:bytesPerRow],
(id)kIOSurfaceBytesPerElement:[NSNumber numberWithInt:4],
- (id)kIOSurfacePixelFormat:[NSNumber
numberWithUnsignedInt:'RGBA']});
+ (id)kIOSurfacePixelFormat:[NSNumber
numberWithUnsignedInt:'BGRA']});
}
IOReturn lockStatus = IOSurfaceLock (surface, 0, nil);
@@ -9613,7 +9613,8 @@ not_in_argv (NSString *arg)
8,
IOSurfaceGetBytesPerRow (currentSurface),
colorSpace,
- IOSurfaceGetPixelFormat (currentSurface));
+ (kCGImageAlphaPremultipliedFirst
+ | kCGBitmapByteOrder32Host));
return context;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- scratch/ns/performance 824b2dd: Change pixel format,
Alan Third <=