aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/skiaserve/Request.h
diff options
context:
space:
mode:
authorGravatar joshualitt <joshualitt@chromium.org>2016-02-25 08:37:54 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-02-25 08:37:54 -0800
commit24dd687ac5f7afb44d593d793180f115f7c68b68 (patch)
tree827575070c02b6b83691d8fb0bd64f688af92f25 /tools/skiaserve/Request.h
parent5ec26ae9bfca635ccc98283aad5deda11519d826 (diff)
Move Request to its own file in preparation for numerous cleanups
Diffstat (limited to 'tools/skiaserve/Request.h')
-rw-r--r--tools/skiaserve/Request.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/tools/skiaserve/Request.h b/tools/skiaserve/Request.h
new file mode 100644
index 0000000000..fd18bdad9c
--- /dev/null
+++ b/tools/skiaserve/Request.h
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2016 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#ifndef Request_DEFINED
+#define Request_DEFINED
+
+#include "GrContextFactory.h"
+
+#include "SkDebugCanvas.h"
+#include "SkPicture.h"
+#include "SkStream.h"
+#include "SkSurface.h"
+
+#include "UrlDataManager.h"
+
+struct MHD_Connection;
+struct MHD_PostProcessor;
+
+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;
+};
+
+#endif
+