Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(294)

Unified Diff: src/gpu/SkGpuFenceSync.h

Issue 1194783003: Implement SkGLContext swapBuffers with fence syncs (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: windows build Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/gpu/gl/angle/SkANGLEGLContext.h ('k') | src/gpu/gl/GrGLAssembleInterface.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/SkGpuFenceSync.h
diff --git a/src/gpu/SkGpuFenceSync.h b/src/gpu/SkGpuFenceSync.h
new file mode 100644
index 0000000000000000000000000000000000000000..b78398fed85736a1236cbc0a11ad54e05c894ed4
--- /dev/null
+++ b/src/gpu/SkGpuFenceSync.h
@@ -0,0 +1,29 @@
+
+/*
+ * Copyright 2015 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+#ifndef SkGpuFenceSync_DEFINED
+#define SkGpuFenceSync_DEFINED
+
+#include "SkTypes.h"
+
+typedef void* SkPlatformGpuFence;
+
+/*
+ * This class provides an interface to interact with fence syncs. A fence sync is an object that the
+ * client can insert into the GPU command stream, and then at any future time, wait until all
+ * commands that were issued before the fence have completed.
+ */
+class SkGpuFenceSync {
+public:
+ virtual SkPlatformGpuFence SK_WARN_UNUSED_RESULT insertFence() const = 0;
+ virtual bool flushAndWaitFence(SkPlatformGpuFence) const = 0;
+ virtual void deleteFence(SkPlatformGpuFence) const = 0;
+
+ virtual ~SkGpuFenceSync() {}
+};
+
+#endif
« no previous file with comments | « include/gpu/gl/angle/SkANGLEGLContext.h ('k') | src/gpu/gl/GrGLAssembleInterface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698