summaryrefslogtreecommitdiff
path: root/Source/WebCore/html/canvas/WebGLContextAttributes.idl
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/html/canvas/WebGLContextAttributes.idl')
-rw-r--r--Source/WebCore/html/canvas/WebGLContextAttributes.idl27
1 files changed, 19 insertions, 8 deletions
diff --git a/Source/WebCore/html/canvas/WebGLContextAttributes.idl b/Source/WebCore/html/canvas/WebGLContextAttributes.idl
index 41bf10234..3be5ac599 100644
--- a/Source/WebCore/html/canvas/WebGLContextAttributes.idl
+++ b/Source/WebCore/html/canvas/WebGLContextAttributes.idl
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2010, Google Inc. All rights reserved.
+ * Copyright (c) 2017, Apple, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -24,14 +25,24 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+typedef boolean GLboolean;
+
+enum WebGLPowerPreference {
+ "default",
+ "low-power",
+ "high-performance"
+};
+
[
- NoInterfaceObject,
Conditional=WEBGL,
-] interface WebGLContextAttributes {
- attribute boolean alpha;
- attribute boolean depth;
- attribute boolean stencil;
- attribute boolean antialias;
- attribute boolean premultipliedAlpha;
- attribute boolean preserveDrawingBuffer;
+ JSGenerateToJSObject
+] dictionary WebGLContextAttributes {
+ GLboolean alpha = true;
+ GLboolean depth = true;
+ GLboolean stencil = false;
+ GLboolean antialias = true;
+ GLboolean premultipliedAlpha = true;
+ GLboolean preserveDrawingBuffer = false;
+ WebGLPowerPreference powerPreference = "default";
+ GLboolean failIfMajorPerformanceCaveat = false;
};