Print out a warning if trying to use a cross context image on two contexts

Change-Id: Ie4611b4aae65aed5aa45be8841fbb7326bcfbf0b
Bug: skia:9581
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251773
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This commit is contained in:
Brian Osman 2019-10-30 15:30:36 -04:00 committed by Skia Commit-Bot
parent c7a8df8b1c
commit 6e1d51a2c7

View File

@ -111,6 +111,7 @@ sk_sp<GrTextureProxy> GrBackendTextureImageGenerator::onGenerateTexture(
if (SK_InvalidGenID != fRefHelper->fBorrowingContextID) {
if (fRefHelper->fBorrowingContextID != context->priv().contextID()) {
fBorrowingMutex.release();
SkDebugf("GrBackendTextureImageGenerator: Trying to use texture on two GrContexts!\n");
return nullptr;
} else {
SkASSERT(fRefHelper->fBorrowingContextReleaseProc);