aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core
diff options
context:
space:
mode:
Diffstat (limited to 'include/core')
-rw-r--r--include/core/SkSurface.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/include/core/SkSurface.h b/include/core/SkSurface.h
index efa2428ccb..6fad21721e 100644
--- a/include/core/SkSurface.h
+++ b/include/core/SkSurface.h
@@ -15,6 +15,7 @@
class SkCanvas;
class SkPaint;
class GrBackendRenderTarget;
+class GrBackendSemaphore;
class GrContext;
class GrRenderTarget;
@@ -323,9 +324,33 @@ public:
/**
* Issue any pending surface IO to the current backend 3D API and resolve any surface MSAA.
+ *
+ * The flush calls below are the new preferred way to flush calls to a surface, and this call
+ * will eventually be removed.
*/
void prepareForExternalIO();
+ /**
+ * Issue any pending surface IO to the current backend 3D API
+ */
+ void flush();
+
+ /**
+ * Issue any pending surface IO to the current backend 3D API. After issuing all commands, we
+ * will issue numSemaphore semaphores for the gpu to signal. We will then fill in the array
+ * 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.
+ */
+ void 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.
+ */
+ void wait(int numSemaphores, const GrBackendSemaphore* waitSemaphores);
+
protected:
SkSurface(int width, int height, const SkSurfaceProps*);
SkSurface(const SkImageInfo&, const SkSurfaceProps*);