Hal Canary | 118df7c | 2019-12-18 16:26:19 -0500 | [diff] [blame] | 1 | // Copyright 2019 Google LLC. |
| 2 | // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. |
| 3 | #ifndef SkiaViewController_DEFINED |
| 4 | #define SkiaViewController_DEFINED |
| 5 | |
| 6 | class SkCanvas; |
| 7 | |
| 8 | #import <CoreGraphics/CoreGraphics.h> |
| 9 | #import <Foundation/Foundation.h> |
| 10 | |
| 11 | // An interface that draws to a Skia canvas. |
| 12 | @interface SkiaViewController : NSObject |
| 13 | - (void)draw:(CGRect)rect toCanvas:(SkCanvas*)canvas atSize:(CGSize)size; |
| 14 | |
| 15 | // Return the current paused state. Implementations should override. |
| 16 | - (bool)isPaused; |
| 17 | |
| 18 | // Change the paused state. Implementations should override. |
| 19 | - (void)togglePaused; |
| 20 | @end |
| 21 | #endif // SkiaViewController_DEFINED |