aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrResourceProvider.h
diff options
context:
space:
mode:
authorGravatar kkinnunen <kkinnunen@nvidia.com>2016-04-01 04:50:37 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-04-01 04:50:38 -0700
commit49c4c22b3744d18e1cb38ecabcb8839d2e26afe0 (patch)
tree229335950c6db475308b063bf82e7d869f47af9a /src/gpu/GrResourceProvider.h
parent4d51f64ff18e2e15c40fec0c374d89879ba273bc (diff)
Remove ownership parameter from GrResourceProvider::wrapBackendTextureAsRenderTarget
Remove ownership parameter from GrResourceProvider::wrapBackendTextureAsRenderTarget. The function leaks the texture id if kAdopt_LifeCycle is passed. There is no public API to access the parameter. BUG=594928 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1842313003 Review URL: https://codereview.chromium.org/1842313003
Diffstat (limited to 'src/gpu/GrResourceProvider.h')
-rw-r--r--src/gpu/GrResourceProvider.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gpu/GrResourceProvider.h b/src/gpu/GrResourceProvider.h
index 7b51726d10..fe0b5defa5 100644
--- a/src/gpu/GrResourceProvider.h
+++ b/src/gpu/GrResourceProvider.h
@@ -140,10 +140,12 @@ public:
* 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.
*
+ * The texture is wrapped as borrowed. The texture object will not be freed once the
+ * render target is destroyed.
+ *
* @return GrRenderTarget object or NULL on failure.
*/
- GrRenderTarget* wrapBackendTextureAsRenderTarget(const GrBackendTextureDesc& desc,
- GrWrapOwnership = kBorrow_GrWrapOwnership);
+ GrRenderTarget* wrapBackendTextureAsRenderTarget(const GrBackendTextureDesc& desc);
private:
const GrBuffer* createInstancedIndexBuffer(const uint16_t* pattern,