From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Third Newsgroups: gmane.emacs.devel Subject: Change to NS drawing routines Date: Sat, 11 Aug 2018 15:06:20 +0100 Message-ID: <20180811140620.GA1519@breton.holly.idiocy.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1533996266 26958 195.159.176.226 (11 Aug 2018 14:04:26 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 11 Aug 2018 14:04:26 +0000 (UTC) User-Agent: Mutt/1.10.0 (2018-05-17) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Aug 11 16:04:22 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1foUVC-0006vG-DB for ged-emacs-devel@m.gmane.org; Sat, 11 Aug 2018 16:04:22 +0200 Original-Received: from localhost ([::1]:60336 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1foUXI-0001w8-W8 for ged-emacs-devel@m.gmane.org; Sat, 11 Aug 2018 10:06:33 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44395) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1foUXC-0001vo-Dc for emacs-devel@gnu.org; Sat, 11 Aug 2018 10:06:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1foUXB-0003TV-GR for emacs-devel@gnu.org; Sat, 11 Aug 2018 10:06:26 -0400 Original-Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:34927) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1foUXB-0003T8-8i for emacs-devel@gnu.org; Sat, 11 Aug 2018 10:06:25 -0400 Original-Received: by mail-wr1-x42a.google.com with SMTP id g1-v6so10589883wru.2 for ; Sat, 11 Aug 2018 07:06:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=sender:date:from:to:subject:message-id:mime-version :content-disposition:content-transfer-encoding:user-agent; bh=UYYn1xtD/bChuOMc/nHjPgOGPPF3MxfaEwtQVRRGDIE=; b=oWftQrUYDD4/Hj/oK/gFMlFFhjIFIbutF9BOVsyYJjJ7Yfr5QBh31KaLBvP9HNOjEm yk+9YfAQ1SoOptH174hafHZTrwmEpRnRD3XNWpC3JljXLPmvSq0IavAzek+qtWR7ROcy PTgmZl5m3NhJyGwvYzB6z6W4LXb0pq/wN4DV7zFxTk0jjOUUBOV6gDqRaNmpdfdmjmT9 MSOMaBuh40sHHFnLLb5IvWGzcYdazHsErXrDRixNLxOpHEKJFsfz9g+RwiJ8T+YM8B4Q bCpSTVy4ntV2iu8zCPK8uHBNtTPM4hw+2EhfXq1Y0ca0EGztxyJT9ousNIjDnnTzqdBh rT+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:subject:message-id :mime-version:content-disposition:content-transfer-encoding :user-agent; bh=UYYn1xtD/bChuOMc/nHjPgOGPPF3MxfaEwtQVRRGDIE=; b=d4zdax2UoR5ZOfaQqS1duKFMgVD0u+SV0m52GTQZx/XzaCytuyIwst4J81MbJ2rc+a 3VV71V/Ys4hvRyD93/ITMLifq5/E09wOW6lSKPXRJt9Ur4SRuxwVnw9WiZnnNjqf+9jW lUexlMVjfdozpp9+/i0OB0ZCpKKp6n3sfUoCTZ3u1Y/NU3cWxaUibfb8TSPSZxQL4A89 lbYLfmme2wGpFgZno6zxleNmvRi10tTnPfyoXbB4pCxj/WP3OIWgETXM2BhwQbcl6WEG OZJBZQ5uI/V4gRZv+/mZ7nOYwmy8/qAVkcmouqH4A5VZYXkkChn8XIKPrd+Gb+b4t8YB 33jA== X-Gm-Message-State: AOUpUlFf9RRzcAOiqhpqwrKLRmZpr4qfjivxGK/bengx8M+/G/p6xNwQ fLfrYKONl/D86602a/O3/czZs5ZqHUw= X-Google-Smtp-Source: AA+uWPyAMwW1Caj8A31TNktHrEyt092g3E8MvNiODcrk26NF3KMhSYKEVx2cxJO4UsxVhQldqLEYWg== X-Received: by 2002:adf:cd0e:: with SMTP id w14-v6mr6400434wrm.226.1533996383514; Sat, 11 Aug 2018 07:06:23 -0700 (PDT) Original-Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-e935-7560-9c0b-73c7.holly.idiocy.org. [2001:8b0:3f8:8129:e935:7560:9c0b:73c7]) by smtp.gmail.com with ESMTPSA id 139-v6sm10462277wmp.4.2018.08.11.07.06.22 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 11 Aug 2018 07:06:22 -0700 (PDT) Content-Disposition: inline X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::42a 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:228406 Archived-At: The next version of macOS deprecates the method we use in the NS port to draw to the screen, specifically marking an NSView as ‘focused’ and then drawing to it. The ‘modern’ way is to only draw from within the ‘drawRect:’ method where ‘focusing’ is already done for you. There is some previous discussion here: https://lists.gnu.org/archive/html/emacs-devel/2018-07/msg00799.html I’ve created a new branch called scratch/ns-drawing which only draws from within drawRect by marking areas that are to be drawn as ‘dirty’ and then, at the end of redisplay, forcing an update, which uses drawRect and expose_frame to redraw the relevant bits of the frame. I believe this is a somewhat controversial approach. My experience so far is that performance is not noticeably slower than master, however if someone with a slower Mac could try it that would be helpful. -- Alan Third