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

Unified Diff: services/ui/gpu/gpu_service.cc

Issue 2723163002: gpu: Replace more chrome ipc with mojom api. (Closed)
Patch Set: . Created 3 years, 10 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
« no previous file with comments | « services/ui/gpu/gpu_service.h ('k') | services/ui/gpu/interfaces/gpu_service.mojom » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « services/ui/gpu/gpu_service.h ('k') | services/ui/gpu/interfaces/gpu_service.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698