|
3749 | 3749 | {{TypeError}}.
|
3750 | 3750 | 6. Let |p| be a new {{Promise}}.
|
3751 | 3751 | 7. Let |copyStepsQueue| be the result of starting a new [=parallel queue=].
|
3752 |
| - 8. Enqueue the following steps to |copyStepsQueue|: |
| 3752 | + 8. Let |planeLayouts| be a new [=list=]. |
| 3753 | + 9. Enqueue the following steps to |copyStepsQueue|: |
3753 | 3754 | 1. Let resource be the [=media resource=] referenced by
|
3754 | 3755 | [[resource reference]].
|
3755 | 3756 | 2. Let |numPlanes| be the number of planes as defined by
|
|
3765 | 3766 | |computedLayout|'s [=computed plane layout/sourceTop=] by
|
3766 | 3767 | |sourceStride|
|
3767 | 3768 | 4. Add |computedLayout|'s [=computed plane layout/sourceLeftBytes=]
|
3768 |
| - to sourceOffset. |
| 3769 | + to |sourceOffset|. |
3769 | 3770 | 5. Let |destinationOffset| be |computedLayout|'s
|
3770 | 3771 | [=computed plane layout/destinationOffset=].
|
3771 | 3772 | 6. Let |rowBytes| be |computedLayout|'s
|
3772 | 3773 | [=computed plane layout/sourceWidthBytes=].
|
3773 |
| - 7. Let |row| be `0`. |
3774 |
| - 8. While |row| is less than |computedLayout|'s |
| 3774 | + 7. Let |layout| be a new {{PlaneLayout}}, with |
| 3775 | + {{PlaneLayout/offset}} set to |destinationOffset| and |
| 3776 | + {{PlaneLayout/stride}} set to |rowBytes|. |
| 3777 | + 8. Let |row| be `0`. |
| 3778 | + 9. While |row| is less than |computedLayout|'s |
3775 | 3779 | [=computed plane layout/sourceHeight=]:
|
3776 | 3780 | 1. Copy |rowBytes| bytes from |resource| starting at
|
3777 | 3781 | |sourceOffset| to |destination| starting at
|
|
3780 | 3784 | 3. Increment |destinationOffset| by |computedLayout|'s
|
3781 | 3785 | [=computed plane layout/destinationStride=].
|
3782 | 3786 | 4. Increment |row| by `1`.
|
3783 |
| - 9. Increment |planeIndex| by `1`. |
3784 |
| - 5. [=Queue a task=] to resolve |p|. |
3785 |
| - 9. Return |p|. |
| 3787 | + 10. Increment |planeIndex| by `1`. |
| 3788 | + 11. Append |layout| to |planeLayouts|. |
| 3789 | + 5. [=Queue a task=] to resolve |p| with |planeLayouts|. |
| 3790 | + 10. Return |p|. |
3786 | 3791 |
|
3787 | 3792 | : <dfn method for=VideoFrame>clone()</dfn>
|
3788 | 3793 | :: Creates a new {{VideoFrame}} with a reference to the same
|
|
0 commit comments