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

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

Issue 1641353003: GpuArcVideoService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@arc-4-owen-ArcGpuVideoDecodeAccelerator
Patch Set: fix build Created 4 years, 8 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
« no previous file with comments | « chrome/gpu/chrome_content_gpu_client.cc ('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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_GPU_GPU_ARC_VIDEO_SERVICE_H_
6 #define CHROME_GPU_GPU_ARC_VIDEO_SERVICE_H_
7
8 #include <map>
9 #include <memory>
10
11 #include "base/macros.h"
12 #include "components/arc/common/video.mojom.h"
13 #include "mojo/public/cpp/bindings/strong_binding.h"
14
15 namespace chromeos {
16 namespace arc {
17
18 // GpuArcVideoService manages life-cycle and IPC message translation for
19 // ArcVideoAccelerator.
20 //
21 // For each creation request from GpuArcVideoServiceHost, GpuArcVideoService
22 // will create a new IPC channel.
23 class GpuArcVideoService : public ::arc::VideoHost {
24 public:
25 class AcceleratorStub;
26
27 // |request| is mojo interface request of arc::VideoHost.
28 explicit GpuArcVideoService(mojo::InterfaceRequest<::arc::VideoHost> request);
29
30 // Upon deletion, all ArcVideoAccelerator will be deleted and the associated
31 // IPC channels are closed.
32 ~GpuArcVideoService() override;
33
34 // Removes the reference of |stub| (and trigger deletion) from this class.
35 void RemoveClient(AcceleratorStub* stub);
36
37 private:
38 // arc::VideoHost implementation.
39 void OnRequestArcVideoAcceleratorChannel(
40 const OnRequestArcVideoAcceleratorChannelCallback& callback) override;
41
42 base::ThreadChecker thread_checker_;
43
44 // Binding of arc::VideoHost. It also takes ownership of |this|.
45 mojo::StrongBinding<::arc::VideoHost> binding_;
46
47 // Bookkeeping all accelerator stubs.
48 std::map<AcceleratorStub*, std::unique_ptr<AcceleratorStub>>
49 accelerator_stubs_;
50
51 DISALLOW_COPY_AND_ASSIGN(GpuArcVideoService);
52 };
53
54 } // namespace arc
55 } // namespace chromeos
56
57 #endif // CHROME_GPU_GPU_ARC_VIDEO_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/gpu/chrome_content_gpu_client.cc ('k') | chrome/gpu/gpu_arc_video_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698