Skip to content

Commit 04cf275

Browse files
committed
Bug 2004602. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D275523
1 parent 826fe76 commit 04cf275

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

gfx/2d/HelpersCairo.h

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,17 +140,23 @@ static inline cairo_extend_t GfxExtendToCairoExtend(ExtendMode extend) {
140140

141141
static inline cairo_format_t GfxFormatToCairoFormat(SurfaceFormat format) {
142142
switch (format) {
143-
case SurfaceFormat::A8R8G8B8_UINT32:
143+
case SurfaceFormat::B8G8R8A8:
144+
case SurfaceFormat::R8G8B8A8:
145+
case SurfaceFormat::A8R8G8B8:
146+
// case SurfaceFormat::A8R8G8B8_UINT32:
144147
return CAIRO_FORMAT_ARGB32;
145-
case SurfaceFormat::X8R8G8B8_UINT32:
148+
case SurfaceFormat::B8G8R8X8:
149+
case SurfaceFormat::R8G8B8X8:
150+
case SurfaceFormat::X8R8G8B8:
151+
// case SurfaceFormat::X8R8G8B8_UINT32:
146152
return CAIRO_FORMAT_RGB24;
147153
case SurfaceFormat::A8:
148154
return CAIRO_FORMAT_A8;
149155
case SurfaceFormat::R5G6B5_UINT16:
150156
return CAIRO_FORMAT_RGB16_565;
151157
default:
152158
gfxCriticalError() << "Unknown image format " << (int)format;
153-
return CAIRO_FORMAT_ARGB32;
159+
return CAIRO_FORMAT_INVALID;
154160
}
155161
}
156162

0 commit comments

Comments
 (0)