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

Unified Diff: services/ui/gles2/command_buffer_driver_manager.h

Issue 2194893002: services/ui: Revert CLs that broke Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 5 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 | « services/ui/gles2/command_buffer_driver.cc ('k') | services/ui/gles2/command_buffer_driver_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/gles2/command_buffer_driver_manager.h
diff --git a/services/ui/gles2/command_buffer_driver_manager.h b/services/ui/gles2/command_buffer_driver_manager.h
new file mode 100644
index 0000000000000000000000000000000000000000..6a1ef2019092a1666b27ada2012ced6b188bc63a
--- /dev/null
+++ b/services/ui/gles2/command_buffer_driver_manager.h
@@ -0,0 +1,46 @@
+// 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 SERVICES_UI_GLES2_COMMAND_BUFFER_DRIVER_MANAGER_H_
+#define SERVICES_UI_GLES2_COMMAND_BUFFER_DRIVER_MANAGER_H_
+
+#include <stdint.h>
+#include <vector>
+
+#include "base/macros.h"
+#include "base/threading/non_thread_safe.h"
+
+namespace ui {
+
+class CommandBufferDriver;
+
+// This class manages all initialized |CommandBufferDriver|s.
+class CommandBufferDriverManager : base::NonThreadSafe {
+ public:
+ CommandBufferDriverManager();
+ ~CommandBufferDriverManager();
+
+ // Add a new initialized driver to the manager.
+ void AddDriver(CommandBufferDriver* driver);
+
+ // Remove a driver from the manager.
+ void RemoveDriver(CommandBufferDriver* driver);
+
+ // Return the global order number for the last unprocessed flush
+ // (|CommandBufferDriver::Flush|).
+ uint32_t GetUnprocessedOrderNum() const;
+
+ // Return the global order number for the last processed flush
+ // (|CommandBufferDriver::Flush|).
+ uint32_t GetProcessedOrderNum() const;
+
+ private:
+ std::vector<CommandBufferDriver*> drivers_;
+
+ DISALLOW_COPY_AND_ASSIGN(CommandBufferDriverManager);
+};
+
+} // namespace ui
+
+#endif // COMPONENTS_GLES2_COMMAND_BUFFER_DRIVER_MANAGER_H_
« no previous file with comments | « services/ui/gles2/command_buffer_driver.cc ('k') | services/ui/gles2/command_buffer_driver_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698