aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrGpu.h
diff options
context:
space:
mode:
authorGravatar Greg Daniel <egdaniel@google.com>2018-01-22 16:11:35 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-01-22 21:41:45 +0000
commit48661b868fbbf7a6193ef49bb6a05a0df61e7c45 (patch)
tree13582c20667d91e8989f76c224d99f2231714730 /src/gpu/GrGpu.h
parent2e6feed858c2b14b9083cf7d2b040a177dcb62ea (diff)
Make use of VkSemaphores thread safe assuming use of the same VkQueue.
This allows us to re-enable support for multiple GrContexts in GrBackendTextureImageGenerator. Bug: skia: Change-Id: Ifd6ac1ad81cdfbd1fd986467d8beb359399d6588 Reviewed-on: https://skia-review.googlesource.com/98340 Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'src/gpu/GrGpu.h')
-rw-r--r--src/gpu/GrGpu.h15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/gpu/GrGpu.h b/src/gpu/GrGpu.h
index e8e0ab9141..2f12073f8a 100644
--- a/src/gpu/GrGpu.h
+++ b/src/gpu/GrGpu.h
@@ -377,11 +377,11 @@ public:
virtual void deleteFence(GrFence) const = 0;
virtual sk_sp<GrSemaphore> SK_WARN_UNUSED_RESULT makeSemaphore(bool isOwned = true) = 0;
- sk_sp<GrSemaphore> wrapBackendSemaphore(const GrBackendSemaphore& semaphore,
- GrResourceProvider::SemaphoreWrapType wrapType,
- GrWrapOwnership ownership);
- void insertSemaphore(sk_sp<GrSemaphore> semaphore, bool flush = false);
- void waitSemaphore(sk_sp<GrSemaphore> semaphore);
+ virtual sk_sp<GrSemaphore> wrapBackendSemaphore(const GrBackendSemaphore& semaphore,
+ GrResourceProvider::SemaphoreWrapType wrapType,
+ GrWrapOwnership ownership) = 0;
+ virtual void insertSemaphore(sk_sp<GrSemaphore> semaphore, bool flush = false) = 0;
+ virtual void waitSemaphore(sk_sp<GrSemaphore> semaphore) = 0;
/**
* Put this texture in a safe and known state for use across multiple GrContexts. Depending on
@@ -606,11 +606,6 @@ private:
virtual void onFinishFlush(bool insertedSemaphores) = 0;
- virtual void onInsertSemaphore(sk_sp<GrSemaphore> semaphore, bool flush = false) = 0;
- virtual void onWaitSemaphore(sk_sp<GrSemaphore> semaphore) = 0;
- virtual sk_sp<GrSemaphore> onWrapBackendSemaphore(const GrBackendSemaphore& semaphore,
- GrWrapOwnership ownership) = 0;
-
virtual void onDumpJSON(SkJSONWriter*) const {}
void resetContext() {