aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkSurface.h
diff options
context:
space:
mode:
authorGravatar Greg Daniel <egdaniel@google.com>2017-06-15 16:59:49 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-06-19 15:01:28 +0000
commitc64ee46a982695dc32b9cad4dd4e635ac09cd25e (patch)
tree2784515cd988e4b985767d01b6762bef6389d292 /include/core/SkSurface.h
parentd4a70ee36717493cc071f878b16b037463e6ce9a (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.h11
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*);