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

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

Issue 1737323002: Wire up /batches in skiaserve (Closed) Base URL: https://skia.googlesource.com/skia@skiaserve-1
Patch Set: minor tweak 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 21 matching lines...) Expand all
32 , fUrlDataManager(rootUrl) 32 , fUrlDataManager(rootUrl)
33 , fGPUEnabled(false) {} 33 , fGPUEnabled(false) {}
34 34
35 SkSurface* createCPUSurface(); 35 SkSurface* createCPUSurface();
36 SkSurface* createGPUSurface(); 36 SkSurface* createGPUSurface();
37 SkData* drawToPng(int n); 37 SkData* drawToPng(int n);
38 void drawToCanvas(int n); 38 void drawToCanvas(int n);
39 SkCanvas* getCanvas(); 39 SkCanvas* getCanvas();
40 SkData* writeCanvasToPng(SkCanvas* canvas); 40 SkData* writeCanvasToPng(SkCanvas* canvas);
41 SkBitmap* getBitmapFromCanvas(SkCanvas* canvas); 41 SkBitmap* getBitmapFromCanvas(SkCanvas* canvas);
42 bool hasPicture() const { return SkToBool(fPicture.get()); }
43 int getLastOp() const { return fDebugCanvas->getSize() - 1; }
44
45 // Returns the json list of ops as an SkData
46 SkData* getJsonOps(int n);
47
48 // Returns a json list of batches as an SkData
49 SkData* getJsonBatchList(int n);
42 50
43 // TODO probably want to make this configurable 51 // TODO probably want to make this configurable
44 static const int kImageWidth; 52 static const int kImageWidth;
45 static const int kImageHeight; 53 static const int kImageHeight;
46 54
47 UploadContext* fUploadContext; 55 UploadContext* fUploadContext;
48 SkAutoTUnref<SkPicture> fPicture; 56 SkAutoTUnref<SkPicture> fPicture;
49 SkAutoTUnref<SkDebugCanvas> fDebugCanvas; 57 SkAutoTUnref<SkDebugCanvas> fDebugCanvas;
50 SkAutoTDelete<GrContextFactory> fContextFactory; 58 SkAutoTDelete<GrContextFactory> fContextFactory;
51 SkAutoTUnref<SkSurface> fSurface; 59 SkAutoTUnref<SkSurface> fSurface;
52 UrlDataManager fUrlDataManager; 60 UrlDataManager fUrlDataManager;
53 bool fGPUEnabled; 61 bool fGPUEnabled;
54 }; 62 };
55 63
56 #endif 64 #endif
57 65
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