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_GPU_CHANNEL_H_ | 5 #ifndef CONTENT_COMMON_GPU_GPU_CHANNEL_H_ |
6 #define CONTENT_COMMON_GPU_GPU_CHANNEL_H_ | 6 #define CONTENT_COMMON_GPU_GPU_CHANNEL_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 const GPUCreateCommandBufferConfig& init_params, | 160 const GPUCreateCommandBufferConfig& init_params, |
161 int32 route_id, | 161 int32 route_id, |
162 bool* succeeded); | 162 bool* succeeded); |
163 void OnDestroyCommandBuffer(int32 route_id); | 163 void OnDestroyCommandBuffer(int32 route_id); |
164 void OnDevToolsStartEventsRecording(int32 route_id, bool* succeeded); | 164 void OnDevToolsStartEventsRecording(int32 route_id, bool* succeeded); |
165 void OnDevToolsStopEventsRecording(); | 165 void OnDevToolsStopEventsRecording(); |
166 | 166 |
167 // Decrement the count of unhandled IPC messages and defer preemption. | 167 // Decrement the count of unhandled IPC messages and defer preemption. |
168 void MessageProcessed(); | 168 void MessageProcessed(); |
169 | 169 |
| 170 // Try to match the messages pattern for GL SwapBuffers operation in the |
| 171 // deferred message queue starting from the current processing message. |
| 172 // Return the number of messages that matches the given pattern, e.g. |
| 173 // SetLatencyInfo -> AsyncFlush -> Echo sequence. |
| 174 size_t MatchSwapBufferMessagesPattern(IPC::Message* current_message); |
| 175 |
170 // The lifetime of objects of this class is managed by a GpuChannelManager. | 176 // The lifetime of objects of this class is managed by a GpuChannelManager. |
171 // The GpuChannelManager destroy all the GpuChannels that they own when they | 177 // The GpuChannelManager destroy all the GpuChannels that they own when they |
172 // are destroyed. So a raw pointer is safe. | 178 // are destroyed. So a raw pointer is safe. |
173 GpuChannelManager* gpu_channel_manager_; | 179 GpuChannelManager* gpu_channel_manager_; |
174 | 180 |
175 scoped_ptr<IPC::SyncChannel> channel_; | 181 scoped_ptr<IPC::SyncChannel> channel_; |
176 | 182 |
177 uint64 messages_processed_; | 183 uint64 messages_processed_; |
178 | 184 |
179 // Whether the processing of IPCs on this channel is stalled and we should | 185 // Whether the processing of IPCs on this channel is stalled and we should |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 size_t num_stubs_descheduled_; | 226 size_t num_stubs_descheduled_; |
221 | 227 |
222 bool allow_future_sync_points_; | 228 bool allow_future_sync_points_; |
223 | 229 |
224 DISALLOW_COPY_AND_ASSIGN(GpuChannel); | 230 DISALLOW_COPY_AND_ASSIGN(GpuChannel); |
225 }; | 231 }; |
226 | 232 |
227 } // namespace content | 233 } // namespace content |
228 | 234 |
229 #endif // CONTENT_COMMON_GPU_GPU_CHANNEL_H_ | 235 #endif // CONTENT_COMMON_GPU_GPU_CHANNEL_H_ |
OLD | NEW |