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/hardware_display_plane.cc

Issue 994503004: Preliminary atomic patch (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: change gyp var 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
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/hardware_display_plane.h" 5 #include "ui/ozone/platform/drm/gpu/hardware_display_plane.h"
6 6
7 #include <drm.h> 7 #include <drm.h>
8 #include <xf86drm.h> 8 #include <xf86drm.h>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "ui/gfx/geometry/rect.h" 11 #include "ui/gfx/geometry/rect.h"
12 #include "ui/ozone/platform/drm/gpu/drm_device.h" 12 #include "ui/ozone/platform/drm/gpu/drm_device.h"
13 13
14 namespace ui { 14 namespace ui {
15 15
16 HardwareDisplayPlane::HardwareDisplayPlane(ScopedDrmPlanePtr plane)
17 : plane_id_(plane->plane_id),
18 possible_crtcs_(plane->possible_crtcs),
19 owning_crtc_(0),
20 in_use_(false),
21 is_dummy_(false) {
22 }
23
24 HardwareDisplayPlane::HardwareDisplayPlane(uint32_t plane_id, 16 HardwareDisplayPlane::HardwareDisplayPlane(uint32_t plane_id,
25 uint32_t possible_crtcs) 17 uint32_t possible_crtcs)
26 : plane_id_(plane_id), 18 : plane_id_(plane_id),
27 possible_crtcs_(possible_crtcs), 19 possible_crtcs_(possible_crtcs),
28 in_use_(false), 20 in_use_(false),
29 is_dummy_(false) { 21 is_dummy_(false) {
30 } 22 }
31 23
32 HardwareDisplayPlane::~HardwareDisplayPlane() { 24 HardwareDisplayPlane::~HardwareDisplayPlane() {
33 } 25 }
34 26
35 bool HardwareDisplayPlane::CanUseForCrtc(uint32_t crtc_index) { 27 bool HardwareDisplayPlane::CanUseForCrtc(uint32_t crtc_index) {
36 return possible_crtcs_ & (1 << crtc_index); 28 return possible_crtcs_ & (1 << crtc_index);
37 } 29 }
38 30
39 bool HardwareDisplayPlane::Initialize(DrmDevice* drm) { 31 bool HardwareDisplayPlane::Initialize(DrmDevice* drm) {
40 return true; 32 return true;
41 } 33 }
42 34
43 } // namespace ui 35 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/drm/gpu/hardware_display_plane.h ('k') | ui/ozone/platform/drm/gpu/hardware_display_plane_atomic.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698