| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ui/gfx/color_space.h" | 5 #include "ui/gfx/color_space.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 | 8 |
| 9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
| 10 #include "base/synchronization/lock.h" | 10 #include "base/synchronization/lock.h" |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 // TODO(crbug.com/634102): Support more than just ICC profile based color | 147 // TODO(crbug.com/634102): Support more than just ICC profile based color |
| 148 // spaces. The DCHECK here is to ensure that callers that expect a valid | 148 // spaces. The DCHECK here is to ensure that callers that expect a valid |
| 149 // result are notified of this incomplete functionality. | 149 // result are notified of this incomplete functionality. |
| 150 std::vector<char> icc_data = gfx::ICCProfile::FromColorSpace(*this).GetData(); | 150 std::vector<char> icc_data = gfx::ICCProfile::FromColorSpace(*this).GetData(); |
| 151 sk_sp<SkColorSpace> result = | 151 sk_sp<SkColorSpace> result = |
| 152 SkColorSpace::NewICC(icc_data.data(), icc_data.size()); | 152 SkColorSpace::NewICC(icc_data.data(), icc_data.size()); |
| 153 DCHECK(result); | 153 DCHECK(result); |
| 154 return result; | 154 return result; |
| 155 } | 155 } |
| 156 | 156 |
| 157 ColorSpace ColorSpace::FromSkColorSpace( |
| 158 const sk_sp<SkColorSpace>& sk_color_space) { |
| 159 if (!sk_color_space) |
| 160 return gfx::ColorSpace(); |
| 161 |
| 162 // TODO(crbug.com/634102): Add conversion to gfx::ColorSpace. |
| 163 return gfx::ColorSpace(); |
| 164 } |
| 165 |
| 157 } // namespace gfx | 166 } // namespace gfx |
| OLD | NEW |