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

Unified Diff: include/core/SkAbortCallback.h

Issue 837693002: Rename SkDrawPictureCallback to SkAbortCallback (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update to ToT 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gyp/skia_for_chromium_defines.gypi ('k') | include/core/SkDrawPictureCallback.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkAbortCallback.h
diff --git a/include/core/SkAbortCallback.h b/include/core/SkAbortCallback.h
new file mode 100644
index 0000000000000000000000000000000000000000..dcdb6ae8e4400a09780818c7a574a138f7c7be4f
--- /dev/null
+++ b/include/core/SkAbortCallback.h
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2014 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#include "SkTypes.h"
+
+#ifndef SkAbortCallback_DEFINED
+#define SkAbortCallback_DEFINED
+
+/**
+* Subclasses of this can be passed to SkPicture::playback(). During the playback
+* of the picture, this callback will periodically be invoked. If its
+* abort() returns true, then picture playback will be interrupted.
+*
+* The resulting drawing is undefined, as there is no guarantee how often the
+* callback will be invoked. If the abort happens inside some level of nested
+* calls to save(), restore will automatically be called to return the state
+* to the same level it was before the playback call was made.
+*/
+class SK_API SkAbortCallback {
+public:
+ SkAbortCallback() {}
+ virtual ~SkAbortCallback() {}
+
+ virtual bool abort() = 0;
+};
+
+#endif // SkAbortCallback_DEFINED
« no previous file with comments | « gyp/skia_for_chromium_defines.gypi ('k') | include/core/SkDrawPictureCallback.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698