| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 WebPChunkIterator chunkIterator; | 308 WebPChunkIterator chunkIterator; |
| 309 if (!WebPDemuxGetChunk(m_demux, "ICCP", 1, &chunkIterator)) { | 309 if (!WebPDemuxGetChunk(m_demux, "ICCP", 1, &chunkIterator)) { |
| 310 WebPDemuxReleaseChunkIterator(&chunkIterator); | 310 WebPDemuxReleaseChunkIterator(&chunkIterator); |
| 311 return; | 311 return; |
| 312 } | 312 } |
| 313 | 313 |
| 314 const char* profileData = | 314 const char* profileData = |
| 315 reinterpret_cast<const char*>(chunkIterator.chunk.bytes); | 315 reinterpret_cast<const char*>(chunkIterator.chunk.bytes); |
| 316 size_t profileSize = chunkIterator.chunk.size; | 316 size_t profileSize = chunkIterator.chunk.size; |
| 317 | 317 |
| 318 setColorProfileAndComputeTransform(profileData, profileSize); | 318 setEmbeddedColorProfile(profileData, profileSize); |
| 319 | 319 |
| 320 WebPDemuxReleaseChunkIterator(&chunkIterator); | 320 WebPDemuxReleaseChunkIterator(&chunkIterator); |
| 321 } | 321 } |
| 322 | 322 |
| 323 void WEBPImageDecoder::applyPostProcessing(size_t frameIndex) { | 323 void WEBPImageDecoder::applyPostProcessing(size_t frameIndex) { |
| 324 ImageFrame& buffer = m_frameBufferCache[frameIndex]; | 324 ImageFrame& buffer = m_frameBufferCache[frameIndex]; |
| 325 int width; | 325 int width; |
| 326 int decodedHeight; | 326 int decodedHeight; |
| 327 if (!WebPIDecGetRGB(m_decoder, &decodedHeight, &width, 0, 0)) | 327 if (!WebPIDecGetRGB(m_decoder, &decodedHeight, &width, 0, 0)) |
| 328 return; // See also https://bugs.webkit.org/show_bug.cgi?id=74062 | 328 return; // See also https://bugs.webkit.org/show_bug.cgi?id=74062 |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 538 return false; | 538 return false; |
| 539 } | 539 } |
| 540 // FALLTHROUGH | 540 // FALLTHROUGH |
| 541 default: | 541 default: |
| 542 clear(); | 542 clear(); |
| 543 return setFailed(); | 543 return setFailed(); |
| 544 } | 544 } |
| 545 } | 545 } |
| 546 | 546 |
| 547 } // namespace blink | 547 } // namespace blink |
| OLD | NEW |