From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Third Newsgroups: gmane.emacs.devel Subject: Re: macOS metal rendering engine in mac port Date: Sat, 29 May 2021 10:32:00 +0100 Message-ID: References: <83k0ni6pje.fsf@gnu.org> <83eedq6mvm.fsf@gnu.org> <83y2bx6gct.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="730"; mail-complaints-to="usenet@ciao.gmane.io" Cc: aaronjensen@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat May 29 11:33:06 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lmvL8-000AY5-Ks for ged-emacs-devel@m.gmane-mx.org; Sat, 29 May 2021 11:33:06 +0200 Original-Received: from localhost ([::1]:54514 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lmvL6-0004Ks-GY for ged-emacs-devel@m.gmane-mx.org; Sat, 29 May 2021 05:33:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37118) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lmvKH-0003f3-PK for emacs-devel@gnu.org; Sat, 29 May 2021 05:32:14 -0400 Original-Received: from outbound.soverin.net ([2a01:4f8:fff0:2d:8::218]:45159) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lmvKE-0007t6-Al; Sat, 29 May 2021 05:32:13 -0400 Original-Received: from smtp.soverin.net (unknown [10.10.3.24]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by outbound.soverin.net (Postfix) with ESMTPS id A4484600D6; Sat, 29 May 2021 09:32:03 +0000 (UTC) Original-Received: from smtp.soverin.net (smtp.soverin.net [159.69.232.138]) by soverin.net DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=idiocy.org; s=soverin; t=1622280723; bh=24T0gUm/iMfnjrMZPwUCrdpIMLGB/Mnf/gcG23O8hBY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=WMawSWmrR4vpiKSUs3boQ/9q7extjduq79jBGFqFvNTG36ld7+P8v7FtX82xFKUns OcjAXu2CnOwGG6NQNOi+D5zi0soLnv39pQry46hLoUAS6t5f40pbYWfpghr0FNBvzk 5pEURiFpCxMtjXfBw0ir2yT3c/9kLYfwasnNdz9RpDWP0+xy4YJ3N7BxerqBt1Zapf RdTYEIfhLaILJV/JqUz+LsDJo3JKQ2EHUHYzbSt5MQ5tW70P4beSV/SQ59GEnsxT4t 1ynSK0P7ZeVogKBd/I4NvMnX3BEajZHFCzc3Q8ZPb1s9THybq9LizeCcjYnxMfZZKs mou1Njj/vbLuQ== Original-Received: from alan by faroe.holly.idiocy.org with local (Exim 4.94.2) (envelope-from ) id 1lmvK4-000QgT-QT; Sat, 29 May 2021 10:32:00 +0100 Mail-Followup-To: Alan Third , Eli Zaretskii , aaronjensen@gmail.com, emacs-devel@gnu.org Content-Disposition: inline In-Reply-To: <83y2bx6gct.fsf@gnu.org> Received-SPF: pass client-ip=2a01:4f8:fff0:2d:8::218; envelope-from=alan@idiocy.org; helo=outbound.soverin.net X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 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, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_SBL_A=0.1 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:270043 Archived-At: On Sat, May 29, 2021 at 12:26:10PM +0300, Eli Zaretskii wrote: > > Date: Sat, 29 May 2021 10:12:26 +0100 > > From: Alan Third > > Cc: Eli Zaretskii , emacs-devel@gnu.org > > > > One thing I know that's odd in the NS port is that we work out which > > face we need on the fly, whereas the other terms seem to have a > > central function that works out the faces early. > > What do you mean by "which face" (singular)? Redisplay of a typical > buffer under a major mode such as CC Mode usually needs to use and > merge about a dozen of different faces (think font-lock), so there > isn't a single face to figure it out. Maybe you mean the default > face? That one gets computed whenever we start the display operation, > such as redisplaying a window, and is reused until we are done with > the window. Then we compute it again when (or if) we go to redisplay > another window. Yes, I think that's what I'm talking about. There's a lot of code like this: struct face *face = FRAME_DEFAULT_FACE (f); [ns_lookup_indexed_color (NS_FACE_BACKGROUND (face), f) set]; and if (s->hl == DRAW_MOUSE_FACE) { face = FACE_FROM_ID_OR_NULL (s->f, MOUSE_HL_INFO (s->f)->mouse_face_face_id); if (!face) face = FACE_FROM_ID (s->f, MOUSE_FACE_ID); } else face = s->face; Which I don't think is present in the other terms, because, as I say, they look them up in one function rather than spread out throughout the term's code. But again, I don't think this should recalculate anything. Macros like FACE_FROM_ID_OR_NULL appear to be doing simple lookups that shouldn't slow anything down, unless I'm missing something. -- Alan Third