mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-20 11:36:10 +00:00
LibWeb/WebGL: Factor in subarrays for typed arrays for generic methods
This commit is contained in:
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
1 changed files with 2 additions and 2 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Reference in a new issue