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 c0e224eae456aa9f08042ec1ce96d7f701213a35..bbddc6becacc6a004457900fdd8c72d3795d4216 100644 |
| --- a/services/ui/gpu/gpu_service.cc |
| +++ b/services/ui/gpu/gpu_service.cc |
| @@ -35,6 +35,10 @@ |
| #include "ui/gl/init/gl_factory.h" |
| #include "url/gurl.h" |
| +#if defined(OS_ANDROID) |
| +#include "media/gpu/avda_codec_allocator.h" |
| +#endif |
| + |
| namespace ui { |
| GpuService::GpuService(const gpu::GPUInfo& gpu_info, |
| @@ -199,4 +203,37 @@ void GpuService::EstablishGpuChannel( |
| callback.Run(std::move(channel_handle)); |
| } |
| +void GpuService::CloseChannel(int32_t client_id) { |
| + if (!gpu_channel_manager_) |
| + return; |
| + gpu_channel_manager_->RemoveChannel(client_id); |
| +} |
| + |
| +void GpuService::LoadedShader(const std::string& data) { |
| + if (!gpu_channel_manager_) |
| + return; |
| + gpu_channel_manager_->PopulateShaderCache(data); |
| +} |
| + |
| +void GpuService::DestroyingVideoSurface( |
| + int32_t surface_id, |
| + const DestroyingVideoSurfaceCallback& callback) { |
| +#if defined(OS_ANDROID) |
| + media::AVDACodecAllocator::Instance()->OnSurfaceDestroyed(surface_id); |
| +#else |
| + NOTREACHED() << "DestroyingVideoSurface() not supoprted on this platform."; |
|
jbauman
2017/03/01 22:44:25
"supported"
sadrul
2017/03/02 00:34:28
Done.
|
| +#endif |
| + callback.Run(); |
| +} |
| + |
| +void GpuService::WakeUpGpu() { |
| +#if defined(OS_ANDROID) |
| + if (!gpu_channel_manager_) |
| + return; |
| + gpu_channel_manager_->WakeUpGpu(); |
| +#else |
| + NOTREACHED() << "WakeUpGpu() not supported on this platform."; |
| +#endif |
| +} |
| + |
| } // namespace ui |