mirror of https://github.com/electron/electron
3d2f68a9df
* refactor: electron::util::AddImageSkiaRepFromJPEG() takes a span arg * refactor: electron::util::AddImageSkiaRepFromPNG() takes a span arg * refactor: electron::util::AddImageSkiaRepFromBuffer() takes a span arg * feat: add Node-buffer-to-base-span helper function * refactor: electron::api::NativeImage::CreateFromPNG() now takes a span param * refactor: electron::api::NativeImage::CreateFromJPEG() now takes a span param * refactor: use base::as_byte_span() * fix: -Wunsafe-buffer-usage warning in NativeImage::CreateFromNamedImage() Warning fixed by this commit: ../../electron/shell/common/api/electron_api_native_image_mac.mm:131:11: error: function introduces unsafe buffer manipulation [-Werror,-Wunsafe-buffer-usage] 131 | {reinterpret_cast<const uint8_t*>((char*)[png_data bytes]), | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 132 | [png_data length]}); | ~~~~~~~~~~~~~~~~~~ ../../electron/shell/common/api/electron_api_native_image_mac.mm:131:11: note: See //docs/unsafe_buffers.md for help. * chore: add // SAFETY comment for Node-buffer-to-span func * chore: add // SAFETY comment for NSData-to-span func |
||
---|---|---|
.. | ||
api.mojom | ||
crashpad_support.cc | ||
electron_api_asar.cc | ||
electron_api_clipboard.cc | ||
electron_api_clipboard.h | ||
electron_api_clipboard_mac.mm | ||
electron_api_command_line.cc | ||
electron_api_environment.cc | ||
electron_api_native_image.cc | ||
electron_api_native_image.h | ||
electron_api_native_image_mac.mm | ||
electron_api_native_image_win.cc | ||
electron_api_net.cc | ||
electron_api_shell.cc | ||
electron_api_testing.cc | ||
electron_api_url_loader.cc | ||
electron_api_url_loader.h | ||
electron_api_v8_util.cc | ||
electron_bindings.cc | ||
electron_bindings.h | ||
features.cc |