commit | 61f2b927d606c228cb8298b69b3165f02d677e85 | [log] [tgz] |
---|---|---|
author | Wenzhao Zang <wzang@chromium.org> | Tue May 01 16:50:30 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Tue May 01 16:50:30 2018 |
tree | 092543798fec6fd015712abc45725156a12d4f7a | |
parent | 98e3cb92c9dee46a3930327587d41aa954edccaa [diff] |
cros: Add function for getting current wallpaper thumbnail We need to show the thumbnail of the currently set wallpaper in the new wallpaper picker. The picker can't locate the thumbnail data if: 1) The wallpaper was set from third-party wallpaper apps, because they may not generate thumbnails for their wallpapers. 2) An online wallpaper from the old wallpaper picker is getting synced to the device with the new picker, in which case the old wallpaper thumbnail has never been saved to local file system. The most fault-tolerant way to fix this is to create an extension function to generate the thumbnail of the current wallpaper image. Since the |ImageSkia| is passed with a shared buffer via mojo, and the thumbnail size is small, it's expected to be fast. Note there're various "generate thumbnail" functions in the legacy code, and we'll be able to clean up some of them: 1) The |generateThumbnail| for custom wallpapers. We can remove this since the new picker does not need this. 2) The generate/save thumbnail methods for online wallpapers. It's not strictly necessary for the new picker, but when the device is offline, this will enable users to see a black-white version of the wallpapers. So this part needs UX decision. Bug: 834873 Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation Change-Id: Ia837a5dc0ad60a1c587cc515c023077bf78e5834 Reviewed-on: https://chromium-review.googlesource.com/1030782 Reviewed-by: Toni Barzic <tbarzic@chromium.org> Reviewed-by: Gayane Petrosyan <gayane@chromium.org> Reviewed-by: Xiaoqian Dai <xdai@chromium.org> Commit-Queue: Wenzhao (Colin) Zang <wzang@chromium.org> Cr-Commit-Position: refs/heads/master@{#555072}
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 .