chore: update CreateSkBitmapFromHICON usage for new API (no pointer)
refs: https://chromium-review.googlesource.com/c/chromium/src/+/1234372
This commit is contained in:
parent
c1b9ca14e7
commit
9d72bd4de4
1 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue