aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core
diff options
context:
space:
mode:
Diffstat (limited to 'include/core')
-rw-r--r--include/core/SkImage.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/include/core/SkImage.h b/include/core/SkImage.h
index aed0843e06..216844bc7c 100644
--- a/include/core/SkImage.h
+++ b/include/core/SkImage.h
@@ -533,7 +533,7 @@ public:
/** Retrieves the back-end API handle of texture. If flushPendingGrContextIO is true,
complete deferred I/O operations.
- If origin in not nullptr, copies location of content drawn into SkImage.
+ 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,
@@ -543,6 +543,21 @@ public:
GrBackendObject getTextureHandle(bool flushPendingGrContextIO,
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.
+
+ 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. Invalid on failure.
+ */
+ GrBackendTexture getBackendTexture(bool flushPendingGrContextIO,
+ GrSurfaceOrigin* origin = nullptr) const;
+#endif
+
/** \enum SkImage::CachingHint
CachingHint selects whether Skia may internally cache SkBitmap generated by
decoding SkImage, or by copying SkImage from GPU to CPU. The default behavior