OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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 UI_OZONE_PLATFORM_DRM_GPU_DRM_THREAD_PROXY_H_ | 5 #ifndef UI_OZONE_PLATFORM_DRM_GPU_DRM_THREAD_PROXY_H_ |
6 #define UI_OZONE_PLATFORM_DRM_GPU_DRM_THREAD_PROXY_H_ | 6 #define UI_OZONE_PLATFORM_DRM_GPU_DRM_THREAD_PROXY_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "ui/ozone/platform/drm/gpu/drm_thread.h" | 12 #include "ui/ozone/platform/drm/gpu/drm_thread.h" |
| 13 #include "ui/ozone/public/interfaces/device_cursor.mojom.h" |
| 14 |
| 15 namespace shell { |
| 16 class Connection; |
| 17 } |
13 | 18 |
14 namespace ui { | 19 namespace ui { |
15 | 20 |
16 class DrmWindowProxy; | 21 class DrmWindowProxy; |
17 class InterThreadMessagingProxy; | 22 class InterThreadMessagingProxy; |
18 | 23 |
19 // Mediates the communication between GPU main/IO threads and the DRM thread. It | 24 // Mediates the communication between GPU main/IO threads and the DRM thread. It |
20 // serves proxy objects that are safe to call on the GPU threads. The proxy | 25 // serves proxy objects that are safe to call on the GPU threads. The proxy |
21 // objects then deal with safely posting the messages to the DRM thread. | 26 // objects then deal with safely posting the messages to the DRM thread. |
22 class DrmThreadProxy { | 27 class DrmThreadProxy { |
(...skipping 14 matching lines...) Expand all Loading... |
37 scoped_refptr<GbmBuffer> CreateBufferFromFds( | 42 scoped_refptr<GbmBuffer> CreateBufferFromFds( |
38 gfx::AcceleratedWidget widget, | 43 gfx::AcceleratedWidget widget, |
39 const gfx::Size& size, | 44 const gfx::Size& size, |
40 gfx::BufferFormat format, | 45 gfx::BufferFormat format, |
41 std::vector<base::ScopedFD>&& fds, | 46 std::vector<base::ScopedFD>&& fds, |
42 const std::vector<gfx::NativePixmapPlane>& planes); | 47 const std::vector<gfx::NativePixmapPlane>& planes); |
43 | 48 |
44 void GetScanoutFormats(gfx::AcceleratedWidget widget, | 49 void GetScanoutFormats(gfx::AcceleratedWidget widget, |
45 std::vector<gfx::BufferFormat>* scanout_formats); | 50 std::vector<gfx::BufferFormat>* scanout_formats); |
46 | 51 |
| 52 void AddBinding(ozone::mojom::DeviceCursorRequest request); |
| 53 |
47 private: | 54 private: |
48 DrmThread drm_thread_; | 55 DrmThread drm_thread_; |
49 | 56 |
50 DISALLOW_COPY_AND_ASSIGN(DrmThreadProxy); | 57 DISALLOW_COPY_AND_ASSIGN(DrmThreadProxy); |
51 }; | 58 }; |
52 | 59 |
53 } // namespace ui | 60 } // namespace ui |
54 | 61 |
55 #endif // UI_OZONE_PLATFORM_DRM_GPU_DRM_THREAD_PROXY_H_ | 62 #endif // UI_OZONE_PLATFORM_DRM_GPU_DRM_THREAD_PROXY_H_ |
OLD | NEW |