Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(225)

Unified Diff: src/gpu/GrResourceProvider.h

Issue 1709163003: Add wrapBackendTextureAsRenderTarget API (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: fix test Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrGpu.cpp ('k') | src/gpu/GrResourceProvider.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrResourceProvider.h
diff --git a/src/gpu/GrResourceProvider.h b/src/gpu/GrResourceProvider.h
index 783c7c743b9bea33abca7b7b295ff0ca38ee47d7..3dfc9ba863334299c5ea1c7142a6ea8d27be9e9e 100644
--- a/src/gpu/GrResourceProvider.h
+++ b/src/gpu/GrResourceProvider.h
@@ -147,6 +147,15 @@ public:
const GrCaps* caps() { return this->gpu()->caps(); }
+ /**
+ * Wraps an existing texture with a GrRenderTarget object. This is useful when the provided
+ * texture has a format that cannot be textured from by Skia, but we want to raster to it.
+ *
+ * @return GrRenderTarget object or NULL on failure.
+ */
+ GrRenderTarget* wrapBackendTextureAsRenderTarget(const GrBackendTextureDesc& desc,
+ GrWrapOwnership = kBorrow_GrWrapOwnership);
+
private:
const GrIndexBuffer* createInstancedIndexBuffer(const uint16_t* pattern,
int patternSize,
« no previous file with comments | « src/gpu/GrGpu.cpp ('k') | src/gpu/GrResourceProvider.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698