From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Third Newsgroups: gmane.emacs.bugs Subject: bug#30699: 26.0.91; buffer contents flicker on macOS frames when frames are resized Date: Tue, 6 Mar 2018 22:55:02 +0000 Message-ID: <20180306225502.GA30546@breton.holly.idiocy.org> References: <20180304202736.GA1479@breton.holly.idiocy.org> <20180304213404.GB1479@breton.holly.idiocy.org> <83d10jtd5m.fsf@gnu.org> <834llutstx.fsf@gnu.org> <83tvtus8rc.fsf@gnu.org> <20180305192331.GA26656@breton.holly.idiocy.org> <83muzms3i6.fsf@gnu.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 1520376850 632 195.159.176.226 (6 Mar 2018 22:54:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 6 Mar 2018 22:54:10 +0000 (UTC) User-Agent: Mutt/1.9.3 (2018-01-21) Cc: 30699@debbugs.gnu.org, aaronjensen@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Mar 06 23:54:06 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1etLTB-0007vq-Jh for geb-bug-gnu-emacs@m.gmane.org; Tue, 06 Mar 2018 23:54:05 +0100 Original-Received: from localhost ([::1]:58728 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1etLVE-0005vT-2h for geb-bug-gnu-emacs@m.gmane.org; Tue, 06 Mar 2018 17:56:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35504) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1etLV7-0005vK-4F for bug-gnu-emacs@gnu.org; Tue, 06 Mar 2018 17:56:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1etLV4-0005uU-2L for bug-gnu-emacs@gnu.org; Tue, 06 Mar 2018 17:56:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:40285) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1etLV3-0005uQ-TV for bug-gnu-emacs@gnu.org; Tue, 06 Mar 2018 17:56:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1etLV3-0007IA-O1 for bug-gnu-emacs@gnu.org; Tue, 06 Mar 2018 17:56:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alan Third Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 06 Mar 2018 22:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 30699 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 30699-submit@debbugs.gnu.org id=B30699.152037691427973 (code B ref 30699); Tue, 06 Mar 2018 22:56:01 +0000 Original-Received: (at 30699) by debbugs.gnu.org; 6 Mar 2018 22:55:14 +0000 Original-Received: from localhost ([127.0.0.1]:48182 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1etLUH-0007H7-MH for submit@debbugs.gnu.org; Tue, 06 Mar 2018 17:55:13 -0500 Original-Received: from mail-wm0-f45.google.com ([74.125.82.45]:38070) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1etLUF-0007Gu-De for 30699@debbugs.gnu.org; Tue, 06 Mar 2018 17:55:11 -0500 Original-Received: by mail-wm0-f45.google.com with SMTP id z9so1208550wmb.3 for <30699@debbugs.gnu.org>; Tue, 06 Mar 2018 14:55:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=JKhooz2ywYg66kTEXyJ4t9oDEbGjVO7MTe8FZ84a7hI=; b=SzUjSoshGPCyq+bHHzHnFYpkFP6tpGEk6nOzOsAMSSLdwaNohzv+AIGsIt61rOggL7 R6DsCLeZBgOTpfQGqMxcBo9dhTo2Je5/RX+jqJftWzhRqbYanjt0h3barQOMnQnSjyVU R4F7rKfFHw/q5x8GFZv8QOI7po5cQnxGJBj7XAF4jFGvfT+ZQmKjT+QrjHZUM1Go5xQq +Md6YbCV1N7spjKz8BVJHO8A7r4wMy8WP+/y1uGtMn68KzbvMVHKgYqFwGKE5skNGDf0 JXG/4QMbYAj2r2f9kPay/ne9u/EL+ysNYSJzepBAhZ+wdGfK2vOdQP9x/AsPKVJlOpCE R8lQ== 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:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=JKhooz2ywYg66kTEXyJ4t9oDEbGjVO7MTe8FZ84a7hI=; b=gVaYdIXqojH2d8I+kBdS4KpktAGy4NnLU+9A7DZrzwxlNwEU2a2Eo8e/x6iyomQLiv IWM9DrYradFs3YGsZ5ubWiEyn2Ruvpwvuvn8qJGV0GgKRgKTe+LVhDUI20wNu2vnT/MZ pHxI1wH22Ng2gEk9arO6APeX6k9B/IA9IwLasoy0yBOA23jJf81an4J7CDq2XMdge/kC wX/HnKAflMZDnj9apkwj4IUnT0aUf5CRZNI5MV/oMn6Tjuc4YqTs4aWMN9Yu2GsASl8X ZrkA2DJQh6c6+5hNtX1KLD/zhDiR1az4hMOGR9wnTgC9nXlzSPpdUPqwBrh5VK+VjW/z Uedw== X-Gm-Message-State: AElRT7HW9Zd7KOL2LhIQG9YkV2YrL7Y+ia86RAnWUHszerYxwxWgGDjS sOrjJ9d72kEEiHXhLMZurtU= X-Google-Smtp-Source: AG47ELs5MdsGIqcjoHd8ye/1TKUt5MIgr9JKoxZbDsza6wthbRwyFJ53kzYYN3qPTLYVx17/2v3cXg== X-Received: by 10.28.50.69 with SMTP id y66mr13562650wmy.133.1520376905125; Tue, 06 Mar 2018 14:55:05 -0800 (PST) Original-Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-e8d9-a19c-5d74-f7c1.holly.idiocy.org. [2001:8b0:3f8:8129:e8d9:a19c:5d74:f7c1]) by smtp.gmail.com with ESMTPSA id m55sm20669158wrf.38.2018.03.06.14.55.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Mar 2018 14:55:04 -0800 (PST) Content-Disposition: inline In-Reply-To: <83muzms3i6.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:143969 Archived-At: On Mon, Mar 05, 2018 at 09:53:37PM +0200, Eli Zaretskii wrote: > > Date: Mon, 5 Mar 2018 19:23:31 +0000 > > From: Alan Third > > Cc: Aaron Jensen , 30699@debbugs.gnu.org > > > > > We already have double-buffering on X, perhaps it can be implemented > > > on macOS as well. > > > > We could do something similar using NSDisableScreenUpdates and > > NSEnableScreenUpdates: > > > > https://developer.apple.com/documentation/appkit/1473676-nsdisablescreenupdates?language=objc > > > > We should be able to wrap it round redisplay. Where would that be > > done? > > I don't think I understand the meaning of "wrap it round redisplay" to > answer that. Is the feature you mention significantly different from > what we use for double-buffering on X? If not, you can use the same > model. I don’t know how we handle double buffering on X, but if it’s anything like my previous experiences of double buffering, this is different. NS already uses double buffering, the issue here is that we want the screen blank and subsequent drawing of the frame to appear as one atomic action, but right now we see them as two actions. In theory if you call NSDisableScreenUpdates before the blanking of the frame, then call NSEnableScreenUpdates after drawing the contents of the frame, both should appear as one action (we don’t see the blank frame at all). I’ve tried adding calls to NSDisableScreenUpdates and NSEnableScreenUpdates in redisplay_internal, just to see if it works, but I couldn’t get it to work at all: I always saw the blanked frame. Either these functions don’t work as advertised or there’s something else going on. It’s quite probable I’ve misunderstood redisplay_internal. -- Alan Third