Skip to content

Commit

Permalink
fix: copy pixels in NativeImage::CreateFromBitmap (#17844)
Browse files Browse the repository at this point in the history
  • Loading branch information
miniak authored and zcbenz committed Apr 18, 2019
1 parent f1ee35e commit 3c2ff97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion atom/common/api/atom_api_native_image.cc
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ mate::Handle<NativeImage> 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));
Expand Down

0 comments on commit 3c2ff97

Please sign in to comment.