blob: 675840f9df24b55ca31f418d3382119d4cde338f [file] [log] [blame]
// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// https://gpuweb.github.io/gpuweb/
[
Exposed=(Window, Worker),
SecureContext,
ActiveScriptWrappable
] interface GPUCanvasContext {
[ImplementedAs=getHTMLOrOffscreenCanvas] readonly attribute (HTMLCanvasElement or OffscreenCanvas) canvas;
[RaisesException] void configure(GPUCanvasConfiguration descriptor);
void unconfigure();
GPUCanvasConfiguration? getConfiguration();
[CallWith=ScriptState, RaisesException] GPUTexture getCurrentTexture();
};