From 6e1d51a2c74ce26c499cb141920007d3dda11435 Mon Sep 17 00:00:00 2001 From: Brian Osman Date: Wed, 30 Oct 2019 15:30:36 -0400 Subject: [PATCH] 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 Commit-Queue: Brian Osman --- src/gpu/GrBackendTextureImageGenerator.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gpu/GrBackendTextureImageGenerator.cpp b/src/gpu/GrBackendTextureImageGenerator.cpp index bd4cacb529..79ff721c3f 100644 --- a/src/gpu/GrBackendTextureImageGenerator.cpp +++ b/src/gpu/GrBackendTextureImageGenerator.cpp @@ -111,6 +111,7 @@ sk_sp 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);