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