From 8557bb213657a72ef6e73a53561b25dab8ece162 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Mon, 14 Sep 2020 20:39:52 -0400 Subject: [PATCH] Adds minor exposition. --- OSBindings/Mac/Clock Signal/ScanTarget/CSScanTarget.mm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/OSBindings/Mac/Clock Signal/ScanTarget/CSScanTarget.mm b/OSBindings/Mac/Clock Signal/ScanTarget/CSScanTarget.mm index 94051fb41..4c989dbb8 100644 --- a/OSBindings/Mac/Clock Signal/ScanTarget/CSScanTarget.mm +++ b/OSBindings/Mac/Clock Signal/ScanTarget/CSScanTarget.mm @@ -1164,6 +1164,10 @@ using BufferingScanTarget = Outputs::Display::BufferingScanTarget; // Set alpha to fully opaque and do some byte shuffling if necessary; // Apple likes BGR for output but RGB is the best I can specify to NSBitmapImageRep. + // + // I'm not putting my foot down and having the GPU do the conversion I want + // because this lets me reuse _copyPipeline and thereby cut down on boilerplate, + // especially given that screenshots are not a bottleneck. const NSUInteger totalBytes = _frameBuffer.width * _frameBuffer.height * 4; const bool flipRedBlue = _view.colorPixelFormat == MTLPixelFormatBGRA8Unorm; for(NSUInteger offset = 0; offset < totalBytes; offset += 4) {