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

Side by Side Diff: tools/skiaserve/Request.h

Issue 1787843002: Fix up no gpu build (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « tools/debugger/SkDebugCanvas.cpp ('k') | tools/skiaserve/Request.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2016 Google Inc. 2 * Copyright 2016 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef Request_DEFINED 8 #ifndef Request_DEFINED
9 #define Request_DEFINED 9 #define Request_DEFINED
10 10
11 #if SK_SUPPORT_GPU
11 #include "GrContextFactory.h" 12 #include "GrContextFactory.h"
13 #endif
12 14
13 #include "SkDebugCanvas.h" 15 #include "SkDebugCanvas.h"
14 #include "SkPicture.h" 16 #include "SkPicture.h"
15 #include "SkStream.h" 17 #include "SkStream.h"
16 #include "SkSurface.h" 18 #include "SkSurface.h"
17 19
18 #include "UrlDataManager.h" 20 #include "UrlDataManager.h"
19 21
22 class GrContextFactory;
20 struct MHD_Connection; 23 struct MHD_Connection;
21 struct MHD_PostProcessor; 24 struct MHD_PostProcessor;
22 25
23 struct UploadContext { 26 struct UploadContext {
24 SkDynamicMemoryWStream fStream; 27 SkDynamicMemoryWStream fStream;
25 MHD_PostProcessor* fPostProcessor; 28 MHD_PostProcessor* fPostProcessor;
26 MHD_Connection* connection; 29 MHD_Connection* connection;
27 }; 30 };
28 31
29 struct Request { 32 struct Request {
30 Request(SkString rootUrl); 33 Request(SkString rootUrl);
34 ~Request();
31 35
32 // draws to skia draw op N, highlighting the Mth batch(-1 means no highlight ) 36 // draws to skia draw op N, highlighting the Mth batch(-1 means no highlight )
33 SkData* drawToPng(int n, int m = -1); 37 SkData* drawToPng(int n, int m = -1);
34 SkData* writeOutSkp(); 38 SkData* writeOutSkp();
35 SkCanvas* getCanvas(); 39 SkCanvas* getCanvas();
36 SkBitmap* getBitmapFromCanvas(SkCanvas* canvas); 40 SkBitmap* getBitmapFromCanvas(SkCanvas* canvas);
37 bool enableGPU(bool enable); 41 bool enableGPU(bool enable);
38 bool hasPicture() const { return SkToBool(fPicture.get()); } 42 bool hasPicture() const { return SkToBool(fPicture.get()); }
39 int getLastOp() const { return fDebugCanvas->getSize() - 1; } 43 int getLastOp() const { return fDebugCanvas->getSize() - 1; }
40 44
(...skipping 17 matching lines...) Expand all
58 62
59 private: 63 private:
60 SkData* writeCanvasToPng(SkCanvas* canvas); 64 SkData* writeCanvasToPng(SkCanvas* canvas);
61 void drawToCanvas(int n, int m = -1); 65 void drawToCanvas(int n, int m = -1);
62 SkSurface* createCPUSurface(); 66 SkSurface* createCPUSurface();
63 SkSurface* createGPUSurface(); 67 SkSurface* createGPUSurface();
64 SkIRect getBounds(); 68 SkIRect getBounds();
65 GrContext* getContext(); 69 GrContext* getContext();
66 70
67 SkAutoTUnref<SkPicture> fPicture; 71 SkAutoTUnref<SkPicture> fPicture;
68 SkAutoTDelete<GrContextFactory> fContextFactory; 72 GrContextFactory* fContextFactory;
ethannicholas 2016/03/11 19:21:38 Why this change? I mean, I see you're now cleaning
69 SkAutoTUnref<SkSurface> fSurface; 73 SkAutoTUnref<SkSurface> fSurface;
70 bool fGPUEnabled; 74 bool fGPUEnabled;
71 }; 75 };
72 76
73 #endif 77 #endif
74 78
OLDNEW
« no previous file with comments | « tools/debugger/SkDebugCanvas.cpp ('k') | tools/skiaserve/Request.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698