From: Alex Gramiak <agrambot@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 35468@debbugs.gnu.org
Subject: bug#35468: [PATCH] Refactor draw_glyph_string on X and w32
Date: Sun, 28 Apr 2019 13:46:46 -0600 [thread overview]
Message-ID: <87pnp5oqu1.fsf@gmail.com> (raw)
In-Reply-To: <83tveit5ph.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 28 Apr 2019 20:11:54 +0300")
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Alex Gramiak <agrambot@gmail.com>
>> Date: Sat, 27 Apr 2019 19:29:30 -0600
>>
>> This merges x_draw_glyph_string and w32_draw_glyph_string together to
>> remove duplicated code.
>>
>> I wanted to do it for NS as well, but it seems just a bit too different
>> to make it easily work.
>
> If we don't include NS in this, we won't actually gain enough to
> justify the reshuffle.
I still think that removing duplication between 2 out of 3 is worth it
considering the size of the removal, but I started to do this because
I'm working on a new backend (GTK without depending on X) that would
benefit from this refactoring.
> What prevented you from including NS, it looks to me the code is very
> similar?
Mostly the differences in clipping behaviour that seemed just slightly
incompatible with the way gui_draw_glyphs_string does it. I'll look at
it a bit harder.
It also doesn't have the two sections (the s->prev and s->next
conditionals) at the end, which I'm not sure is a bug or unnecessary
there. Those could just be surrounded by a (!FRAME_NS_P (s->f))
conditional though.
>> +struct draw_glyph_string_interface
>
> I'd prefer draw_glyphs_interface, it's shorter. And given the
> comments below, maybe the name should be gui_interface.
draw_glyphs_interface doesn't seem bad, as long as glyph strings are the
only types of glyphs that are drawn (otherwise draw_glyphs would be too
broad).
I think gui_interface is too broad of a description, since many of the
terminal hooks and frame parameter handlers (setting GUI window
properties, accessing color structures, setting WM hints, etc.) could
also be considered as belonging to a GUI interface. Perhaps
gui_drawing_interface or graphical_drawing_interface?
> The result of this refactoring should be more low-level and more
> primitive interfaces, and they should each one make sense, not be
> ad-hoc. It means the job becomes more complex, and you will probably
> need to ask questions regarding the GUI systems you are less familiar
> with. But the result will IMO much better and future-proof.
I'll see what I can do.
next prev parent reply other threads:[~2019-04-28 19:46 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-28 1:29 bug#35468: [PATCH] Refactor draw_glyph_string on X and w32 Alex Gramiak
2019-04-28 17:11 ` Eli Zaretskii
2019-04-28 19:46 ` Alex Gramiak [this message]
2019-04-29 17:43 ` Alex Gramiak
2019-04-30 4:59 ` Eli Zaretskii
2019-04-30 18:00 ` Alex Gramiak
2019-05-01 0:14 ` mituharu
2019-05-03 19:01 ` Alex Gramiak
2019-05-03 21:33 ` mituharu
2019-05-04 4:00 ` mituharu
2019-05-01 18:19 ` Eli Zaretskii
2019-05-02 19:41 ` Alex Gramiak
2019-05-02 20:14 ` Eli Zaretskii
2019-05-03 15:26 ` Basil L. Contovounesios
2019-05-04 8:17 ` Eli Zaretskii
2019-05-04 19:29 ` Alex Gramiak
2019-05-05 0:10 ` mituharu
2019-05-05 16:00 ` Eli Zaretskii
2019-05-05 2:34 ` Eli Zaretskii
2019-04-30 20:11 ` Alan Third
2019-05-01 17:38 ` Eli Zaretskii
2019-05-01 21:08 ` Alan Third
2019-05-02 18:14 ` Alex Gramiak
2019-05-03 21:12 ` Alan Third
2021-05-12 14:43 ` Lars Ingebrigtsen
2021-07-22 12:55 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87pnp5oqu1.fsf@gmail.com \
--to=agrambot@gmail.com \
--cc=35468@debbugs.gnu.org \
--cc=eliz@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.