[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#51411: NS port cleanups
From: |
Po Lu |
Subject: |
bug#51411: NS port cleanups |
Date: |
Thu, 28 Oct 2021 09:09:33 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Alan Third <alan@idiocy.org> writes:
> That function is a real mess of calls to ns_focus and ns_unfocus. I
> think there's no good reason for them to be called as often as they
> are, and some related functions (ns_dumpglyphs_stretch) don't need to
> call them themselves either.
> I think we need to have a rethink of how clipping is handled here. We
> don't need to use ns_focus to clip and we repeatedly call ns_focus on
> the same rectangle. For a lot of those calls we could replace them
> with a single clipping rectangle and adjust it as required for
> overhangs or whatever.
> I also think you misunderstood what I was saying about the performance
> problems with calling saveGraphicsState. Calling it when not required
> is frowned upon by Apple as they say it causes performance problems.
> Your code is now calling it in ns_focus whether it's required or not.
> Ideally we only call it when modifying the clipping rectangle, because
> there are times ns_focus is called where we don't modify the clipping
> rectangle and therefore we don't need to save the graphics context.
I understand what you mean now, thanks.
> I understand what you did, but I think the better solution is for us
> is to try to untangle ns_draw_glyph_string, even if that means saving
> the context there directly on occasion.
> If you want me to have a look at it let me know, I think I know what
> needs to be done, but I probably won't get round to it as soon as you
> could.
Thanks. I had a try at it, cleaning up much of what appeared obviously
unnecessary. (Though I did not dare change what seemed to be mysterious
to me.)
Though, OTOH, I think calling saveGraphicsState inside the overhang draw
process is not too much of a problem as it happens infrequently enough
to not be relevant.
0001-Improve-font-display-on-NS-port.patch
Description: Text Data
I think these changes are appropriate enough for the font display patch,
as they affect cursor display and overhang drawing.
- bug#51411: NS port cleanups, Po Lu, 2021/10/26
- bug#51411: NS port cleanups, Alan Third, 2021/10/26
- bug#51411: NS port cleanups, Po Lu, 2021/10/26
- bug#51411: NS port cleanups, Alan Third, 2021/10/27
- bug#51411: NS port cleanups,
Po Lu <=
- bug#51411: NS port cleanups, Alan Third, 2021/10/28
- bug#51411: NS port cleanups, Po Lu, 2021/10/28
- bug#51411: NS port cleanups, Alan Third, 2021/10/31
- bug#51411: NS port cleanups, Po Lu, 2021/10/31
- bug#51411: NS port cleanups, Po Lu, 2021/10/31
- bug#51411: NS port cleanups, Alan Third, 2021/10/31
- bug#51411: NS port cleanups, Po Lu, 2021/10/31
- bug#51411: NS port cleanups, Po Lu, 2021/10/31
- bug#51411: NS port cleanups, Alan Third, 2021/10/31
- bug#51411: NS port cleanups, Po Lu, 2021/10/31