aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrResourceProvider.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/GrResourceProvider.h')
-rw-r--r--src/gpu/GrResourceProvider.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gpu/GrResourceProvider.h b/src/gpu/GrResourceProvider.h
index 5ecaac3473..1f1ff8e173 100644
--- a/src/gpu/GrResourceProvider.h
+++ b/src/gpu/GrResourceProvider.h
@@ -227,6 +227,17 @@ public:
*/
GrGpuResource* findAndRefResourceByUniqueKey(const GrUniqueKey&);
+ sk_sp<GrSemaphore> SK_WARN_UNUSED_RESULT makeSemaphore();
+
+ // Takes the GrSemaphore and sets the ownership of the semaphore to the GrGpu object used by
+ // this class. This call is only used when passing a GrSemaphore from one context to another.
+ void takeOwnershipOfSemaphore(sk_sp<GrSemaphore>);
+ // Takes the GrSemaphore and resets the ownership of the semaphore so that it is not owned by
+ // any GrGpu. A follow up call to takeOwnershipofSemaphore must be made so that the underlying
+ // semaphore can be deleted. This call is only used when passing a GrSemaphore from one context
+ // to another.
+ void releaseOwnershipOfSemaphore(sk_sp<GrSemaphore>);
+
void abandon() {
fCache = NULL;
fGpu = NULL;