OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ | 5 #ifndef CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ |
6 #define CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ | 6 #define CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <queue> | 9 #include <queue> |
10 #include <string> | 10 #include <string> |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 | 90 |
91 bool DiscardBackbuffer(); | 91 bool DiscardBackbuffer(); |
92 bool EnsureBackbuffer(); | 92 bool EnsureBackbuffer(); |
93 | 93 |
94 // Inserts a sync point, returning its ID. This is handled on the IO thread of | 94 // Inserts a sync point, returning its ID. This is handled on the IO thread of |
95 // the GPU process, and so should be relatively fast, but its effect is | 95 // the GPU process, and so should be relatively fast, but its effect is |
96 // ordered wrt other messages (in particular, Flush). Sync point IDs are | 96 // ordered wrt other messages (in particular, Flush). Sync point IDs are |
97 // global and can be used for cross-channel synchronization. | 97 // global and can be used for cross-channel synchronization. |
98 uint32 InsertSyncPoint(); | 98 uint32 InsertSyncPoint(); |
99 | 99 |
100 // Makes this command buffer wait on a sync point. This command buffer will be | |
101 // unscheduled until the command buffer that inserted that sync point reaches | |
102 // it, or gets destroyed. | |
103 void WaitSyncPoint(uint32); | |
104 | |
105 // Makes this command buffer invoke a task when a sync point is reached, or | 100 // Makes this command buffer invoke a task when a sync point is reached, or |
106 // the command buffer that inserted that sync point is destroyed. | 101 // the command buffer that inserted that sync point is destroyed. |
107 bool SignalSyncPoint(uint32 sync_point, | 102 bool SignalSyncPoint(uint32 sync_point, |
108 const base::Closure& callback); | 103 const base::Closure& callback); |
109 | 104 |
110 // Generates n unique mailbox names that can be used with | 105 // Generates n unique mailbox names that can be used with |
111 // GL_texture_mailbox_CHROMIUM. Unlike genMailboxCHROMIUM, this IPC is | 106 // GL_texture_mailbox_CHROMIUM. Unlike genMailboxCHROMIUM, this IPC is |
112 // handled only on the GPU process' IO thread, and so is not effectively | 107 // handled only on the GPU process' IO thread, and so is not effectively |
113 // a finish. | 108 // a finish. |
114 bool GenerateMailboxNames(unsigned num, std::vector<std::string>* names); | 109 bool GenerateMailboxNames(unsigned num, std::vector<std::string>* names); |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 // Tasks to be invoked in SignalSyncPoint responses. | 185 // Tasks to be invoked in SignalSyncPoint responses. |
191 uint32 next_signal_id_; | 186 uint32 next_signal_id_; |
192 SignalTaskMap signal_tasks_; | 187 SignalTaskMap signal_tasks_; |
193 | 188 |
194 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxyImpl); | 189 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxyImpl); |
195 }; | 190 }; |
196 | 191 |
197 } // namespace content | 192 } // namespace content |
198 | 193 |
199 #endif // CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ | 194 #endif // CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ |
OLD | NEW |