Index: tools/skiaserve/skiaserve.cpp |
diff --git a/tools/skiaserve/skiaserve.cpp b/tools/skiaserve/skiaserve.cpp |
index 5f6d35fa27914675b3ca8066d7e2f510e811a239..037075f7c5ab3baaf6385d93973f7f13184a94b2 100644 |
--- a/tools/skiaserve/skiaserve.cpp |
+++ b/tools/skiaserve/skiaserve.cpp |
@@ -7,18 +7,14 @@ |
#include "GrCaps.h" |
#include "GrContextFactory.h" |
+ |
+#include "Request.h" |
+ |
#include "SkCanvas.h" |
#include "SkCommandLineFlags.h" |
-#include "SkDebugCanvas.h" |
#include "SkJSONCanvas.h" |
-#include "SkJSONCPP.h" |
-#include "SkPicture.h" |
#include "SkPictureRecorder.h" |
#include "SkPixelSerializer.h" |
-#include "SkStream.h" |
-#include "SkSurface.h" |
- |
-#include "UrlDataManager.h" |
#include <sys/socket.h> |
#include <microhttpd.h> |
@@ -59,27 +55,6 @@ SkString generateTemplate(SkString source) { |
} |
-struct UploadContext { |
- SkDynamicMemoryWStream fStream; |
- MHD_PostProcessor* fPostProcessor; |
- MHD_Connection* connection; |
-}; |
- |
-struct Request { |
- Request(SkString rootUrl) |
- : fUploadContext(nullptr) |
- , fUrlDataManager(rootUrl) |
- , fGPUEnabled(false) {} |
- |
- UploadContext* fUploadContext; |
- SkAutoTUnref<SkPicture> fPicture; |
- SkAutoTUnref<SkDebugCanvas> fDebugCanvas; |
- SkAutoTDelete<GrContextFactory> fContextFactory; |
- SkAutoTUnref<SkSurface> fSurface; |
- UrlDataManager fUrlDataManager; |
- bool fGPUEnabled; |
-}; |
- |
static void write_png_callback(png_structp png_ptr, png_bytep data, png_size_t length) { |
SkWStream* out = (SkWStream*) png_get_io_ptr(png_ptr); |
out->write(data, length); |