ImageBitmapRenderingContext
ImageBitmapRenderingContext
接口是 canvas 的渲染上下文,它只提供了使用给定 ImageBitmap
替换 canvas 的功能。它的上下文 ID (HTMLCanvasElement.getContext()
或 OffscreenCanvas.getContext()
的第一个参数) 是 "bitmaprenderer"
。
这个接口可用于 window context 和 worker context.
方法
ImageBitmapRenderingContext.transferFromImageBitmap()
-
在与此渲染上下文相关的 canvas 中显示给定的
ImageBitmap
。ImageBitmap
的所有权被转移到画布上。这个函数以前命名为transferImageBitmap()
,但在规范中修改了原名字。为了避免影响之前的代码,旧名称作为别名被保留下来。
规范
Currently drafted as a proposal in the OffscreenCanvas specification.
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
ImageBitmapRenderingContext | ||||||||||||
canvas | ||||||||||||
transferFromImageBitmap |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- Uses a non-standard name.
- Has more compatibility info.
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.