From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master 5c9304e: Disable some display optimizations when frames need redisplay Date: Fri, 02 Oct 2015 08:44:34 -0400 Message-ID: References: <20150930193450.11644.62040@vcs.savannah.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1443792467 12900 80.91.229.3 (2 Oct 2015 13:27:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 2 Oct 2015 13:27:47 +0000 (UTC) Cc: Eli Zaretskii To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 02 15:27:39 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Zi0N9-0008OQ-Gs for ged-emacs-devel@m.gmane.org; Fri, 02 Oct 2015 15:27:39 +0200 Original-Received: from localhost ([::1]:59639 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zi0N8-0003Ou-Pv for ged-emacs-devel@m.gmane.org; Fri, 02 Oct 2015 09:27:38 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59736) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zhzhb-0006Aa-Pm for emacs-devel@gnu.org; Fri, 02 Oct 2015 08:44:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zhzha-0008OH-RN for emacs-devel@gnu.org; Fri, 02 Oct 2015 08:44:43 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:32698) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZhzhW-0008NA-7a; Fri, 02 Oct 2015 08:44:38 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0CdDQA731xV/wihxEVcgxCEAshgBAICgTw9EAEBAQEBAQGBCkEFg10BAQMBJy8jBQsLNBIUGA2IWwjPIwEBAQEGAQEBAR6LOoUFBxaEFwWQNI5jjhaGEoFFI4I7gVkigngBAQE X-IPAS-Result: A0CdDQA731xV/wihxEVcgxCEAshgBAICgTw9EAEBAQEBAQGBCkEFg10BAQMBJy8jBQsLNBIUGA2IWwjPIwEBAQEGAQEBAR6LOoUFBxaEFwWQNI5jjhaGEoFFI4I7gVkigngBAQE X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="166943856" Original-Received: from 69-196-161-8.dsl.teksavvy.com (HELO pastel.home) ([69.196.161.8]) by ironport2-out.teksavvy.com with ESMTP; 02 Oct 2015 08:44:35 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id EBC346227C; Fri, 2 Oct 2015 08:44:34 -0400 (EDT) In-Reply-To: (Eli Zaretskii's message of "Wed, 30 Sep 2015 19:34:50 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:190681 Archived-At: > Disable some display optimizations when frames need redisplay > These optimizations were previously disabled by the > windows_or_buffers_changed flag, which now is not set > when only some frames need to be redrawn. Hmm... I only replaced things like windows_or_buffers_changed = 45; with fset_redisplay (f); which internally will set windows_or_buffers_changed to 2, so as long as windows_or_buffers_changed is treated as a boolean, the code should not be affected. > + /* True means we need to redraw frames whose 'redisplay' bit is set. */ > + bool consider_some_frames_p = false; Why not use "windows_or_buffers_changed == REDISPLAY_SOME" as an equivalent condition? > /* Build desired matrices, and update the display. If > - consider_all_windows_p, do it for all windows on all frames. > - Otherwise do it for selected_window, only. */ > + consider_all_windows_p, do it for all windows on all frames. If > + a frame's 'redisplay' flag is set, do it for all windows on each > + such frame. Otherwise do it for selected_window, only. */ > > - if (consider_all_windows_p) > + if (!consider_all_windows_p) > { > FOR_EACH_FRAME (tail, frame) > - XFRAME (frame)->updated_p = false; > + { > + if (XFRAME (frame)->redisplay && XFRAME (frame) != sf) > + { > + consider_some_frames_p = true; > + break; > + } > + } > + } > + > + if (consider_all_windows_p || consider_some_frames_p) > + { > + FOR_EACH_FRAME (tail, frame) > + { > + if (XFRAME (frame)->redisplay || consider_all_windows_p) > + XFRAME (frame)->updated_p = false; > + } I don't understand in which kind of scenario this could make a difference. > && !windows_or_buffers_changed > && !f->cursor_type_changed > + && !f->redisplay Same here: IIUC this change should make no difference, since setting f->redisplay also sets windows_or_buffers_changed to a non-nil value. > || windows_or_buffers_changed > + || f->redisplay And same again here. > + if (windows_or_buffers_changed || f->cursor_type_changed || f->redisplay) And here. So, what am I missing? Stefan