Pass origins through the flushSurfaces calls.
Bug: skia:9556
Change-Id: Ie4a0b33dd35e50b93c30cb0010f60c2893140661
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/270439
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/GrContextPriv.cpp b/src/gpu/GrContextPriv.cpp
index e033ffa..f1f0d86 100644
--- a/src/gpu/GrContextPriv.cpp
+++ b/src/gpu/GrContextPriv.cpp
@@ -40,7 +40,8 @@
fContext->addOnFlushCallbackObject(onFlushCBObject);
}
-GrSemaphoresSubmitted GrContextPriv::flushSurfaces(GrSurfaceProxy* proxies[], int numProxies,
+GrSemaphoresSubmitted GrContextPriv::flushSurfaces(GrSurfaceProxy* proxies[],
+ GrSurfaceOrigin origins[], int numProxies,
const GrFlushInfo& info) {
ASSERT_SINGLE_OWNER
RETURN_VALUE_IF_ABANDONED(GrSemaphoresSubmitted::kNo)
@@ -52,11 +53,12 @@
ASSERT_OWNED_PROXY(proxies[i]);
}
return fContext->drawingManager()->flushSurfaces(
- proxies, numProxies, SkSurface::BackendSurfaceAccess::kNoAccess, info);
+ proxies, origins, numProxies, SkSurface::BackendSurfaceAccess::kNoAccess, info);
}
-void GrContextPriv::flushSurface(GrSurfaceProxy* proxy) {
- this->flushSurfaces(proxy ? &proxy : nullptr, proxy ? 1 : 0, {});
+void GrContextPriv::flushSurface(GrSurfaceProxy* proxy, GrSurfaceOrigin origin) {
+ SkASSERT(proxy);
+ this->flushSurfaces(&proxy, &origin, 1, {});
}
void GrContextPriv::moveRenderTasksToDDL(SkDeferredDisplayList* ddl) {