Cleanup of gfxColor.h

RESOLVED FIXED in mozilla9

Status

()

Core
GFX: Color Management
RESOLVED FIXED
8 years ago
6 years ago

People

(Reporter: Alfred Kayser, Assigned: Ms2ger)

Tracking

({footprint})

Trunk
mozilla9
footprint
Points:
---
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

8 years ago
gfxRGBA has some things that can be cleaned out.

Not Used:
265 #ifdef MOZILLA_INTERNAL_API
266     /**
267      * Convert this color to a hex value. For example, for rgb(255,0,0),
268      * this will return FF0000.
269      */
270     // XXX I'd really prefer to just have this return an nsACString
271     // Does this function even make sense, since we're just ignoring the alpha value?
272     void Hex(nsACString& result) const {
273         nsPrintfCString hex(8, "%02x%02x%02x", PRUint8(r*255.0), PRUint8(g*255.0), PRUint8(b*255.0));
274         result.Assign(hex);
275     }
276 #endif
and
41 #ifdef MOZILLA_INTERNAL_API
42 #include "nsPrintfCString.h"
43 #endif
44 



Not implemented, and also not used:
222     /**
223      * Initialize this color by parsing the given string.
224      * XXX implement me!
225      */
226 #if 0
227     gfxRGBA(const char* str) {
228         a = 1.0;
229         // if aString[0] is a #, parse it as hex
230         // if aString[0] is a letter, parse it as a color name
231         // if aString[0] is a number, parse it loosely as hex
232     }
233 #endif
234 


Not used:
PACKED_ABGR_PREMULTIPLIED, but PACKED_ARGB_PREMULTIPLIED is used)
PACKED_XBGR
PACKED_XRGB
(Reporter)

Updated

8 years ago
Assignee: nobody → alfredkayser
Status: NEW → ASSIGNED
Flags: wanted1.9.2?
Keywords: footprint
OS: Windows XP → All
Hardware: x86 → All
(Reporter)

Comment 1

8 years ago
Created attachment 419555 [details] [diff] [review]
V1: Cleanup of gfxRGBA in gfxColor.h

Note, the removal of #include nsPrintfCString.h requires the addition of #include nsString.h in gfxPlatform, as that one uses nsString.
Attachment #419555 - Flags: review?(vladimir)
(Reporter)

Updated

8 years ago
Attachment #419555 - Flags: review?(vladimir) → review?(jmuizelaar)
I'd prefer if you got Vlad and/or Stuart to review these changes because they put the unused code in.
Attachment #419555 - Flags: review?(jmuizelaar)
(Reporter)

Updated

8 years ago
Attachment #419555 - Flags: review?(vladimir)
(Reporter)

Updated

8 years ago
Attachment #419555 - Flags: review?(vladimir) → review?(pavlov)
(Reporter)

Updated

8 years ago
Blocks: 457262
(Assignee)

Updated

6 years ago
Attachment #419555 - Flags: review?(vladimir)
(Assignee)

Comment 3

6 years ago
Comment on attachment 419555 [details] [diff] [review]
V1: Cleanup of gfxRGBA in gfxColor.h

Doesn't look like they are going to do their review duty, back to you.
Attachment #419555 - Flags: review?(jmuizelaar)
Comment on attachment 419555 [details] [diff] [review]
V1: Cleanup of gfxRGBA in gfxColor.h

Why not.
Attachment #419555 - Flags: review?(jmuizelaar) → review+

Comment 5

6 years ago
Try run for bb4988e00b64 is complete.
Detailed breakdown of the results available here:
    http://tbpl.allizom.org/?tree=Try&usebuildbot=1&rev=bb4988e00b64
Results (out of 17 total builds):
    failure: 17
Builds available at http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/Ms2ger@gmail.com-bb4988e00b64
(Assignee)

Comment 6

6 years ago
Created attachment 554812 [details] [diff] [review]
Patch v2

Turned out that PACKED_XRGB was used after all. I added it back and fixed up a couple of #include problems. Sorry about that.
Assignee: alfredkayser → Ms2ger
Attachment #419555 - Attachment is obsolete: true
Attachment #554812 - Flags: review?(jmuizelaar)
Attachment #419555 - Flags: review?(vladimir)
Attachment #419555 - Flags: review?(pavlov)
(Assignee)

Comment 7

6 years ago
(It does pass try now: <http://tbpl.allizom.org/?tree=Try&usebuildbot=1&rev=507d2f1ad5c3>.)
Attachment #554812 - Flags: review?(jmuizelaar) → review+
(Assignee)

Comment 8

6 years ago
http://hg.mozilla.org/mozilla-central/rev/7dfa2501f151
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Flags: wanted1.9.2? → in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → mozilla9
Version: unspecified → Trunk
You need to log in before you can comment on or make changes to this bug.