[PATCH wayland-protocols] presentation-time: add missing bitfield marker
Simon Ser
contact at emersion.fr
Tue Aug 20 11:30:09 UTC 2019
On Tuesday, August 20, 2019 2:20 PM, Jonas Ã…dahl <jadahl at gmail.com> wrote:
> On Tue, Aug 20, 2019 at 10:48:40AM +0000, Simon Ser wrote:
>
> > That's a good catch.
> > However I don't know if this can be considered backwards-compatible.
> > For wayland-scanner it doesn't make a difference, but what about other
> > scanners?
>
> I don't think it's reasonable to avoid using any new XML format features
> to protocols that was initially introduced early than those features; it
> should be required that scanners handle unknown attributes by ignoring
> them, just as wayland-scanner does when not passing --strict.
Agreed. However in this case it's the other way around: bitfields were
introduced (2015), then the presentation-time was introduced (2016).
Only 3 months between those two events, but the protocol has been
further modified after its initial introduction, and then stabilized.
So now the question is: some scanners may have generated some code from
presentation-time.xml. Some scanners may generate different code for
bitfields, maybe breaking ABI. Is it fine to add the bitfield
attribute?
For instance, wayland-rs seems to be generating different code:
https://github.com/Smithay/wayland-rs/blob/master/wayland-scanner/src/common_gen.rs#L33
Adding Victor Berger to the discussion.
> > The commit introducing bitfields in the DTD predates presentation-time.
> > commit e65aed46168fc86a7e78db071472278ea533f526
> > Author: Peter Hutterer peter.hutterer at who-t.net
> > Date: Tue Nov 10 09:34:32 2015 +1000
> >
> > protocol: add the new bitfields to the dtd
> >
> > See 851614fa78862499e016c5718e730fefbb8e3b73
> >
> >
> > commit 95e7f445edbc8ea52b6f4d22ae1ee514b2323895
> > Author: Pekka Paalanen pekka.paalanen at collabora.co.uk
> > Date: Wed Feb 17 16:32:05 2016 +0200
> >
> > stable: add presentation-time draft
> >
> > This XML file has been copied verbatim from Weston 1.10.0 release,
> > protocol/presentation_timing.xml. The last behavioral change to that
> > file was in December 2014, so the behaviour is considered stable.
> >
> > Interfaces still need to be renamed according wayland-protocols policy.
> > That will be done in a follow-up patch to clearly show the changes.
> >
> >
> > wayland-devel mailing list
> > wayland-devel at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/wayland-devel
More information about the wayland-devel
mailing list