diff --git a/atom/common/api/atom_api_native_image.cc b/atom/common/api/atom_api_native_image.cc index e202e174d9a0..27ee37682825 100644 --- a/atom/common/api/atom_api_native_image.cc +++ b/atom/common/api/atom_api_native_image.cc @@ -568,7 +568,7 @@ mate::Handle NativeImage::CreateFromBitmap( SkBitmap bitmap; bitmap.allocN32Pixels(width, height, false); - bitmap.setPixels(node::Buffer::Data(buffer)); + bitmap.writePixels({info, node::Buffer::Data(buffer), bitmap.rowBytes()}); gfx::ImageSkia image_skia; image_skia.AddRepresentation(gfx::ImageSkiaRep(bitmap, scale_factor));