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

Unified Diff: ui/gl/gl_fence_shared_event.h

Issue 2383753002: gpu: Add GpuFence framework.
Patch Set: rebase Created 4 years, 1 month 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
Index: ui/gl/gl_fence_shared_event.h
diff --git a/ui/gl/gl_fence_shared_event.h b/ui/gl/gl_fence_shared_event.h
new file mode 100644
index 0000000000000000000000000000000000000000..23c185aa8cd3cfdc5f8d17672d41e1fcdaf479f8
--- /dev/null
+++ b/ui/gl/gl_fence_shared_event.h
@@ -0,0 +1,35 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_GL_GL_FENCE_SHARED_EVENT_H_
+#define UI_GL_GL_FENCE_SHARED_EVENT_H_
+
+#include "base/macros.h"
+#include "ui/gfx/shared_event.h"
+#include "ui/gl/gl_export.h"
+#include "ui/gl/gl_fence.h"
+
+namespace gl {
+
+class GL_EXPORT GLFenceSharedEvent : public GLFence {
+ public:
+ explicit GLFenceSharedEvent(const gfx::SharedEventHandle& handle);
+ ~GLFenceSharedEvent() override;
+
+ // Overridden from GLFence:
+ bool HasCompleted() override;
+ void ClientWait() override;
+ void ServerWait() override;
+ bool SignalSupported() override;
+ void Signal() override;
+
+ private:
+ gfx::SharedEvent shared_event_;
+
+ DISALLOW_COPY_AND_ASSIGN(GLFenceSharedEvent);
+};
+
+} // namespace gl
+
+#endif // UI_GL_GL_FENCE_SHARED_EVENT_H_

Powered by Google App Engine
This is Rietveld 408576698