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

Side by Side Diff: ui/ozone/platform/drm/gpu/drm_gpu_display_manager.h

Issue 2613493002: Fix namespace for src/ui/display/. (Closed)
Patch Set: Rebase. Created 3 years, 11 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_OZONE_PLATFORM_DRM_GPU_DRM_GPU_DISPLAY_MANAGER_H_ 5 #ifndef UI_OZONE_PLATFORM_DRM_GPU_DRM_GPU_DISPLAY_MANAGER_H_
6 #define UI_OZONE_PLATFORM_DRM_GPU_DRM_GPU_DISPLAY_MANAGER_H_ 6 #define UI_OZONE_PLATFORM_DRM_GPU_DRM_GPU_DISPLAY_MANAGER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/memory/scoped_vector.h" 11 #include "base/memory/scoped_vector.h"
12 #include "ui/gfx/native_widget_types.h" 12 #include "ui/gfx/native_widget_types.h"
13 #include "ui/ozone/common/gpu/ozone_gpu_message_params.h" 13 #include "ui/ozone/common/gpu/ozone_gpu_message_params.h"
14 14
15 namespace display {
16 struct GammaRampRGBEntry;
17 }
18
15 namespace ui { 19 namespace ui {
16 20
17 class DrmDeviceManager; 21 class DrmDeviceManager;
18 class DrmDisplay; 22 class DrmDisplay;
19 class ScreenManager; 23 class ScreenManager;
20 24
21 struct GammaRampRGBEntry;
22
23 class DrmGpuDisplayManager { 25 class DrmGpuDisplayManager {
24 public: 26 public:
25 DrmGpuDisplayManager(ScreenManager* screen_manager, 27 DrmGpuDisplayManager(ScreenManager* screen_manager,
26 DrmDeviceManager* drm_device_manager); 28 DrmDeviceManager* drm_device_manager);
27 ~DrmGpuDisplayManager(); 29 ~DrmGpuDisplayManager();
28 30
29 // Returns a list of the connected displays. When this is called the list of 31 // Returns a list of the connected displays. When this is called the list of
30 // displays is refreshed. 32 // displays is refreshed.
31 std::vector<DisplaySnapshot_Params> GetDisplays(); 33 std::vector<DisplaySnapshot_Params> GetDisplays();
32 34
33 // Returns all scanout formats for |widget| representing a particular display 35 // Returns all scanout formats for |widget| representing a particular display
34 // controller or default display controller for kNullAcceleratedWidget. 36 // controller or default display controller for kNullAcceleratedWidget.
35 void GetScanoutFormats(gfx::AcceleratedWidget widget, 37 void GetScanoutFormats(gfx::AcceleratedWidget widget,
36 std::vector<gfx::BufferFormat>* scanout_formats); 38 std::vector<gfx::BufferFormat>* scanout_formats);
37 39
38 // Takes/releases the control of the DRM devices. 40 // Takes/releases the control of the DRM devices.
39 bool TakeDisplayControl(); 41 bool TakeDisplayControl();
40 void RelinquishDisplayControl(); 42 void RelinquishDisplayControl();
41 43
42 bool ConfigureDisplay(int64_t id, 44 bool ConfigureDisplay(int64_t id,
43 const DisplayMode_Params& mode, 45 const DisplayMode_Params& mode,
44 const gfx::Point& origin); 46 const gfx::Point& origin);
45 bool DisableDisplay(int64_t id); 47 bool DisableDisplay(int64_t id);
46 bool GetHDCPState(int64_t display_id, HDCPState* state); 48 bool GetHDCPState(int64_t display_id, display::HDCPState* state);
47 bool SetHDCPState(int64_t display_id, HDCPState state); 49 bool SetHDCPState(int64_t display_id, display::HDCPState state);
48 void SetColorCorrection(int64_t id, 50 void SetColorCorrection(
49 const std::vector<GammaRampRGBEntry>& degamma_lut, 51 int64_t id,
50 const std::vector<GammaRampRGBEntry>& gamma_lut, 52 const std::vector<display::GammaRampRGBEntry>& degamma_lut,
51 const std::vector<float>& correction_matrix); 53 const std::vector<display::GammaRampRGBEntry>& gamma_lut,
54 const std::vector<float>& correction_matrix);
52 55
53 private: 56 private:
54 DrmDisplay* FindDisplay(int64_t display_id); 57 DrmDisplay* FindDisplay(int64_t display_id);
55 58
56 // Notify ScreenManager of all the displays that were present before the 59 // Notify ScreenManager of all the displays that were present before the
57 // update but are gone after the update. 60 // update but are gone after the update.
58 void NotifyScreenManager( 61 void NotifyScreenManager(
59 const std::vector<std::unique_ptr<DrmDisplay>>& new_displays, 62 const std::vector<std::unique_ptr<DrmDisplay>>& new_displays,
60 const std::vector<std::unique_ptr<DrmDisplay>>& old_displays) const; 63 const std::vector<std::unique_ptr<DrmDisplay>>& old_displays) const;
61 64
62 ScreenManager* screen_manager_; // Not owned. 65 ScreenManager* screen_manager_; // Not owned.
63 DrmDeviceManager* drm_device_manager_; // Not owned. 66 DrmDeviceManager* drm_device_manager_; // Not owned.
64 67
65 std::vector<std::unique_ptr<DrmDisplay>> displays_; 68 std::vector<std::unique_ptr<DrmDisplay>> displays_;
66 69
67 DISALLOW_COPY_AND_ASSIGN(DrmGpuDisplayManager); 70 DISALLOW_COPY_AND_ASSIGN(DrmGpuDisplayManager);
68 }; 71 };
69 72
70 } // namespace ui 73 } // namespace ui
71 74
72 #endif // UI_OZONE_PLATFORM_DRM_GPU_DRM_GPU_DISPLAY_MANAGER_H_ 75 #endif // UI_OZONE_PLATFORM_DRM_GPU_DRM_GPU_DISPLAY_MANAGER_H_
OLDNEW
« 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