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

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

Issue 1141243002: [Ozone-Drm] Remove GPU lock (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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/gpu/gpu_lock.cc ('k') | ui/ozone/platform/drm/ozone_platform_gbm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_drm.h" 5 #include "ui/ozone/platform/drm/ozone_platform_drm.h"
6 6
7 #include "base/at_exit.h" 7 #include "base/at_exit.h"
8 #include "base/thread_task_runner_handle.h" 8 #include "base/thread_task_runner_handle.h"
9 #include "ui/base/cursor/ozone/bitmap_cursor_factory_ozone.h" 9 #include "ui/base/cursor/ozone/bitmap_cursor_factory_ozone.h"
10 #include "ui/events/ozone/device/device_manager.h" 10 #include "ui/events/ozone/device/device_manager.h"
11 #include "ui/events/ozone/evdev/cursor_delegate_evdev.h" 11 #include "ui/events/ozone/evdev/cursor_delegate_evdev.h"
12 #include "ui/events/ozone/evdev/event_factory_evdev.h" 12 #include "ui/events/ozone/evdev/event_factory_evdev.h"
13 #include "ui/events/ozone/layout/keyboard_layout_engine_manager.h" 13 #include "ui/events/ozone/layout/keyboard_layout_engine_manager.h"
14 #include "ui/ozone/platform/drm/common/drm_util.h" 14 #include "ui/ozone/platform/drm/common/drm_util.h"
15 #include "ui/ozone/platform/drm/drm_surface_factory.h" 15 #include "ui/ozone/platform/drm/drm_surface_factory.h"
16 #include "ui/ozone/platform/drm/gpu/drm_buffer.h" 16 #include "ui/ozone/platform/drm/gpu/drm_buffer.h"
17 #include "ui/ozone/platform/drm/gpu/drm_device.h" 17 #include "ui/ozone/platform/drm/gpu/drm_device.h"
18 #include "ui/ozone/platform/drm/gpu/drm_device_generator.h" 18 #include "ui/ozone/platform/drm/gpu/drm_device_generator.h"
19 #include "ui/ozone/platform/drm/gpu/drm_device_manager.h" 19 #include "ui/ozone/platform/drm/gpu/drm_device_manager.h"
20 #include "ui/ozone/platform/drm/gpu/drm_gpu_display_manager.h" 20 #include "ui/ozone/platform/drm/gpu/drm_gpu_display_manager.h"
21 #include "ui/ozone/platform/drm/gpu/drm_gpu_platform_support.h" 21 #include "ui/ozone/platform/drm/gpu/drm_gpu_platform_support.h"
22 #include "ui/ozone/platform/drm/gpu/drm_window.h" 22 #include "ui/ozone/platform/drm/gpu/drm_window.h"
23 #include "ui/ozone/platform/drm/gpu/gpu_lock.h"
24 #include "ui/ozone/platform/drm/gpu/screen_manager.h" 23 #include "ui/ozone/platform/drm/gpu/screen_manager.h"
25 #include "ui/ozone/platform/drm/host/drm_cursor.h" 24 #include "ui/ozone/platform/drm/host/drm_cursor.h"
26 #include "ui/ozone/platform/drm/host/drm_display_host_manager.h" 25 #include "ui/ozone/platform/drm/host/drm_display_host_manager.h"
27 #include "ui/ozone/platform/drm/host/drm_gpu_platform_support_host.h" 26 #include "ui/ozone/platform/drm/host/drm_gpu_platform_support_host.h"
28 #include "ui/ozone/platform/drm/host/drm_native_display_delegate.h" 27 #include "ui/ozone/platform/drm/host/drm_native_display_delegate.h"
29 #include "ui/ozone/platform/drm/host/drm_window_host.h" 28 #include "ui/ozone/platform/drm/host/drm_window_host.h"
30 #include "ui/ozone/platform/drm/host/drm_window_host_manager.h" 29 #include "ui/ozone/platform/drm/host/drm_window_host_manager.h"
31 #include "ui/ozone/public/ozone_gpu_test_helper.h" 30 #include "ui/ozone/public/ozone_gpu_test_helper.h"
32 #include "ui/ozone/public/ozone_platform.h" 31 #include "ui/ozone/public/ozone_platform.h"
33 32
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 event_factory_ozone_.get(), cursor_.get(), 80 event_factory_ozone_.get(), cursor_.get(),
82 window_manager_.get(), display_manager_.get())); 81 window_manager_.get(), display_manager_.get()));
83 platform_window->Initialize(); 82 platform_window->Initialize();
84 return platform_window.Pass(); 83 return platform_window.Pass();
85 } 84 }
86 scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate() override { 85 scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate() override {
87 return make_scoped_ptr( 86 return make_scoped_ptr(
88 new DrmNativeDisplayDelegate(display_manager_.get())); 87 new DrmNativeDisplayDelegate(display_manager_.get()));
89 } 88 }
90 void InitializeUI() override { 89 void InitializeUI() override {
91 #if defined(OS_CHROMEOS)
92 gpu_lock_.reset(new GpuLock());
93 #endif
94 drm_device_manager_.reset(new DrmDeviceManager( 90 drm_device_manager_.reset(new DrmDeviceManager(
95 scoped_ptr<DrmDeviceGenerator>(new DrmDeviceGenerator()))); 91 scoped_ptr<DrmDeviceGenerator>(new DrmDeviceGenerator())));
96 window_manager_.reset(new DrmWindowHostManager()); 92 window_manager_.reset(new DrmWindowHostManager());
97 cursor_.reset(new DrmCursor(window_manager_.get())); 93 cursor_.reset(new DrmCursor(window_manager_.get()));
98 surface_factory_ozone_.reset(new DrmSurfaceFactory(screen_manager_.get())); 94 surface_factory_ozone_.reset(new DrmSurfaceFactory(screen_manager_.get()));
99 scoped_ptr<DrmGpuDisplayManager> ndd(new DrmGpuDisplayManager( 95 scoped_ptr<DrmGpuDisplayManager> ndd(new DrmGpuDisplayManager(
100 screen_manager_.get(), drm_device_manager_.get())); 96 screen_manager_.get(), drm_device_manager_.get()));
101 gpu_platform_support_.reset(new DrmGpuPlatformSupport( 97 gpu_platform_support_.reset(new DrmGpuPlatformSupport(
102 drm_device_manager_.get(), screen_manager_.get(), ndd.Pass())); 98 drm_device_manager_.get(), screen_manager_.get(), ndd.Pass()));
103 gpu_platform_support_host_.reset( 99 gpu_platform_support_host_.reset(
(...skipping 14 matching lines...) Expand all
118 114
119 if (!gpu_helper_.Initialize(base::ThreadTaskRunnerHandle::Get(), 115 if (!gpu_helper_.Initialize(base::ThreadTaskRunnerHandle::Get(),
120 base::ThreadTaskRunnerHandle::Get())) 116 base::ThreadTaskRunnerHandle::Get()))
121 LOG(FATAL) << "Failed to initialize dummy channel."; 117 LOG(FATAL) << "Failed to initialize dummy channel.";
122 } 118 }
123 119
124 void InitializeGPU() override {} 120 void InitializeGPU() override {}
125 121
126 private: 122 private:
127 // Objects in the "GPU" process. 123 // Objects in the "GPU" process.
128 scoped_ptr<GpuLock> gpu_lock_;
129 scoped_ptr<DrmDeviceManager> drm_device_manager_; 124 scoped_ptr<DrmDeviceManager> drm_device_manager_;
130 scoped_ptr<DrmBufferGenerator> buffer_generator_; 125 scoped_ptr<DrmBufferGenerator> buffer_generator_;
131 scoped_ptr<ScreenManager> screen_manager_; 126 scoped_ptr<ScreenManager> screen_manager_;
132 scoped_ptr<DrmGpuPlatformSupport> gpu_platform_support_; 127 scoped_ptr<DrmGpuPlatformSupport> gpu_platform_support_;
133 128
134 // Objects in the "Browser" process. 129 // Objects in the "Browser" process.
135 scoped_ptr<DeviceManager> device_manager_; 130 scoped_ptr<DeviceManager> device_manager_;
136 scoped_ptr<BitmapCursorFactoryOzone> cursor_factory_ozone_; 131 scoped_ptr<BitmapCursorFactoryOzone> cursor_factory_ozone_;
137 scoped_ptr<DrmWindowHostManager> window_manager_; 132 scoped_ptr<DrmWindowHostManager> window_manager_;
138 scoped_ptr<DrmCursor> cursor_; 133 scoped_ptr<DrmCursor> cursor_;
(...skipping 17 matching lines...) Expand all
156 151
157 OzonePlatform* CreateOzonePlatformDri() { 152 OzonePlatform* CreateOzonePlatformDri() {
158 return new OzonePlatformDrm; 153 return new OzonePlatformDrm;
159 } 154 }
160 155
161 OzonePlatform* CreateOzonePlatformDrm() { 156 OzonePlatform* CreateOzonePlatformDrm() {
162 return new OzonePlatformDrm; 157 return new OzonePlatformDrm;
163 } 158 }
164 159
165 } // namespace ui 160 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/drm/gpu/gpu_lock.cc ('k') | ui/ozone/platform/drm/ozone_platform_gbm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698