From: Po Lu <luangruo@yahoo.com>
To: "Pfrommer, Julius" <julius.pfrommer@web.de>
Cc: Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org
Subject: Re: Unifying code for drawing on a cairo context
Date: Fri, 29 Apr 2022 16:33:21 +0800 [thread overview]
Message-ID: <87v8usxp9q.fsf@yahoo.com> (raw)
In-Reply-To: <1e28345b-7293-aa6f-9457-71435fec4eae@web.de> (Julius Pfrommer's message of "Fri, 29 Apr 2022 10:01:01 +0200")
"Pfrommer, Julius" <julius.pfrommer@web.de> writes:
> Not all Cairo drawing, but those parts where it makes sense.
> But having some level of code-sharing will decrease the "entropy"
> pulling the toolkits and platforms apart over time.
There will be no benefit to this at all. We only recently introduced a
second platform where Cairo drawing is used, and aside from GTK (and X
Windows, where using Cairo for stuff other than fonts was apparently
implemented so that we could use it for printing in the future, but
nobody has shown any interest in doing that work), there are no other
platfoms where Cairo drawing is required or would be beneficial.
So IMNSHO this refactoring is premature, and will also likely cause
problems down the road when we want to change the behavior of the Cairo
code on a platform-specific basis, such as when the device scaling
feature is implemented on X.
> I would argue to the contrary. Developers typically only have access to
> a subset of the platforms. Developers will improve and bugfix only those
> platforms where they can test their changes. Having a common core for
> Cairo-drawing (with no #ifdef mess and assuming that Cairo behaves
> similarly across platforms) would reduce the duplication of the effort
> to fix bugs.
I work on both platforms where Cairo drawing is used for something other
than fonts and see no "ifdef mess" you allude to in the Cairo code, and
so far there hasn't been a single instance of the two instances of
subtly different Cairo code causing fixing a bug to require a
duplication of effort. Most of the preprocessor conditionals in the X
Windows drawing code stem from the presence of both a Cairo and
non-Cairo configuration, neither of which are going away.
Cairo is not used at all on NS and MS Windows, so bug fixes will have to
be made separately there in any case. The Haiku port will also never
use Cairo for drawing anything other than text with complex shaping
requirements.
On the other hand, why not dedicate your time to some work on the PGTK
port that will lead to an immediate improvement, such as refactoring the
selection code in `pgtkselect.c' to use the low-level GDK selection API,
so that drag-and-drop will work, and most of the Lisp-level selection
code can be shared with X?
Thanks in advance.
next prev parent reply other threads:[~2022-04-29 8:33 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-23 9:06 Unifying code for drawing on a cairo context Pfrommer, Julius
2022-04-23 9:18 ` Eli Zaretskii
2022-04-23 11:58 ` Po Lu
2022-04-23 12:04 ` Eli Zaretskii
2022-04-29 8:01 ` Pfrommer, Julius
2022-04-29 8:33 ` Po Lu [this message]
2022-04-29 8:35 ` Po Lu
2022-04-29 9:07 ` Pfrommer, Julius
2022-04-29 9:20 ` Po Lu
2022-04-29 10:43 ` Eli Zaretskii
2022-04-23 11:51 ` Po Lu
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87v8usxp9q.fsf@yahoo.com \
--to=luangruo@yahoo.com \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=julius.pfrommer@web.de \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).