diff options
author | 2016-02-25 08:37:54 -0800 | |
---|---|---|
committer | 2016-02-25 08:37:54 -0800 | |
commit | 24dd687ac5f7afb44d593d793180f115f7c68b68 (patch) | |
tree | 827575070c02b6b83691d8fb0bd64f688af92f25 /tools/skiaserve/Request.h | |
parent | 5ec26ae9bfca635ccc98283aad5deda11519d826 (diff) |
Move Request to its own file in preparation for numerous cleanups
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1738483003
Review URL: https://codereview.chromium.org/1738483003
Diffstat (limited to 'tools/skiaserve/Request.h')
-rw-r--r-- | tools/skiaserve/Request.h | 45 |
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 + |