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

Side by Side Diff: content/common/gpu/gpu_channel.cc

Issue 1775763002: gpu: Ensure that preempted channels wake up after preemption. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698