From patchwork Sat Feb 20 04:29:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akihiko Odaki X-Patchwork-Id: 12096705 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3F7B0C433E0 for ; Sat, 20 Feb 2021 04:30:26 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A734364DDC for ; Sat, 20 Feb 2021 04:30:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A734364DDC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:58624 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lDJuS-0008G4-G4 for qemu-devel@archiver.kernel.org; Fri, 19 Feb 2021 23:30:24 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47404) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lDJtk-0007pE-Vk for qemu-devel@nongnu.org; Fri, 19 Feb 2021 23:29:41 -0500 Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]:43755) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lDJtj-00034t-67 for qemu-devel@nongnu.org; Fri, 19 Feb 2021 23:29:40 -0500 Received: by mail-pf1-x431.google.com with SMTP id c11so3181971pfp.10 for ; Fri, 19 Feb 2021 20:29:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/3EFgtV92audiL6pQIXjmdUB++t9hLrS4oY7k/7KqJ4=; b=sIh7ZzInCKEZMG9qbUHvdWJcROT6jrWnX6Oq6BSEQsJva/Mos172bL0/tObY2O7lgo Yiq5a4FZlDeNEvydRopm7bfVFcrEzB6URPKJCtP4QoJVbqHPq84AQiJ0ByxWqHlV0N+C x2IX1VrvYSga8fMuNWz6WC59o8DjUQjg4b0nztxieO5rkSjFWwXhf1+g7cn4fBTfgFhZ DVxxZ2WKbxfJJ+JxOzom1R3TZSq7yp/0B0b21slTUE0CyxssICshBVvkxp/zytlR01RK 1GK8hflpjp/1Xep5LLPAeu2xSFheKM1wpP35Wpifj+D5od2tc7Iy+LirZxjL+1NgmXPX uheQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/3EFgtV92audiL6pQIXjmdUB++t9hLrS4oY7k/7KqJ4=; b=Dw+qWx7glFgaxgWgmQMmzJo2D6+2kFmmYA48bRd1NEAnoaNWFLa0GrOeNshYznYYTc Ht1fFsk1BZRetw9P60D3JBMzBoLLBaPoPgGs88AZqlIe+yaFJDNiIl3Z9dZhjUQuTaPA P78YW+q8F1x8Q6dPu7oNR5oLZSz6rUM0+/r3juwHU0JPJr9JIZXdYszV1k07zov4DCr7 06vFO2Q0rY7gwekOJ5ti1oUtH6F57VqZ2/lYd/rZlOg5PBLuBRqkeQH4hsQy1AF4gHF6 qYTHaa/B6jsXC9NFUWagFqzacmj2reKQAn6GbdWMdLGf4INIFYajQhGwA0dpQ6K6/Bp2 Lg5w== X-Gm-Message-State: AOAM530Cv4EIfhALmaCdVe28WpsFN9J8xQF9nl1R+9Oh3T6yspxdcO+5 bJaX8RXBPqpa3rFq9EDA9zabVR5k7dN2yA== X-Google-Smtp-Source: ABdhPJzlxdxgqva2JABoRsIXBqCiN+Q4DdSNM9yYVFuriXjDXciC+RycYnTHimat5U2J5+mGbjpFug== X-Received: by 2002:a63:d710:: with SMTP id d16mr11204466pgg.123.1613795377403; Fri, 19 Feb 2021 20:29:37 -0800 (PST) Received: from localhost.localdomain ([2400:4050:c360:8200:d8f0:71c1:3d6a:4f53]) by smtp.gmail.com with ESMTPSA id n4sm10881765pgg.68.2021.02.19.20.29.35 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 19 Feb 2021 20:29:37 -0800 (PST) From: Akihiko Odaki To: Subject: [PATCH v3] ui/cocoa: Use kCGColorSpaceSRGB Date: Sat, 20 Feb 2021 13:29:29 +0900 Message-Id: <20210220042929.97163-1-akihiko.odaki@gmail.com> X-Mailer: git-send-email 2.24.3 (Apple Git-128) In-Reply-To: <20210219141131.o7rlx6jzfcrf6554@sirius.home.kraxel.org> References: <20210219141131.o7rlx6jzfcrf6554@sirius.home.kraxel.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::431; envelope-from=akihiko.odaki@gmail.com; helo=mail-pf1-x431.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , qemu-devel@nongnu.org, Akihiko Odaki , Gerd Hoffmann Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" 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 --- ui/cocoa.m | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/ui/cocoa.m b/ui/cocoa.m index 13fba8103e1..7710835c4c1 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -436,13 +436,8 @@ - (void) drawRect:(NSRect) rect screen.bitsPerComponent, //bitsPerComponent screen.bitsPerPixel, //bitsPerPixel (screen.width * (screen.bitsPerComponent/2)), //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