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

Side by Side Diff: ui/ozone/platform/drm/host/drm_display_host_manager.h

Issue 1151533002: drm: Make DrmDisplayHostManager handle VGEM fd by itself. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Don't abuse DrmDeviceHandle Created 5 years, 6 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_HOST_DRM_DISPLAY_HOST_MANAGER_H_ 5 #ifndef UI_OZONE_PLATFORM_DRM_HOST_DRM_DISPLAY_HOST_MANAGER_H_
6 #define UI_OZONE_PLATFORM_DRM_HOST_DRM_DISPLAY_HOST_MANAGER_H_ 6 #define UI_OZONE_PLATFORM_DRM_HOST_DRM_DISPLAY_HOST_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <queue> 9 #include <queue>
10 #include <set> 10 #include <set>
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 DrmGpuPlatformSupportHost* proxy_; // Not owned. 100 DrmGpuPlatformSupportHost* proxy_; // Not owned.
101 DeviceManager* device_manager_; // Not owned. 101 DeviceManager* device_manager_; // Not owned.
102 102
103 DrmNativeDisplayDelegate* delegate_; // Not owned. 103 DrmNativeDisplayDelegate* delegate_; // Not owned.
104 104
105 // File path for the primary graphics card which is opened by default in the 105 // File path for the primary graphics card which is opened by default in the
106 // GPU process. We'll avoid opening this in hotplug events since it will race 106 // GPU process. We'll avoid opening this in hotplug events since it will race
107 // with the GPU process trying to open it and aquire DRM master. 107 // with the GPU process trying to open it and aquire DRM master.
108 base::FilePath primary_graphics_card_path_; 108 base::FilePath primary_graphics_card_path_;
109 109
110 // File path for virtual gem device.
111 base::FilePath vgem_card_path_;
112
110 // Keeps track if there is a dummy display. This happens on initialization 113 // Keeps track if there is a dummy display. This happens on initialization
111 // when there is no connection to the GPU to update the displays. 114 // when there is no connection to the GPU to update the displays.
112 bool has_dummy_display_; 115 bool has_dummy_display_;
113 116
114 ScopedVector<DisplaySnapshot> displays_; 117 ScopedVector<DisplaySnapshot> displays_;
115 118
116 GetDisplaysCallback get_displays_callback_; 119 GetDisplaysCallback get_displays_callback_;
117 120
118 // Map between display_id and the configuration callback. 121 // Map between display_id and the configuration callback.
119 std::map<int64_t, ConfigureCallback> configure_callback_map_; 122 std::map<int64_t, ConfigureCallback> configure_callback_map_;
(...skipping 11 matching lines...) Expand all
131 // True if a display event is currently being processed on a worker thread. 134 // True if a display event is currently being processed on a worker thread.
132 bool task_pending_; 135 bool task_pending_;
133 136
134 // Keeps track of all the active DRM devices. 137 // Keeps track of all the active DRM devices.
135 std::set<base::FilePath> drm_devices_; 138 std::set<base::FilePath> drm_devices_;
136 139
137 // This is used to cache the primary DRM device until the channel is 140 // This is used to cache the primary DRM device until the channel is
138 // established. 141 // established.
139 scoped_ptr<DrmDeviceHandle> primary_drm_device_handle_; 142 scoped_ptr<DrmDeviceHandle> primary_drm_device_handle_;
140 143
144 // Manages the VGEM device by itself and doesn't send it to GPU process.
145 base::File vgem_card_device_file_;
146
141 base::WeakPtrFactory<DrmDisplayHostManager> weak_ptr_factory_; 147 base::WeakPtrFactory<DrmDisplayHostManager> weak_ptr_factory_;
142 148
143 DISALLOW_COPY_AND_ASSIGN(DrmDisplayHostManager); 149 DISALLOW_COPY_AND_ASSIGN(DrmDisplayHostManager);
144 }; 150 };
145 151
146 } // namespace ui 152 } // namespace ui
147 153
148 #endif // UI_OZONE_PLATFORM_DRM_HOST_DRM_DISPLAY_HOST_MANAGER_H_ 154 #endif // UI_OZONE_PLATFORM_DRM_HOST_DRM_DISPLAY_HOST_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698