mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-20 15:27:32 +09:00
(backported from UXP) Issue #3042 - Add canvas WebGL context powerPreference
This commit is contained in:
parent
fbe9582c37
commit
6822713a60
4 changed files with 46 additions and 32 deletions
|
|
@ -137,30 +137,17 @@ void AssertUintParamCorrect(gl::GLContext* gl, GLenum pname, GLuint shadow);
|
|||
|
||||
struct WebGLContextOptions
|
||||
{
|
||||
// these are defaults
|
||||
bool alpha = true;
|
||||
bool depth = true;
|
||||
bool stencil = false;
|
||||
bool premultipliedAlpha = true;
|
||||
bool antialias = true;
|
||||
bool preserveDrawingBuffer = false;
|
||||
bool failIfMajorPerformanceCaveat = false;
|
||||
dom::WebGLPowerPreference powerPreference = dom::WebGLPowerPreference::Default;
|
||||
|
||||
WebGLContextOptions();
|
||||
|
||||
bool operator==(const WebGLContextOptions& other) const {
|
||||
return
|
||||
alpha == other.alpha &&
|
||||
depth == other.depth &&
|
||||
stencil == other.stencil &&
|
||||
premultipliedAlpha == other.premultipliedAlpha &&
|
||||
antialias == other.antialias &&
|
||||
preserveDrawingBuffer == other.preserveDrawingBuffer;
|
||||
}
|
||||
|
||||
bool operator!=(const WebGLContextOptions& other) const {
|
||||
return !operator==(other);
|
||||
}
|
||||
|
||||
bool alpha;
|
||||
bool depth;
|
||||
bool stencil;
|
||||
bool premultipliedAlpha;
|
||||
bool antialias;
|
||||
bool preserveDrawingBuffer;
|
||||
bool failIfMajorPerformanceCaveat;
|
||||
bool operator==(const WebGLContextOptions&) const;
|
||||
};
|
||||
|
||||
// From WebGLContextUtils
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue