| 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 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 MHD_PostProcessor* fPostProcessor; | 25 MHD_PostProcessor* fPostProcessor; |
| 26 MHD_Connection* connection; | 26 MHD_Connection* connection; |
| 27 }; | 27 }; |
| 28 | 28 |
| 29 struct Request { | 29 struct Request { |
| 30 Request(SkString rootUrl) | 30 Request(SkString rootUrl) |
| 31 : fUploadContext(nullptr) | 31 : fUploadContext(nullptr) |
| 32 , fUrlDataManager(rootUrl) | 32 , fUrlDataManager(rootUrl) |
| 33 , fGPUEnabled(false) {} | 33 , fGPUEnabled(false) {} |
| 34 | 34 |
| 35 SkSurface* createCPUSurface(); |
| 36 SkSurface* createGPUSurface(); |
| 37 SkData* drawToPng(int n); |
| 38 void drawToCanvas(int n); |
| 39 SkCanvas* getCanvas(); |
| 40 SkData* writeCanvasToPng(SkCanvas* canvas); |
| 41 SkBitmap* getBitmapFromCanvas(SkCanvas* canvas); |
| 42 |
| 43 // TODO probably want to make this configurable |
| 44 static const int kImageWidth; |
| 45 static const int kImageHeight; |
| 46 |
| 35 UploadContext* fUploadContext; | 47 UploadContext* fUploadContext; |
| 36 SkAutoTUnref<SkPicture> fPicture; | 48 SkAutoTUnref<SkPicture> fPicture; |
| 37 SkAutoTUnref<SkDebugCanvas> fDebugCanvas; | 49 SkAutoTUnref<SkDebugCanvas> fDebugCanvas; |
| 38 SkAutoTDelete<GrContextFactory> fContextFactory; | 50 SkAutoTDelete<GrContextFactory> fContextFactory; |
| 39 SkAutoTUnref<SkSurface> fSurface; | 51 SkAutoTUnref<SkSurface> fSurface; |
| 40 UrlDataManager fUrlDataManager; | 52 UrlDataManager fUrlDataManager; |
| 41 bool fGPUEnabled; | 53 bool fGPUEnabled; |
| 42 }; | 54 }; |
| 43 | 55 |
| 44 #endif | 56 #endif |
| 45 | 57 |
| OLD | NEW |