GNU bug report logs - #32932
27.0.50; render bugs on macOS Mojave

Previous Next

Package: emacs;

Reported by: Aaron Jensen <aaronjensen <at> gmail.com>

Date: Thu, 4 Oct 2018 13:07:02 UTC

Severity: minor

Tags: fixed

Merged with 31904, 33891, 34127, 34710, 36302

Found in versions 26.1.90, 26.1.91, 26.2.90, 27.0.50

Fixed in version 28.1

Done: Alan Third <alan <at> idiocy.org>

Bug is archived. No further changes may be made.

Full log


Message #125 received at 32932 <at> debbugs.gnu.org (full text, mbox):

From: Aaron Jensen <aaronjensen <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: boris <at> d12frosted.io, 32932 <at> debbugs.gnu.org, alan <at> idiocy.org
Subject: Re: bug#32932: 27.0.50; render bugs on macOS Mojave
Date: Thu, 1 Nov 2018 12:52:43 -0700
On November 1, 2018 at 11:12:14 AM, Eli Zaretskii
(eliz <at> gnu.org(mailto:eliz <at> gnu.org)) wrote:

> Can you find the reason for that? In general, redrawing the cursor
> should only redraw a single character, and sometimes the two adjacent
> ones. It shouldn't redraw more than that.
>
> From what you describe, it sounds like the problem is in the logic
> that determines which parts to redraw, see update_text_area in
> dispnew.c.

dispnew.c redraws up to the end of the line in many situations. I
added the following logging:

      fprintf (stderr, "clear %d %d %d %d %d %d %d\n", !current_row->enabled_p
               , desired_row->y != current_row->y
               , desired_row->ascent != current_row->ascent
               , desired_row->phys_ascent != current_row->phys_ascent
               , desired_row->phys_height != current_row->phys_height
               , desired_row->visible_height != current_row->visible_height
               , current_row->overlapped_p);
      fprintf (stderr, "desired\t%d\t%d\t%d\t%d\t%d\n"
               , desired_row->y
               , desired_row->ascent
               , desired_row->phys_ascent
               , desired_row->phys_height
               , desired_row->visible_height);
      fprintf (stderr, "current\t%d\t%d\t%d\t%d\t%d\n"
               , current_row->y
               , current_row->ascent
               , current_row->phys_ascent
               , current_row->phys_height
               , current_row->visible_height);

And when this happens, this is what I get:

draw_glyphs x: 56 pos: 7 8
clear 0 0 1 1 1 0 0
desired 0       15      12      16      19
current 0       0       0       19      19
clear 1 0 0 0 0 0 0
desired 637     20      19      26      28
current 637     20      19      26      28
clear 1 0 1 1 1 1 0
desired 0       318     318     637     637
current 0       15      15      19      19
clear 1 0 0 0 0 0 0
desired 0       15      12      16      19
current 0       15      12      16      19

So, the ascent and physics_ascent on the current row are coming back
as 0. Also, the height is different.

That’s causing it to redraw to the end of the line.

AFAICT there are two issues:

1. It’s redrawing to the end of the line unnecessarily.
2. It’s clearing and then doing some other processing before actually painting.

If #1 was fixed, it would perhaps be better, but I wonder if the area
under the cursor would be cleared the same.

I tried changing the condition in update_text_area to just:

if (!current_row->enabled_p)

And it still reproduced, so the ascent stuff above may be a red herring…

Aaron




This bug report was last modified 5 years and 94 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.