| 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 20 matching lines...) Expand all Loading... |
| 31 qcms_profile* display_profile = qcms_profile_from_path(path.value().c_str()); | 31 qcms_profile* display_profile = qcms_profile_from_path(path.value().c_str()); |
| 32 if (!display_profile) { | 32 if (!display_profile) { |
| 33 LOG(WARNING) << "Unable to load ICC file: " << path.value(); | 33 LOG(WARNING) << "Unable to load ICC file: " << path.value(); |
| 34 return nullptr; | 34 return nullptr; |
| 35 } | 35 } |
| 36 | 36 |
| 37 size_t vcgt_channel_length = | 37 size_t vcgt_channel_length = |
| 38 qcms_profile_get_vcgt_channel_length(display_profile); | 38 qcms_profile_get_vcgt_channel_length(display_profile); |
| 39 | 39 |
| 40 if (!has_color_correction_matrix && !vcgt_channel_length) { | 40 if (!has_color_correction_matrix && !vcgt_channel_length) { |
| 41 LOG(WARNING) << "No vcgt table in ICC file: " << path.value(); | 41 LOG(WARNING) << "No vcgt table or color correction matrix in ICC file: " |
| 42 << path.value(); |
| 42 qcms_profile_release(display_profile); | 43 qcms_profile_release(display_profile); |
| 43 return nullptr; | 44 return nullptr; |
| 44 } | 45 } |
| 45 | 46 |
| 46 scoped_ptr<DisplayColorManager::ColorCalibrationData> data( | 47 scoped_ptr<DisplayColorManager::ColorCalibrationData> data( |
| 47 new DisplayColorManager::ColorCalibrationData()); | 48 new DisplayColorManager::ColorCalibrationData()); |
| 48 if (vcgt_channel_length) { | 49 if (vcgt_channel_length) { |
| 49 VLOG_IF(1, has_color_correction_matrix) | 50 VLOG_IF(1, has_color_correction_matrix) |
| 50 << "Using VCGT data on CTM enabled platform."; | 51 << "Using VCGT data on CTM enabled platform."; |
| 51 | 52 |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 calibration_map_[product_id] = data.release(); | 243 calibration_map_[product_id] = data.release(); |
| 243 ApplyDisplayColorCalibration(display_id, product_id); | 244 ApplyDisplayColorCalibration(display_id, product_id); |
| 244 } | 245 } |
| 245 } | 246 } |
| 246 | 247 |
| 247 DisplayColorManager::ColorCalibrationData::ColorCalibrationData() {} | 248 DisplayColorManager::ColorCalibrationData::ColorCalibrationData() {} |
| 248 | 249 |
| 249 DisplayColorManager::ColorCalibrationData::~ColorCalibrationData() {} | 250 DisplayColorManager::ColorCalibrationData::~ColorCalibrationData() {} |
| 250 | 251 |
| 251 } // namespace ash | 252 } // namespace ash |
| OLD | NEW |