Skip to content

Commit

Permalink
[Tablet GTS] Avoid bitmap resize when thumbnail width or height are n…
Browse files Browse the repository at this point in the history
…ot set

(cherry picked from commit 9d773e8)

Bug: 1319350
Change-Id: Id61f33c3377b418644f10fd3c7cbaf7cdc9c9b47
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3605970
Reviewed-by: Theresa Sullivan <twellington@chromium.org>
Reviewed-by: Neil Coronado <nemco@google.com>
Commit-Queue: Sirisha Kavuluru <skavuluru@google.com>
Cr-Original-Commit-Position: refs/heads/main@{#995759}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3607397
Cr-Commit-Position: refs/branch-heads/5005@{#196}
Cr-Branched-From: 5b4d945-refs/heads/main@{#992738}
  • Loading branch information
Sirisha Kavuluru authored and Chromium LUCI CQ committed Apr 27, 2022
1 parent 46907f8 commit e430a80
Showing 1 changed file with 3 additions and 0 deletions.
Expand Up @@ -368,6 +368,9 @@ private static void updateThumbnail(ViewLookupCachingFrameLayout view, PropertyM
}

private static Bitmap resizeBitmap(Bitmap source, int newWidth, int newHeight) {
if (newWidth <= 0 || newHeight <= 0) {
return source;
}
return Bitmap.createScaledBitmap(source, newWidth, newHeight, true);
}

Expand Down

0 comments on commit e430a80

Please sign in to comment.