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

Unified Diff: cc/resources/sync_point_helper.h

Issue 14126014: Add signalSyncPoint to the WebGraphicsContext3D command buffer impls. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: removedusing Created 7 years, 8 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 | « cc/output/gl_renderer_pixeltest.cc ('k') | cc/resources/sync_point_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/sync_point_helper.h
diff --git a/cc/resources/sync_point_helper.h b/cc/resources/sync_point_helper.h
new file mode 100644
index 0000000000000000000000000000000000000000..c342069bc7e2b70f4e6a676c2f7192d610f2f29e
--- /dev/null
+++ b/cc/resources/sync_point_helper.h
@@ -0,0 +1,36 @@
+// Copyright 2013 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 CC_RESOURCES_SYNC_POINT_HELPER_H_
+#define CC_RESOURCES_SYNC_POINT_HELPER_H_
+
+#include "base/callback.h"
+#include "cc/base/cc_export.h"
+
+namespace WebKit { class WebGraphicsContext3D; }
+
+namespace cc {
+
+class CC_EXPORT SyncPointHelper {
+ public:
+ // Requests a callback to |closure| when the |sync_point| is reached by the
+ // |context3d|.
+ //
+ // If the |context3d| is destroyed or lost before the callback fires, then
+ // AbortBecauseDidLoseOrDestroyContext() must be called to clean up the
+ // callback's resources.
+ static void SignalSyncPoint(
+ WebKit::WebGraphicsContext3D* context3d,
+ unsigned sync_point,
+ const base::Closure& closure);
+
+ private:
+ SyncPointHelper();
+
+ DISALLOW_COPY_AND_ASSIGN(SyncPointHelper);
+};
+
+} // namespace cc
+
+#endif // CC_RESOURCES_SYNC_POINT_HELPER_H_
« no previous file with comments | « cc/output/gl_renderer_pixeltest.cc ('k') | cc/resources/sync_point_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698