New issue
Advanced search Search tips

Issue 857240 link

Starred by 2 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

ash::WallpaperDecoder can't decode png images

Project Member Reported by wzang@chromium.org, Jun 27 2018

Issue description

The new wallpaper picker provides several images in .png format, and the wallpaper decoder in //ash does not support it. Users can't set these wallpapers.

 
Screenshot 2018-06-27 at 3.12.29 PM.png
1.4 MB View Download

Comment 1 by wzang@chromium.org, Jun 28 2018

Cc: mkarkada@chromium.org dhadd...@chromium.org sdantul...@chromium.org wzang@chromium.org
 Issue 857563  has been merged into this issue.
Project Member

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

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

commit e9c0963c5214fbcbf4f5adb3469413283191d6a4
Author: Wenzhao Zang <wzang@chromium.org>
Date: Fri Jun 29 18:12:07 2018

cros: ash::WallpaperDecoder should be able to decode png images

This issue is not very easy to fix since:
- The png decoder is not reliable according to [1]
- The default codec is considered "unsafe", confirmed by multiple
  sources (e.g. [2], [3])

So I think we should continue to use the jpeg decoder on login screen
(it's always working because we re-encode all the wallpaper images in
jpeg [4]) and make an "exception" to use the default codec only when
it's safe. This will solve the issue because online wallpapers used to
be decoded by the code point at [3] before the refactoring, which uses
default codec.

[1]
https://cs.chromium.org/chromium/src/ui/gfx/codec/png_codec.h?dr=Ss&g=0&l=24
[2]
https://cs.chromium.org/chromium/src/chrome/browser/chromeos/login/users/avatar/user_image_manager_impl.cc?type=cs&q=DEFAULT_CODEC&sq=package:chromium&g=0&l=386
[3]
https://cs.chromium.org/chromium/src/chrome/browser/chromeos/extensions/wallpaper_function_base.cc?q=wallpaper_function_base&sq=package:chromium&dr=C&l=81
[4]
https://cs.chromium.org/chromium/src/ash/wallpaper/wallpaper_controller.cc?type=cs&g=0&l=207

Bug:  857240 
Change-Id: I1bb0f1351a72acec233539e08c43221c8952d032
Reviewed-on: https://chromium-review.googlesource.com/1117764
Reviewed-by: Xiaoqian Dai <xdai@chromium.org>
Commit-Queue: Wenzhao (Colin) Zang <wzang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#571546}
[modify] https://crrev.com/e9c0963c5214fbcbf4f5adb3469413283191d6a4/ash/wallpaper/wallpaper_controller.cc
[modify] https://crrev.com/e9c0963c5214fbcbf4f5adb3469413283191d6a4/ash/wallpaper/wallpaper_utils/wallpaper_decoder.cc
[modify] https://crrev.com/e9c0963c5214fbcbf4f5adb3469413283191d6a4/ash/wallpaper/wallpaper_utils/wallpaper_decoder.h

Comment 3 by wzang@chromium.org, Jun 29 2018

Status: Fixed (was: Started)

Sign in to add a comment