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

Unified Diff: include/gpu/GrTextureProvider.h

Issue 1709163003: Add wrapBackendTextureAsRenderTarget API (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Remove assert that is no longer true 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 | « no previous file | src/gpu/GrGpu.h » ('j') | src/gpu/gl/GrGLGpu.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/GrTextureProvider.h
diff --git a/include/gpu/GrTextureProvider.h b/include/gpu/GrTextureProvider.h
index 338dddbaca87f0a87c89c29129afad0ae3fadac4..f943da33667c998aef69e98ac0d4ca5b09716391 100644
--- a/include/gpu/GrTextureProvider.h
+++ b/include/gpu/GrTextureProvider.h
@@ -98,10 +98,19 @@ public:
* the client will resolve to a texture). Currently wrapped render targets
* always use the kBorrow_GrWrapOwnership semantics.
*
- * @return GrTexture object or NULL on failure.
+ * @return GrRenderTarget object or NULL on failure.
*/
GrRenderTarget* wrapBackendRenderTarget(const GrBackendRenderTargetDesc& desc);
+ /**
+ * 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,
bsalomon 2016/02/22 16:41:01 Can we put this in GrResourceProvider (it's a deri
ericrk 2016/02/22 21:02:59 I was planning on calling this directly from Chrom
bsalomon 2016/02/23 02:25:27 Gotcha, what if we added a prepareForExternalIO (o
ericrk 2016/02/24 00:39:53 Added this function.
+ GrWrapOwnership = kBorrow_GrWrapOwnership);
+
protected:
GrTextureProvider(GrGpu* gpu, GrResourceCache* cache, GrSingleOwner* singleOwner);
« no previous file with comments | « no previous file | src/gpu/GrGpu.h » ('j') | src/gpu/gl/GrGLGpu.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698