Closed
Bug 576437
Opened 14 years ago
Closed 14 years ago
CreateOffscreenSurface should not silently translate ImageFormat24 into ImageFormat16_565
Categories
(Core :: Graphics, defect)
Tracking
()
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
blocking2.0 | --- | betaN+ |
People
(Reporter: vlad, Assigned: reportbase)
References
Details
Attachments
(3 files, 1 obsolete file)
33.85 KB,
patch
|
joe
:
review+
|
Details | Diff | Splinter Review |
5.93 KB,
patch
|
joe
:
review+
|
Details | Diff | Splinter Review |
33.92 KB,
patch
|
Details | Diff | Splinter Review |
gfxPlatform has a CreateOffscreenSurface API that takes a gfxImageFormat. When the 565 patch landed, the mobile implementations of this silently translate ImageFormatRGB24 to ImageFormatRGB16_565. They need to not do this -- it's pretty broken to give back something extremely different than what the caller requested. This causes crashes when code expects the RGB24 format it requested. Instead, if we want to have CreateOffscreen choose the best type of surface, then instead of a gfxImageFormat it should take a gfxContentType -- that way callers will know to only expect a RGBA or RGB surface, and not a particular format.
Comment 1•14 years ago
|
||
This doesn't need to block beta 2, but it needs to be fixed.
Assignee: nobody → romaxa
blocking2.0: beta2+ → betaN+
Reporter | ||
Comment 2•14 years ago
|
||
One simple fix would be to change CreateOffscreenSurface to take a ContentType instead of a format; that way no format promise is made.
Assignee | ||
Comment 3•14 years ago
|
||
I wasn't able to build all targets and I was only able to do a desk check on this code.
Attachment #474260 -
Flags: review?(joe)
Updated•14 years ago
|
Attachment #474260 -
Attachment is patch: true
Attachment #474260 -
Attachment mime type: application/octet-stream → text/plain
Updated•14 years ago
|
Assignee: romaxa → reportbase
Comment 4•14 years ago
|
||
I think this fix should be useful for handling such bugs like bug 593175
Comment 5•14 years ago
|
||
chris ^
Updated•14 years ago
|
Attachment #474260 -
Flags: review?(joe) → review+
Comment 6•14 years ago
|
||
This patch is not full, and don't change all CreateOffscreenSurface entries... We need one more patch which contain CreateOffscreenSurface changes for tests and non-linux platforms...
Attachment #475923 -
Flags: review+
Comment 7•14 years ago
|
||
Comment on attachment 475923 [details] [diff] [review] Fixed apply to m-c this is previous patch just fix apply to latest m-c
Attachment #475923 -
Attachment is patch: true
Attachment #475923 -
Attachment mime type: application/octet-stream → text/plain
Attachment #475923 -
Flags: review+
Updated•14 years ago
|
Attachment #474260 -
Attachment description: Change CreateOffscreenSurface to take a ContentType instead of a format. → Change CreateOffscreenSurface to take a ContentType instead of a format. (NOT FULL DON'T checking without second part)
Comment 8•14 years ago
|
||
Attachment #475935 -
Flags: review?
Updated•14 years ago
|
Attachment #475935 -
Flags: review? → review?(joe)
Updated•14 years ago
|
Attachment #475935 -
Flags: review?(joe) → review+
Comment 9•14 years ago
|
||
Attachment #475923 -
Attachment is obsolete: true
Comment 10•14 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/0ca9e1e100fe http://hg.mozilla.org/mozilla-central/rev/a6a168f5fb90
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•