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

Side by Side Diff: ui/ozone/platform/drm/gpu/drm_display.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
« no previous file with comments | « ui/ozone/platform/drm/gpu/drm_device.cc ('k') | ui/ozone/platform/drm/gpu/drm_display.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_DISPLAY_H_ 5 #ifndef UI_OZONE_PLATFORM_DRM_GPU_DRM_DISPLAY_H_
6 #define UI_OZONE_PLATFORM_DRM_GPU_DRM_DISPLAY_H_ 6 #define UI_OZONE_PLATFORM_DRM_GPU_DRM_DISPLAY_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
15 #include "ui/display/types/display_constants.h" 15 #include "ui/display/types/display_constants.h"
16 #include "ui/gfx/geometry/point.h" 16 #include "ui/gfx/geometry/point.h"
17 #include "ui/ozone/common/gpu/ozone_gpu_message_params.h" 17 #include "ui/ozone/common/gpu/ozone_gpu_message_params.h"
18 18
19 typedef struct _drmModeModeInfo drmModeModeInfo; 19 typedef struct _drmModeModeInfo drmModeModeInfo;
20 20
21 namespace display {
22 struct GammaRampRGBEntry;
23 }
24
21 namespace ui { 25 namespace ui {
22 26
23 class DrmDevice; 27 class DrmDevice;
24 class HardwareDisplayControllerInfo; 28 class HardwareDisplayControllerInfo;
25 class ScreenManager; 29 class ScreenManager;
26 30
27 struct GammaRampRGBEntry;
28
29 class DrmDisplay { 31 class DrmDisplay {
30 public: 32 public:
31 DrmDisplay(ScreenManager* screen_manager, 33 DrmDisplay(ScreenManager* screen_manager,
32 const scoped_refptr<DrmDevice>& drm); 34 const scoped_refptr<DrmDevice>& drm);
33 ~DrmDisplay(); 35 ~DrmDisplay();
34 36
35 int64_t display_id() const { return display_id_; } 37 int64_t display_id() const { return display_id_; }
36 scoped_refptr<DrmDevice> drm() const { return drm_; } 38 scoped_refptr<DrmDevice> drm() const { return drm_; }
37 uint32_t crtc() const { return crtc_; } 39 uint32_t crtc() const { return crtc_; }
38 uint32_t connector() const { return connector_; } 40 uint32_t connector() const { return connector_; }
39 const std::vector<drmModeModeInfo>& modes() const { return modes_; } 41 const std::vector<drmModeModeInfo>& modes() const { return modes_; }
40 42
41 DisplaySnapshot_Params Update(HardwareDisplayControllerInfo* info, 43 DisplaySnapshot_Params Update(HardwareDisplayControllerInfo* info,
42 size_t device_index); 44 size_t device_index);
43 45
44 bool Configure(const drmModeModeInfo* mode, const gfx::Point& origin); 46 bool Configure(const drmModeModeInfo* mode, const gfx::Point& origin);
45 bool GetHDCPState(HDCPState* state); 47 bool GetHDCPState(display::HDCPState* state);
46 bool SetHDCPState(HDCPState state); 48 bool SetHDCPState(display::HDCPState state);
47 void SetColorCorrection(const std::vector<GammaRampRGBEntry>& degamma_lut, 49 void SetColorCorrection(
48 const std::vector<GammaRampRGBEntry>& gamma_lut, 50 const std::vector<display::GammaRampRGBEntry>& degamma_lut,
49 const std::vector<float>& correction_matrix); 51 const std::vector<display::GammaRampRGBEntry>& gamma_lut,
52 const std::vector<float>& correction_matrix);
50 53
51 private: 54 private:
52 ScreenManager* screen_manager_; // Not owned. 55 ScreenManager* screen_manager_; // Not owned.
53 56
54 int64_t display_id_ = -1; 57 int64_t display_id_ = -1;
55 scoped_refptr<DrmDevice> drm_; 58 scoped_refptr<DrmDevice> drm_;
56 uint32_t crtc_ = 0; 59 uint32_t crtc_ = 0;
57 uint32_t connector_ = 0; 60 uint32_t connector_ = 0;
58 std::vector<drmModeModeInfo> modes_; 61 std::vector<drmModeModeInfo> modes_;
59 gfx::Point origin_; 62 gfx::Point origin_;
60 63
61 DISALLOW_COPY_AND_ASSIGN(DrmDisplay); 64 DISALLOW_COPY_AND_ASSIGN(DrmDisplay);
62 }; 65 };
63 66
64 } // namespace ui 67 } // namespace ui
65 68
66 #endif // UI_OZONE_PLATFORM_DRM_GPU_DRM_DISPLAY_H_ 69 #endif // UI_OZONE_PLATFORM_DRM_GPU_DRM_DISPLAY_H_
OLDNEW
« no previous file with comments | « ui/ozone/platform/drm/gpu/drm_device.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