diff options
Diffstat (limited to 'src/gpu/GrBackendTextureImageGenerator.cpp')
-rw-r--r-- | src/gpu/GrBackendTextureImageGenerator.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gpu/GrBackendTextureImageGenerator.cpp b/src/gpu/GrBackendTextureImageGenerator.cpp index 9b55704dce..b07115ef2d 100644 --- a/src/gpu/GrBackendTextureImageGenerator.cpp +++ b/src/gpu/GrBackendTextureImageGenerator.cpp @@ -80,6 +80,7 @@ void GrBackendTextureImageGenerator::ReleaseRefHelper_TextureReleaseProc(void* c SkASSERT(refHelper); refHelper->fBorrowedTexture = nullptr; + refHelper->fBorrowingContextID = SK_InvalidGenID; refHelper->unref(); } @@ -125,11 +126,12 @@ sk_sp<GrTextureProxy> GrBackendTextureImageGenerator::onGenerateTexture( if (!resourceProvider) { // If we get here then we never created a texture to pass the refHelper ref off // to. Thus we must unref it ourselves. + refHelper->fBorrowingContextID = SK_InvalidGenID; refHelper->unref(); return sk_sp<GrTexture>(); } - if (semaphore && !semaphore->hasSubmittedWait()) { + if (semaphore) { resourceProvider->priv().gpu()->waitSemaphore(semaphore); } @@ -155,6 +157,7 @@ sk_sp<GrTextureProxy> GrBackendTextureImageGenerator::onGenerateTexture( tex = resourceProvider->wrapBackendTexture(backendTexture, kBorrow_GrWrapOwnership); if (!tex) { + refHelper->fBorrowingContextID = SK_InvalidGenID; refHelper->unref(); return sk_sp<GrTexture>(); } |