commit | 52a00cac514dfd9cedb85a9c3e92fdb3e32a03f7 | [log] [tgz] |
---|---|---|
author | junov@google.com <junov@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | Mon Oct 01 15:27:14 2012 +0000 |
committer | junov@google.com <junov@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | Mon Oct 01 15:27:14 2012 +0000 |
tree | cbcaef014f7d2da380dc58936f30f65dd4075c0c | |
parent | dde646afb522ac46d6917ada7c404d91da860bb0 [diff] [blame] |
Adding virtual method to SkDeferredCanvas::NotificationClient for signaling when commands are skipped due to the skip on clear optimization. TEST=DeferredCanvas unit test BUG=http://code.google.com/p/chromium/issues/detail?id=116840 Review URL: https://codereview.appspot.com/6590050 git-svn-id: http://skia.googlecode.com/svn/trunk@5747 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/include/utils/SkDeferredCanvas.h b/include/utils/SkDeferredCanvas.h index f5674d1..97848f1 100644 --- a/include/utils/SkDeferredCanvas.h +++ b/include/utils/SkDeferredCanvas.h
@@ -203,6 +203,13 @@ */ virtual void flushedDrawCommands() {} + /** + * Called after pending draw commands have been skipped, meaning + * that they were optimized-out because the canvas is cleared + * or completely overwritten by the command currently being recorded. + */ + virtual void skippedPendingDrawCommands() {} + private: typedef SkRefCnt INHERITED; };