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

Unified Diff: content/common/gpu/client/ipc/gpu_host_ipc_transport_factory_impl.cc

Issue 1656433002: Sample code: IPC Transport object for GPU Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: GpuMemoryBufferService + Transport object. TODO: Eliminate ChildThreadImpl dependency Created 4 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
Index: content/common/gpu/client/ipc/gpu_host_ipc_transport_factory_impl.cc
diff --git a/content/common/gpu/client/ipc/gpu_host_ipc_transport_factory_impl.cc b/content/common/gpu/client/ipc/gpu_host_ipc_transport_factory_impl.cc
new file mode 100644
index 0000000000000000000000000000000000000000..4c693fc28c778fed51a2c8e9e892e70eea34aa5d
--- /dev/null
+++ b/content/common/gpu/client/ipc/gpu_host_ipc_transport_factory_impl.cc
@@ -0,0 +1,49 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "content/common/gpu/client/ipc/gpu_host_ipc_transport_factory_impl.h"
+
+#include "content/common/gpu/client/ipc/chrome/chrome_command_buffer_ipc_transport.h"
+#include "content/common/gpu/client/ipc/chrome/chrome_gpu_channel_host_ipc_transport.h"
+#include "content/common/gpu/client/ipc/chrome/chrome_gpu_jpeg_decode_accelerator_host_ipc_transport.h"
+#include "content/common/gpu/client/ipc/chrome/chrome_gpu_video_decode_accelerator_host_ipc_transport.h"
+#include "content/common/gpu/client/ipc/chrome/chrome_gpu_video_encode_accelerator_host_ipc_transport.h"
+
+namespace content {
+
+GpuHostIPCTransportFactoryImpl::GpuHostIPCTransportFactoryImpl() {
+ DCHECK(!factory_);
+ factory_ = this;
+}
+
+GpuHostIPCTransportFactoryImpl::~GpuHostIPCTransportFactoryImpl() {
+ factory_ = nullptr;
+}
+
+scoped_ptr<CommandBufferIPCTransport>
+GpuHostIPCTransportFactoryImpl::CreateCommandBufferIPCTransport() {
+ return ChromeCommandBufferIPCTransport::Create();
+}
+
+scoped_ptr<GpuChannelHostIPCTransport>
+GpuHostIPCTransportFactoryImpl::CreateGpuChannelHostIPCTransport() {
+ return ChromeGpuChannelHostIPCTransport::Create();
+}
+
+scoped_ptr<GpuJpegDecodeAcceleratorHostIPCTransport>
+GpuHostIPCTransportFactoryImpl::CreateJpegDecodeAcceleratorHostIPCTransport() {
+ return ChromeGpuJpegDecodeAcceleratorHostIPCTransport::Create();
+}
+
+scoped_ptr<GpuVideoDecodeAcceleratorHostIPCTransport>
+GpuHostIPCTransportFactoryImpl::CreateVideoDecodeAcceleratorHostIPCTransport() {
+ return ChromeGpuVideoDecodeAcceleratorHostIPCTransport::Create();
+}
+
+scoped_ptr<GpuVideoEncodeAcceleratorHostIPCTransport>
+GpuHostIPCTransportFactoryImpl::CreateVideoEncodeAcceleratorHostIPCTransport() {
+ return ChromeGpuVideoEncodeAcceleratorHostIPCTransport::Create();
+}
+
+} // namespace content

Powered by Google App Engine
This is Rietveld 408576698