aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrGpu.cpp
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2018-01-16 15:07:54 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-01-16 20:53:28 +0000
commit6be756b673b823881e90a2ef68c12b640ddde549 (patch)
treef7e09cae44e5d5b3faddef00d9250962eec0e05a /src/gpu/GrGpu.cpp
parent1ea485fd56a977b4e84b4e82039e8f2487813c1e (diff)
Move resourceProvider accessor to GrContextPriv (take 2)
TBR=bsalomon@google.com Change-Id: I3fd46ebfad0d04b8a2bfa6190f81308f3a6be620 Reviewed-on: https://skia-review.googlesource.com/95121 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'src/gpu/GrGpu.cpp')
-rw-r--r--src/gpu/GrGpu.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gpu/GrGpu.cpp b/src/gpu/GrGpu.cpp
index 3a095517b5..93f719ab48 100644
--- a/src/gpu/GrGpu.cpp
+++ b/src/gpu/GrGpu.cpp
@@ -13,6 +13,7 @@
#include "GrBuffer.h"
#include "GrCaps.h"
#include "GrContext.h"
+#include "GrContextPriv.h"
#include "GrGpuResourcePriv.h"
#include "GrMesh.h"
#include "GrPathRendering.h"
@@ -483,15 +484,17 @@ bool GrGpu::SamplePatternComparator::operator()(const SamplePattern& a,
GrSemaphoresSubmitted GrGpu::finishFlush(int numSemaphores,
GrBackendSemaphore backendSemaphores[]) {
+ GrResourceProvider* resourceProvider = fContext->contextPriv().resourceProvider();
+
if (this->caps()->fenceSyncSupport()) {
for (int i = 0; i < numSemaphores; ++i) {
sk_sp<GrSemaphore> semaphore;
if (backendSemaphores[i].isInitialized()) {
- semaphore = fContext->resourceProvider()->wrapBackendSemaphore(
+ semaphore = resourceProvider->wrapBackendSemaphore(
backendSemaphores[i], GrResourceProvider::SemaphoreWrapType::kWillSignal,
kBorrow_GrWrapOwnership);
} else {
- semaphore = fContext->resourceProvider()->makeSemaphore(false);
+ semaphore = resourceProvider->makeSemaphore(false);
}
this->insertSemaphore(semaphore, false);