OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 #ifndef fiddle_main_DEFINED | 7 #ifndef fiddle_main_DEFINED |
8 #define fiddle_main_DEFINED | 8 #define fiddle_main_DEFINED |
9 | 9 |
10 #include "skia.h" | 10 #ifdef FIDDLE_BUILD_TEST |
| 11 #include "GrContext.h" |
| 12 #include "SkCanvas.h" |
| 13 #include "SkDocument.h" |
| 14 #include "SkPictureRecorder.h" |
| 15 #include "SkStream.h" |
| 16 #include "SkSurface.h" |
| 17 #include "gl/GrGLAssembleInterface.h" |
| 18 #include "gl/GrGLInterface.h" |
| 19 #else |
| 20 #include "skia.h" |
| 21 #endif |
11 | 22 |
12 extern SkBitmap source; | 23 extern SkBitmap source; |
13 extern sk_sp<SkImage> image; | 24 extern sk_sp<SkImage> image; |
14 | 25 |
15 struct DrawOptions { | 26 struct DrawOptions { |
16 DrawOptions(int w, int h, bool r, bool g, bool p, bool k, const char* s) | 27 DrawOptions(int w, int h, bool r, bool g, bool p, bool k, const char* s) |
17 : size(SkISize::Make(w, h)) | 28 : size(SkISize::Make(w, h)) |
18 , raster(r) | 29 , raster(r) |
19 , gpu(g) | 30 , gpu(g) |
20 , pdf(p) | 31 , pdf(p) |
21 , skp(k) | 32 , skp(k) |
22 , source(s) {} | 33 , source(s) {} |
23 SkISize size; | 34 SkISize size; |
24 bool raster; | 35 bool raster; |
25 bool gpu; | 36 bool gpu; |
26 bool pdf; | 37 bool pdf; |
27 bool skp; | 38 bool skp; |
28 const char* source; | 39 const char* source; |
29 }; | 40 }; |
30 | 41 |
31 extern DrawOptions GetDrawOptions(); | 42 extern DrawOptions GetDrawOptions(); |
32 extern void draw(SkCanvas*); | 43 extern void draw(SkCanvas*); |
33 | 44 |
34 #endif // fiddle_main_DEFINED | 45 #endif // fiddle_main_DEFINED |
OLD | NEW |