Closed
Bug 393001
Opened 17 years ago
Closed 15 years ago
cleanup of nsIImage: Removal of several (virtual) members
Categories
(Core Graveyard :: Image: Painting, defect)
Core Graveyard
Image: Painting
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: alfredkayser, Assigned: alfredkayser)
References
()
Details
Attachments
(1 file)
(deleted),
patch
|
Details | Diff | Splinter Review |
GetIsRowOrderTopToBottom() now always returns PR_TRUE, so we can remove this, and the callers can now always assume TopToBottom (as long as we use Cairo).
This simplifies in gfxImageFrame some code, as we have TopToBottom always true, and removes some API clutter from nsIImage
Assignee | ||
Comment 1•17 years ago
|
||
Note, also 'GetColorMap' is redundant.
Thebes/Cairo does:
273 nsThebesImage::GetColorMap()
274 {
275 return NULL;
276 }
And there are no callers for GetColorMap():
see http://lxr.mozilla.org/mozilla/search?string=GetColormap
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•17 years ago
|
||
Also GetBytesPix() is redundant. One should now use sizeof(gfx_color), as defined in gfx/idl/gfxtypes.idl, line 53 (or just sizeof(PRUint32)).
Also GetBitInfo() is nowhere used, and not implemented as well.
Also GetAlphaDepth() is nowhere used.
Note, GetHasAlphaMask returns wrong result when SetHasNoAlpha() was used to change imageformat from ARGB32 to RGB24. It should not test for mAlphaDepth, but for the format ARGb32.
And of course GetAlphaBits and GetAlphaLineStride are no longer valid.
(Only user is gfxImageFrame in SetData which doesn't work anymore for alpha data) (this depends on bug 367281, so possibly do the cleanup in two steps).
Assignee | ||
Updated•17 years ago
|
Summary: Removal of GetIsRowOrderTopToBottom(); → nsIImage: Removal of GetIsRowOrderTopToBottom();
Assignee | ||
Updated•17 years ago
|
Summary: nsIImage: Removal of GetIsRowOrderTopToBottom(); → cleanup of nsIImage: Removal of GetIsRowOrderTopToBottom() and others
Assignee | ||
Comment 3•16 years ago
|
||
With the completion of the switch to Cairo and the completion of the removal of platform specific code, GetIsRowOrderTopToBottom can now be removed completely (and possibly more of nsIImage.h). And most of the members of nsIImage don't need to be virtual anymore?
http://mxr.mozilla.org/mozilla-central/search?string=RowOrderTopToBottom&find=&RowOrderTopToBottom
Found 3 matching lines in 3 files:
/gfx/public/nsIImage.h (View change log or blame annotations)
* line 108 -- virtual PRBool GetIsRowOrderTopToBottom() = 0;
/gfx/src/thebes/nsThebesImage.cpp (View change log or blame annotations)
* line 162 -- nsThebesImage::GetIsRowOrderTopToBottom()
/gfx/src/thebes/nsThebesImage.h (View change log or blame annotations)
* line 65 -- virtual PRBool GetIsRowOrderTopToBottom();
Others are:
GetColorMap (not used)
GetBytesPix (is used in one location, but for Cairo it is always 4 (sizeof(nscolor)).
GetBitInfo (not used)
GetAlphaDepth (not used)
GetHasAlphaMask (not used)
GetAlphaLineStride (not used)
GetAlphaBits (not used)
Summary: cleanup of nsIImage: Removal of GetIsRowOrderTopToBottom() and others → cleanup of nsIImage: Removal of several (virtual) members
Assignee | ||
Comment 4•16 years ago
|
||
Simple code cleanup.
Attachment #370624 -
Flags: review?(vladimir)
Assignee | ||
Comment 5•15 years ago
|
||
Fixed by bug 753!
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•15 years ago
|
Attachment #370624 -
Flags: review?(vladimir)
You need to log in
before you can comment on or make changes to this bug.
Description
•