Loosen up assert in SkImage_Gpu::asTextureProxyRef

In the DDL world, the actual constraint is that the contexts have
the same ID. The old version was catching the case where an already
instantiated SkImage_Gpu was being drawn into a DDL.

Bug: 882457
Change-Id: I09ac0d5e176e8de5f5089d11d7495766c92f2450
Reviewed-on: https://skia-review.googlesource.com/153665
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This commit is contained in:
Robert Phillips 2018-09-11 13:37:49 -04:00 committed by Skia Commit-Bot
parent 29868f9ebd
commit bfd45adb2c

View File

@ -123,7 +123,7 @@ sk_sp<GrTextureProxy> SkImage_Gpu::asTextureProxyRef(GrContext* context,
SkColorSpace* dstColorSpace,
sk_sp<SkColorSpace>* texColorSpace,
SkScalar scaleAdjust[2]) const {
if (context != fContext.get()) {
if (context->uniqueID() != fContext->uniqueID()) {
SkASSERT(0);
return nullptr;
}