blob: f5d7a6fe99e5b9a4e8ed768922c17c655b874ebf [file] [log] [blame]
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
typedef (WebGLRenderingContext or WebGL2RenderingContext) XRWebGLRenderingContext;
// https://immersive-web.github.io/webxr/#xrwebgllayer-interface
[
SecureContext,
Exposed=Window,
OriginTrialEnabled=WebXR,
Constructor(XRSession session, XRWebGLRenderingContext context, optional XRWebGLLayerInit layerInit),
RaisesException=Constructor
] interface XRWebGLLayer : XRLayer {
[ImplementedAs=getXRWebGLRenderingContext] readonly attribute XRWebGLRenderingContext context;
readonly attribute boolean antialias;
readonly attribute boolean depth;
readonly attribute boolean stencil;
readonly attribute boolean alpha;
readonly attribute boolean multiview;
readonly attribute unsigned long framebufferWidth;
readonly attribute unsigned long framebufferHeight;
readonly attribute WebGLFramebuffer framebuffer;
XRViewport? getViewport(XRView view);
void requestViewportScaling(double viewportScaleFactor);
static double getNativeFramebufferScaleFactor(XRSession session);
};