[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Optional support for GDI+ on Windows (emacs-28)
From: |
Stefan Monnier |
Subject: |
Re: Optional support for GDI+ on Windows (emacs-28) |
Date: |
Wed, 01 Apr 2020 10:58:29 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
>> >> > we should provide variables to control whether GDI+ is used for each
>> >> > supported image format. HAVE_GDIPLUS should guard code which uses
>> >> > GDI+, but it should NOT decide whether that code is actually used.
>> >> Why bother?
>> > Because I requested it.
>>
>> I understand this part, but really there's a good chance this is
>> wasted effort. The NS port didn't have to jump through those hoops to
>> get its code accepted.
>
> I didn't request anything that could be qualified as jumping through
> hoops. This is our standard implementation paradigm for optional
> features on MS-Windows, you can see it all over the place in w32*.c
> files. Convenience macros are available to make coding this
> more-or-less copy-pasting from some other similar feature.
I don't think "variables to control whether <foo> is used for each
supported <bar>" is comparable to what we do for other
"optional" features on MS-Windows.
Also, for "optional features on MS-Windows", the usual behavior if the
lib is not available at run-time is just not to provide the
corresponding functionality, rather than to fallback on some alternative
C implementation.
IOW, I think what would be comparable is: build with support for GDI+
images only (i.e. without support for images via libpng and friends),
and make sure Emacs does run even if GDI+ is not available (simply with
the limitation that it can't display those images, just like what we
have now if libpng is not available at run time).
Stefan