OLD | NEW |
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_DISPLAY_CHROMEOS_DISPLAY_CONFIGURATOR_H_ | 5 #ifndef UI_DISPLAY_CHROMEOS_DISPLAY_CONFIGURATOR_H_ |
6 #define UI_DISPLAY_CHROMEOS_DISPLAY_CONFIGURATOR_H_ | 6 #define UI_DISPLAY_CHROMEOS_DISPLAY_CONFIGURATOR_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 11 matching lines...) Expand all Loading... |
22 #include "ui/display/types/native_display_observer.h" | 22 #include "ui/display/types/native_display_observer.h" |
23 #include "ui/gfx/geometry/size.h" | 23 #include "ui/gfx/geometry/size.h" |
24 | 24 |
25 namespace gfx { | 25 namespace gfx { |
26 class Point; | 26 class Point; |
27 class Size; | 27 class Size; |
28 } | 28 } |
29 | 29 |
30 namespace ui { | 30 namespace ui { |
31 struct DisplayConfigureRequest; | 31 struct DisplayConfigureRequest; |
| 32 struct GammaRampRGBEntry; |
32 class DisplayMode; | 33 class DisplayMode; |
33 class DisplaySnapshot; | 34 class DisplaySnapshot; |
34 class NativeDisplayDelegate; | 35 class NativeDisplayDelegate; |
35 class UpdateDisplayConfigurationTask; | 36 class UpdateDisplayConfigurationTask; |
36 | 37 |
37 // This class interacts directly with the system display configurator. | 38 // This class interacts directly with the system display configurator. |
38 class DISPLAY_EXPORT DisplayConfigurator : public NativeDisplayObserver { | 39 class DISPLAY_EXPORT DisplayConfigurator : public NativeDisplayObserver { |
39 public: | 40 public: |
40 typedef uint64_t ContentProtectionClientId; | 41 typedef uint64_t ContentProtectionClientId; |
41 static const ContentProtectionClientId kInvalidClientId = 0; | 42 static const ContentProtectionClientId kInvalidClientId = 0; |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 | 261 |
261 // Checks the available color profiles for |display_id| and fills the result | 262 // Checks the available color profiles for |display_id| and fills the result |
262 // into |profiles|. | 263 // into |profiles|. |
263 std::vector<ui::ColorCalibrationProfile> GetAvailableColorCalibrationProfiles( | 264 std::vector<ui::ColorCalibrationProfile> GetAvailableColorCalibrationProfiles( |
264 int64_t display_id); | 265 int64_t display_id); |
265 | 266 |
266 // Updates the color calibration to |new_profile|. | 267 // Updates the color calibration to |new_profile|. |
267 bool SetColorCalibrationProfile(int64_t display_id, | 268 bool SetColorCalibrationProfile(int64_t display_id, |
268 ui::ColorCalibrationProfile new_profile); | 269 ui::ColorCalibrationProfile new_profile); |
269 | 270 |
| 271 // Sets the gamma ramp for |display_id| to the values in |lut|. |
| 272 bool SetGammaRamp(int64_t display_id, |
| 273 const std::vector<GammaRampRGBEntry>& lut); |
| 274 |
270 private: | 275 private: |
271 class DisplayLayoutManagerImpl; | 276 class DisplayLayoutManagerImpl; |
272 | 277 |
273 // Mapping a display_id to a protection request bitmask. | 278 // Mapping a display_id to a protection request bitmask. |
274 typedef std::map<int64_t, uint32_t> ContentProtections; | 279 typedef std::map<int64_t, uint32_t> ContentProtections; |
275 // Mapping a client to its protection request. | 280 // Mapping a client to its protection request. |
276 typedef std::map<ContentProtectionClientId, ContentProtections> | 281 typedef std::map<ContentProtectionClientId, ContentProtections> |
277 ProtectionRequests; | 282 ProtectionRequests; |
278 | 283 |
279 // Performs platform specific delegate initialization. | 284 // Performs platform specific delegate initialization. |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
402 | 407 |
403 // This must be the last variable. | 408 // This must be the last variable. |
404 base::WeakPtrFactory<DisplayConfigurator> weak_ptr_factory_; | 409 base::WeakPtrFactory<DisplayConfigurator> weak_ptr_factory_; |
405 | 410 |
406 DISALLOW_COPY_AND_ASSIGN(DisplayConfigurator); | 411 DISALLOW_COPY_AND_ASSIGN(DisplayConfigurator); |
407 }; | 412 }; |
408 | 413 |
409 } // namespace ui | 414 } // namespace ui |
410 | 415 |
411 #endif // UI_DISPLAY_CHROMEOS_DISPLAY_CONFIGURATOR_H_ | 416 #endif // UI_DISPLAY_CHROMEOS_DISPLAY_CONFIGURATOR_H_ |
OLD | NEW |