From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Removing assumption of unsigned long pixel values for colours Date: Mon, 06 May 2019 18:06:15 +0300 Message-ID: <83o94fk4go.fsf@gnu.org> References: <87v9yqjdnh.fsf@gmail.com> <83a7g2kqsi.fsf@gnu.org> <87lfzlkeic.fsf@gmail.com> <20190506081255.GA78728@breton.holly.idiocy.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="172682"; mail-complaints-to="usenet@blaine.gmane.org" Cc: agrambot@gmail.com, emacs-devel@gnu.org To: Alan Third Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon May 06 17:07:22 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hNfD7-000il4-CM for ged-emacs-devel@m.gmane.org; Mon, 06 May 2019 17:07:21 +0200 Original-Received: from localhost ([127.0.0.1]:57966 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hNfD6-0001QC-9K for ged-emacs-devel@m.gmane.org; Mon, 06 May 2019 11:07:20 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:59703) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hNfCU-0001Pv-Hq for emacs-devel@gnu.org; Mon, 06 May 2019 11:06:43 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:40173) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hNfCR-0002Wf-IJ; Mon, 06 May 2019 11:06:40 -0400 Original-Received: from [176.228.60.248] (port=1114 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hNfCL-0004MT-DN; Mon, 06 May 2019 11:06:34 -0400 In-reply-to: <20190506081255.GA78728@breton.holly.idiocy.org> (message from Alan Third on Mon, 6 May 2019 09:12:55 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:236195 Archived-At: > Date: Mon, 6 May 2019 09:12:55 +0100 > From: Alan Third > Cc: Eli Zaretskii , emacs-devel@gnu.org > > On Sat, May 04, 2019 at 05:04:43PM -0600, Alex Gramiak wrote: > > > > It might also help simplify the NS side to use NSColor objects directly > > rather than using the unsigned long values as indices to an > > ns_color_table (CC'd Alan to confirm/deny). > > Unfortunately I don’t know too much about this area, but it certainly > looks like it might simplify things. It seems like there’s a lot of > conversion from NSColor, to unsigned long, which must then be > converted back to NSColor for drawing. AFAICS, it just indexes into a table of color descriptors. Which is something similar to what we do on TTY frames as well, only more efficient. Once again, I'm okay, in principle, with changing our platform-independent abstraction of a color to a different representation, if that would benefit some of the platforms, but such a change will have to be across the board, and I imagine it would be tricky, since the current abstraction is exposed to users (e.g., see how many of the themes customize their colors). It's the idea of having 2 representations at once on the platform-independent level that I don't like.