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

Unified Diff: ui/ozone/platform/drm/gpu/hardware_display_plane_atomic.h

Issue 1285183008: Ozone integration. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: add missing license header Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: ui/ozone/platform/drm/gpu/hardware_display_plane_atomic.h
diff --git a/ui/ozone/platform/drm/gpu/hardware_display_plane_atomic.h b/ui/ozone/platform/drm/gpu/hardware_display_plane_atomic.h
new file mode 100644
index 0000000000000000000000000000000000000000..f89c119a82d9f8a5edfa1b154782dcbc2cbcb954
--- /dev/null
+++ b/ui/ozone/platform/drm/gpu/hardware_display_plane_atomic.h
@@ -0,0 +1,58 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_OZONE_PLATFORM_DRM_GPU_HARDWARE_DISPLAY_PLANE_ATOMIC_H_
+#define UI_OZONE_PLATFORM_DRM_GPU_HARDWARE_DISPLAY_PLANE_ATOMIC_H_
+
+#include "ui/ozone/platform/drm/gpu/hardware_display_plane.h"
+
+#include <xf86drmMode.h>
+
+namespace ui {
+
+class CrtcController;
+class DrmDevice;
+
+class HardwareDisplayPlaneAtomic : public HardwareDisplayPlane {
+ public:
+ HardwareDisplayPlaneAtomic(uint32_t plane_id, uint32_t possible_crtcs);
+ ~HardwareDisplayPlaneAtomic() override;
+
+ bool SetPlaneData(drmModePropertySet* property_set,
+ uint32_t crtc_id,
+ uint32_t framebuffer,
+ const gfx::Rect& crtc_rect,
+ const gfx::Rect& src_rect);
+
+ // HardwareDisplayPlane:
+ bool Initialize(DrmDevice* drm) override;
+
+ void set_crtc(CrtcController* crtc) { crtc_ = crtc; }
+ CrtcController* crtc() const { return crtc_; }
+
+ private:
+ struct Property {
+ Property();
+ bool Initialize(DrmDevice* drm,
+ const char* name,
+ const ScopedDrmObjectPropertyPtr& plane_properties);
+ uint32_t id = 0;
+ };
+
+ Property crtc_prop_;
+ Property fb_prop_;
+ Property crtc_x_prop_;
+ Property crtc_y_prop_;
+ Property crtc_w_prop_;
+ Property crtc_h_prop_;
+ Property src_x_prop_;
+ Property src_y_prop_;
+ Property src_w_prop_;
+ Property src_h_prop_;
+ CrtcController* crtc_ = nullptr;
+};
+
+} // namespace ui
+
+#endif // UI_OZONE_PLATFORM_DRM_GPU_HARDWARE_DISPLAY_PLANE_ATOMIC_H_
« no previous file with comments | « ui/ozone/platform/drm/gpu/hardware_display_plane.cc ('k') | ui/ozone/platform/drm/gpu/hardware_display_plane_atomic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698