Closed Bug 1377020 Opened 7 years ago Closed 7 years ago

Remove sentinel enumerators in gfx/layers

Categories

(Core :: Graphics: Layers, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla56
Tracking Status
firefox56 --- fixed

People

(Reporter: botond, Assigned: botond)

References

Details

Attachments

(2 files)

Once bug 1371771 is in place, we can remove sentinel enumerators by using MOZ_DEFINE_ENUM or one of its variants to define the affected enumerations instead.

I'm going to do that for enumerations defined in gfx/layers in this bug.
Assignee: nobody → botond
I'm posting this for reference, but not for review yet, in case interface changes are made during the review of bug 1371771.
I realized that this patch doesn't work as written. It changes the argument passed for the |HighBound| template parameter of ContiguousEnumSerializer from the sentinel value to the highest legal value, but ContiguousEnumSerializer expects |HighBound| to be a sentinel value (it checks that actual values are strictly less than it).

I think that eventually we'll want to change ContiguousEnumSerializer to interpret |HighBound| as the highest legal value. However, I'd prefer not to transition all of the enums that use ContiguousEnumSerializer at once, so I think for now I'll introduce a ContiguousEnumSerializerInclusive variant.
Whoops, MozReview fail. There should be a second patch here.
Comment on attachment 8883706 [details]
Bug 1377020 - Add a new enum serializer ContiguousEnumSerializerInclusive.

https://reviewboard.mozilla.org/r/154616/#review159704
Attachment #8883706 - Flags: review?(bugmail) → review+
Comment on attachment 8882059 [details]
Bug 1377020 - Use MOZ_DEFINE_ENUM instead of a sentinel enumerator for enumerations in gfx/layers.

https://reviewboard.mozilla.org/r/153146/#review159706

Woohoo!
Attachment #8882059 - Flags: review?(bugmail) → review+
Pushed by bballo@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6641837cae96
Add a new enum serializer ContiguousEnumSerializerInclusive. r=kats
https://hg.mozilla.org/integration/autoland/rev/484dcb23bd4d
Use MOZ_DEFINE_ENUM instead of a sentinel enumerator for enumerations in gfx/layers. r=kats
https://hg.mozilla.org/mozilla-central/rev/6641837cae96
https://hg.mozilla.org/mozilla-central/rev/484dcb23bd4d
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: