From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Stipples and scroll optimizations Date: Sun, 08 May 2022 12:06:31 +0300 Message-ID: <83ee14wfzc.fsf@gnu.org> References: <87a6bs5w05.fsf.ref@yahoo.com> <87a6bs5w05.fsf@yahoo.com> <83ilqgwkfw.fsf@gnu.org> <875ymg5vgm.fsf@yahoo.com> <83h760wjyt.fsf@gnu.org> <871qx45ud0.fsf@yahoo.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1701"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun May 08 11:07:54 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nnctO-0000ME-F2 for ged-emacs-devel@m.gmane-mx.org; Sun, 08 May 2022 11:07:54 +0200 Original-Received: from localhost ([::1]:39676 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nnctN-0005JS-2u for ged-emacs-devel@m.gmane-mx.org; Sun, 08 May 2022 05:07:53 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53134) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nncsB-0004bu-MI for emacs-devel@gnu.org; Sun, 08 May 2022 05:06:40 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:52420) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nncsB-00058Q-Cf; Sun, 08 May 2022 05:06:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Youz52FyAyZ4+vKicLyYsEQUyo7P1IUDMl7ge7yLQKk=; b=BX7OHoZDJtkj LiafBrmreLEQYvveSYmuBL8odr8PuocsDMEIpqCYibfcKBp5a51Ksho2xPHYO14BXW4gYZqwgogpk 5fELlBLClS3o1qbLqix23q8AyIYCcZ+tAtNFywC2tIPp4ceZEktrSeT/PnlM4RWvGQ2oRWf/KGAq4 bukB7PrHk1ZZtAj01n4lw9/szhY7VMEoPfczE1wq2BQB0v3xMCVleFNjL6Prf8PUUV8xodcq97Tvf kiMHoLSvdEjX+/MfeBcUhAOs8lbcsALLnDDt9gq8UnUt2A/eiXCfE21ZlYymKg10eu9Y6k/ncIa+x d6vqAZkKBHBzU3kD5XwuGw==; Original-Received: from [87.69.77.57] (port=1695 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nncsA-0004Qu-V3; Sun, 08 May 2022 05:06:39 -0400 In-Reply-To: <871qx45ud0.fsf@yahoo.com> (message from Po Lu on Sun, 08 May 2022 15:58:03 +0800) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:289457 Archived-At: > From: Po Lu > Cc: emacs-devel@gnu.org > Date: Sun, 08 May 2022 15:58:03 +0800 > > Eli Zaretskii writes: > > > I think doing this is x_draw_glyph_string is too late, because that is > > called after the test for applicability of scrolling_window was > > already done, no? > > I meant to do the test beforehand, i.e. to the glyphs in the "previous" > glyph matrix, and to use its results when comparing that matrix to the > desired matrix in scrolling_window. Sorry, I don't understand: what is the "previous" glyph matrix, and how can you use it for this test? > > Is the fact that some of the glyphs in a glyph-row use stipple easily > > detectable by scanning the row's glyphs? If so, update_window could > > do that, just before it calls scrolling_window, and refrain from doing > > so. > > No, whether or not a stipple is actually used is only known with > complete certainty to x_draw_glyph_string (and some of the functions > that it calls.) Really? I see that 'struct face' has a 'stipple' member, which is set in realize_gui_face, and that happens when we realize the face, long before x_draw_glyph_string is called. And each glyph in a glyph_row has a face_id member, which allows you to get at the corresponding face structure. Why cannot you use this to detect glyph_row's that use stipples? The only type of glyph whose stipple is ignored is the cursor glyph, and that hardly matters for your purposes here, no?