Allow surfaces to validate against matching contexts, not ptr equality
Bug: skia:10286
Change-Id: Ibc4885388f4a3be263fdfc0ee786a9c087fd295e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295324
Commit-Queue: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/GrSurfaceProxy.cpp b/src/gpu/GrSurfaceProxy.cpp
index f774ae7..23580b2 100644
--- a/src/gpu/GrSurfaceProxy.cpp
+++ b/src/gpu/GrSurfaceProxy.cpp
@@ -241,7 +241,7 @@
#ifdef SK_DEBUG
void GrSurfaceProxy::validate(GrContext_Base* context) const {
if (fTarget) {
- SkASSERT(fTarget->getContext() == context);
+ SkASSERT(fTarget->getContext()->priv().matches(context));
}
}
#endif