Bug 831191: Make PNG dumping work for r5g6b5 surfaces. r=joedrew

This commit is contained in:
Chris Jones 2013-01-17 12:06:36 -08:00
parent ae00e39b03
commit 8ce05e794b

View File

@ -726,7 +726,8 @@ gfxASurface::WriteAsPNG_internal(FILE* aFile, bool aBinary)
nsRefPtr<gfxImageSurface> imgsurf = GetAsImageSurface();
gfxIntSize size;
if (!imgsurf) {
// FIXME/bug 831898: hack r5g6b5 for now.
if (!imgsurf || imgsurf->Format() == ImageFormatRGB16_565) {
size = GetSize();
if (size.width == -1 && size.height == -1) {
printf("Could not determine surface size\n");