[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
scratch/ns/performance 6312a8e 6/6: Change pixel format
From: |
Alan Third |
Subject: |
scratch/ns/performance 6312a8e 6/6: Change pixel format |
Date: |
Thu, 31 Dec 2020 10:45:20 -0500 (EST) |
branch: scratch/ns/performance
commit 6312a8e9382105196fdf1edddfc68a678acd673e
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 63f48cd..b5eb3ac 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -9597,7 +9597,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);
@@ -9614,7 +9614,8 @@ not_in_argv (NSString *arg)
8,
IOSurfaceGetBytesPerRow (currentSurface),
colorSpace,
- IOSurfaceGetPixelFormat (currentSurface));
+ (kCGImageAlphaPremultipliedFirst
+ | kCGBitmapByteOrder32Host));
return context;
}
- branch scratch/ns/performance created (now 6312a8e), Alan Third, 2020/12/31
- scratch/ns/performance 9be0f08 1/6: Improve drawing performance on macOS, Alan Third, 2020/12/31
- scratch/ns/performance 690bb68 3/6: Fix problems with reusing IOSurfaces, Alan Third, 2020/12/31
- scratch/ns/performance 77a07a2 4/6: Fix GNUstep warnings, Alan Third, 2020/12/31
- scratch/ns/performance 6312a8e 6/6: Change pixel format,
Alan Third <=
- scratch/ns/performance aeb2475 5/6: Fix EmacsSurface definitions, Alan Third, 2020/12/31
- scratch/ns/performance ee74dc5 2/6: Improve performance of scrolling on NS, Alan Third, 2020/12/31