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

Side by Side Diff: ui/ozone/platform/dri/gbm_surfaceless.cc

Issue 908993003: [Ozone-Dri] Rename DriWrapper to DrmDevice (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@udl3-pass-drm-fd
Patch Set: rebased Created 5 years, 9 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/dri/gbm_surface_factory.cc ('k') | ui/ozone/platform/dri/gbm_wrapper.h » ('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 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/dri/gbm_surfaceless.h" 5 #include "ui/ozone/platform/dri/gbm_surfaceless.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "ui/ozone/platform/dri/dri_vsync_provider.h" 9 #include "ui/ozone/platform/dri/dri_vsync_provider.h"
10 #include "ui/ozone/platform/dri/dri_window_delegate.h" 10 #include "ui/ozone/platform/dri/dri_window_delegate.h"
11 #include "ui/ozone/platform/dri/dri_wrapper.h" 11 #include "ui/ozone/platform/dri/drm_device.h"
12 #include "ui/ozone/platform/dri/drm_device_manager.h" 12 #include "ui/ozone/platform/dri/drm_device_manager.h"
13 #include "ui/ozone/platform/dri/gbm_buffer.h" 13 #include "ui/ozone/platform/dri/gbm_buffer.h"
14 #include "ui/ozone/platform/dri/hardware_display_controller.h" 14 #include "ui/ozone/platform/dri/hardware_display_controller.h"
15 15
16 namespace ui { 16 namespace ui {
17 17
18 GbmSurfaceless::GbmSurfaceless(DriWindowDelegate* window_delegate, 18 GbmSurfaceless::GbmSurfaceless(DriWindowDelegate* window_delegate,
19 DrmDeviceManager* drm_device_manager) 19 DrmDeviceManager* drm_device_manager)
20 : window_delegate_(window_delegate), 20 : window_delegate_(window_delegate),
21 drm_device_manager_(drm_device_manager) { 21 drm_device_manager_(drm_device_manager) {
(...skipping 30 matching lines...) Expand all
52 return controller->SchedulePageFlip(false /* is_sync */, callback); 52 return controller->SchedulePageFlip(false /* is_sync */, callback);
53 } 53 }
54 54
55 scoped_ptr<gfx::VSyncProvider> GbmSurfaceless::CreateVSyncProvider() { 55 scoped_ptr<gfx::VSyncProvider> GbmSurfaceless::CreateVSyncProvider() {
56 return make_scoped_ptr(new DriVSyncProvider(window_delegate_)); 56 return make_scoped_ptr(new DriVSyncProvider(window_delegate_));
57 } 57 }
58 58
59 bool GbmSurfaceless::IsUniversalDisplayLinkDevice() { 59 bool GbmSurfaceless::IsUniversalDisplayLinkDevice() {
60 if (!drm_device_manager_) 60 if (!drm_device_manager_)
61 return false; 61 return false;
62 scoped_refptr<DriWrapper> drm_primary = 62 scoped_refptr<DrmDevice> drm_primary =
63 drm_device_manager_->GetDrmDevice(gfx::kNullAcceleratedWidget); 63 drm_device_manager_->GetDrmDevice(gfx::kNullAcceleratedWidget);
64 DCHECK(drm_primary); 64 DCHECK(drm_primary);
65 65
66 HardwareDisplayController* controller = window_delegate_->GetController(); 66 HardwareDisplayController* controller = window_delegate_->GetController();
67 if (!controller) 67 if (!controller)
68 return false; 68 return false;
69 scoped_refptr<DriWrapper> drm = controller->GetAllocationDriWrapper(); 69 scoped_refptr<DrmDevice> drm = controller->GetAllocationDrmDevice();
70 DCHECK(drm); 70 DCHECK(drm);
71 71
72 return drm_primary != drm; 72 return drm_primary != drm;
73 } 73 }
74 74
75 } // namespace ui 75 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/dri/gbm_surface_factory.cc ('k') | ui/ozone/platform/dri/gbm_wrapper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698