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

Side by Side Diff: content/browser/gpu/gpu_client.h

Issue 2514923002: content: Use mus client-lib's gpu-service from renderers. (Closed)
Patch Set: . 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 | « content/browser/BUILD.gn ('k') | content/browser/gpu/gpu_client.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 CONTENT_BROWSER_GPU_GPU_CLIENT_H_
6 #define CONTENT_BROWSER_GPU_GPU_CLIENT_H_
7
8 #include "base/memory/weak_ptr.h"
9 #include "ipc/ipc_channel_handle.h"
10 #include "mojo/public/cpp/bindings/binding_set.h"
11 #include "services/ui/public/interfaces/gpu.mojom.h"
12
13 namespace content {
14
15 class GpuClient : public ui::mojom::Gpu {
16 public:
17 explicit GpuClient(int render_process_id);
18 ~GpuClient() override;
19
20 void Add(ui::mojom::GpuRequest request);
21
22 private:
23 void OnError();
24 void OnEstablishGpuChannel(const EstablishGpuChannelCallback& callback,
25 const IPC::ChannelHandle& channel,
26 const gpu::GPUInfo& gpu_info);
27 void OnCreateGpuMemoryBuffer(const CreateGpuMemoryBufferCallback& callback,
28 const gfx::GpuMemoryBufferHandle& handle);
29
30 // ui::mojom::Gpu overrides:
31 void EstablishGpuChannel(
32 const EstablishGpuChannelCallback& callback) override;
33 void CreateGpuMemoryBuffer(
34 gfx::GpuMemoryBufferId id,
35 const gfx::Size& size,
36 gfx::BufferFormat format,
37 gfx::BufferUsage usage,
38 const ui::mojom::Gpu::CreateGpuMemoryBufferCallback& callback) override;
39 void DestroyGpuMemoryBuffer(gfx::GpuMemoryBufferId id,
40 const gpu::SyncToken& sync_token) override;
41
42 const int render_process_id_;
43 mojo::BindingSet<ui::mojom::Gpu> bindings_;
44 base::WeakPtrFactory<GpuClient> weak_factory_;
45
46 DISALLOW_COPY_AND_ASSIGN(GpuClient);
47 };
48
49 } // namespace content
50
51 #endif // CONTENT_BROWSER_GPU_GPU_CLIENT_H_
OLDNEW
« no previous file with comments | « content/browser/BUILD.gn ('k') | content/browser/gpu/gpu_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698