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

Unified Diff: content/common/gpu/gpu_channel_manager.cc

Issue 1308913004: GPU Channel's now maintain a global order number for each processed IPC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: GPU Channel message queue placed in own class, applied suggestions Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: content/common/gpu/gpu_channel_manager.cc
diff --git a/content/common/gpu/gpu_channel_manager.cc b/content/common/gpu/gpu_channel_manager.cc
index 1f027783eb02dc5b839f150f1181872dde49cfd8..da22d4dc4da95dfc358c0541df66d738075fe600 100644
--- a/content/common/gpu/gpu_channel_manager.cc
+++ b/content/common/gpu/gpu_channel_manager.cc
@@ -255,16 +255,19 @@ bool GpuChannelManager::HandleMessagesScheduled() {
return false;
}
-uint64 GpuChannelManager::MessagesProcessed() {
- uint64 messages_processed = 0;
- for (auto& kv : gpu_channels_)
- messages_processed += kv.second->messages_processed();
- return messages_processed;
+uint32_t GpuChannelManager::ProcessedOrderNumber() {
+ uint32_t processed_order_num = 0;
+ for (auto& kv : gpu_channels_) {
+ processed_order_num = std::max(processed_order_num,
+ kv.second->GetProcessedOrderNum());
+ }
+ return processed_order_num;
}
void GpuChannelManager::LoseAllContexts() {
- for (auto& kv : gpu_channels_)
+ for (auto& kv : gpu_channels_) {
kv.second->MarkAllContextsLost();
+ }
task_runner_->PostTask(FROM_HERE,
base::Bind(&GpuChannelManager::OnLoseAllContexts,
weak_factory_.GetWeakPtr()));

Powered by Google App Engine
This is Rietveld 408576698