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

Side by Side Diff: ash/display/display_color_manager_chromeos.h

Issue 1182063002: Add support for more advanced color correction (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@qcms-fixed-point-gamma
Patch Set: Rebase after quirks changes Created 4 years, 8 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 | « no previous file | ash/display/display_color_manager_chromeos.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 ASH_DISPLAY_DISPLAY_COLOR_MANAGER_CHROMEOS_H_ 5 #ifndef ASH_DISPLAY_DISPLAY_COLOR_MANAGER_CHROMEOS_H_
6 #define ASH_DISPLAY_DISPLAY_COLOR_MANAGER_CHROMEOS_H_ 6 #define ASH_DISPLAY_DISPLAY_COLOR_MANAGER_CHROMEOS_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 void OnDisplayModeChanged( 42 void OnDisplayModeChanged(
43 const ui::DisplayConfigurator::DisplayStateList& outputs) override; 43 const ui::DisplayConfigurator::DisplayStateList& outputs) override;
44 void OnDisplayModeChangeFailed( 44 void OnDisplayModeChangeFailed(
45 const ui::DisplayConfigurator::DisplayStateList& displays, 45 const ui::DisplayConfigurator::DisplayStateList& displays,
46 ui::MultipleDisplayState failed_new_state) override {} 46 ui::MultipleDisplayState failed_new_state) override {}
47 47
48 struct ColorCalibrationData { 48 struct ColorCalibrationData {
49 ColorCalibrationData(); 49 ColorCalibrationData();
50 ~ColorCalibrationData(); 50 ~ColorCalibrationData();
51 51
52 std::vector<ui::GammaRampRGBEntry> lut; 52 std::vector<ui::GammaRampRGBEntry> degamma_lut;
53 std::vector<ui::GammaRampRGBEntry> gamma_lut;
54 std::vector<float> correction_matrix;
53 }; 55 };
54 56
55 protected: 57 protected:
56 virtual void FinishLoadCalibrationForDisplay(int64_t display_id, 58 virtual void FinishLoadCalibrationForDisplay(int64_t display_id,
57 int64_t product_id, 59 int64_t product_id,
60 bool has_color_correction_matrix,
58 ui::DisplayConnectionType type, 61 ui::DisplayConnectionType type,
59 const base::FilePath& path, 62 const base::FilePath& path,
60 bool file_downloaded); 63 bool file_downloaded);
61 virtual void UpdateCalibrationData(int64_t display_id, 64 virtual void UpdateCalibrationData(int64_t display_id,
62 int64_t product_id, 65 int64_t product_id,
63 scoped_ptr<ColorCalibrationData> data); 66 scoped_ptr<ColorCalibrationData> data);
64 67
65 private: 68 private:
66 void ApplyDisplayColorCalibration(int64_t display_id, int64_t product_id); 69 void ApplyDisplayColorCalibration(int64_t display_id, int64_t product_id);
67 void LoadCalibrationForDisplay(const ui::DisplaySnapshot* display); 70 void LoadCalibrationForDisplay(const ui::DisplaySnapshot* display);
68 71
69 ui::DisplayConfigurator* configurator_; 72 ui::DisplayConfigurator* configurator_;
70 std::map<int64_t, ColorCalibrationData*> calibration_map_; 73 std::map<int64_t, ColorCalibrationData*> calibration_map_;
71 base::ThreadChecker thread_checker_; 74 base::ThreadChecker thread_checker_;
72 base::SequencedWorkerPool* blocking_pool_; 75 base::SequencedWorkerPool* blocking_pool_;
73 76
74 // Factory for callbacks. 77 // Factory for callbacks.
75 base::WeakPtrFactory<DisplayColorManager> weak_ptr_factory_; 78 base::WeakPtrFactory<DisplayColorManager> weak_ptr_factory_;
76 79
77 DISALLOW_COPY_AND_ASSIGN(DisplayColorManager); 80 DISALLOW_COPY_AND_ASSIGN(DisplayColorManager);
78 }; 81 };
79 82
80 } // namespace ash 83 } // namespace ash
81 84
82 #endif // ASH_DISPLAY_DISPLAY_COLOR_MANAGER_CHROMEOS_H_ 85 #endif // ASH_DISPLAY_DISPLAY_COLOR_MANAGER_CHROMEOS_H_
OLDNEW
« no previous file with comments | « no previous file | ash/display/display_color_manager_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698