Open
Bug 976371
Opened 11 years ago
Updated 2 years ago
Figure out why converting a gfxImageSurface to a DataSourceSurface using GetSourceSurfaceForSurface changes the pixel data
Categories
(Core :: Graphics, defect)
Tracking
()
NEW
People
(Reporter: jwatt, Unassigned)
References
Details
Attachments
(1 file)
4.04 KB,
patch
|
Details | Diff | Splinter Review |
In bug 975900 I discovered that when you convert a gfxImageSurface to a DataSourceSurface using GetSourceSurfaceForSurface it can change the pixel data so that it does not match the original gfxImageSurface. That's bad and we need to figure out why and fix the issue.
This may block the final conversion of imgIContainer::GetFrame to Moz2D (bug 950372) since image\test\unit\test_imgtools.js and toolkit\components\places\tests\favicons\test_favicons_conversions.js test for an exact pixel match.
Reporter | ||
Comment 1•11 years ago
|
||
This is only an issue on Windows.
Reporter | ||
Comment 2•11 years ago
|
||
In bug 975900 the issue occurred with test 3, "test encoding an unscaled JPEG":
http://mxr.mozilla.org/mozilla-central/source/image/test/unit/test_imgtools.js?rev=649a09e4524&mark=184-184,191-191#179
In other words for this test things go wrong under the GetFirstImageFrame call in imgTools::EncodeImage:
http://mxr.mozilla.org/mozilla-central/source/image/src/imgTools.cpp?rev=649a09e4524&mark=164-164#158
Reporter | ||
Comment 3•11 years ago
|
||
This debugging code adds some code to check the result of the current method of getting the pixel data with the (broken) GetSourceSurfaceForSurface method we'd prefer to use. With it you can run:
./mach xpcshell-test image/test/unit/test_imgtools.js
and get a debugger attached just before the bad GetFirstImageFrame call (start stepping the second time it's hit).
Reporter | ||
Comment 4•11 years ago
|
||
For the broken test there are 4096 pixels; 3573 pixels are the same and 523 pixels are different.
Reporter | ||
Comment 5•11 years ago
|
||
Oh, and enabling the |#if 0| code gets things working, so this is only an issue if passing nullptr to GetSourceSurfaceForSurface so that it uses a screen reference (platform native) draw target.
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•