OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 SkDrawPictureCallback_DEFINED | 8 #ifndef SkDrawPictureCallback_DEFINED |
9 #define SkDrawPictureCallback_DEFINED | 9 #define SkDrawPictureCallback_DEFINED |
10 | 10 |
| 11 #include "SkTypes.h" |
| 12 |
11 /** | 13 /** |
12 * Subclasses of this can be passed to canvas.drawPicture(). During the drawing | 14 * Subclasses of this can be passed to canvas.drawPicture(). During the drawing |
13 * of the picture, this callback will periodically be invoked. If its | 15 * of the picture, this callback will periodically be invoked. If its |
14 * abortDrawing() returns true, then picture playback will be interrupted. | 16 * abortDrawing() returns true, then picture playback will be interrupted. |
15 * | 17 * |
16 * The resulting drawing is undefined, as there is no guarantee how often the | 18 * The resulting drawing is undefined, as there is no guarantee how often the |
17 * callback will be invoked. If the abort happens inside some level of nested | 19 * callback will be invoked. If the abort happens inside some level of nested |
18 * calls to save(), restore will automatically be called to return the state | 20 * calls to save(), restore will automatically be called to return the state |
19 * to the same level it was before the drawPicture call was made. | 21 * to the same level it was before the drawPicture call was made. |
20 */ | 22 */ |
21 class SK_API SkDrawPictureCallback { | 23 class SK_API SkDrawPictureCallback { |
22 public: | 24 public: |
23 SkDrawPictureCallback() {} | 25 SkDrawPictureCallback() {} |
24 virtual ~SkDrawPictureCallback() {} | 26 virtual ~SkDrawPictureCallback() {} |
25 | 27 |
26 virtual bool abortDrawing() = 0; | 28 virtual bool abortDrawing() = 0; |
27 }; | 29 }; |
28 | 30 |
29 #endif//SkDrawPictureCallback_DEFINED | 31 #endif//SkDrawPictureCallback_DEFINED |
OLD | NEW |