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

Side by Side Diff: content/gpu/gpu_memory_buffer_service.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
« no previous file with comments | « content/gpu/gpu_child_thread.cc ('k') | content/gpu/gpu_memory_buffer_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 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_GPU_GPU_MEMORY_BUFFER_SERVICE_H_
6 #define CONTENT_GPU_GPU_MEMORY_BUFFER_SERVICE_H_
7
8 #include "base/memory/scoped_ptr.h"
9 #include "content/gpu/gpu_memory_buffer_service_ipc_transport.h"
10 #include "ipc/message_filter.h"
11
12 namespace content {
13
14 class GpuMemoryBufferFactory;
15 struct CreateGpuMemoryBufferFromHandleParams;
16 struct CreateGpuMemoryBufferParams;
17
18 // Message filter used to to handle GpuMsg_CreateGpuMemoryBuffer messages on
19 // the IO thread. This allows the UI thread in the browser process to remain
20 // fast at all times.
21 class GpuMemoryBufferService
22 : public GpuMemoryBufferServiceIPCTransport::Client {
23 public:
24 explicit GpuMemoryBufferService(
25 GpuMemoryBufferFactory* gpu_memory_buffer_factory);
26
27 GpuMemoryBufferServiceIPCTransport* transport() { return transport_.get(); }
28
29 private:
30 ~GpuMemoryBufferService() override;
31
32 // GpuMemoryBufferServiceIPCTransport::Client:
33 void OnConnectionClosed() override;
34 void OnCreateGpuMemoryBuffer(
35 const CreateGpuMemoryBufferParams& params) override;
36 void OnCreateGpuMemoryBufferFromHandle(
37 const CreateGpuMemoryBufferFromHandleParams& params) override;
38
39 scoped_ptr<GpuMemoryBufferServiceIPCTransport> transport_;
40 GpuMemoryBufferFactory* const gpu_memory_buffer_factory_;
41 };
42
43 } // namespace content
44
45 #endif // CONTENT_GPU_GPU_MEMROY_BUFFER_SERVICE_H_
OLDNEW
« no previous file with comments | « content/gpu/gpu_child_thread.cc ('k') | content/gpu/gpu_memory_buffer_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698