Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(113)

Side by Side Diff: include/core/SkDrawPictureCallback.h

Issue 829983003: Rename SkDrawPictureCallback to SkPicture::AbortCallback (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Readd deleted android gypi changes Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « gyp/skia_for_chromium_defines.gypi ('k') | include/core/SkPicture.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
14 #include "SkPicture.h"
15
13 /** 16 /**
14 * 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
15 * of the picture, this callback will periodically be invoked. If its 18 * of the picture, this callback will periodically be invoked. If its
16 * abortDrawing() returns true, then picture playback will be interrupted. 19 * abortDrawing() returns true, then picture playback will be interrupted.
17 * 20 *
18 * 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
19 * 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
20 * 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
21 * 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.
22 */ 25 */
23 class SK_API SkDrawPictureCallback { 26 class SK_API SkDrawPictureCallback : public SkPicture::AbortCallback {
24 public: 27 public:
25 SkDrawPictureCallback() {} 28 virtual bool abortDrawing() = 0;
26 virtual ~SkDrawPictureCallback() {}
27 29
28 virtual bool abortDrawing() = 0; 30 bool abort() SK_OVERRIDE { return this->abortDrawing(); }
29 }; 31 };
32 #endif
30 33
31 #endif//SkDrawPictureCallback_DEFINED 34 #endif // SkDrawPictureCallback_DEFINED
OLDNEW
« no previous file with comments | « gyp/skia_for_chromium_defines.gypi ('k') | include/core/SkPicture.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698