Bug 494664. Minor color-related cleanup. r=jmuizel,sr=vlad
authorTimothy Nikkel <tnikkel@gmail.com>
Wed, 24 Jun 2009 21:18:17 +1200
changeset 29533 ddee37e8a38e50fdfb4f9b6560611bd8da204a70
parent 29532 c97e700b3bbf04e70e63d925b667ae97a617c9eb
child 29534 9fd2fb3a0c9f55f45a8bc725532e429a29f5f0cc
push id7687
push userrocallahan@mozilla.com
push dateWed, 24 Jun 2009 09:31:47 +0000
treeherdermozilla-central@9fd2fb3a0c9f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjmuizel, vlad
bugs494664
milestone1.9.2a1pre
Bug 494664. Minor color-related cleanup. r=jmuizel,sr=vlad
gfx/src/nsColor.cpp
gfx/thebes/public/gfxColor.h
--- a/gfx/src/nsColor.cpp
+++ b/gfx/src/nsColor.cpp
@@ -70,17 +70,17 @@ void nsColorNames::AddRefTable(void)
 {
   NS_ASSERTION(!gColorTable, "pre existing array!");
   if (!gColorTable) {
     gColorTable = new nsStaticCaseInsensitiveNameTable();
     if (gColorTable) {
 #ifdef DEBUG
     {
       // let's verify the table...
-      for (PRInt32 index = 0; index < eColorName_COUNT; ++index) {
+      for (PRUint32 index = 0; index < eColorName_COUNT; ++index) {
         nsCAutoString temp1(kColorNames[index]);
         nsCAutoString temp2(kColorNames[index]);
         ToLowerCase(temp1);
         NS_ASSERTION(temp1.Equals(temp2), "upper case char in table");
       }
     }
 #endif      
       gColorTable->Init(kColorNames, eColorName_COUNT); 
--- a/gfx/thebes/public/gfxColor.h
+++ b/gfx/thebes/public/gfxColor.h
@@ -112,18 +112,18 @@
     p1 = 0xFF000000 | ((rgbr) << 16) | ((gbrg) >> 16); \
     p2 = 0xFF000000 | ((gbrg) <<  8) | ((brgb) >> 24); \
     p3 = 0xFF000000 | (brgb); \
     to[0] = p0; to[1] = p1; to[2] = p2; to[3] = p3; \
   PR_END_MACRO
 
 /**
  * Fast approximate division by 255. It has the property that
- * for all 0 <= n <= 255*255, FAST_DIVIDE_BY_255(n) == n/255.
- * But it only uses two adds and two shifts instead of an 
+ * for all 0 <= n <= 255*255, GFX_DIVIDE_BY_255(n) == n/255.
+ * But it only uses two adds and two shifts instead of an
  * integer division (which is expensive on many processors).
  *
  * equivalent to ((v)/255)
  */
 #define GFX_DIVIDE_BY_255(v)  \
      (((((unsigned)(v)) << 8) + ((unsigned)(v)) + 255) >> 16)
 
 /**