diff options
author | 2017-06-15 15:25:38 -0400 | |
---|---|---|
committer | 2017-06-15 19:49:18 +0000 | |
commit | 66366c697853e906d961ae691e2bc5209cdcfa62 (patch) | |
tree | f90de7fef9bd094ded9f6497c0004876694cca61 /src/gpu/GrResourceProvider.h | |
parent | 000182881a65ef4b12ca3739d47c5e21e79ca919 (diff) |
Add API for flushing surfaces with gpu semaphores
BUG=skia:
Change-Id: Ia4bfef784cd5f2516ceccafce958be18a86f91d1
Reviewed-on: https://skia-review.googlesource.com/11488
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Forrest Reiling <freiling@google.com>
Diffstat (limited to 'src/gpu/GrResourceProvider.h')
-rw-r--r-- | src/gpu/GrResourceProvider.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gpu/GrResourceProvider.h b/src/gpu/GrResourceProvider.h index 50264ef908..a6ddbc55b0 100644 --- a/src/gpu/GrResourceProvider.h +++ b/src/gpu/GrResourceProvider.h @@ -8,13 +8,14 @@ #ifndef GrResourceProvider_DEFINED #define GrResourceProvider_DEFINED -#include "GrBackendSurface.h" #include "GrBuffer.h" #include "GrPathRange.h" #include "SkImageInfo.h" #include "SkScalerContext.h" class GrBackendRenderTarget; +class GrBackendSemaphore; +class GrBackendTexture; class GrGpu; class GrPath; class GrRenderTarget; @@ -227,7 +228,10 @@ public: */ GrGpuResource* findAndRefResourceByUniqueKey(const GrUniqueKey&); - sk_sp<GrSemaphore> SK_WARN_UNUSED_RESULT makeSemaphore(); + sk_sp<GrSemaphore> SK_WARN_UNUSED_RESULT makeSemaphore(bool isOwned = true); + + sk_sp<GrSemaphore> wrapBackendSemaphore(const GrBackendSemaphore&, + GrWrapOwnership = kBorrow_GrWrapOwnership); // 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. |