mirror of
https://github.com/RGBCube/serenity
synced 2025-07-23 10:47:36 +00:00
LibWeb/WebGL: Add WebGLRenderingContextBase.canvas
This commit is contained in:
parent
0ec8a19a34
commit
50642f85ac
3 changed files with 11 additions and 0 deletions
|
@ -77,6 +77,11 @@ HTML::HTMLCanvasElement const& WebGLRenderingContextBase::canvas_element() const
|
||||||
return ref_count_target();
|
return ref_count_target();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NonnullRefPtr<HTML::HTMLCanvasElement> WebGLRenderingContextBase::canvas_for_binding() const
|
||||||
|
{
|
||||||
|
return canvas_element();
|
||||||
|
}
|
||||||
|
|
||||||
void WebGLRenderingContextBase::needs_to_present()
|
void WebGLRenderingContextBase::needs_to_present()
|
||||||
{
|
{
|
||||||
m_should_present = true;
|
m_should_present = true;
|
||||||
|
|
|
@ -23,6 +23,8 @@ public:
|
||||||
|
|
||||||
void present();
|
void present();
|
||||||
|
|
||||||
|
NonnullRefPtr<HTML::HTMLCanvasElement> canvas_for_binding() const;
|
||||||
|
|
||||||
bool is_context_lost() const;
|
bool is_context_lost() const;
|
||||||
|
|
||||||
Optional<Vector<String>> get_supported_extensions() const;
|
Optional<Vector<String>> get_supported_extensions() const;
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
#import <HTML/HTMLCanvasElement.idl>
|
||||||
#import <WebGL/Types.idl>
|
#import <WebGL/Types.idl>
|
||||||
|
|
||||||
dictionary WebGLContextAttributes {
|
dictionary WebGLContextAttributes {
|
||||||
|
@ -18,6 +19,9 @@ interface mixin WebGLRenderingContextBase {
|
||||||
// IDL code generator. This also allows us to handle the return type ourselves instead of adding the complexity of the
|
// IDL code generator. This also allows us to handle the return type ourselves instead of adding the complexity of the
|
||||||
// code generator working out the return type and returning the appropriate value to return on context loss.
|
// code generator working out the return type and returning the appropriate value to return on context loss.
|
||||||
|
|
||||||
|
// FIXME: The type should be (HTMLCanvasElement or OffscreenCanvas).
|
||||||
|
[ImplementedAs=canvas_for_binding] readonly attribute HTMLCanvasElement canvas;
|
||||||
|
|
||||||
boolean isContextLost();
|
boolean isContextLost();
|
||||||
|
|
||||||
sequence<DOMString>? getSupportedExtensions();
|
sequence<DOMString>? getSupportedExtensions();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue