Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(143)

Unified Diff: tools/skiaserve/skiaserve.cpp

Issue 1738483003: Move Request to its own file in preparation for numerous cleanups (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: merge Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/skiaserve/Request.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « tools/skiaserve/Request.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698