| Index: tools/skiaserve/urlhandlers/DownloadHandler.cpp
|
| diff --git a/tools/skiaserve/urlhandlers/DownloadHandler.cpp b/tools/skiaserve/urlhandlers/DownloadHandler.cpp
|
| index cc55c3b4b9ba92126d3ed20457a137cfb0f5d45a..fd9308d26eb47c99c36996cd6ff13a2296cc11b8 100644
|
| --- a/tools/skiaserve/urlhandlers/DownloadHandler.cpp
|
| +++ b/tools/skiaserve/urlhandlers/DownloadHandler.cpp
|
| @@ -8,8 +8,6 @@
|
| #include "UrlHandler.h"
|
|
|
| #include "microhttpd.h"
|
| -#include "SkPictureRecorder.h"
|
| -#include "SkPixelSerializer.h"
|
| #include "../Request.h"
|
| #include "../Response.h"
|
|
|
| @@ -27,22 +25,7 @@ int DownloadHandler::handle(Request* request, MHD_Connection* connection,
|
| return MHD_NO;
|
| }
|
|
|
| - // TODO move to a function
|
| - // Playback into picture recorder
|
| - SkPictureRecorder recorder;
|
| - SkCanvas* canvas = recorder.beginRecording(Request::kImageWidth,
|
| - Request::kImageHeight);
|
| -
|
| - request->fDebugCanvas->draw(canvas);
|
| -
|
| - SkAutoTUnref<SkPicture> picture(recorder.endRecording());
|
| -
|
| - SkDynamicMemoryWStream outStream;
|
| -
|
| - SkAutoTUnref<SkPixelSerializer> serializer(SkImageEncoder::CreatePixelSerializer());
|
| - picture->serialize(&outStream, serializer);
|
| -
|
| - SkAutoTUnref<SkData> data(outStream.copyToData());
|
| + SkAutoTUnref<SkData> data(request->writeOutSkp());
|
|
|
| // TODO fancier name handling
|
| return SendData(connection, data, "application/octet-stream", true,
|
|
|