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

Unified Diff: src/core/SkCanvasDrawable.h

Issue 697363004: update dox (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkCanvasDrawable.h
diff --git a/src/core/SkCanvasDrawable.h b/src/core/SkCanvasDrawable.h
index 8092ea0b7a49755cbe2f497fa37425015b1cfe30..807bbc7ab1e1d8e731960a8563acc0b0e51ec09f 100644
--- a/src/core/SkCanvasDrawable.h
+++ b/src/core/SkCanvasDrawable.h
@@ -14,9 +14,11 @@ class SkCanvas;
struct SkRect;
/**
- * Base-class to capture a set of drawing commands (sent to SkCanvas). Instances of this class
- * need not be thread-safe, but they must be able to be used in a thread different from where
- * they were created.
+ * Base-class for objects that draw into SkCanvas.
+ *
+ * The object has a generation ID, which is guaranteed to be unique across all drawables. To
+ * allow for clients of the drawable that may want to cache the results, the drawable must
+ * change its generation ID whenever its internal state changes such that it will draw differently.
*/
class SkCanvasDrawable : public SkRefCnt {
public:
@@ -45,6 +47,11 @@ public:
*/
bool getBounds(SkRect*);
+ /**
+ * Calling this invalidates the previous generation ID, and causes a new one to be computed
+ * the next time getGenerationID() is called. Typically this is called by the object itself,
+ * in response to its internal state changing.
+ */
void notifyDrawingChanged();
protected:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698