From: Eli Zaretskii <eliz@gnu.org>
To: Alex Gramiak <agrambot@gmail.com>
Cc: 35468@debbugs.gnu.org
Subject: bug#35468: [PATCH] Refactor draw_glyph_string on X and w32
Date: Sun, 05 May 2019 05:34:56 +0300 [thread overview]
Message-ID: <838svlljcf.fsf@gnu.org> (raw)
In-Reply-To: <87pnoyj9wh.fsf@gmail.com> (message from Alex Gramiak on Sat, 04 May 2019 13:29:34 -0600)
> From: Alex Gramiak <agrambot@gmail.com>
> Cc: 35468@debbugs.gnu.org, mituharu@math.s.chiba-u.ac.jp
> Date: Sat, 04 May 2019 13:29:34 -0600
>
> > The way I wrote it was confusing: by the 'draw' method I actually
> > meant the external APIs called by the 'draw' method, like
> > XftDrawGlyphs. Compare that with w32's ExtTextOutW in w32font_draw.
>
> Ah, I see. I'll keep the setter and rename it to, say,
> set_device_context_font.
"Device context" is a w32-specific concept, I wouldn't propagate it
into an abstraction. set_font sounds much better to me.
> > I don't think I understand the difficulties, sorry. Why is
> > s->img->mask a problem?
>
> I meant problem as in that it's "leaking" the internals a bit.
Yes, but where and why do you need to leak it?
> > What details does glyph_has_image hide? Is that just to test
> > s->img->pixmap?
>
> On most platforms, yes, but the Cairo drawing uses s->img->cr_data
> instead.
A macro should do here, there's no need for an interface, IMO.
> >> if (!gdif->glyph_image_uses_mask (s))
> >
> > And what does glyph_image_uses_mask hide? AFAIU, the current code
> > simply looks at s->img->mask, and if so, why do we need an interface
> > for that?
>
> I was thinking that since AFAIU the Cairo drawing doesn't set
> s->img->mask it wouldn't make sense, from an interface POV, to check it
> directly. I suppose it doesn't really matter in that case, and it would
> be faster to just check s->img->mask even if the backend doesn't use it.
Yes, I think so.
next prev parent reply other threads:[~2019-05-05 2:34 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
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 [this message]
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=838svlljcf.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=35468@debbugs.gnu.org \
--cc=agrambot@gmail.com \
/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.