OLD | NEW |
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 #if SK_SUPPORT_GPU |
12 #include "GrContextFactory.h" | 12 #include "GrContextFactory.h" |
13 #endif | 13 #endif |
14 | 14 |
15 #include "SkDebugCanvas.h" | 15 #include "SkDebugCanvas.h" |
16 #include "SkPicture.h" | 16 #include "SkPicture.h" |
17 #include "SkStream.h" | 17 #include "SkStream.h" |
18 #include "SkSurface.h" | 18 #include "SkSurface.h" |
19 | 19 |
20 #include "UrlDataManager.h" | 20 #include "UrlDataManager.h" |
21 | 21 |
22 namespace sk_gpu_test { | |
23 class GrContextFactory; | 22 class GrContextFactory; |
24 } | |
25 struct MHD_Connection; | 23 struct MHD_Connection; |
26 struct MHD_PostProcessor; | 24 struct MHD_PostProcessor; |
27 | 25 |
28 struct UploadContext { | 26 struct UploadContext { |
29 SkDynamicMemoryWStream fStream; | 27 SkDynamicMemoryWStream fStream; |
30 MHD_PostProcessor* fPostProcessor; | 28 MHD_PostProcessor* fPostProcessor; |
31 MHD_Connection* connection; | 29 MHD_Connection* connection; |
32 }; | 30 }; |
33 | 31 |
34 struct Request { | 32 struct Request { |
(...skipping 29 matching lines...) Expand all Loading... |
64 | 62 |
65 private: | 63 private: |
66 SkData* writeCanvasToPng(SkCanvas* canvas); | 64 SkData* writeCanvasToPng(SkCanvas* canvas); |
67 void drawToCanvas(int n, int m = -1); | 65 void drawToCanvas(int n, int m = -1); |
68 SkSurface* createCPUSurface(); | 66 SkSurface* createCPUSurface(); |
69 SkSurface* createGPUSurface(); | 67 SkSurface* createGPUSurface(); |
70 SkIRect getBounds(); | 68 SkIRect getBounds(); |
71 GrContext* getContext(); | 69 GrContext* getContext(); |
72 | 70 |
73 sk_sp<SkPicture> fPicture; | 71 sk_sp<SkPicture> fPicture; |
74 sk_gpu_test::GrContextFactory* fContextFactory; | 72 GrContextFactory* fContextFactory; |
75 SkAutoTUnref<SkSurface> fSurface; | 73 SkAutoTUnref<SkSurface> fSurface; |
76 bool fGPUEnabled; | 74 bool fGPUEnabled; |
77 }; | 75 }; |
78 | 76 |
79 #endif | 77 #endif |
OLD | NEW |