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: redisplay and expose_frame Date: Sun, 22 Jul 2018 13:44:18 +0100 Message-ID: <20180722124418.GA8674@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 1532263382 1259 195.159.176.226 (22 Jul 2018 12:43:02 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 22 Jul 2018 12:43:02 +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 Sun Jul 22 14:42:58 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 1fhDhR-00009a-IF for ged-emacs-devel@m.gmane.org; Sun, 22 Jul 2018 14:42:57 +0200 Original-Received: from localhost ([::1]:55927 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fhDjY-0004uY-At for ged-emacs-devel@m.gmane.org; Sun, 22 Jul 2018 08:45:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39404) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fhDip-0004uH-Rm for emacs-devel@gnu.org; Sun, 22 Jul 2018 08:44:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fhDip-0003uJ-0c for emacs-devel@gnu.org; Sun, 22 Jul 2018 08:44:23 -0400 Original-Received: from mail-wm0-x230.google.com ([2a00:1450:400c:c09::230]:35885) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fhDio-0003u7-OR for emacs-devel@gnu.org; Sun, 22 Jul 2018 08:44:22 -0400 Original-Received: by mail-wm0-x230.google.com with SMTP id s14-v6so13862735wmc.1 for ; Sun, 22 Jul 2018 05:44:22 -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=/pXvE9lG6AL8ob2RWekXna1bgDBvBS5ZuylZhv5AbHQ=; b=Xty6s8uv2KBVA69EnhZNWyuK3dkyPsGMpNoJE0rAOMBRJSBWXmiCCa0eshaFs2Cxqu P8UyrLYyss9MekmgyUP147PXeouOr837DewiYblKK3W85X4gtu7bhgn9hbpZFDRuZ6fZ qC8I1gZFC4T2YsVn+Z/BlqgErTYuq8E1buMsot8qMlZtQIe9yghOnpbOW3BFTkN3iSL1 x4pQ4bUxTkOwDo+KpjXF2yPQUFy4TRy8xhv99HtHrrEUF56DsiH9GQQoId9vn0EwUVlH 2JNxDUgzcpm3XHoyyGjfz24FC8vXjo0uznX1ZTYqg6ww3FfnG3lxa7LUANhbkNAkasWC IrsQ== 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=/pXvE9lG6AL8ob2RWekXna1bgDBvBS5ZuylZhv5AbHQ=; b=XUwQLlc4mCFKcdKdOAq2u1qBWXsqwx1XLPGzjrjtMXJtIOtrurRDCXacFo8+nccr3p RkMueWCW97kK68bUXnc1BC24ViYaQZpPHpW79u69RWIrAEQ9rZEVxLvzj9wdhAxdAdy7 i/P1jwgBQIzEk1ZGJVMA0vP8PElmn9W2qYL+/gbaDGJqH3cWtDjh1U+pSWB4yjIrQppI L+l5TAwbt3GptVoD8gtjAc5k2q/w8cwgo781kpBYsyO6cGXpRQiO+yrwFJkI2CUGgtH9 MOlH7IMsNxIgyF55vDvNECgfi/YXzQCxHMQuoJVTNjQxCBtL4ducE74hhXVRgq/Ow3tB QerA== X-Gm-Message-State: AOUpUlHm4KXKGgOT1fLFN5/7Fg5sIImhAEuVadQNX1xeRGLF2XhD1fns BfsIhP2NGyNxDhbz3rq8kbanY5VMYAo= X-Google-Smtp-Source: AAOMgpeYsx6SeEXcqA2eZY2oNPRexobtJyaXhWqTxELly3LgxI60htT5NLm8V/XSTvfmVghzCkieyQ== X-Received: by 2002:a1c:7c13:: with SMTP id x19-v6mr5630871wmc.27.1532263461059; Sun, 22 Jul 2018 05:44:21 -0700 (PDT) Original-Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-d06d-4e11-349a-ad1f.holly.idiocy.org. [2001:8b0:3f8:8129:d06d:4e11:349a:ad1f]) by smtp.gmail.com with ESMTPSA id g63-v6sm5612601wmf.3.2018.07.22.05.44.20 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 22 Jul 2018 05:44:20 -0700 (PDT) Content-Disposition: inline X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::230 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:227662 Archived-At: Hi all, I’m looking for a little bit of guidance as to how exactly Emacs draws to a GUI frame. The background here is that I’m working on splitting the NS port’s GUI code into its own thread, and while working on that I noticed that Apple have deprecated the method we use to draw, so I thought that since I’m working with the code anyway, I may as well try to ‘modernise’ it. The ‘new’ way of drawing to the screen works thus: 1. When you want to update a portion of the screen you mark it as dirty. 2. At some point you have to call [emacs-frame display], which does some set‐up and then calls drawRect with an argument that is a rectangle showing which parts of the screen need to be updated. 3. *All* the drawing *must* occur in drawRect. 4. done. At the moment NS Emacs calls expose_frame from within drawRect which works well, however it also does some drawing outside of drawRect, and I strongly suspect that redisplay_internal must, somehow, call expose_frame (or an equivalent), but I can’t see where. Does Emacs explicitly draw to the screen as part of redisplay? If so, where is it doing it? Thanks! -- Alan Third