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

Unified Diff: components/arc/arc_bridge_service.cc

Issue 1451353002: Implement GpuArcVideoService for arc video accelerator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use GpuProcessHost instead of GpuChannelHost Created 5 years, 1 month 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: components/arc/arc_bridge_service.cc
diff --git a/components/arc/arc_bridge_service.cc b/components/arc/arc_bridge_service.cc
index 6565416c8a57115ecc3142bb9a2b7ccb591a010d..57434a569838bc420cde1e2abc0ff8f25b8228d0 100644
--- a/components/arc/arc_bridge_service.cc
+++ b/components/arc/arc_bridge_service.cc
@@ -134,6 +134,18 @@ bool ArcBridgeService::RegisterInputDevice(const std::string& name,
name, device_type, base::FileDescriptor(fd.Pass())));
}
+bool ArcBridgeService::NotifyVideoAcceleratorConnectionCreated(
+ IPC::ChannelHandle handle) {
+ DCHECK(origin_task_runner_->RunsTasksOnCurrentThread());
+ if (state_ != State::READY) {
+ LOG(ERROR) << "Called NotifyVideoAcceleratorConnectionCreated when the "
+ "service is not ready";
+ return false;
+ }
+ return ipc_channel_->Send(
+ new ArcInstanceMsg_NotifyVideoAcceleratorConnecitonCreated(handle));
+}
+
void ArcBridgeService::SocketConnect(const base::FilePath& socket_path) {
DCHECK(origin_task_runner_->RunsTasksOnCurrentThread());
if (state_ != State::STOPPED) {
@@ -240,6 +252,11 @@ void ArcBridgeService::OnInstanceReady() {
SetState(State::READY);
}
+void ArcBridgeService::OnCreateArcVideoAcceleratorConnection() {
+ FOR_EACH_OBSERVER(Observer, observer_list_,
+ OnCreateArcVideoAcceleratorConnection());
+}
+
void ArcBridgeService::SetState(State state) {
DCHECK(origin_task_runner_->RunsTasksOnCurrentThread());
// DCHECK on enum classes not supported.
@@ -254,6 +271,8 @@ bool ArcBridgeService::OnMessageReceived(const IPC::Message& message) {
IPC_BEGIN_MESSAGE_MAP(ArcBridgeService, message)
IPC_MESSAGE_HANDLER(ArcInstanceHostMsg_InstanceReady, OnInstanceReady)
+ IPC_MESSAGE_HANDLER(ArcInstanceHostMsg_CreateArcVideoAcceleratorConnection,
+ OnCreateArcVideoAcceleratorConnection)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()

Powered by Google App Engine
This is Rietveld 408576698