| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * Copyright 2010, The Android Open Source Project | 2  * Copyright 2010, The Android Open Source Project | 
| 3  * | 3  * | 
| 4  * Licensed under the Apache License, Version 2.0 (the "License"); | 4  * Licensed under the Apache License, Version 2.0 (the "License"); | 
| 5  * you may not use this file except in compliance with the License. | 5  * you may not use this file except in compliance with the License. | 
| 6  * You may obtain a copy of the License at | 6  * You may obtain a copy of the License at | 
| 7  * | 7  * | 
| 8  *     http://www.apache.org/licenses/LICENSE-2.0 | 8  *     http://www.apache.org/licenses/LICENSE-2.0 | 
| 9  * | 9  * | 
| 10  * Unless required by applicable law or agreed to in writing, software | 10  * Unless required by applicable law or agreed to in writing, software | 
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 217             success = false; | 217             success = false; | 
| 218             break; | 218             break; | 
| 219         } | 219         } | 
| 220 | 220 | 
| 221         status = WebPIAppend(idec, input, bytesRead); | 221         status = WebPIAppend(idec, input, bytesRead); | 
| 222         if (VP8_STATUS_OK != status && VP8_STATUS_SUSPENDED != status) { | 222         if (VP8_STATUS_OK != status && VP8_STATUS_SUSPENDED != status) { | 
| 223             success = false; | 223             success = false; | 
| 224             break; | 224             break; | 
| 225         } | 225         } | 
| 226     } while (VP8_STATUS_OK != status); | 226     } while (VP8_STATUS_OK != status); | 
| 227     srcStorage.free(); | 227     srcStorage.reset(); | 
| 228     WebPIDelete(idec); | 228     WebPIDelete(idec); | 
| 229     WebPFreeDecBuffer(&config->output); | 229     WebPFreeDecBuffer(&config->output); | 
| 230 | 230 | 
| 231     return success; | 231     return success; | 
| 232 } | 232 } | 
| 233 | 233 | 
| 234 static bool webp_get_config_resize(WebPDecoderConfig* config, | 234 static bool webp_get_config_resize(WebPDecoderConfig* config, | 
| 235                                    SkBitmap* decodedBitmap, | 235                                    SkBitmap* decodedBitmap, | 
| 236                                    int width, int height, bool premultiply) { | 236                                    int width, int height, bool premultiply) { | 
| 237     WEBP_CSP_MODE mode = webp_decode_mode(decodedBitmap, premultiply); | 237     WEBP_CSP_MODE mode = webp_decode_mode(decodedBitmap, premultiply); | 
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 550     return SkImageDecoder::kUnknown_Format; | 550     return SkImageDecoder::kUnknown_Format; | 
| 551 } | 551 } | 
| 552 | 552 | 
| 553 static SkImageEncoder* sk_libwebp_efactory(SkImageEncoder::Type t) { | 553 static SkImageEncoder* sk_libwebp_efactory(SkImageEncoder::Type t) { | 
| 554     return (SkImageEncoder::kWEBP_Type == t) ? new SkWEBPImageEncoder : nullptr; | 554     return (SkImageEncoder::kWEBP_Type == t) ? new SkWEBPImageEncoder : nullptr; | 
| 555 } | 555 } | 
| 556 | 556 | 
| 557 static SkImageDecoder_DecodeReg gDReg(sk_libwebp_dfactory); | 557 static SkImageDecoder_DecodeReg gDReg(sk_libwebp_dfactory); | 
| 558 static SkImageDecoder_FormatReg gFormatReg(get_format_webp); | 558 static SkImageDecoder_FormatReg gFormatReg(get_format_webp); | 
| 559 static SkImageEncoder_EncodeReg gEReg(sk_libwebp_efactory); | 559 static SkImageEncoder_EncodeReg gEReg(sk_libwebp_efactory); | 
| OLD | NEW | 
|---|