Index: tools/skiaserve/Request.cpp |
diff --git a/tools/skiaserve/Request.cpp b/tools/skiaserve/Request.cpp |
index f2f10acad1cf0442d41164efb5bdbf56dd3229a5..6ae6b51b8d95e6054476b2d2f6788ff2c8944d9d 100644 |
--- a/tools/skiaserve/Request.cpp |
+++ b/tools/skiaserve/Request.cpp |
@@ -59,11 +59,10 @@ SkData* Request::writeCanvasToPng(SkCanvas* canvas) { |
sk_sp<SkData> encodedBitmap = sk_tools::encode_bitmap_for_png(*bmp); |
SkASSERT(encodedBitmap.get()); |
- // write to png |
+ // write to an opaque png (black background) |
SkDynamicMemoryWStream buffer; |
- SkDrawCommand::WritePNG((const png_bytep) encodedBitmap->writable_data(), |
- bmp->width(), bmp->height(), |
- buffer); |
+ SkDrawCommand::WritePNG((const png_bytep) encodedBitmap->bytes(), bmp->width(), bmp->height(), |
+ buffer, true); |
return buffer.copyToData(); |
} |