Skip to content

Commit 51dbdad

Browse files
Djuffinchrisn
andcommitted
Editorial changes from Chris Needham
Co-authored-by: Chris Needham <chrisn@users.noreply.github.com>
1 parent ee8cd68 commit 51dbdad

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

index.src.html

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3767,7 +3767,7 @@
37673767
5. If `destination.byteLength` is less than |combinedLayout|'s [=combined
37683768
buffer layout/allocationSize=], return a promise rejected with a
37693769
{{TypeError}}.
3770-
6. If |options|.{{VideoFrameCopyToOptions/format}} does not equal to
3770+
6. If |options|.{{VideoFrameCopyToOptions/format}} does not equal
37713771
{{VideoFrame/[[format]]}} and |options|.{{VideoFrameCopyToOptions/format}}
37723772
is equal to one of {{RGBA}}, {{RGBX}}, {{BGRA}}, {{BGRX}} then:
37733773
1. Let |newOptions| be the result of running the <a>Clone Configuration</a>
@@ -4214,25 +4214,25 @@
42144214
2. Let |canvasSettings| be a new {{CanvasRenderingContext2DSettings}} with
42154215
{{CanvasRenderingContext2DSettings/colorSpace}} set to |colorSpace|.
42164216
3. Let |context| be the result of calling {{OffscreenCanvas/getContext()}}
4217-
on |canvas| with `"2d"` and |canvasSettings|
4217+
on |canvas| with `"2d"` and |canvasSettings|.
42184218
3. Call {{CanvasDrawImage/drawImage()}} on |context| with
42194219
`rect.x`, `rect.y`, `rect.width`, `rect.height`, `0`, `0`, `rect.width`,
42204220
`rect.height`.
42214221
4. Let |imageData| be the result of calling {{CanvasImageData/getImageData()}} with
42224222
`0`, `0`, |rect.width|, |rect.height|.
42234223
5. If |format| is equal to {{BGRA}} or {{BGRX}}:
4224-
1. Let |pixelIndex| be `0`
4224+
1. Let |pixelIndex| be `0`.
42254225
2. While |pixelIndex| is less than `rect.width` multiplied by `rect.height`:
42264226
1. Swap elements in |imageData|.{{ImageData/data}} at indexes `4 * pixelIndex`
42274227
and `4 * pixelIndex + 2`.
4228-
2. Increment |pixelIndex| by `1`
4228+
2. Increment |pixelIndex| by `1`.
42294229
6. Let |init| be a new {{VideoFrameBufferInit}} constructed with
42304230
{{VideoFrameBufferInit/format}} = |format|,
42314231
{{VideoFrameBufferInit/codedWidth}} = `rect.width`,
4232-
{{VideoFrameBufferInit/codedHeight}} = `rect.height`
4232+
{{VideoFrameBufferInit/codedHeight}} = `rect.height`.
42334233
7. Let |convertedFrame| be a new {{VideoFrame}} constructed with
4234-
|imageData|.{{ImageData/data}} and |init|
4235-
8. Return |convertedFrame|
4234+
|imageData|.{{ImageData/data}} and |init|.
4235+
8. Return |convertedFrame|.
42364236

42374237
: <dfn for=VideoFrame>Copy VideoFrame metadata</dfn> (with |metadata|)
42384238
:: 1. Let |metadataCopySerialized| be [$StructuredSerialize$](|metadata|).
@@ -4290,7 +4290,7 @@
42904290

42914291
VideoFrame CopyTo() Options {#videoframe-copyto-options}
42924292
------------------------------------------------------------
4293-
Options to specify a rectangle of pixels to copy, their format and the offset
4293+
Options to specify a rectangle of pixels to copy, their format, and the offset
42944294
and stride of planes in the destination buffer.
42954295

42964296
<xmp class='idl'>
@@ -4332,8 +4332,8 @@
43324332
{{RGBA}}, {{RGBX}}, {{BGRA}}, {{BGRX}} and values of {{VideoFrame/format}}.
43334333
If unspecified or `null`, the {{VideoFrame/format}} is used.
43344334
: <dfn dict-member for=VideoFrameCopyToOptions>colorSpace</dfn>
4335-
:: A {{PredefinedColorSpace}} that <em class="rfc2119">SHALL</em> be used to as
4336-
a target color space for for the pixel data in the destination
4335+
:: A {{PredefinedColorSpace}} that <em class="rfc2119">SHALL</em> be used as
4336+
a target color space for the pixel data in the destination
43374337
{{BufferSource}}, but only if {{VideoFrameCopyToOptions/format}} is one of
43384338
{{RGBA}}, {{RGBX}}, {{BGRA}}, {{BGRX}}, otherwise it is ignored.
43394339
If unspecified or `null`, {{srgb}} is used.

0 commit comments

Comments
 (0)