mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-02 20:42:11 +02:00
LibWeb/WebGL: Factor in subarrays for typed arrays for generic methods
This commit is contained in:
committed by
Alexander Kalenik
parent
42cce393f4
commit
9b4bad4255
Notes:
github-actions[bot]
2025-01-08 14:58:55 +00:00
Author: https://github.com/Lubrsi Commit: https://github.com/LadybirdBrowser/ladybird/commit/9b4bad4255f Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2943 Reviewed-by: https://github.com/kalenikaliaksandr
@@ -1454,8 +1454,8 @@ public:
|
||||
size_t byte_size = 0;
|
||||
if (@buffer_source_name@->is_typed_array_base()) {
|
||||
auto& typed_array_base = static_cast<JS::TypedArrayBase&>(*@buffer_source_name@->raw_object());
|
||||
ptr = typed_array_base.viewed_array_buffer()->buffer().data();
|
||||
byte_size = typed_array_base.viewed_array_buffer()->byte_length();
|
||||
ptr = typed_array_base.viewed_array_buffer()->buffer().data() + typed_array_base.byte_offset();
|
||||
byte_size = @buffer_source_name@->byte_length();
|
||||
} else if (@buffer_source_name@->is_data_view()) {
|
||||
auto& data_view = static_cast<JS::DataView&>(*@buffer_source_name@->raw_object());
|
||||
ptr = data_view.viewed_array_buffer()->buffer().data();
|
||||
|
||||
Reference in New Issue
Block a user