| commit | b3b8f3332cce37427ae62cd30fc3c1a3ce1a23bf | [log] [tgz] |
|---|---|---|
| author | Robert Phillips <robertphillips@google.com> | Wed Aug 09 15:55:57 2023 -0400 |
| committer | SkCQ <skcq-be@skia-corp.google.com.iam.gserviceaccount.com> | Tue Aug 22 13:17:39 2023 +0000 |
| tree | 9cbbe813bac79648ac9db1240ab06d62b753c678 | |
| parent | bf08da24a261d985d94e6ec93eed04faaa06d839 [diff] |
Check that instantiated texture matches the proxy's protectedness Change-Id: I9241c66f4312216dce8b0c1983dcfaf1c6ca8e50 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/738883 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com>
diff --git a/src/gpu/ganesh/GrSurfaceProxy.cpp b/src/gpu/ganesh/GrSurfaceProxy.cpp index e41b6f2..3448077 100644 --- a/src/gpu/ganesh/GrSurfaceProxy.cpp +++ b/src/gpu/ganesh/GrSurfaceProxy.cpp
@@ -501,6 +501,7 @@ void GrSurfaceProxy::validateSurface(const GrSurface* surface) { SkASSERTF(surface->backendFormat() == fFormat, "%s != %s", surface->backendFormat().toStr().c_str(), fFormat.toStr().c_str()); + SkASSERT(skgpu::Protected(surface->isProtected()) == this->isProtected()); this->onValidateSurface(surface); }