Closed
Bug 1212664
Opened 10 years ago
Closed 10 years ago
Compositor surface dumping code performs y-inversion incorrectly
Categories
(Core :: Graphics: Layers, defect)
Core
Graphics: Layers
Tracking
()
RESOLVED
FIXED
mozilla44
| Tracking | Status | |
|---|---|---|
| firefox44 | --- | fixed |
People
(Reporter: botond, Assigned: botond)
References
Details
Attachments
(1 file)
The transform set in YInvertImageSurface() is:
Matrix::Scaling(1.0, -1.0) *
Matrix::Translation(0.0, aSurf->GetSize().height)
That's ends up being
1 0 0
0 -1 -height
which is incorrect because after the -1 y-scale flips the y-coordinate, translating by -height moves the pixel further off-surface. The matrix we want is
1 0 0
0 -1 height
which is obtained as:
Matrix::Translation(0.0, aSurf->GetSize().height) *
Matrix::Scaling(1.0, -1.0)
| Assignee | ||
Comment 1•10 years ago
|
||
Bug 1212664 - Perform y-inversion correctly when dumping compositor surface. r=jrmuizel
Attachment #8671097 -
Flags: review?(jmuizelaar)
| Assignee | ||
Comment 2•10 years ago
|
||
https://reviewboard.mozilla.org/r/21531/#review19357
jrmuizel gave verbal r+
| Assignee | ||
Comment 3•10 years ago
|
||
Comment on attachment 8671097 [details]
MozReview Request: Bug 1212664 - Perform y-inversion correctly when dumping compositor surface. r=jrmuizel
Jeff gave me verbal r+.
| Assignee | ||
Updated•10 years ago
|
Attachment #8671097 -
Flags: review?(jmuizelaar) → review+
| Assignee | ||
Comment 4•10 years ago
|
||
(In reply to Botond Ballo [:botond] from comment #0)
> The transform set in YInvertImageSurface() is:
>
> Matrix::Scaling(1.0, -1.0) *
> Matrix::Translation(0.0, aSurf->GetSize().height)
>
> That's ends up being
>
> 1 0 0
> 0 -1 -height
>
> which is incorrect because after the -1 y-scale flips the y-coordinate,
> translating by -height moves the pixel further off-surface. The matrix we
> want is
>
> 1 0 0
> 0 -1 height
>
> which is obtained as:
>
> Matrix::Translation(0.0, aSurf->GetSize().height) *
> Matrix::Scaling(1.0, -1.0)
Sorry I mixed those up.
Matrix::Translation(0.0, aSurf->GetSize().height) *
Matrix::Scaling(1.0, -1.0)
is the one we had, which gives the incorrect matrix
1 0 0
0 -1 -height
| Assignee | ||
Comment 6•10 years ago
|
||
I should also mention that the Part 7 patch in bug 709490 (which recently landed and got backed out) contains this fix, though it's not clear whether that's intentional or it just snuck into the patch.
See Also: → 709490
Comment 7•10 years ago
|
||
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in
before you can comment on or make changes to this bug.
Description
•