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

Side by Side Diff: ui/ozone/platform/dri/hardware_display_plane.h

Issue 383193002: Start plumbing drm atomic swap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef UI_OZONE_PLATFORM_DRI_HARDWARE_DISPLAY_PLANE_H_
6 #define UI_OZONE_PLATFORM_DRI_HARDWARE_DISPLAY_PLANE_H_
7
8 #include <stddef.h>
9 #include <stdint.h>
10 #include <xf86drmMode.h>
11
12 #include "base/basictypes.h"
13
14 namespace gfx {
15 class Rect;
16 }
17
18 namespace ui {
19
20 class DriWrapper;
21
22 class HardwareDisplayPlane {
23 public:
24 HardwareDisplayPlane(DriWrapper* drm,
25 drmModePropertySetPtr atomic_property_set,
26 drmModePlanePtr plane,
27 uint32_t plane_id);
28
29 ~HardwareDisplayPlane();
30
31 bool Initialize();
32
33 bool SetPlaneData(uint32_t crtc_id,
34 uint32_t framebuffer,
35 const gfx::Rect& crtc_rect,
36 const gfx::Rect& src_rect);
37
38 private:
39 struct Property {
40 Property();
41 bool Initialize(DriWrapper* drm,
42 const char* name,
43 drmModeObjectPropertiesPtr plane_properties);
44 uint32_t id_;
45 };
46 // Object containing the connection to the graphics device and wraps the API
47 // calls to control it.
48 DriWrapper* drm_;
49
50 // Not owned.
51 drmModePropertySetPtr property_set_;
52
53 drmModePlanePtr plane_;
dnicoara 2014/07/11 15:24:04 Please create a wrapper in scoped_drm_types.h and
alexst (slow to review) 2014/07/11 20:19:43 Done.
54 uint32_t plane_id_;
55
56 Property crtc_prop_;
57 Property fb_prop_;
58 Property crtc_x_prop_;
59 Property crtc_y_prop_;
60 Property crtc_w_prop_;
61 Property crtc_h_prop_;
62 Property src_x_prop_;
63 Property src_y_prop_;
64 Property src_w_prop_;
65 Property src_h_prop_;
66
67 DISALLOW_COPY_AND_ASSIGN(HardwareDisplayPlane);
68 };
69
70 } // namespace ui
71
72 #endif // UI_OZONE_PLATFORM_DRI_HARDWARE_DISPLAY_PLANE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698