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

Side by Side Diff: ui/ozone/platform/drm/gpu/drm_gpu_platform_support.cc

Issue 1124063003: drm: GPU process manages VGEM fd. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase to ToT 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
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/gpu/drm_gpu_platform_support.h" 5 #include "ui/ozone/platform/drm/gpu/drm_gpu_platform_support.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/thread_task_runner_handle.h" 8 #include "base/thread_task_runner_handle.h"
9 #include "ipc/ipc_message_macros.h" 9 #include "ipc/ipc_message_macros.h"
10 #include "ui/ozone/common/gpu/ozone_gpu_message_params.h" 10 #include "ui/ozone/common/gpu/ozone_gpu_message_params.h"
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 IPC_MESSAGE_HANDLER(OzoneGpuMsg_RefreshNativeDisplays, 207 IPC_MESSAGE_HANDLER(OzoneGpuMsg_RefreshNativeDisplays,
208 OnRefreshNativeDisplays) 208 OnRefreshNativeDisplays)
209 IPC_MESSAGE_HANDLER(OzoneGpuMsg_ConfigureNativeDisplay, 209 IPC_MESSAGE_HANDLER(OzoneGpuMsg_ConfigureNativeDisplay,
210 OnConfigureNativeDisplay) 210 OnConfigureNativeDisplay)
211 IPC_MESSAGE_HANDLER(OzoneGpuMsg_DisableNativeDisplay, OnDisableNativeDisplay) 211 IPC_MESSAGE_HANDLER(OzoneGpuMsg_DisableNativeDisplay, OnDisableNativeDisplay)
212 IPC_MESSAGE_HANDLER(OzoneGpuMsg_TakeDisplayControl, OnTakeDisplayControl) 212 IPC_MESSAGE_HANDLER(OzoneGpuMsg_TakeDisplayControl, OnTakeDisplayControl)
213 IPC_MESSAGE_HANDLER(OzoneGpuMsg_RelinquishDisplayControl, 213 IPC_MESSAGE_HANDLER(OzoneGpuMsg_RelinquishDisplayControl,
214 OnRelinquishDisplayControl) 214 OnRelinquishDisplayControl)
215 IPC_MESSAGE_HANDLER(OzoneGpuMsg_AddGraphicsDevice, OnAddGraphicsDevice) 215 IPC_MESSAGE_HANDLER(OzoneGpuMsg_AddGraphicsDevice, OnAddGraphicsDevice)
216 IPC_MESSAGE_HANDLER(OzoneGpuMsg_RemoveGraphicsDevice, OnRemoveGraphicsDevice) 216 IPC_MESSAGE_HANDLER(OzoneGpuMsg_RemoveGraphicsDevice, OnRemoveGraphicsDevice)
217 IPC_MESSAGE_HANDLER(OzoneGpuMsg_AddVgemDevice, OnAddVgemDevice)
217 IPC_MESSAGE_HANDLER(OzoneGpuMsg_GetHDCPState, OnGetHDCPState) 218 IPC_MESSAGE_HANDLER(OzoneGpuMsg_GetHDCPState, OnGetHDCPState)
218 IPC_MESSAGE_HANDLER(OzoneGpuMsg_SetHDCPState, OnSetHDCPState) 219 IPC_MESSAGE_HANDLER(OzoneGpuMsg_SetHDCPState, OnSetHDCPState)
219 IPC_MESSAGE_HANDLER(OzoneGpuMsg_SetGammaRamp, OnSetGammaRamp); 220 IPC_MESSAGE_HANDLER(OzoneGpuMsg_SetGammaRamp, OnSetGammaRamp);
220 IPC_MESSAGE_UNHANDLED(handled = false); 221 IPC_MESSAGE_UNHANDLED(handled = false);
221 IPC_END_MESSAGE_MAP() 222 IPC_END_MESSAGE_MAP()
222 223
223 if (!handled) 224 if (!handled)
224 for (size_t i = 0; i < handlers_.size(); ++i) 225 for (size_t i = 0; i < handlers_.size(); ++i)
225 if (handlers_[i]->OnMessageReceived(message)) 226 if (handlers_[i]->OnMessageReceived(message))
226 return true; 227 return true;
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 void DrmGpuPlatformSupport::OnAddGraphicsDevice( 289 void DrmGpuPlatformSupport::OnAddGraphicsDevice(
289 const base::FilePath& path, 290 const base::FilePath& path,
290 const base::FileDescriptor& fd) { 291 const base::FileDescriptor& fd) {
291 drm_device_manager_->AddDrmDevice(path, fd); 292 drm_device_manager_->AddDrmDevice(path, fd);
292 } 293 }
293 294
294 void DrmGpuPlatformSupport::OnRemoveGraphicsDevice(const base::FilePath& path) { 295 void DrmGpuPlatformSupport::OnRemoveGraphicsDevice(const base::FilePath& path) {
295 drm_device_manager_->RemoveDrmDevice(path); 296 drm_device_manager_->RemoveDrmDevice(path);
296 } 297 }
297 298
299 void DrmGpuPlatformSupport::OnAddVgemDevice(const base::FilePath& path,
300 const base::FileDescriptor& fd) {
301 drm_device_manager_->AddVgemDevice(path, fd);
302 }
303
298 void DrmGpuPlatformSupport::OnSetGammaRamp( 304 void DrmGpuPlatformSupport::OnSetGammaRamp(
299 int64_t id, 305 int64_t id,
300 const std::vector<GammaRampRGBEntry>& lut) { 306 const std::vector<GammaRampRGBEntry>& lut) {
301 ndd_->SetGammaRamp(id, lut); 307 ndd_->SetGammaRamp(id, lut);
302 } 308 }
303 309
304 void DrmGpuPlatformSupport::RelinquishGpuResources( 310 void DrmGpuPlatformSupport::RelinquishGpuResources(
305 const base::Closure& callback) { 311 const base::Closure& callback) {
306 callback.Run(); 312 callback.Run();
307 } 313 }
(...skipping 13 matching lines...) Expand all
321 void DrmGpuPlatformSupport::SetIOTaskRunner( 327 void DrmGpuPlatformSupport::SetIOTaskRunner(
322 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner) { 328 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner) {
323 drm_device_manager_->InitializeIOTaskRunner(io_task_runner); 329 drm_device_manager_->InitializeIOTaskRunner(io_task_runner);
324 } 330 }
325 331
326 IPC::MessageFilter* DrmGpuPlatformSupport::GetMessageFilter() { 332 IPC::MessageFilter* DrmGpuPlatformSupport::GetMessageFilter() {
327 return filter_.get(); 333 return filter_.get();
328 } 334 }
329 335
330 } // namespace ui 336 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/drm/gpu/drm_gpu_platform_support.h ('k') | ui/ozone/platform/drm/gpu/gbm_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698