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