| 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 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 WebPChunkIterator chunk_iterator; | 281 WebPChunkIterator chunk_iterator; |
| 282 if (!WebPDemuxGetChunk(demux_, "ICCP", 1, &chunk_iterator)) { | 282 if (!WebPDemuxGetChunk(demux_, "ICCP", 1, &chunk_iterator)) { |
| 283 WebPDemuxReleaseChunkIterator(&chunk_iterator); | 283 WebPDemuxReleaseChunkIterator(&chunk_iterator); |
| 284 return; | 284 return; |
| 285 } | 285 } |
| 286 | 286 |
| 287 const char* profile_data = | 287 const char* profile_data = |
| 288 reinterpret_cast<const char*>(chunk_iterator.chunk.bytes); | 288 reinterpret_cast<const char*>(chunk_iterator.chunk.bytes); |
| 289 size_t profile_size = chunk_iterator.chunk.size; | 289 size_t profile_size = chunk_iterator.chunk.size; |
| 290 | 290 |
| 291 SetEmbeddedColorProfile(profile_data, profile_size); | 291 SetEmbeddedColorProfile(profile_data, profile_size, |
| 292 SkColorSpace::kRGB_ICCTypeFlag); |
| 292 | 293 |
| 293 WebPDemuxReleaseChunkIterator(&chunk_iterator); | 294 WebPDemuxReleaseChunkIterator(&chunk_iterator); |
| 294 } | 295 } |
| 295 | 296 |
| 296 void WEBPImageDecoder::ApplyPostProcessing(size_t frame_index) { | 297 void WEBPImageDecoder::ApplyPostProcessing(size_t frame_index) { |
| 297 ImageFrame& buffer = frame_buffer_cache_[frame_index]; | 298 ImageFrame& buffer = frame_buffer_cache_[frame_index]; |
| 298 int width; | 299 int width; |
| 299 int decoded_height; | 300 int decoded_height; |
| 300 if (!WebPIDecGetRGB(decoder_, &decoded_height, &width, 0, 0)) | 301 if (!WebPIDecGetRGB(decoder_, &decoded_height, &width, 0, 0)) |
| 301 return; // See also https://bugs.webkit.org/show_bug.cgi?id=74062 | 302 return; // See also https://bugs.webkit.org/show_bug.cgi?id=74062 |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 516 return false; | 517 return false; |
| 517 } | 518 } |
| 518 // FALLTHROUGH | 519 // FALLTHROUGH |
| 519 default: | 520 default: |
| 520 Clear(); | 521 Clear(); |
| 521 return SetFailed(); | 522 return SetFailed(); |
| 522 } | 523 } |
| 523 } | 524 } |
| 524 | 525 |
| 525 } // namespace blink | 526 } // namespace blink |
| OLD | NEW |