aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrDrawingManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/GrDrawingManager.cpp')
-rw-r--r--src/gpu/GrDrawingManager.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/gpu/GrDrawingManager.cpp b/src/gpu/GrDrawingManager.cpp
index 3f6c77379a..302da06c07 100644
--- a/src/gpu/GrDrawingManager.cpp
+++ b/src/gpu/GrDrawingManager.cpp
@@ -121,8 +121,9 @@ GrSemaphoresSubmitted GrDrawingManager::internalFlush(GrSurfaceProxy*,
SkASSERT(result);
#endif
- GrOpFlushState flushState(fContext->getGpu(),
- fContext->contextPriv().resourceProvider(),
+ GrGpu* gpu = fContext->contextPriv().getGpu();
+
+ GrOpFlushState flushState(gpu, fContext->contextPriv().resourceProvider(),
&fTokenTracker);
GrOnFlushResourceProvider onFlushProvider(this);
@@ -193,8 +194,7 @@ GrSemaphoresSubmitted GrDrawingManager::internalFlush(GrSurfaceProxy*,
fOpLists.reset();
- GrSemaphoresSubmitted result = fContext->getGpu()->finishFlush(numSemaphores,
- backendSemaphores);
+ GrSemaphoresSubmitted result = gpu->finishFlush(numSemaphores, backendSemaphores);
// We always have to notify the cache when it requested a flush so it can reset its state.
if (flushed || type == GrResourceCache::FlushType::kCacheRequested) {
@@ -299,10 +299,11 @@ GrSemaphoresSubmitted GrDrawingManager::prepareSurfaceForExternalIO(
return result;
}
+ GrGpu* gpu = fContext->contextPriv().getGpu();
GrSurface* surface = proxy->priv().peekSurface();
- if (fContext->getGpu() && surface->asRenderTarget()) {
- fContext->getGpu()->resolveRenderTarget(surface->asRenderTarget(), proxy->origin());
+ if (gpu && surface->asRenderTarget()) {
+ gpu->resolveRenderTarget(surface->asRenderTarget(), proxy->origin());
}
return result;
}
@@ -322,8 +323,10 @@ sk_sp<GrRenderTargetOpList> GrDrawingManager::newRTOpList(GrRenderTargetProxy* r
fOpLists.back()->makeClosed(*fContext->caps());
}
+ auto resourceProvider = fContext->contextPriv().resourceProvider();
+
sk_sp<GrRenderTargetOpList> opList(new GrRenderTargetOpList(rtp,
- fContext->getGpu(),
+ resourceProvider,
fContext->getAuditTrail()));
SkASSERT(rtp->getLastOpList() == opList.get());