| 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 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 WebPChunkIterator chunkIterator; | 327 WebPChunkIterator chunkIterator; |
| 328 if (!WebPDemuxGetChunk(m_demux, "ICCP", 1, &chunkIterator)) { | 328 if (!WebPDemuxGetChunk(m_demux, "ICCP", 1, &chunkIterator)) { |
| 329 WebPDemuxReleaseChunkIterator(&chunkIterator); | 329 WebPDemuxReleaseChunkIterator(&chunkIterator); |
| 330 return; | 330 return; |
| 331 } | 331 } |
| 332 | 332 |
| 333 const char* profileData = | 333 const char* profileData = |
| 334 reinterpret_cast<const char*>(chunkIterator.chunk.bytes); | 334 reinterpret_cast<const char*>(chunkIterator.chunk.bytes); |
| 335 size_t profileSize = chunkIterator.chunk.size; | 335 size_t profileSize = chunkIterator.chunk.size; |
| 336 | 336 |
| 337 setColorProfileAndComputeTransform(profileData, profileSize); | 337 setEmbeddedColorProfile(profileData, profileSize); |
| 338 | 338 |
| 339 WebPDemuxReleaseChunkIterator(&chunkIterator); | 339 WebPDemuxReleaseChunkIterator(&chunkIterator); |
| 340 } | 340 } |
| 341 | 341 |
| 342 void WEBPImageDecoder::applyPostProcessing(size_t frameIndex) { | 342 void WEBPImageDecoder::applyPostProcessing(size_t frameIndex) { |
| 343 ImageFrame& buffer = m_frameBufferCache[frameIndex]; | 343 ImageFrame& buffer = m_frameBufferCache[frameIndex]; |
| 344 int width; | 344 int width; |
| 345 int decodedHeight; | 345 int decodedHeight; |
| 346 if (!WebPIDecGetRGB(m_decoder, &decodedHeight, &width, 0, 0)) | 346 if (!WebPIDecGetRGB(m_decoder, &decodedHeight, &width, 0, 0)) |
| 347 return; // See also https://bugs.webkit.org/show_bug.cgi?id=74062 | 347 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... |
| 557 return false; | 557 return false; |
| 558 } | 558 } |
| 559 // FALLTHROUGH | 559 // FALLTHROUGH |
| 560 default: | 560 default: |
| 561 clear(); | 561 clear(); |
| 562 return setFailed(); | 562 return setFailed(); |
| 563 } | 563 } |
| 564 } | 564 } |
| 565 | 565 |
| 566 } // namespace blink | 566 } // namespace blink |
| OLD | NEW |