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