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>
This commit is contained in:
Adlai Holler 2020-06-09 15:20:25 -04:00 committed by Skia Commit-Bot
parent ba426ba3ba
commit b81eebae88

View File

@ -241,7 +241,7 @@ bool GrSurfaceProxy::isFormatCompressed(const GrCaps* caps) const {
#ifdef SK_DEBUG
void GrSurfaceProxy::validate(GrContext_Base* context) const {
if (fTarget) {
SkASSERT(fTarget->getContext() == context);
SkASSERT(fTarget->getContext()->priv().matches(context));
}
}
#endif