| 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 #include "content/common/gpu/gpu_channel.h" | 5 #include "content/common/gpu/gpu_channel.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #if defined(OS_WIN) | 9 #if defined(OS_WIN) |
| 10 #include <windows.h> | 10 #include <windows.h> |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 return nullptr; | 224 return nullptr; |
| 225 sync_point_order_data_->BeginProcessingOrderNumber( | 225 sync_point_order_data_->BeginProcessingOrderNumber( |
| 226 channel_messages_.front()->order_number); | 226 channel_messages_.front()->order_number); |
| 227 return channel_messages_.front().get(); | 227 return channel_messages_.front().get(); |
| 228 } | 228 } |
| 229 | 229 |
| 230 void GpuChannelMessageQueue::PauseMessageProcessing() { | 230 void GpuChannelMessageQueue::PauseMessageProcessing() { |
| 231 base::AutoLock auto_lock(channel_lock_); | 231 base::AutoLock auto_lock(channel_lock_); |
| 232 DCHECK(!channel_messages_.empty()); | 232 DCHECK(!channel_messages_.empty()); |
| 233 | 233 |
| 234 // If we have been preempted by another channel, just post a task to wake up. |
| 235 if (scheduled_) |
| 236 channel_->PostHandleMessage(this); |
| 237 |
| 234 sync_point_order_data_->PauseProcessingOrderNumber( | 238 sync_point_order_data_->PauseProcessingOrderNumber( |
| 235 channel_messages_.front()->order_number); | 239 channel_messages_.front()->order_number); |
| 236 } | 240 } |
| 237 | 241 |
| 238 void GpuChannelMessageQueue::FinishMessageProcessing() { | 242 void GpuChannelMessageQueue::FinishMessageProcessing() { |
| 239 base::AutoLock auto_lock(channel_lock_); | 243 base::AutoLock auto_lock(channel_lock_); |
| 240 DCHECK(!channel_messages_.empty()); | 244 DCHECK(!channel_messages_.empty()); |
| 241 DCHECK(scheduled_); | 245 DCHECK(scheduled_); |
| 242 | 246 |
| 243 sync_point_order_data_->FinishProcessingOrderNumber( | 247 sync_point_order_data_->FinishProcessingOrderNumber( |
| (...skipping 813 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1057 } | 1061 } |
| 1058 } | 1062 } |
| 1059 } | 1063 } |
| 1060 | 1064 |
| 1061 void GpuChannel::HandleUpdateValueState( | 1065 void GpuChannel::HandleUpdateValueState( |
| 1062 unsigned int target, const gpu::ValueState& state) { | 1066 unsigned int target, const gpu::ValueState& state) { |
| 1063 pending_valuebuffer_state_->UpdateState(target, state); | 1067 pending_valuebuffer_state_->UpdateState(target, state); |
| 1064 } | 1068 } |
| 1065 | 1069 |
| 1066 } // namespace content | 1070 } // namespace content |
| OLD | NEW |