Chromium Code Reviews| Index: ui/gfx/image/image_family.cc |
| diff --git a/ui/gfx/image/image_family.cc b/ui/gfx/image/image_family.cc |
| index af0c2bf3675b367d9c78c7a428f38d0ddd4d2f77..0b80eef50a27fb1c1972cb1030ff2e166408dd6c 100644 |
| --- a/ui/gfx/image/image_family.cc |
| +++ b/ui/gfx/image/image_family.cc |
| @@ -117,8 +117,10 @@ gfx::Image ImageFamily::CreateExact(int width, int height) const { |
| if (!image) |
| return gfx::Image(); |
| - if (image->Width() == width && image->Height() == height) |
| - return gfx::Image(*image); |
| + if (image->Width() == width && image->Height() == height) { |
| + std::unique_ptr<gfx::ImageSkia> image_skia(image->CopyImageSkia()); |
|
Robert Sesek
2017/02/22 18:44:46
I'd leave a comment here as to why this is done.
tzik
2017/02/22 22:01:16
Done.
|
| + return gfx::Image(*image_skia); |
| + } |
| SkBitmap bitmap = image->AsBitmap(); |
| SkBitmap resized_bitmap = skia::ImageOperations::Resize( |