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 4cec7cb3c8114656a0138f24c144935a56bebb1f..cb26cf21072daac96c32490d20a777aed2f8e494 100644 |
--- a/content/common/gpu/gpu_channel_manager.cc |
+++ b/content/common/gpu/gpu_channel_manager.cc |
@@ -6,9 +6,6 @@ |
#include "base/bind.h" |
#include "base/command_line.h" |
-#include "base/location.h" |
-#include "base/single_thread_task_runner.h" |
-#include "base/thread_task_runner_handle.h" |
#include "content/common/gpu/gpu_channel.h" |
#include "content/common/gpu/gpu_memory_buffer_factory.h" |
#include "content/common/gpu/gpu_memory_manager.h" |
@@ -88,13 +85,12 @@ |
} // namespace |
-GpuChannelManager::GpuChannelManager( |
- MessageRouter* router, |
- GpuWatchdog* watchdog, |
- base::SingleThreadTaskRunner* io_task_runner, |
- base::WaitableEvent* shutdown_event, |
- IPC::SyncChannel* channel) |
- : io_task_runner_(io_task_runner), |
+GpuChannelManager::GpuChannelManager(MessageRouter* router, |
+ GpuWatchdog* watchdog, |
+ base::MessageLoopProxy* io_message_loop, |
+ base::WaitableEvent* shutdown_event, |
+ IPC::SyncChannel* channel) |
+ : io_message_loop_(io_message_loop), |
shutdown_event_(shutdown_event), |
router_(router), |
gpu_memory_manager_( |
@@ -110,7 +106,7 @@ |
relinquish_resources_pending_(false), |
weak_factory_(this) { |
DCHECK(router_); |
- DCHECK(io_task_runner); |
+ DCHECK(io_message_loop); |
DCHECK(shutdown_event); |
channel_->AddFilter(filter_.get()); |
} |
@@ -210,7 +206,7 @@ |
client_id, |
false, |
allow_future_sync_points)); |
- channel->Init(io_task_runner_.get(), shutdown_event_); |
+ channel->Init(io_message_loop_.get(), shutdown_event_); |
channel_handle.name = channel->GetChannelName(); |
#if defined(OS_POSIX) |
@@ -259,9 +255,12 @@ |
void GpuChannelManager::DestroyGpuMemoryBuffer( |
gfx::GpuMemoryBufferId id, |
int client_id) { |
- io_task_runner_->PostTask( |
- FROM_HERE, base::Bind(&GpuChannelManager::DestroyGpuMemoryBufferOnIO, |
- base::Unretained(this), id, client_id)); |
+ io_message_loop_->PostTask( |
+ FROM_HERE, |
+ base::Bind(&GpuChannelManager::DestroyGpuMemoryBufferOnIO, |
+ base::Unretained(this), |
+ id, |
+ client_id)); |
} |
void GpuChannelManager::DestroyGpuMemoryBufferOnIO( |
@@ -325,9 +324,10 @@ |
iter != gpu_channels_.end(); ++iter) { |
iter->second->MarkAllContextsLost(); |
} |
- base::ThreadTaskRunnerHandle::Get()->PostTask( |
- FROM_HERE, base::Bind(&GpuChannelManager::OnLoseAllContexts, |
- weak_factory_.GetWeakPtr())); |
+ base::MessageLoop::current()->PostTask( |
+ FROM_HERE, |
+ base::Bind(&GpuChannelManager::OnLoseAllContexts, |
+ weak_factory_.GetWeakPtr())); |
} |
void GpuChannelManager::OnLoseAllContexts() { |