| OLD | NEW |
| 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 #include "ash/display/display_color_manager_chromeos.h" | 5 #include "ash/display/display_color_manager_chromeos.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 | 190 |
| 191 void DisplayColorManager::LoadCalibrationForDisplay( | 191 void DisplayColorManager::LoadCalibrationForDisplay( |
| 192 const display::DisplaySnapshot* display) { | 192 const display::DisplaySnapshot* display) { |
| 193 DCHECK(thread_checker_.CalledOnValidThread()); | 193 DCHECK(thread_checker_.CalledOnValidThread()); |
| 194 if (display->display_id() == display::kInvalidDisplayId) { | 194 if (display->display_id() == display::kInvalidDisplayId) { |
| 195 LOG(WARNING) << "Trying to load calibration data for invalid display id"; | 195 LOG(WARNING) << "Trying to load calibration data for invalid display id"; |
| 196 return; | 196 return; |
| 197 } | 197 } |
| 198 | 198 |
| 199 quirks::QuirksManager::Get()->RequestIccProfilePath( | 199 quirks::QuirksManager::Get()->RequestIccProfilePath( |
| 200 display->product_id(), | 200 display->product_id(), display->display_name(), |
| 201 base::Bind(&DisplayColorManager::FinishLoadCalibrationForDisplay, | 201 base::Bind(&DisplayColorManager::FinishLoadCalibrationForDisplay, |
| 202 weak_ptr_factory_.GetWeakPtr(), display->display_id(), | 202 weak_ptr_factory_.GetWeakPtr(), display->display_id(), |
| 203 display->product_id(), display->has_color_correction_matrix(), | 203 display->product_id(), display->has_color_correction_matrix(), |
| 204 display->type())); | 204 display->type())); |
| 205 } | 205 } |
| 206 | 206 |
| 207 void DisplayColorManager::FinishLoadCalibrationForDisplay( | 207 void DisplayColorManager::FinishLoadCalibrationForDisplay( |
| 208 int64_t display_id, | 208 int64_t display_id, |
| 209 int64_t product_id, | 209 int64_t product_id, |
| 210 bool has_color_correction_matrix, | 210 bool has_color_correction_matrix, |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 calibration_map_[product_id] = std::move(data); | 246 calibration_map_[product_id] = std::move(data); |
| 247 ApplyDisplayColorCalibration(display_id, product_id); | 247 ApplyDisplayColorCalibration(display_id, product_id); |
| 248 } | 248 } |
| 249 } | 249 } |
| 250 | 250 |
| 251 DisplayColorManager::ColorCalibrationData::ColorCalibrationData() {} | 251 DisplayColorManager::ColorCalibrationData::ColorCalibrationData() {} |
| 252 | 252 |
| 253 DisplayColorManager::ColorCalibrationData::~ColorCalibrationData() {} | 253 DisplayColorManager::ColorCalibrationData::~ColorCalibrationData() {} |
| 254 | 254 |
| 255 } // namespace ash | 255 } // namespace ash |
| OLD | NEW |