diff options
author | 2017-06-15 16:59:49 -0400 | |
---|---|---|
committer | 2017-06-19 15:01:28 +0000 | |
commit | c64ee46a982695dc32b9cad4dd4e635ac09cd25e (patch) | |
tree | 2784515cd988e4b985767d01b6762bef6389d292 /include/core/SkSurface.h | |
parent | d4a70ee36717493cc071f878b16b037463e6ce9a (diff) |
Add return to surface semaphore calls to indicate when we don't support them
Bug: skia:
Change-Id: I00118637bf6555278ca61707275ed60372de581d
Reviewed-on: https://skia-review.googlesource.com/20061
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'include/core/SkSurface.h')
-rw-r--r-- | include/core/SkSurface.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/include/core/SkSurface.h b/include/core/SkSurface.h index 6fad21721e..08e558cac7 100644 --- a/include/core/SkSurface.h +++ b/include/core/SkSurface.h @@ -341,15 +341,22 @@ public: * signalSemaphores with the info on the semaphores we submitted. The client is reposonsible for * allocating enough space in signalSemaphores to handle numSemaphores of GrBackendSemaphores. * The client will also take ownership of the returned underlying backend semaphores. + * + * If this call returns false, the GPU backend will not have created or added any semaphores to + * signal. Thus the array of semaphores will remain uninitialized. However, we will still flush + * any pending surface IO. */ - void flushAndSignalSemaphores(int numSemaphores, GrBackendSemaphore* signalSemaphores); + bool flushAndSignalSemaphores(int numSemaphores, GrBackendSemaphore* signalSemaphores); /** * Inserts a list of GPU semaphores that the current backend 3D API must wait on before * executing any more commands on the GPU for this surface. Skia will take ownership of the * underlying semaphores and delete them once they have been signaled and waited on. + * + * If this call returns false, then the GPU backend will not wait on any passed in semaphores, + * and the client will still own the semaphores. */ - void wait(int numSemaphores, const GrBackendSemaphore* waitSemaphores); + bool wait(int numSemaphores, const GrBackendSemaphore* waitSemaphores); protected: SkSurface(int width, int height, const SkSurfaceProps*); |