chore: update CreateSkBitmapFromHICON usage for new API (no pointer)

refs: https://chromium-review.googlesource.com/c/chromium/src/+/1234372
This commit is contained in:
Samuel Attard 2018-10-28 11:11:20 +11:00 committed by deepak1556
parent c1b9ca14e7
commit 9d72bd4de4

View file

@ -195,11 +195,11 @@ base::win::ScopedHICON ReadICOFromPath(int size, const base::FilePath& path) {
bool ReadImageSkiaFromICO(gfx::ImageSkia* image, HICON icon) {
// Convert the icon from the Windows specific HICON to gfx::ImageSkia.
std::unique_ptr<SkBitmap> bitmap(IconUtil::CreateSkBitmapFromHICON(icon));
if (!bitmap)
SkBitmap bitmap = IconUtil::CreateSkBitmapFromHICON(icon);
if (bitmap.isNull())
return false;
image->AddRepresentation(gfx::ImageSkiaRep(*bitmap, 1.0f));
image->AddRepresentation(gfx::ImageSkiaRep(bitmap, 1.0f));
return true;
}
#endif