Charles Kerr
3d2f68a9df
refactor: spanify image utils (#44127)
* 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
2024-10-10 09:34:55 -04:00
..
2024-10-10 09:34:55 -04:00
2024-09-24 15:41:24 -05:00
2024-09-12 16:05:37 +02:00
2024-10-07 18:06:47 -05:00
2024-09-18 16:23:29 -05:00
2024-07-22 11:31:32 +02:00
2022-04-28 10:28:27 -04:00
2024-09-26 17:09:42 -05:00
2023-09-01 15:54:59 +09:00
2024-09-12 16:05:37 +02:00
2023-09-07 17:14:01 +09:00
2023-09-07 17:14:01 +09:00
2024-08-12 10:28:33 +02:00
2024-09-12 16:05:37 +02:00
2023-12-13 13:01:03 -08:00
2024-09-16 15:53:04 -05:00
2022-06-29 12:55:47 -07:00
2022-02-09 18:58:52 -08:00
2022-02-09 18:58:52 -08:00
2023-06-08 16:40:08 -04:00
2024-07-25 11:25:45 +02:00
2022-05-09 10:26:57 -04:00
2024-10-09 12:18:19 -05:00
2021-11-22 16:34:31 +09:00
2024-08-26 13:19:05 -05:00
2024-07-02 09:51:33 +02:00
2024-01-10 19:00:37 -06:00
2022-11-09 10:50:43 -05:00
2020-05-04 10:49:29 -07:00
2024-07-25 11:25:45 +02:00
2021-11-22 16:34:31 +09:00
2024-08-21 15:26:06 -05:00
2021-11-22 16:34:31 +09:00
2024-08-20 15:34:59 -04:00
2024-07-22 11:31:32 +02:00
2024-09-16 15:53:04 -05:00
2024-07-22 11:31:32 +02:00
2024-09-12 16:05:37 +02:00
2024-07-22 11:31:32 +02:00
2024-09-17 01:38:56 -07:00
2024-09-09 14:13:39 +02:00
2024-09-27 10:17:06 +09:00
2024-10-10 09:34:55 -04:00
2024-10-10 09:34:55 -04:00
2024-08-22 19:23:13 -05:00
2024-08-22 19:23:13 -05:00
2022-06-29 12:55:47 -07:00
2024-09-26 17:09:42 -05:00
2024-09-17 01:38:56 -07:00
2024-09-23 22:37:32 -07:00
2024-07-22 11:31:32 +02:00
2023-10-16 12:25:11 -04:00
2024-02-21 15:27:05 -05:00
2022-10-27 12:37:04 -04:00
2024-08-12 10:28:33 +02:00
2024-09-16 15:53:04 -05:00
2024-09-16 15:53:04 -05:00
2024-10-10 09:34:55 -04:00
2024-10-10 09:34:55 -04:00
2022-11-17 14:59:23 -05:00
2024-09-10 15:05:05 -05:00
2022-03-24 21:39:03 -04:00
2021-11-22 16:34:31 +09:00