[profiles] Fix image generation in GetPlaceholderAvatarIconWithColors
GetPlaceholderAvatarIconWithColors() constructs an gfx::ImageSkia from an ImageSkiaSource and size. This code has a bug because the function passes the size parameter as int instead of gfx::Size. gfx::ImageSkia() has another constructor overload that accepts `float scale` as the second parameter. This overload is being called by mistake. The result image doesn't have any obvious visible defects but the creation of an image with a very large scale (>70.0) takes a lot of time (>700ms). Bug: 1122114 Change-Id: Ibf53dca2b361145703a77c970d255e25453bbca9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2376856 Auto-Submit: Alex Ilin <alexilin@chromium.org> Reviewed-by:David Roger <droger@chromium.org> Commit-Queue: David Roger <droger@chromium.org> Cr-Commit-Position: refs/heads/master@{#802151}
Showing
Please register or sign in to comment