OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef SERVICES_UI_GLES2_COMMAND_BUFFER_DRIVER_MANAGER_H_ |
| 6 #define SERVICES_UI_GLES2_COMMAND_BUFFER_DRIVER_MANAGER_H_ |
| 7 |
| 8 #include <stdint.h> |
| 9 #include <vector> |
| 10 |
| 11 #include "base/macros.h" |
| 12 #include "base/threading/non_thread_safe.h" |
| 13 |
| 14 namespace ui { |
| 15 |
| 16 class CommandBufferDriver; |
| 17 |
| 18 // This class manages all initialized |CommandBufferDriver|s. |
| 19 class CommandBufferDriverManager : base::NonThreadSafe { |
| 20 public: |
| 21 CommandBufferDriverManager(); |
| 22 ~CommandBufferDriverManager(); |
| 23 |
| 24 // Add a new initialized driver to the manager. |
| 25 void AddDriver(CommandBufferDriver* driver); |
| 26 |
| 27 // Remove a driver from the manager. |
| 28 void RemoveDriver(CommandBufferDriver* driver); |
| 29 |
| 30 // Return the global order number for the last unprocessed flush |
| 31 // (|CommandBufferDriver::Flush|). |
| 32 uint32_t GetUnprocessedOrderNum() const; |
| 33 |
| 34 // Return the global order number for the last processed flush |
| 35 // (|CommandBufferDriver::Flush|). |
| 36 uint32_t GetProcessedOrderNum() const; |
| 37 |
| 38 private: |
| 39 std::vector<CommandBufferDriver*> drivers_; |
| 40 |
| 41 DISALLOW_COPY_AND_ASSIGN(CommandBufferDriverManager); |
| 42 }; |
| 43 |
| 44 } // namespace ui |
| 45 |
| 46 #endif // COMPONENTS_GLES2_COMMAND_BUFFER_DRIVER_MANAGER_H_ |
OLD | NEW |