commit | 59e3c75c060833b5b566ef6c209bc75e79bc04c5 | [log] [tgz] |
---|---|---|
author | Calder Kitagawa <ckitagawa@chromium.org> | Wed Jul 25 18:32:11 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Wed Jul 25 18:32:11 2018 |
tree | a4842fd8e1c1e67d87e3df84ded0bb377b1c7709 | |
parent | fde7180682ea53f003cbe95a012e3f1e4497b7b7 [diff] |
[Webapps] Fix splash screen scaling on Android P When loading splash_icon.xml on Android P, scaling doesn't occur until after the image is drawn. As a result, if we try to show a lower DPI image such as the mdpi icon, the Bitmap#getWidth/Bitmap#getHeight values will only return the original image size on Android P. What we actually want is the scaled image size. To do so we use Bitmap#getScaledWidth/Bitmap#getScaledHeight which return the scaled image size in pixels. This wasn't a problem on O and earlier since this scaling occurred when the bitmap was loaded into memory (prior to rendering). Bug: 819755 Change-Id: I86ad9466d653d4d8501a8c672925b2ba86819d8d Reviewed-on: https://chromium-review.googlesource.com/1148815 Reviewed-by: Peter Kotwicz <pkotwicz@chromium.org> Reviewed-by: Xi Han <hanxi@chromium.org> Reviewed-by: Dominick Ng <dominickn@chromium.org> Commit-Queue: Calder Kitagawa <ckitagawa@chromium.org> Cr-Commit-Position: refs/heads/master@{#577987}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .