halcanary | decb21e | 2015-12-10 07:52:45 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2015 Google Inc. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
| 6 | */ |
| 7 | #ifndef fiddle_main_DEFINED |
| 8 | #define fiddle_main_DEFINED |
| 9 | |
| 10 | #include "skia.h" |
| 11 | |
| 12 | extern SkBitmap source; |
halcanary | 7b8b237 | 2016-04-18 08:17:56 -0700 | [diff] [blame^] | 13 | extern sk_sp<SkImage> image; |
halcanary | decb21e | 2015-12-10 07:52:45 -0800 | [diff] [blame] | 14 | |
| 15 | struct DrawOptions { |
| 16 | DrawOptions(int w, int h, bool r, bool g, bool p, bool k, const char* s) |
| 17 | : size(SkISize::Make(w, h)) |
| 18 | , raster(r) |
| 19 | , gpu(g) |
| 20 | , pdf(p) |
| 21 | , skp(k) |
| 22 | , source(s) {} |
| 23 | SkISize size; |
| 24 | bool raster; |
| 25 | bool gpu; |
| 26 | bool pdf; |
| 27 | bool skp; |
| 28 | const char* source; |
| 29 | }; |
| 30 | |
| 31 | extern DrawOptions GetDrawOptions(); |
| 32 | extern void draw(SkCanvas*); |
| 33 | |
| 34 | #endif // fiddle_main_DEFINED |