Skip to content

Commit 3602251

Browse files
committed
fix typos, add note: about canvasImageSource 'copy'
1 parent 0c71f1a commit 3602251

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

index.src.html

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2264,12 +2264,12 @@
22642264
5. Switch on |image|:
22652265
- {{HTMLImageElement}}
22662266
- {{SVGImageElement}}
2267-
1. If {{VideoFramePlaneInit/timestamp}} does not [=map/exist=] in
2267+
1. If {{VideoFrameInit/timestamp}} does not [=map/exist=] in
22682268
|init|, throw a {{TypeError}}.
2269-
2. If image's media data has no [=natural dimensions=]
2269+
2. If |image|'s media data has no [=natural dimensions=]
22702270
(e.g., it's a vector graphic with no specified content size), then
22712271
throw an {{InvalidStateError}} {{DOMException}}.
2272-
3. Let |resource| be a new [=frame resource=] containing a copy of
2272+
3. Let |resource| be a new [=media resource=] containing a copy of
22732273
|image|'s media data. If this is an animated image, |image|'s
22742274
[=bitmap data=] must only be taken from the default image of the
22752275
animation (the one that the format defines is to be used when
@@ -2286,16 +2286,20 @@
22862286
{{InvalidStateError}} {{DOMException}}.
22872287
2. Let |currentPlaybackFrame| be the {{VideoFrame}} at the [=current
22882288
playback position=].
2289-
3. Run the [=VideoFrame/Initialize Frame From Other Frame=] algoirhtm
2289+
3. Run the [=VideoFrame/Initialize Frame From Other Frame=] algorithm
22902290
with |init|, |frame|, and |currentPlaybackFrame|.
22912291

22922292
- {{HTMLCanvasElement}}
22932293
- {{ImageBitmap}}
22942294
- {{OffscreenCanvas}}
2295-
1. If {{VideoFramePlaneInit/timestamp}} does not [=map/exist=] in
2295+
1. If {{VideoFrameInit/timestamp}} does not [=map/exist=] in
22962296
|init|, throw a {{TypeError}}.
2297-
2. Let |resource| be a new [=frame resource=] containing a copy of
2297+
2. Let |resource| be a new [=media resource=] containing a copy of
22982298
|image|'s [=bitmap data=].
2299+
2300+
NOTE: Implementers are should avoid a deep copy by using reference
2301+
coutning where feasible.
2302+
22992303
3. Let |width| be `image.width` and |height| be `image.height`.
23002304
4. Run the [=VideoFrame/Initialize Frame With Resource and Size=]
23012305
algorithm with |init|, |frame|, |resource|, |width|, and |height|.
@@ -2522,7 +2526,7 @@
25222526

25232527
: <dfn for=VideoFrame>Initialize Frame From Other Frame</dfn> (with |init|,
25242528
|frame|, and |otherFrame|)
2525-
:: 1. Let |resource| be the [=frame resource=] referenced by |otherFrame|'s
2529+
:: 1. Let |resource| be the [=media resource=] referenced by |otherFrame|'s
25262530
{{VideoFrame/[[resource reference]]}}.
25272531
2. Assign a new reference for |resource| to |frame|'s
25282532
{{VideoFrame/[[resource reference]]}}.
@@ -2557,7 +2561,7 @@
25572561
2. If |resource| uses a recognized {{PixelFormat}}:
25582562
1. Assign the {{PixelFormat}} of |resource| to {{VideoFrame/format}}.
25592563
2. Let |planes| be a list of {{Plane}}s describing the
2560-
[=frame resource=] in accordance with the {{VideoFrame/format}}.
2564+
[=media resource=] in accordance with the {{VideoFrame/format}}.
25612565

25622566
ISSUE: The spec should define explicit rules for each
25632567
{{PixelFormat}} and reference them in the step above. See

0 commit comments

Comments
 (0)