| 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..f1901286b12bb65d41ebba32f4bdf827290907a6 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 supported on this platform.";
|
| +#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
|
|
|