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

Side by Side Diff: chrome/gpu/gpu_arc_video_service.h

Issue 2513973002: Use mojo typemap to simplify the code using DmabufPlane (Closed)
Patch Set: Addressed comments Created 4 years 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
« no previous file with comments | « chrome/gpu/arc_video_accelerator.h ('k') | chrome/gpu/gpu_arc_video_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_GPU_GPU_ARC_VIDEO_SERVICE_H_ 5 #ifndef CHROME_GPU_GPU_ARC_VIDEO_SERVICE_H_
6 #define CHROME_GPU_GPU_ARC_VIDEO_SERVICE_H_ 6 #define CHROME_GPU_GPU_ARC_VIDEO_SERVICE_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/files/scoped_file.h" 11 #include "base/files/scoped_file.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "chrome/gpu/arc_video_accelerator.h" 13 #include "chrome/gpu/arc_video_accelerator.h"
14 #include "components/arc/common/video_accelerator.mojom.h" 14 #include "components/arc/common/video_accelerator.mojom.h"
15 #include "components/arc/video_accelerator/video_accelerator.h"
15 #include "gpu/command_buffer/service/gpu_preferences.h" 16 #include "gpu/command_buffer/service/gpu_preferences.h"
16 17
17 namespace chromeos { 18 namespace chromeos {
18 namespace arc { 19 namespace arc {
19 20
20 // GpuArcVideoService manages life-cycle and IPC message translation for 21 // GpuArcVideoService manages life-cycle and IPC message translation for
21 // ArcVideoAccelerator. 22 // ArcVideoAccelerator.
22 // 23 //
23 // For each creation request from GpuArcVideoServiceHost, GpuArcVideoService 24 // For each creation request from GpuArcVideoServiceHost, GpuArcVideoService
24 // will create a new IPC channel. 25 // will create a new IPC channel.
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 mojo::ScopedHandle ashmem_handle, 57 mojo::ScopedHandle ashmem_handle,
57 uint32_t offset, 58 uint32_t offset,
58 uint32_t length) override; 59 uint32_t length) override;
59 void DeprecatedBindDmabuf(::arc::mojom::PortType port, 60 void DeprecatedBindDmabuf(::arc::mojom::PortType port,
60 uint32_t index, 61 uint32_t index,
61 mojo::ScopedHandle dmabuf_handle, 62 mojo::ScopedHandle dmabuf_handle,
62 int32_t stride) override; 63 int32_t stride) override;
63 void BindDmabuf(::arc::mojom::PortType port, 64 void BindDmabuf(::arc::mojom::PortType port,
64 uint32_t index, 65 uint32_t index,
65 mojo::ScopedHandle dmabuf_handle, 66 mojo::ScopedHandle dmabuf_handle,
66 std::vector<::arc::mojom::ArcVideoAcceleratorDmabufPlanePtr> 67 std::vector<::arc::ArcVideoAcceleratorDmabufPlane>
67 dmabuf_planes) override; 68 dmabuf_planes) override;
68 void UseBuffer(::arc::mojom::PortType port, 69 void UseBuffer(::arc::mojom::PortType port,
69 uint32_t index, 70 uint32_t index,
70 ::arc::mojom::BufferMetadataPtr metadata) override; 71 ::arc::mojom::BufferMetadataPtr metadata) override;
71 void SetNumberOfOutputBuffers(uint32_t number) override; 72 void SetNumberOfOutputBuffers(uint32_t number) override;
72 void Flush() override; 73 void Flush() override;
73 void Reset() override; 74 void Reset() override;
74 75
75 base::ScopedFD UnwrapFdFromMojoHandle(mojo::ScopedHandle handle); 76 base::ScopedFD UnwrapFdFromMojoHandle(mojo::ScopedHandle handle);
76 77
77 base::ThreadChecker thread_checker_; 78 base::ThreadChecker thread_checker_;
78 79
79 gpu::GpuPreferences gpu_preferences_; 80 gpu::GpuPreferences gpu_preferences_;
80 std::unique_ptr<ArcVideoAccelerator> accelerator_; 81 std::unique_ptr<ArcVideoAccelerator> accelerator_;
81 ::arc::mojom::VideoAcceleratorServiceClientPtr client_; 82 ::arc::mojom::VideoAcceleratorServiceClientPtr client_;
82 83
83 DISALLOW_COPY_AND_ASSIGN(GpuArcVideoService); 84 DISALLOW_COPY_AND_ASSIGN(GpuArcVideoService);
84 }; 85 };
85 86
86 } // namespace arc 87 } // namespace arc
87 } // namespace chromeos 88 } // namespace chromeos
88 89
89 #endif // CHROME_GPU_GPU_ARC_VIDEO_SERVICE_H_ 90 #endif // CHROME_GPU_GPU_ARC_VIDEO_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/gpu/arc_video_accelerator.h ('k') | chrome/gpu/gpu_arc_video_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698