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 24 matching lines...) Expand all Loading... |
35 Request(SkString rootUrl); | 35 Request(SkString rootUrl); |
36 ~Request(); | 36 ~Request(); |
37 | 37 |
38 // draws to skia draw op N, highlighting the Mth batch(-1 means no highlight
) | 38 // draws to skia draw op N, highlighting the Mth batch(-1 means no highlight
) |
39 SkData* drawToPng(int n, int m = -1); | 39 SkData* drawToPng(int n, int m = -1); |
40 SkData* writeOutSkp(); | 40 SkData* writeOutSkp(); |
41 SkCanvas* getCanvas(); | 41 SkCanvas* getCanvas(); |
42 SkBitmap* getBitmapFromCanvas(SkCanvas* canvas); | 42 SkBitmap* getBitmapFromCanvas(SkCanvas* canvas); |
43 bool enableGPU(bool enable); | 43 bool enableGPU(bool enable); |
44 bool setColorMode(int mode); | 44 bool setColorMode(int mode); |
| 45 bool setSRGBMode(bool enable); |
45 bool hasPicture() const { return SkToBool(fPicture.get()); } | 46 bool hasPicture() const { return SkToBool(fPicture.get()); } |
46 int getLastOp() const { return fDebugCanvas->getSize() - 1; } | 47 int getLastOp() const { return fDebugCanvas->getSize() - 1; } |
47 | 48 |
48 bool initPictureFromStream(SkStream*); | 49 bool initPictureFromStream(SkStream*); |
49 | 50 |
50 // Returns the json list of ops as an SkData | 51 // Returns the json list of ops as an SkData |
51 SkData* getJsonOps(int n); | 52 SkData* getJsonOps(int n); |
52 | 53 |
53 // Returns a json list of batches as an SkData | 54 // Returns a json list of batches as an SkData |
54 SkData* getJsonBatchList(int n); | 55 SkData* getJsonBatchList(int n); |
(...skipping 17 matching lines...) Expand all Loading... |
72 GrContext* getContext(); | 73 GrContext* getContext(); |
73 | 74 |
74 sk_sp<SkPicture> fPicture; | 75 sk_sp<SkPicture> fPicture; |
75 sk_gpu_test::GrContextFactory* fContextFactory; | 76 sk_gpu_test::GrContextFactory* fContextFactory; |
76 SkAutoTUnref<SkSurface> fSurface; | 77 SkAutoTUnref<SkSurface> fSurface; |
77 bool fGPUEnabled; | 78 bool fGPUEnabled; |
78 int fColorMode; | 79 int fColorMode; |
79 }; | 80 }; |
80 | 81 |
81 #endif | 82 #endif |
OLD | NEW |