mirror of
https://github.com/electron/electron.git
synced 2026-01-10 07:58:08 -05:00
feat: offscreen rendering support rgbaf16 hdr output format. (#48265)
* feat: offscreen rendering support rgbaf16 * docs: update doc * docs: update doc.
This commit is contained in:
@@ -2,7 +2,10 @@
|
||||
|
||||
* `textureInfo` Object - The shared texture info.
|
||||
* `widgetType` string - The widget type of the texture. Can be `popup` or `frame`.
|
||||
* `pixelFormat` string - The pixel format of the texture. Can be `rgba` or `bgra`.
|
||||
* `pixelFormat` string - The pixel format of the texture.
|
||||
* `rgba` - The texture format is 8-bit unorm RGBA.
|
||||
* `bgra` - The texture format is 8-bit unorm BGRA.
|
||||
* `rgbaf16` - The texture format is 16-bit float RGBA.
|
||||
* `codedSize` [Size](size.md) - The full dimensions of the video frame.
|
||||
* `colorSpace` [ColorSpace](color-space.md) - The color space of the video frame.
|
||||
* `visibleRect` [Rectangle](rectangle.md) - A subsection of [0, 0, codedSize.width, codedSize.height]. In OSR case, it is expected to have the full section area.
|
||||
|
||||
@@ -87,6 +87,11 @@
|
||||
paint event. Defaults to `false`. See the
|
||||
[offscreen rendering tutorial](../../tutorial/offscreen-rendering.md) for
|
||||
more details.
|
||||
* `sharedTexturePixelFormat` string (optional) _Experimental_ - The requested output format of the shared texture. Defaults to `argb`.
|
||||
The name is originated from Chromium [`media::VideoPixelFormat`](https://source.chromium.org/chromium/chromium/src/+/main:media/base/video_types.h) enum suffix and only subset of them are supported.
|
||||
The actual output pixel format and color space of the texture should refer to [`OffscreenSharedTexture`](../structures/offscreen-shared-texture.md) object in the `paint` event.
|
||||
* `argb` - The requested output texture format is 8-bit unorm RGBA, with SRGB SDR color space.
|
||||
* `rgbaf16` - The requested output texture format is 16-bit float RGBA, with scRGB HDR color space.
|
||||
* `contextIsolation` boolean (optional) - Whether to run Electron APIs and
|
||||
the specified `preload` script in a separate JavaScript context. Defaults
|
||||
to `true`. The context that the `preload` script runs in will only have
|
||||
|
||||
Reference in New Issue
Block a user