mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-30 06:52:52 +00:00
LibWeb/WebGL: Implement drawingBufferWidth and drawingBufferHeight
This commit is contained in:
parent
4dc65c57a0
commit
c199be061a
Notes:
github-actions[bot]
2024-12-13 08:21:09 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: c199be061a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2878
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/gmta
5 changed files with 32 additions and 2 deletions
|
@ -155,4 +155,16 @@ JS::Object* WebGL2RenderingContext::get_extension(String const&)
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
WebIDL::Long WebGL2RenderingContext::drawing_buffer_width() const
|
||||
{
|
||||
auto size = canvas_for_binding()->bitmap_size_for_canvas();
|
||||
return size.width();
|
||||
}
|
||||
|
||||
WebIDL::Long WebGL2RenderingContext::drawing_buffer_height() const
|
||||
{
|
||||
auto size = canvas_for_binding()->bitmap_size_for_canvas();
|
||||
return size.height();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue