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

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

Issue 1129923004: [1/2][Ozone-Drm] Refactor GPU display management (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@handle-display-init2
Patch Set: . 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/ozone/platform/drm/drm.gypi ('k') | ui/ozone/platform/drm/gpu/drm_display.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/drm/gpu/drm_display.h
diff --git a/ui/ozone/platform/drm/gpu/drm_display.h b/ui/ozone/platform/drm/gpu/drm_display.h
new file mode 100644
index 0000000000000000000000000000000000000000..13f2e67967788b04e46baaf3861f63f5a81a0ecd
--- /dev/null
+++ b/ui/ozone/platform/drm/gpu/drm_display.h
@@ -0,0 +1,61 @@
+// 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_DRM_DISPLAY_H_
+#define UI_OZONE_PLATFORM_DRM_GPU_DRM_DISPLAY_H_
+
+#include <vector>
+
+#include "base/memory/ref_counted.h"
+#include "ui/display/types/display_constants.h"
+
+typedef struct _drmModeModeInfo drmModeModeInfo;
+
+namespace gfx {
+class Point;
+}
+
+namespace ui {
+
+class DrmDevice;
+class ScreenManager;
+
+struct GammaRampRGBEntry;
+
+class DrmDisplay {
+ public:
+ DrmDisplay(ScreenManager* screen_manager,
+ int64_t display_id,
+ const scoped_refptr<DrmDevice>& drm,
+ uint32_t crtc,
+ uint32_t connector,
+ const std::vector<drmModeModeInfo>& modes);
+ ~DrmDisplay();
+
+ int64_t display_id() const { return display_id_; }
+ scoped_refptr<DrmDevice> drm() const { return drm_; }
+ uint32_t crtc() const { return crtc_; }
+ uint32_t connector() const { return connector_; }
+ const std::vector<drmModeModeInfo>& modes() const { return modes_; }
+
+ bool Configure(const drmModeModeInfo* mode, const gfx::Point& origin);
+ bool GetHDCPState(HDCPState* state);
+ bool SetHDCPState(HDCPState state);
+ void SetGammaRamp(const std::vector<GammaRampRGBEntry>& lut);
+
+ private:
+ ScreenManager* screen_manager_; // Not owned.
+
+ int64_t display_id_;
+ scoped_refptr<DrmDevice> drm_;
+ uint32_t crtc_;
+ uint32_t connector_;
+ std::vector<drmModeModeInfo> modes_;
+
+ DISALLOW_COPY_AND_ASSIGN(DrmDisplay);
+};
+
+} // namespace ui
+
+#endif // UI_OZONE_PLATFORM_DRM_GPU_DRM_DISPLAY_H_
« no previous file with comments | « ui/ozone/platform/drm/drm.gypi ('k') | ui/ozone/platform/drm/gpu/drm_display.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698