mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-08 01:00:05 +00:00
LibWeb/WebGL: Implement getContextAttributes()
This commit is contained in:
parent
a8c282a30e
commit
c817eb8d2b
Notes:
github-actions[bot]
2024-12-05 08:57:56 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: c817eb8d2b
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2776
8 changed files with 22 additions and 18 deletions
|
@ -7,15 +7,10 @@
|
|||
#pragma once
|
||||
|
||||
#include <LibJS/Forward.h>
|
||||
#include <LibWeb/Bindings/WebGLRenderingContextPrototype.h>
|
||||
|
||||
namespace Web::WebGL {
|
||||
|
||||
enum class WebGLPowerPreference {
|
||||
Default,
|
||||
LowPower,
|
||||
HighPerformance,
|
||||
};
|
||||
|
||||
// https://www.khronos.org/registry/webgl/specs/latest/1.0/#WEBGLCONTEXTATTRIBUTES
|
||||
struct WebGLContextAttributes {
|
||||
bool alpha { true };
|
||||
|
@ -24,7 +19,7 @@ struct WebGLContextAttributes {
|
|||
bool antialias { true };
|
||||
bool premultiplied_alpha { true };
|
||||
bool preserve_drawing_buffer { false };
|
||||
WebGLPowerPreference power_preference { WebGLPowerPreference::Default };
|
||||
Bindings::WebGLPowerPreference power_preference { Bindings::WebGLPowerPreference::Default };
|
||||
bool fail_if_major_performance_caveat { false };
|
||||
bool desynchronized { false };
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue