diff options
Diffstat (limited to 'src/gpu/GrAHardwareBufferImageGenerator.cpp')
-rw-r--r-- | src/gpu/GrAHardwareBufferImageGenerator.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/gpu/GrAHardwareBufferImageGenerator.cpp b/src/gpu/GrAHardwareBufferImageGenerator.cpp index 205595526f..2dcdeb5911 100644 --- a/src/gpu/GrAHardwareBufferImageGenerator.cpp +++ b/src/gpu/GrAHardwareBufferImageGenerator.cpp @@ -152,20 +152,22 @@ sk_sp<GrTextureProxy> GrAHardwareBufferImageGenerator::makeProxy(GrRecordingCont [direct, buffer = AutoAHBRelease(hardwareBuffer), width, height, pixelConfig, isProtectedContent, backendFormat](GrResourceProvider* resourceProvider) { GrAHardwareBufferUtils::DeleteImageProc deleteImageProc = nullptr; - GrAHardwareBufferUtils::DeleteImageCtx deleteImageCtx = nullptr; + GrAHardwareBufferUtils::UpdateImageProc updateImageProc = nullptr; + GrAHardwareBufferUtils::TexImageCtx texImageCtx = nullptr; GrBackendTexture backendTex = GrAHardwareBufferUtils::MakeBackendTexture(direct, buffer.get(), width, height, &deleteImageProc, - &deleteImageCtx, + &updateImageProc, + &texImageCtx, isProtectedContent, backendFormat, false); if (!backendTex.isValid()) { return sk_sp<GrTexture>(); } - SkASSERT(deleteImageProc && deleteImageCtx); + SkASSERT(deleteImageProc && texImageCtx); backendTex.fConfig = pixelConfig; // We make this texture cacheable to avoid recreating a GrTexture every time this @@ -174,12 +176,12 @@ sk_sp<GrTextureProxy> GrAHardwareBufferImageGenerator::makeProxy(GrRecordingCont sk_sp<GrTexture> tex = resourceProvider->wrapBackendTexture( backendTex, kBorrow_GrWrapOwnership, GrWrapCacheable::kYes, kRead_GrIOType); if (!tex) { - deleteImageProc(deleteImageCtx); + deleteImageProc(texImageCtx); return sk_sp<GrTexture>(); } if (deleteImageProc) { - tex->setRelease(deleteImageProc, deleteImageCtx); + tex->setRelease(deleteImageProc, texImageCtx); } return tex; |