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

Unified Diff: content/common/gpu/client/gpu_channel_host_factory.h

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/gpu_channel_host_factory.h
diff --git a/content/common/gpu/client/gpu_channel_host_factory.h b/content/common/gpu/client/gpu_channel_host_factory.h
new file mode 100644
index 0000000000000000000000000000000000000000..c6f8c6dc3902694e6e877b384a94bf330641ff3e
--- /dev/null
+++ b/content/common/gpu/client/gpu_channel_host_factory.h
@@ -0,0 +1,35 @@
+// Copyright 2015 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.
+
+#ifndef CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_FACTORY_H_
+#define CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_FACTORY_H_
+
+#include "base/memory/ref_counted.h"
+#include "base/memory/scoped_ptr.h"
+#include "base/memory/shared_memory.h"
+#include "base/single_thread_task_runner.h"
+#include "content/common/content_export.h"
+#include "content/common/gpu/gpu_result_codes.h"
+
+namespace content {
+
+struct GpuCreateCommandBufferConfig;
+
+class CONTENT_EXPORT GpuChannelHostFactory {
+ public:
+ virtual ~GpuChannelHostFactory() {}
+
+ virtual bool IsMainThread() = 0;
+ virtual scoped_refptr<base::SingleThreadTaskRunner>
+ GetIOThreadTaskRunner() = 0;
+ virtual scoped_ptr<base::SharedMemory> AllocateSharedMemory(size_t size) = 0;
+ virtual CreateCommandBufferResult CreateViewCommandBuffer(
+ int32_t surface_id,
+ const GpuCreateCommandBufferConfig& init_params,
+ int32_t route_id) = 0;
+};
+
+} // namespace content
+
+#endif // CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_FACTORY_H_
« no previous file with comments | « content/common/gpu/client/gpu_channel_host.cc ('k') | content/common/gpu/client/gpu_jpeg_decode_accelerator_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698