| 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 blink::ImageFrame::blendSrcOverDstRaw(pixel, prevPixel); | 110 blink::ImageFrame::blendSrcOverDstRaw(pixel, prevPixel); |
| 111 } | 111 } |
| 112 } | 112 } |
| 113 } | 113 } |
| 114 | 114 |
| 115 } // namespace | 115 } // namespace |
| 116 | 116 |
| 117 namespace blink { | 117 namespace blink { |
| 118 | 118 |
| 119 WEBPImageDecoder::WEBPImageDecoder(AlphaOption alphaOption, | 119 WEBPImageDecoder::WEBPImageDecoder(AlphaOption alphaOption, |
| 120 ColorSpaceOption colorOptions, | 120 const ColorBehavior& colorBehavior, |
| 121 sk_sp<SkColorSpace> targetColorSpace, | |
| 122 size_t maxDecodedBytes) | 121 size_t maxDecodedBytes) |
| 123 : ImageDecoder(alphaOption, | 122 : ImageDecoder(alphaOption, colorBehavior, maxDecodedBytes), |
| 124 colorOptions, | |
| 125 std::move(targetColorSpace), | |
| 126 maxDecodedBytes), | |
| 127 m_decoder(0), | 123 m_decoder(0), |
| 128 m_formatFlags(0), | 124 m_formatFlags(0), |
| 129 m_frameBackgroundHasAlpha(false), | 125 m_frameBackgroundHasAlpha(false), |
| 130 m_demux(0), | 126 m_demux(0), |
| 131 m_demuxState(WEBP_DEMUX_PARSING_HEADER), | 127 m_demuxState(WEBP_DEMUX_PARSING_HEADER), |
| 132 m_haveAlreadyParsedThisData(false), | 128 m_haveAlreadyParsedThisData(false), |
| 133 m_repetitionCount(cAnimationLoopOnce), | 129 m_repetitionCount(cAnimationLoopOnce), |
| 134 m_decodedHeight(0) { | 130 m_decodedHeight(0) { |
| 135 m_blendFunction = (alphaOption == AlphaPremultiplied) | 131 m_blendFunction = (alphaOption == AlphaPremultiplied) |
| 136 ? alphaBlendPremultiplied | 132 ? alphaBlendPremultiplied |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 513 return false; | 509 return false; |
| 514 } | 510 } |
| 515 // FALLTHROUGH | 511 // FALLTHROUGH |
| 516 default: | 512 default: |
| 517 clear(); | 513 clear(); |
| 518 return setFailed(); | 514 return setFailed(); |
| 519 } | 515 } |
| 520 } | 516 } |
| 521 | 517 |
| 522 } // namespace blink | 518 } // namespace blink |
| OLD | NEW |