Skip to content

Commit

Permalink
Fix incorrect computation in Compute Layout and Allocation Size when …
Browse files Browse the repository at this point in the history
…figuring out the destination rect

This fixes #511.
  • Loading branch information
padenot committed Oct 31, 2023
1 parent 3c9e353 commit 51ee334
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions index.src.html
Original file line number Diff line number Diff line change
Expand Up @@ -4093,10 +4093,12 @@
to the nearest integer.
9. Set |computedLayout|'s [=computed plane layout/sourceLeftBytes=] to
the result of the integer division of
truncated |parsedRect|.{{DOMRectInit/x}} by |sampleWidthBytes|.
truncated |parsedRect|.{{DOMRectInit/x}} by |sampleWidth|,
multiplied by |sampleBytes|.
10. Set |computedLayout|'s [=computed plane layout/sourceWidthBytes=] to
the result of the integer division of
truncated |parsedRect|.{{DOMRectInit/width}} by |sampleWidthBytes|.
truncated |parsedRect|.{{DOMRectInit/width}} by |sampleHeight|,
multiplied by |sampleBytes|.
11. If |layout| is not `undefined`:
1. Let |planeLayout| be the {{PlaneLayout}} in |layout| at position
|planeIndex|.
Expand Down

0 comments on commit 51ee334

Please sign in to comment.