Closed
Bug 386937
Opened 17 years ago
Closed 13 years ago
ConvertPixel doesn't work as nsColor and gfx_color are not compatible...
Categories
(Core :: Graphics, defect)
Core
Graphics
Tracking
()
RESOLVED
FIXED
People
(Reporter: alfredkayser, Assigned: alfredkayser)
References
Details
Attachments
(1 file)
2.08 KB,
patch
|
vlad
:
review+
|
Details | Diff | Splinter Review |
In, the code assumes that nscolor and the aPixel (gfx_color) formats are equal. http://lxr.mozilla.org/mozilla/source/gfx/src/thebes/nsThebesDeviceContext.cpp#435 435 nsThebesDeviceContext::ConvertPixel(nscolor aColor, PRUint32 & aPixel) In fact they are not. nsColor uses ABGR and gfx_color (cairo) uses ARGB. Furthermore, in gfxColor gfxRGBA() and ::Packed, allows all kinds of formats, while only PACKED_ABGR is really used. GFX_PACKED_PIXEL(a,r,g,b) produces the cairo format: ARGB. In order to remove all this confusion, I would propose to convert all to one format: PACKED_ARGB (for the PRUint32 packed version), which is compatible with the Cairo image surface encoding). All other places don't really care about the order. nsColor always uses macro's access the parts. And gfxColor can also easily be made to only handle ARGB.
Assignee | ||
Comment 1•15 years ago
|
||
Standardization to the Cairo format is also needed in qCMS. Using one packed color format throughout the mozilla codebase will make live a lot easier.
Assignee: nobody → alfredkayser
Blocks: 490700
Assignee | ||
Comment 2•15 years ago
|
||
Actually ConvertPixel is not used anywhere, so I propose to remove it before it gets misused.
Assignee | ||
Updated•15 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Updated•15 years ago
|
Component: Image: Painting → GFX: Color Management
Product: Core Graveyard → Core
Assignee | ||
Comment 3•15 years ago
|
||
Attachment #419553 -
Flags: review?(vladimir)
Assignee | ||
Updated•15 years ago
|
Attachment #419553 -
Attachment is patch: true
Attachment #419553 -
Attachment mime type: application/octet-stream → text/plain
Assignee | ||
Updated•15 years ago
|
Flags: wanted1.9.2?
Updated•15 years ago
|
QA Contact: image.gfx → color-management
Assignee | ||
Updated•14 years ago
|
Attachment #419553 -
Flags: review?(vladimir) → review?(gavin.sharp)
Comment 4•14 years ago
|
||
Comment on attachment 419553 [details] [diff] [review] Simple removal of ConvertPixel (and DebugShowCairo...) Not sure why you asked me to review this, I'm not a gfx peer and don't really know anything about cairo :)
Attachment #419553 -
Flags: review?(gavin.sharp)
Assignee | ||
Updated•14 years ago
|
Attachment #419553 -
Flags: review?(vladimir)
Attachment #419553 -
Flags: review?(vladimir) → review+
Assignee | ||
Comment 5•14 years ago
|
||
Pushed: http://hg.mozilla.org/mozilla-central/rev/f319622cee4d
Comment 6•13 years ago
|
||
The patch landed, why the bug is still opened?
Updated•13 years ago
|
Assignee: alfredkayser → nobody
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Component: GFX: Color Management → Graphics
QA Contact: color-management → thebes
Resolution: --- → FIXED
Updated•13 years ago
|
Assignee: nobody → alfredkayser
You need to log in
before you can comment on or make changes to this bug.
Description
•