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

Unified Diff: ui/ozone/platform/drm/gpu/drm_display.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
« no previous file with comments | « ui/ozone/platform/drm/gpu/drm_device_manager.cc ('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..40cd3439f962c84855ec7297185fad065bdcf64a
--- /dev/null
+++ b/ui/ozone/platform/drm/gpu/drm_display.h
@@ -0,0 +1,60 @@
+// 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"
+#include "ui/gfx/geometry/point.h"
+#include "ui/ozone/common/gpu/ozone_gpu_message_params.h"
+
+typedef struct _drmModeModeInfo drmModeModeInfo;
+
+namespace ui {
+
+class DrmDevice;
+class HardwareDisplayControllerInfo;
+class ScreenManager;
+
+struct GammaRampRGBEntry;
+
+class DrmDisplay {
+ public:
+ DrmDisplay(ScreenManager* screen_manager,
+ const scoped_refptr<DrmDevice>& drm);
+ ~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_; }
+
+ DisplaySnapshot_Params Update(HardwareDisplayControllerInfo* info,
+ size_t display_index);
+
+ 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_ = -1;
+ scoped_refptr<DrmDevice> drm_;
+ uint32_t crtc_ = 0;
+ uint32_t connector_ = 0;
+ std::vector<drmModeModeInfo> modes_;
+ gfx::Point origin_;
+
+ 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/gpu/drm_device_manager.cc ('k') | ui/ozone/platform/drm/gpu/drm_display.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698