| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. | 2 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. |
| 3 * | 3 * |
| 4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
| 5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
| 6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
| 7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
| 8 * | 8 * |
| 9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 | 310 |
| 311 // Take a lock around initializing and accessing the global device color pro
file. | 311 // Take a lock around initializing and accessing the global device color pro
file. |
| 312 SpinLock::Guard guard(gTargetColorProfileLock); | 312 SpinLock::Guard guard(gTargetColorProfileLock); |
| 313 | 313 |
| 314 // Layout tests expect that only the first call will take effect. | 314 // Layout tests expect that only the first call will take effect. |
| 315 if (gTargetColorProfile) | 315 if (gTargetColorProfile) |
| 316 return; | 316 return; |
| 317 | 317 |
| 318 // FIXME: Add optional ICCv4 support and support for multiple monitors. | 318 // FIXME: Add optional ICCv4 support and support for multiple monitors. |
| 319 gTargetColorProfile = qcms_profile_from_memory(profile.data(), profile.size(
)); | 319 gTargetColorProfile = qcms_profile_from_memory(profile.data(), profile.size(
)); |
| 320 if (!gTargetColorProfile) |
| 321 return; |
| 320 | 322 |
| 321 if (gTargetColorProfile && qcms_profile_is_bogus(gTargetColorProfile)) { | 323 if (qcms_profile_is_bogus(gTargetColorProfile)) { |
| 322 qcms_profile_release(gTargetColorProfile); | 324 qcms_profile_release(gTargetColorProfile); |
| 323 gTargetColorProfile = nullptr; | 325 gTargetColorProfile = nullptr; |
| 324 return; | 326 return; |
| 325 } | 327 } |
| 326 | 328 |
| 327 qcms_profile_precache_output_transform(gTargetColorProfile); | 329 qcms_profile_precache_output_transform(gTargetColorProfile); |
| 328 } | 330 } |
| 329 | 331 |
| 330 bool ImageDecoder::hasColorProfile() const | 332 bool ImageDecoder::hasColorProfile() const |
| 331 { | 333 { |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 } | 383 } |
| 382 | 384 |
| 383 bool ImageDecoder::hasColorProfile() const | 385 bool ImageDecoder::hasColorProfile() const |
| 384 { | 386 { |
| 385 return false; | 387 return false; |
| 386 } | 388 } |
| 387 | 389 |
| 388 #endif // USE(QCMSLIB) | 390 #endif // USE(QCMSLIB) |
| 389 | 391 |
| 390 } // namespace blink | 392 } // namespace blink |
| OLD | NEW |