Add support for creating texture backed images where Skia will delete the texture.
Review URL: https://codereview.chromium.org/1187523005
diff --git a/src/gpu/GrGpu.cpp b/src/gpu/GrGpu.cpp
index a6e9654..d46d09d 100644
--- a/src/gpu/GrGpu.cpp
+++ b/src/gpu/GrGpu.cpp
@@ -175,9 +175,9 @@
}
}
-GrTexture* GrGpu::wrapBackendTexture(const GrBackendTextureDesc& desc) {
+GrTexture* GrGpu::wrapBackendTexture(const GrBackendTextureDesc& desc, GrWrapOwnership ownership) {
this->handleDirtyContext();
- GrTexture* tex = this->onWrapBackendTexture(desc);
+ GrTexture* tex = this->onWrapBackendTexture(desc, ownership);
if (NULL == tex) {
return NULL;
}
@@ -191,9 +191,10 @@
}
}
-GrRenderTarget* GrGpu::wrapBackendRenderTarget(const GrBackendRenderTargetDesc& desc) {
+GrRenderTarget* GrGpu::wrapBackendRenderTarget(const GrBackendRenderTargetDesc& desc,
+ GrWrapOwnership ownership) {
this->handleDirtyContext();
- return this->onWrapBackendRenderTarget(desc);
+ return this->onWrapBackendRenderTarget(desc, ownership);
}
GrVertexBuffer* GrGpu::createVertexBuffer(size_t size, bool dynamic) {