fix "enumeration value $X not handled in switch" warnings in HelpersSkia.h

RESOLVED WORKSFORME

Status

()

defect
RESOLVED WORKSFORME
6 years ago
6 years ago

People

(Reporter: froydnj, Unassigned)

Tracking

(Blocks 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

No description provided.
Blocks: buildwarning
Comment on attachment 749890 [details] [diff] [review]
fix "enumeration value $X not handled in switch" warnings in HelpersSkia.h

It seems like this will hide useful warnings. What's the enumeration value that we're not handling.
Attachment #749890 - Flags: review?(jmuizelaar) → review-
(In reply to Jeff Muizelaar [:jrmuizel] from comment #2)
> It seems like this will hide useful warnings. What's the enumeration value
> that we're not handling.

Looks like FORMAT_R8G8B8A8, FORMAT_R8G8B8X8, FORMAT_YUV, and FORMAT_UNKNOWN.

FWIW, GfxFormatToGrConfig just below this function:

http://mxr.mozilla.org/mozilla-central/source/gfx/2d/HelpersSkia.h#43

was already using |default:|, so I figured it would be suitable to use |default:| in GfxFormatToSkiaConfig.
Pinging Jeff for a response to comment 3.
Flags: needinfo?(jmuizelaar)
Comment on attachment 749890 [details] [diff] [review]
fix "enumeration value $X not handled in switch" warnings in HelpersSkia.h

How about we do MOZ_ASSERT than if we have a format that we don't understand. It would be good to add this to the GfxFormatToGrConfig function too.
Flags: needinfo?(jmuizelaar)
MOZ_ASSERTs added in the appropriate places.
Attachment #749890 - Attachment is obsolete: true
Attachment #770296 - Flags: review?(jmuizelaar)
Comment on attachment 770296 [details] [diff] [review]
fix "enumeration value $X not handled in switch" warnings in HelpersSkia.h

Looks like a recent skia update resolved the warning, but didn't add MOZ_ASSERTs.  I'm just going to cancel this review and close the bug, then.
Attachment #770296 - Flags: review?(jmuizelaar)
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.