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

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

Issue 1733813004: Move some methods to SkiaServe's Request, this is still very leaky (Closed) Base URL: https://skia.googlesource.com/skia@skiaserve-2
Patch Set: kbudgeted stuff Created 4 years, 10 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 | « no previous file | 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
(...skipping 14 matching lines...) Expand all
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
OLDNEW
« no previous file with comments | « no previous file | tools/skiaserve/Request.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698