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

Unified Diff: content/common/gpu/gpu_channel_manager.cc

Issue 1451353002: Implement GpuArcVideoService for arc video accelerator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed dcheng's comments Created 4 years, 11 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
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 4dd10273396ee5a9e9f562f335dd1b189267ad39..e478f599e210cdd66c88d44421b5960310e3a37e 100644
--- a/content/common/gpu/gpu_channel_manager.cc
+++ b/content/common/gpu/gpu_channel_manager.cc
@@ -30,6 +30,10 @@
#include "ui/gl/gl_bindings.h"
#include "ui/gl/gl_share_group.h"
+#if defined(OS_CHROMEOS)
+#include "content/common/gpu/media/gpu_arc_video_service.h"
+#endif
+
namespace content {
namespace {
@@ -137,6 +141,10 @@ bool GpuChannelManager::OnControlMessageReceived(const IPC::Message& msg) {
IPC_MESSAGE_HANDLER(GpuMsg_CreateViewCommandBuffer,
OnCreateViewCommandBuffer)
IPC_MESSAGE_HANDLER(GpuMsg_DestroyGpuMemoryBuffer, OnDestroyGpuMemoryBuffer)
+#if defined(OS_CHROMEOS)
+ IPC_MESSAGE_HANDLER(GpuMsg_CreateArcVideoAcceleratorChannel,
+ OnCreateArcVideoAcceleratorChannel)
+#endif
IPC_MESSAGE_HANDLER(GpuMsg_LoadedShader, OnLoadedShader)
IPC_MESSAGE_HANDLER(GpuMsg_UpdateValueState, OnUpdateValueState)
#if defined(OS_ANDROID)
@@ -246,6 +254,28 @@ void GpuChannelManager::OnDestroyGpuMemoryBuffer(
DestroyGpuMemoryBuffer(id, client_id);
}
+#if defined(OS_CHROMEOS)
+void GpuChannelManager::OnCreateArcVideoAcceleratorChannel() {
+ if (!gpu_arc_video_service_) {
+ gpu_arc_video_service_.reset(
+ new GpuArcVideoService(shutdown_event_, io_task_runner_));
+ }
+
+ gpu_arc_video_service_->CreateChannel(
+ base::Bind(&GpuChannelManager::ArcVideoAcceleratorChannelCreated,
+ weak_factory_.GetWeakPtr()));
+}
+
+void GpuChannelManager::ArcVideoAcceleratorChannelCreated(
+ const IPC::ChannelHandle& handle) {
+ Send(new GpuHostMsg_ArcVideoAcceleratorChannelCreated(handle));
+}
+
+void GpuChannelManager::OnShutdownArcVideoService() {
+ gpu_arc_video_service_.reset();
+}
+#endif
+
void GpuChannelManager::OnUpdateValueState(
int client_id, unsigned int target, const gpu::ValueState& state) {
// Only pass updated state to the channel corresponding to the

Powered by Google App Engine
This is Rietveld 408576698