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

Unified Diff: ui/ozone/platform/drm/gpu/drm_gpu_display_manager.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_display.cc ('k') | ui/ozone/platform/drm/gpu/drm_gpu_display_manager.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_gpu_display_manager.h
diff --git a/ui/ozone/platform/drm/gpu/drm_gpu_display_manager.h b/ui/ozone/platform/drm/gpu/drm_gpu_display_manager.h
new file mode 100644
index 0000000000000000000000000000000000000000..97ebaa7283a1c09553e7a838755cff5248e5ca24
--- /dev/null
+++ b/ui/ozone/platform/drm/gpu/drm_gpu_display_manager.h
@@ -0,0 +1,60 @@
+// Copyright 2014 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_GPU_DISPLAY_MANAGER_H_
+#define UI_OZONE_PLATFORM_DRM_GPU_DRM_GPU_DISPLAY_MANAGER_H_
+
+#include "base/memory/scoped_vector.h"
+#include "ui/display/types/display_constants.h"
+#include "ui/ozone/common/gpu/ozone_gpu_message_params.h"
+
+namespace ui {
+
+class DrmDeviceManager;
+class DrmDisplay;
+class ScreenManager;
+
+struct GammaRampRGBEntry;
+
+class DrmGpuDisplayManager {
+ public:
+ DrmGpuDisplayManager(ScreenManager* screen_manager,
+ DrmDeviceManager* drm_device_manager);
+ ~DrmGpuDisplayManager();
+
+ // Returns a list of the connected displays. When this is called the list of
+ // displays is refreshed.
+ std::vector<DisplaySnapshot_Params> GetDisplays();
+
+ // Takes/releases the control of the DRM devices.
+ bool TakeDisplayControl();
+ void RelinquishDisplayControl();
+
+ bool ConfigureDisplay(int64_t id,
+ const DisplayMode_Params& mode,
+ const gfx::Point& origin);
+ bool DisableDisplay(int64_t id);
+ bool GetHDCPState(int64_t display_id, HDCPState* state);
+ bool SetHDCPState(int64_t display_id, HDCPState state);
+ void SetGammaRamp(int64_t id, const std::vector<GammaRampRGBEntry>& lut);
+
+ private:
+ DrmDisplay* FindDisplay(int64_t display_id);
+
+ // Notify ScreenManager of all the displays that were present before the
+ // update but are gone after the update.
+ void NotifyScreenManager(const std::vector<DrmDisplay*>& new_displays,
+ const std::vector<DrmDisplay*>& old_displays) const;
+
+ ScreenManager* screen_manager_; // Not owned.
+ DrmDeviceManager* drm_device_manager_; // Not owned.
+
+ ScopedVector<DrmDisplay> displays_;
+
+ DISALLOW_COPY_AND_ASSIGN(DrmGpuDisplayManager);
+};
+
+} // namespace ui
+
+#endif // UI_OZONE_PLATFORM_DRM_GPU_DRM_GPU_DISPLAY_MANAGER_H_
« no previous file with comments | « ui/ozone/platform/drm/gpu/drm_display.cc ('k') | ui/ozone/platform/drm/gpu/drm_gpu_display_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698