commit | dba7f46122ba3b1cdb8890eec92aa7b3534781b6 | [log] [tgz] |
---|---|---|
author | Daniel Dilan <danieldilan@google.com> | Wed Jan 08 14:51:17 2025 -0500 |
committer | SkCQ <skcq-be@skia-corp.google.com.iam.gserviceaccount.com> | Fri Jan 10 07:26:13 2025 -0800 |
tree | b3469b1ab8086a23b6a566ff889bce6bc46c0218 | |
parent | 5f2e30e0c8bd00b2ff314a6c751ceac95fedb913 [diff] |
Automatically scale animated webp post-decode in Android Due to limitations in libwebp and the constraints of the Skia API, decoding animated webp images into a scaled bitmap won't be correct (similar to this bug: https://b.corp.google.com/issues/40038560). However for android we can make it so that post-decode scaling is automatically applied instead of decoding into a scaled bitmap while not breaking any requirements for this API: https://developer.android.com/reference/android/graphics/ImageDecoder#setTargetSize(int,%20int). For reference this change makes it such that the scaling is applied to the fMatrix by modifying computeSampleSize here: https://source.chromium.org/chromium/chromium/src/+/main:third_party/skia/src/android/SkAnimatedImage.cpp;drc=e56bb46671597b175df302e5b3b2b6c26c7a7d04;l=97 Bug: 375423074 Change-Id: I9c73524042380c2d739746b900b7c0aa6173ce7f Reviewed-on: https://skia-review.googlesource.com/c/skia/+/936537 Commit-Queue: Daniel Dilan <danieldilan@google.com> Reviewed-by: Florin Malita <fmalita@google.com>