diff options
author | reed <reed@chromium.org> | 2015-01-25 10:33:58 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-01-25 10:33:58 -0800 |
commit | 96a857ef5a40b3d0751ec9ebaaa96d9f20b82b21 (patch) | |
tree | 06ce8d7d5fd00f4e4d0d5d36f1804dd3e6e2ab7e /include/core/SkPicture.h | |
parent | dadbb357c87922c0631e66fc9b24313273af11c5 (diff) |
initial preroll api
BUG=skia:
Review URL: https://codereview.chromium.org/855473002
Diffstat (limited to 'include/core/SkPicture.h')
-rw-r--r-- | include/core/SkPicture.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/core/SkPicture.h b/include/core/SkPicture.h index 5b2f7a99f7..5a48476db0 100644 --- a/include/core/SkPicture.h +++ b/include/core/SkPicture.h @@ -171,6 +171,22 @@ public: */ bool willPlayBackBitmaps() const; + /** + * This is a general hint that the picture will (soon) be drawn into a SkCanvas with + * corresponding attributes (e.g. clip, matrix, props). No drawing occurs, but some + * expensive operations may be run (e.g. image decoding). + * + * Any of the parameters may be NULL. + * + * @param srcBounds If not NULL, this is the subset of the picture (in the same coordinates + * as the picture's bounds) that preroll() should focus on. + * @param initialMatrix If not NULL, this is the initialMatrix that is expected when the + * picture is actually drawn. + * @param props If not NULL, these are the expected props when the picture is actually drawn. + */ + void preroll(const SkRect* srcBounds, const SkMatrix* initialMatrix, const SkSurfaceProps*, + void* gpuCacheAccessor) const; + /** Return true if the SkStream/Buffer represents a serialized picture, and fills out SkPictInfo. After this function returns, the data source is not rewound so it will have to be manually reset before passing to |