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>
2 files changed