GNU bug report logs -
#51411
NS port cleanups
Previous Next
Reported by: Po Lu <luangruo <at> yahoo.com>
Date: Tue, 26 Oct 2021 11:43:01 UTC
Severity: normal
Tags: patch
Done: Alan Third <alan <at> idiocy.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Alan Third <alan <at> 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 (text/x-patch, attachment)]
[Message part 3 (text/plain, inline)]
I think these changes are appropriate enough for the font display patch,
as they affect cursor display and overhang drawing.
This bug report was last modified 3 years and 196 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.