diff options
Diffstat (limited to 'include/core/SkImage.h')
-rw-r--r-- | include/core/SkImage.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/core/SkImage.h b/include/core/SkImage.h index 7e1ffaac66..6d3ae42fa4 100644 --- a/include/core/SkImage.h +++ b/include/core/SkImage.h @@ -534,6 +534,21 @@ public: */ bool isValid(GrContext* context) const; +#ifdef SK_SUPPORT_LEGACY_BACKEND_OBJECTS + /** Retrieves the back-end API handle of texture. If flushPendingGrContextIO is true, + complete deferred I/O operations. + + If origin is 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, or nullptr + */ + GrBackendObject getTextureHandle(bool flushPendingGrContextIO, + GrSurfaceOrigin* origin = nullptr) const; +#endif + /** 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. |