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

Side by Side Diff: ui/ozone/platform/drm/ozone_platform_gbm.cc

Issue 2844023002: Ozone DRM: Destroy MusThreadProxy last. (Closed)
Patch Set: Created 3 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 | « ui/ozone/platform/drm/host/drm_display_host_manager.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "ui/ozone/platform/drm/ozone_platform_gbm.h" 5 #include "ui/ozone/platform/drm/ozone_platform_gbm.h"
6 6
7 #include <dlfcn.h> 7 #include <dlfcn.h>
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #include <gbm.h> 9 #include <gbm.h>
10 #include <stdlib.h> 10 #include <stdlib.h>
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 } 232 }
233 for (auto& request : pending_cursor_requests_) 233 for (auto& request : pending_cursor_requests_)
234 drm_thread_proxy_->AddBinding(std::move(request)); 234 drm_thread_proxy_->AddBinding(std::move(request));
235 pending_cursor_requests_.clear(); 235 pending_cursor_requests_.clear();
236 } 236 }
237 237
238 private: 238 private:
239 bool using_mojo_; 239 bool using_mojo_;
240 bool single_process_; 240 bool single_process_;
241 241
242 // Bridges the DRM, GPU and main threads in mus. This must be destroyed last.
243 std::unique_ptr<MusThreadProxy> mus_thread_proxy_;
244
242 // Objects in the GPU process. 245 // Objects in the GPU process.
243 std::unique_ptr<DrmThreadProxy> drm_thread_proxy_; 246 std::unique_ptr<DrmThreadProxy> drm_thread_proxy_;
244 std::unique_ptr<GlApiLoader> gl_api_loader_; 247 std::unique_ptr<GlApiLoader> gl_api_loader_;
245 std::unique_ptr<GbmSurfaceFactory> surface_factory_; 248 std::unique_ptr<GbmSurfaceFactory> surface_factory_;
246 scoped_refptr<IPC::MessageFilter> gpu_message_filter_; 249 scoped_refptr<IPC::MessageFilter> gpu_message_filter_;
247 // TODO(sad): Once the mus gpu process split happens, this can go away. 250 // TODO(sad): Once the mus gpu process split happens, this can go away.
248 std::vector<ozone::mojom::DeviceCursorRequest> pending_cursor_requests_; 251 std::vector<ozone::mojom::DeviceCursorRequest> pending_cursor_requests_;
249 252
250 // Objects in the Browser process. 253 // Objects in the Browser process.
251 std::unique_ptr<DeviceManager> device_manager_; 254 std::unique_ptr<DeviceManager> device_manager_;
252 std::unique_ptr<BitmapCursorFactoryOzone> cursor_factory_ozone_; 255 std::unique_ptr<BitmapCursorFactoryOzone> cursor_factory_ozone_;
253 std::unique_ptr<DrmWindowHostManager> window_manager_; 256 std::unique_ptr<DrmWindowHostManager> window_manager_;
254 std::unique_ptr<DrmCursor> cursor_; 257 std::unique_ptr<DrmCursor> cursor_;
255 std::unique_ptr<EventFactoryEvdev> event_factory_ozone_; 258 std::unique_ptr<EventFactoryEvdev> event_factory_ozone_;
256 std::unique_ptr<DrmGpuPlatformSupportHost> gpu_platform_support_host_; 259 std::unique_ptr<DrmGpuPlatformSupportHost> gpu_platform_support_host_;
257 std::unique_ptr<DrmDisplayHostManager> display_manager_; 260 std::unique_ptr<DrmDisplayHostManager> display_manager_;
258 std::unique_ptr<DrmOverlayManager> overlay_manager_; 261 std::unique_ptr<DrmOverlayManager> overlay_manager_;
259 262
260 // Bridges the DRM, GPU and main threads in mus.
261 std::unique_ptr<MusThreadProxy> mus_thread_proxy_;
262
263 #if BUILDFLAG(USE_XKBCOMMON) 263 #if BUILDFLAG(USE_XKBCOMMON)
264 XkbEvdevCodes xkb_evdev_code_converter_; 264 XkbEvdevCodes xkb_evdev_code_converter_;
265 #endif 265 #endif
266 266
267 DISALLOW_COPY_AND_ASSIGN(OzonePlatformGbm); 267 DISALLOW_COPY_AND_ASSIGN(OzonePlatformGbm);
268 }; 268 };
269 269
270 } // namespace 270 } // namespace
271 271
272 OzonePlatform* CreateOzonePlatformGbm() { 272 OzonePlatform* CreateOzonePlatformGbm() {
273 return new OzonePlatformGbm; 273 return new OzonePlatformGbm;
274 } 274 }
275 275
276 } // namespace ui 276 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/drm/host/drm_display_host_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698