Chromium Code Reviews| Index: services/ui/gpu/gpu_service.cc |
| diff --git a/services/ui/gpu/gpu_service.cc b/services/ui/gpu/gpu_service.cc |
| index 6daf6c207927e1d9804c1a31665f197e582e26fd..d9abf74facc74f63adfedbe20e265fac2ca96f7a 100644 |
| --- a/services/ui/gpu/gpu_service.cc |
| +++ b/services/ui/gpu/gpu_service.cc |
| @@ -232,8 +232,7 @@ void GpuService::DestroyGpuMemoryBuffer(gfx::GpuMemoryBufferId id, |
| id, client_id, sync_token)); |
| return; |
| } |
| - if (gpu_channel_manager_) |
|
piman
2017/04/06 20:51:14
This used to be necessary (in GpuChildThread) beca
sadrul
2017/04/07 02:16:12
We tear-down the mojo connection if the initializa
piman
2017/04/07 18:16:41
Ok. It does rely on the fact that gpu_service_.res
sadrul
2017/04/07 22:57:03
Sounds good. Moved Bind() to happen after the chec
|
| - gpu_channel_manager_->DestroyGpuMemoryBuffer(id, client_id, sync_token); |
| + gpu_channel_manager_->DestroyGpuMemoryBuffer(id, client_id, sync_token); |
| } |
| void GpuService::GetVideoMemoryUsageStats( |
| @@ -246,10 +245,8 @@ void GpuService::GetVideoMemoryUsageStats( |
| return; |
| } |
| gpu::VideoMemoryUsageStats video_memory_usage_stats; |
| - if (gpu_channel_manager_) { |
| - gpu_channel_manager_->gpu_memory_manager()->GetVideoMemoryUsageStats( |
| - &video_memory_usage_stats); |
| - } |
| + gpu_channel_manager_->gpu_memory_manager()->GetVideoMemoryUsageStats( |
| + &video_memory_usage_stats); |
| callback.Run(video_memory_usage_stats); |
| } |
| @@ -384,11 +381,6 @@ void GpuService::EstablishGpuChannel( |
| return; |
| } |
| - if (!gpu_channel_manager_) { |
| - callback.Run(mojo::ScopedMessagePipeHandle()); |
| - return; |
| - } |
| - |
| gpu::GpuChannel* gpu_channel = gpu_channel_manager_->EstablishChannel( |
| client_id, client_tracing_id, is_gpu_host); |
| @@ -407,8 +399,6 @@ void GpuService::CloseChannel(int32_t client_id) { |
| FROM_HERE, base::Bind(&GpuService::CloseChannel, weak_ptr_, client_id)); |
| return; |
| } |
| - if (!gpu_channel_manager_) |
| - return; |
| gpu_channel_manager_->RemoveChannel(client_id); |
| } |
| @@ -418,8 +408,6 @@ void GpuService::LoadedShader(const std::string& data) { |
| FROM_HERE, base::Bind(&GpuService::LoadedShader, weak_ptr_, data)); |
| return; |
| } |
| - if (!gpu_channel_manager_) |
| - return; |
| gpu_channel_manager_->PopulateShaderCache(data); |
| } |
| @@ -449,8 +437,6 @@ void GpuService::WakeUpGpu() { |
| return; |
| } |
| #if defined(OS_ANDROID) |
| - if (!gpu_channel_manager_) |
| - return; |
| gpu_channel_manager_->WakeUpGpu(); |
| #else |
| NOTREACHED() << "WakeUpGpu() not supported on this platform."; |
| @@ -469,8 +455,6 @@ void GpuService::DestroyAllChannels() { |
| FROM_HERE, base::Bind(&GpuService::DestroyAllChannels, weak_ptr_)); |
| return; |
| } |
| - if (!gpu_channel_manager_) |
| - return; |
| DVLOG(1) << "GPU: Removing all contexts"; |
| gpu_channel_manager_->DestroyAllChannels(); |
| } |