blob: fd18bdad9cb604032280b54940eea3b060b08e2c [file] [log] [blame]
joshualitt24dd6872016-02-25 08:37:54 -08001/*
2 * Copyright 2016 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8#ifndef Request_DEFINED
9#define Request_DEFINED
10
11#include "GrContextFactory.h"
12
13#include "SkDebugCanvas.h"
14#include "SkPicture.h"
15#include "SkStream.h"
16#include "SkSurface.h"
17
18#include "UrlDataManager.h"
19
20struct MHD_Connection;
21struct MHD_PostProcessor;
22
23struct UploadContext {
24 SkDynamicMemoryWStream fStream;
25 MHD_PostProcessor* fPostProcessor;
26 MHD_Connection* connection;
27};
28
29struct Request {
30 Request(SkString rootUrl)
31 : fUploadContext(nullptr)
32 , fUrlDataManager(rootUrl)
33 , fGPUEnabled(false) {}
34
35 UploadContext* fUploadContext;
36 SkAutoTUnref<SkPicture> fPicture;
37 SkAutoTUnref<SkDebugCanvas> fDebugCanvas;
38 SkAutoTDelete<GrContextFactory> fContextFactory;
39 SkAutoTUnref<SkSurface> fSurface;
40 UrlDataManager fUrlDataManager;
41 bool fGPUEnabled;
42};
43
44#endif
45