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

Side by Side Diff: content/common/gpu/client/ipc/gpu_channel_host_ipc_transport.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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_IPC_TRANSPORT_H_
6 #define CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_IPC_TRANSPORT_H_
7
8 #include <stdint.h>
9
10 #include <vector>
11
12 #include "base/memory/shared_memory_handle.h"
13 #include "content/common/gpu/gpu_result_codes.h"
14 #include "ui/events/latency_info.h"
15
16 namespace gfx {
17 class Size;
18 }
19
20 namespace content {
21
22 class CommandBufferIPCTransport;
23 class GpuJpegDecodeAcceleratorHostIPCTransport;
24 struct GpuCreateCommandBufferConfig;
25
26 class GpuChannelHostIPCTransport {
27 public:
28 virtual ~GpuChannelHostIPCTransport() {}
29
30 virtual bool AsyncFlush(CommandBufferIPCTransport* transport,
31 int32_t put_offset,
32 uint32_t flush_count,
33 const std::vector<ui::LatencyInfo>& latency_info) = 0;
34
35 virtual bool CreateJpegDecoder(
36 GpuJpegDecodeAcceleratorHostIPCTransport* jpeg_decode_transport,
37 bool* succeeded) = 0;
38
39 virtual bool CreateViewCommandBuffer(
40 uint32_t surface_id,
41 const GpuCreateCommandBufferConfig& init_params,
42 CommandBufferIPCTransport* command_buffer_transport,
43 CreateCommandBufferResult* result) = 0;
44
45 virtual bool CreateOffscreenCommandBuffer(
46 const gfx::Size& size,
47 const GpuCreateCommandBufferConfig& init_params,
48 CommandBufferIPCTransport* command_buffer_transport,
49 bool* succeeded) = 0;
50
51 virtual bool DestroyCommandBuffer(
52 CommandBufferIPCTransport* command_buffer_transport) = 0;
53
54 virtual bool IsLost() const = 0;
55
56 // TODO(fsamuel): This is not currently Mojo compatible.
57 virtual base::SharedMemoryHandle ShareToGpuProcess(
58 const base::SharedMemoryHandle& source_handle) = 0;
59
60 virtual bool Nop() = 0;
61 };
62
63 } // namespace content
64
65 #endif // CONTENT_COMMON_GPU_GPU_CHANNEL_HOST_IPC_TRANSPORT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698