From a5cf4f45bb6ecfe37058404e173e20622e6f6503 Mon Sep 17 00:00:00 2001 From: msarett Date: Thu, 30 Jun 2016 10:06:51 -0700 Subject: Fix png encoding in skia debugger BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2119513002 Review-Url: https://codereview.chromium.org/2119513002 --- tools/skiaserve/Request.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'tools/skiaserve') diff --git a/tools/skiaserve/Request.cpp b/tools/skiaserve/Request.cpp index 2af707a57d..44e5ddfa9d 100644 --- a/tools/skiaserve/Request.cpp +++ b/tools/skiaserve/Request.cpp @@ -61,11 +61,10 @@ SkData* Request::writeCanvasToPng(SkCanvas* canvas) { sk_sp 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(); } -- cgit v1.2.3