Last Comment Bug 537223 - Cleanup of gfxColor.h
: Cleanup of gfxColor.h
Status: RESOLVED FIXED
: footprint
Product: Core
Classification: Components
Component: GFX: Color Management (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla9
Assigned To: :Ms2ger (⌚ UTC+1/+2)
:
Mentors:
Depends on:
Blocks: deadcode
  Show dependency treegraph
 
Reported: 2009-12-30 04:19 PST by Alfred Kayser
Modified: 2011-08-25 06:57 PDT (History)
4 users (show)
Ms2ger: in‑testsuite-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
V1: Cleanup of gfxRGBA in gfxColor.h (5.75 KB, patch)
2009-12-30 04:41 PST, Alfred Kayser
jmuizelaar: review+
Details | Diff | Splinter Review
Patch v2 (10.76 KB, patch)
2011-08-22 03:32 PDT, :Ms2ger (⌚ UTC+1/+2)
jmuizelaar: review+
Details | Diff | Splinter Review

Description Alfred Kayser 2009-12-30 04:19:53 PST
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
Comment 1 Alfred Kayser 2009-12-30 04:41:30 PST
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.
Comment 2 Jeff Muizelaar [:jrmuizel] 2010-01-28 08:19:16 PST
I'd prefer if you got Vlad and/or Stuart to review these changes because they put the unused code in.
Comment 3 :Ms2ger (⌚ UTC+1/+2) 2011-08-12 03:45:56 PDT
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.
Comment 4 Jeff Muizelaar [:jrmuizel] 2011-08-16 09:22:03 PDT
Comment on attachment 419555 [details] [diff] [review]
V1: Cleanup of gfxRGBA in gfxColor.h

Why not.
Comment 5 Mozilla RelEng Bot 2011-08-19 12:10:50 PDT
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
Comment 6 :Ms2ger (⌚ UTC+1/+2) 2011-08-22 03:32:02 PDT
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.
Comment 7 :Ms2ger (⌚ UTC+1/+2) 2011-08-22 03:32:45 PDT
(It does pass try now: <http://tbpl.allizom.org/?tree=Try&usebuildbot=1&rev=507d2f1ad5c3>.)
Comment 8 :Ms2ger (⌚ UTC+1/+2) 2011-08-25 06:57:51 PDT
http://hg.mozilla.org/mozilla-central/rev/7dfa2501f151

Note You need to log in before you can comment on or make changes to this bug.