OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "SkAtomics.h" | 8 #include "SkAtomics.h" |
9 #include "SkColorSpace.h" | 9 #include "SkColorSpace.h" |
10 | 10 |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 #define return_if_false(pred, msg) \ | 167 #define return_if_false(pred, msg) \ |
168 do { \ | 168 do { \ |
169 if (!(pred)) { \ | 169 if (!(pred)) { \ |
170 SkColorSpacePrintf("Invalid ICC Profile: %s.\n", (msg)); \ | 170 SkColorSpacePrintf("Invalid ICC Profile: %s.\n", (msg)); \ |
171 return false; \ | 171 return false; \ |
172 } \ | 172 } \ |
173 } while (0) | 173 } while (0) |
174 | 174 |
175 #define return_null(msg) \ | 175 #define return_null(msg) \ |
176 do { \ | 176 do { \ |
177 SkDebugf("Invalid ICC Profile: %s.\n", (msg)); \ | 177 SkColorSpacePrintf("Invalid ICC Profile: %s.\n", (msg)); \ |
178 return nullptr; \ | 178 return nullptr; \ |
179 } while (0) | 179 } while (0) |
180 | 180 |
181 static uint16_t read_big_endian_short(const uint8_t* ptr) { | 181 static uint16_t read_big_endian_short(const uint8_t* ptr) { |
182 return ptr[0] << 8 | ptr[1]; | 182 return ptr[0] << 8 | ptr[1]; |
183 } | 183 } |
184 | 184 |
185 static uint32_t read_big_endian_int(const uint8_t* ptr) { | 185 static uint32_t read_big_endian_int(const uint8_t* ptr) { |
186 return ptr[0] << 24 | ptr[1] << 16 | ptr[2] << 8 | ptr[3]; | 186 return ptr[0] << 24 | ptr[1] << 16 | ptr[2] << 8 | ptr[3]; |
187 } | 187 } |
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 } | 541 } |
542 | 542 |
543 // D65 white point of Rec. 709 [8] are: | 543 // D65 white point of Rec. 709 [8] are: |
544 // | 544 // |
545 // D65 white-point in unit luminance XYZ = 0.9505, 1.0000, 1.0890 | 545 // D65 white-point in unit luminance XYZ = 0.9505, 1.0000, 1.0890 |
546 // | 546 // |
547 // R G B white | 547 // R G B white |
548 // x 0.640 0.300 0.150 0.3127 | 548 // x 0.640 0.300 0.150 0.3127 |
549 // y 0.330 0.600 0.060 0.3290 | 549 // y 0.330 0.600 0.060 0.3290 |
550 // z 0.030 0.100 0.790 0.3582 | 550 // z 0.030 0.100 0.790 0.3582 |
OLD | NEW |