diff options
author | Cary Clark <caryclark@skia.org> | 2018-04-05 08:18:41 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-04-05 12:47:52 +0000 |
commit | ba75aee95224af408219e05092208ba3c5099028 (patch) | |
tree | e8691b6b73f21e120dd634df47d613550d398b58 /include | |
parent | 636fbaea77effb3de23ed62e2cb1dfa13be1d22e (diff) |
tweak SkImage documentation
- fix syntactic nits
- add how to check result of getBackendTexture
- add example
R=robertphillips@google.com
TBR=reed@google.com
Docs-Preview: https://skia.org/?cl=118590
Bug: skia:6898
Change-Id: I60cfcf448dc2f201ecc34d33ead707d0c3e3b86b
Reviewed-on: https://skia-review.googlesource.com/118590
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Cary Clark <caryclark@skia.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/core/SkImage.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/include/core/SkImage.h b/include/core/SkImage.h index 216844bc7c..aefa395ada 100644 --- a/include/core/SkImage.h +++ b/include/core/SkImage.h @@ -544,16 +544,19 @@ public: GrSurfaceOrigin* origin = nullptr) const; #if GR_TEST_UTILS - /** Retrieves the backend texture. If there is none an invalid object will be returned. - If flushPendingGrContextIO is true, complete deferred I/O operations. + /** Retrieves the backend texture. If SkImage has no backend texture, an invalid + object is returned. Call GrBackendTexture::isValid to determine if the result + is valid. - If origin is not nullptr, copies location of content drawn into SkImage. + If flushPendingGrContextIO is true, completes deferred I/O operations. + + If origin in not nullptr, copies location of content drawn into SkImage. @param flushPendingGrContextIO flag to flush outstanding requests @param origin storage for one of: kTopLeft_GrSurfaceOrigin, kBottomLeft_GrSurfaceOrigin; or nullptr - @return back-end API texture handle. Invalid on failure. - */ + @return back-end API texture handle; invalid on failure + */ GrBackendTexture getBackendTexture(bool flushPendingGrContextIO, GrSurfaceOrigin* origin = nullptr) const; #endif |