New issue
Advanced search Search tips

Issue 842997 link

Starred by 6 users

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

scaled icon in launcher looks bad

Project Member Reported by osh...@chromium.org, May 15 2018

Issue description

tested on low dpi with different display size (zoom).

Not sure if this is regression nor has been this way.

wutao@ can you look into this?
 

Comment 1 by osh...@chromium.org, May 15 2018

Cc: malaykeshav@chromium.org
Summary: scaled icon in launcher looks badstable (was: scaled icon in launcher looks bad)
I saw a similar regression but only for android app icons. Chrome icons are sharp.
Cc: newcomer@chromium.org
+alex who worked on the same bug for the shelf icons

Comment 4 by wutao@chromium.org, May 15 2018

Malay and Alex,  is this ToT?

Yes this is ToT.

Comment 6 by osh...@chromium.org, May 17 2018

Summary: scaled icon in launcher looks bad (was: scaled icon in launcher looks badstable)

Comment 7 by wutao@chromium.org, May 24 2018

Cc: xiy...@chromium.org
The icons in the suggested row look bad, but the icons in the apps grid look normal.

Malay, not sure what did you see.

Comment 8 by wutao@chromium.org, May 24 2018

The shelf icons look fine to me.

Comment 9 by xiy...@chromium.org, May 24 2018

possible to attach screenshots?

Comment 10 by wutao@chromium.org, May 24 2018

xiyuan@, please see the attached images. See Hangout app as an example.
In the suggested row, the icon quality is worse than the icon in the apps_grid.
Icon_quality.png
870 KB View Download

Comment 11 by wutao@chromium.org, May 24 2018

To repo #10, at EVE, decrease the UI resolution by pressing "ctrl + shift + =" all the way to no changes any more.
Is that an ARC app or chrome app?

Comment 13 by wutao@chromium.org, May 24 2018

I think it does not matter. Please see this attached app, the Files and Settings app icon also worse in Suggested row.

Screenshot 2018-05-24 at 16.01.51.png
440 KB View Download
Screenshot 2018-05-24 at 16.02.19.png
863 KB View Download

Comment 16 by wutao@chromium.org, May 25 2018

In #15, maybe we need to do this:

metadata_->icon = icon;
metadata_->icon.EnsureRepsForSupportedScales();

Re #15: Right. Ignore my comment in #14 since we already do that.

Re #16: It should not be necessary. EnsureRepsForSupportedScales updates |storage_|, which is ref-counted and shared when creating a ImageSkia by copy/assignment.

Well, we have to add logs to see where the representations got lost. Logging the icon.image_reps().size() in chrome, in AppListControllerImpl::SetSearchResultMetadata and SearchResultTileItemView::OnMetadataChanged. And check whether the ImageSkia has expected reps inside along the path.
Components: UI>Shell>Launcher

Comment 19 by wutao@chromium.org, May 29 2018

On Eve and Desktop emulator, I only get two icon.image_reps() with scales: 1 and 2.

Is this why other scale get bad quality?
Does disabling pixel canvas fix this?

Comment 21 by wutao@chromium.org, May 30 2018

#20, disabling the features::kEnablePixelCanvasRecording, does not fix this.
#19, that's the image scale and expected for scaled image (at least right now)

For the launcher I believe what we want is to use the highest image as an unscaled image, then downscale (or upscale if necessary) using RESIZE_BEST. 
Re #19: As oshima said, two reps with scale 1 and 2 are expected. Do we get them on the app list ui side as well?

Comment 24 by wutao@chromium.org, May 30 2018

#23, yes, I have two bmp with pixel of 48 and 96 at the SearchResultTileItemView.

Comparing ChromeSearchResult (bad quality image) and ChromeAppListItem (good quality), the only difference is that in AppListItemView::SetIcon, we CreateResizedImage using RESIZE_BEST again [1].

Adding the resize in SearchResultTileItemView::SetIcon [2] fixes this bug.

[1] https://cs.chromium.org/chromium/src/ui/app_list/views/app_list_item_view.cc?l=127&rcl=c8dce893601359f0a97e8d2657bb1395a8edcb53

[2]
https://cs.chromium.org/chromium/src/ui/app_list/views/search_result_tile_item_view.cc?l=398&rcl=c8dce893601359f0a97e8d2657bb1395a8edcb53



Comment 25 by wutao@chromium.org, May 30 2018

Issue 841998 has been merged into this issue.
Project Member

Comment 26 by bugdroid1@chromium.org, May 30 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/10c002c62a6d5f4cd26065ce4a5c81150a580cd5

commit 10c002c62a6d5f4cd26065ce4a5c81150a580cd5
Author: wutao <wutao@chromium.org>
Date: Wed May 30 22:35:30 2018

app_list: Resize icon in search result view

When SetIcon in the SearchResultTileItemview, the icon is not resized
for different display size. Therefore the image quality is bad when the
scale is not 1. Resizing the icon will fix this bug.

Bug:  842997 
Test: manual
Change-Id: I00189636fbb2499e778f777d7e93cd60a3cc9057
Reviewed-on: https://chromium-review.googlesource.com/1080011
Reviewed-by: Xiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Tao Wu <wutao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#563035}
[modify] https://crrev.com/10c002c62a6d5f4cd26065ce4a5c81150a580cd5/ui/app_list/views/search_result_tile_item_view.cc

Comment 27 by wutao@chromium.org, May 30 2018

Labels: Merge-Request-68
Project Member

Comment 28 by sheriffbot@chromium.org, May 31 2018

Labels: -Merge-Request-68 Hotlist-Merge-Approved Merge-Approved-68
Your change meets the bar and is auto-approved for M68. Please go ahead and merge the CL to branch 3440 manually. Please contact milestone owner if you have questions.
Owners: cmasso@(Android), kariahda@(iOS), bhthompson@(ChromeOS), abdulsyed@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 29 by bugdroid1@chromium.org, Jun 1 2018

Labels: -merge-approved-68 merge-merged-3440
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0c086c306669727596be8660adabf242c8ac6e99

commit 0c086c306669727596be8660adabf242c8ac6e99
Author: wutao <wutao@chromium.org>
Date: Fri Jun 01 17:52:57 2018

M68 merge: app_list: Resize icon in search result view

When SetIcon in the SearchResultTileItemview, the icon is not resized
for different display size. Therefore the image quality is bad when the scale is not 1. Resizing the icon will fix this bug.

TBR=xiyuan@chromium.org

Bug:  842997 
Test: manual
Change-Id: I00189636fbb2499e778f777d7e93cd60a3cc9057
Reviewed-on: https://chromium-review.googlesource.com/1080011
Reviewed-by: Xiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Tao Wu <wutao@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#563035}(cherry picked from commit 10c002c62a6d5f4cd26065ce4a5c81150a580cd5)
Reviewed-on: https://chromium-review.googlesource.com/1082811
Reviewed-by: Tao Wu <wutao@chromium.org>
Cr-Commit-Position: refs/branch-heads/3440@{#92}
Cr-Branched-From: 010ddcfda246975d194964ccf20038ebbdec6084-refs/heads/master@{#561733}
[modify] https://crrev.com/0c086c306669727596be8660adabf242c8ac6e99/ui/app_list/views/search_result_tile_item_view.cc

Status: Fixed (was: Assigned)
Cc: wutao@chromium.org jopra@chromium.org osh...@chromium.org
 Issue 847317  has been merged into this issue.
Just a follow up. The quality of the scaling algorithm used in ImageView when the size doesn't match is low.

https://cs.chromium.org/chromium/src/ui/views/controls/image_view.cc?rcl=839d0e8229bad522896c5f6f8e242c2631c6c272&l=217

Note that it can be scaled again for the target scale

https://cs.chromium.org/chromium/src/ui/gfx/image/image_skia.cc?rcl=3d7f15c742e7aff293b9b2065837bf98cb3a042b&l=60

and the best way would still be using unscaled image with highest available
image, but if pre-scaling with high quality scaling works, then it should be fine.

Sign in to add a comment