gfx/skia/patches/archive/0004-Bug-722011-Fix-trailing-commas-in-enums.patch

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 From 81d61682a94d47be5b47fb7882ea7e7c7e6c3351 Mon Sep 17 00:00:00 2001
     2 From: George Wright <gwright@mozilla.com>
     3 Date: Fri, 18 May 2012 14:15:28 -0400
     4 Subject: [PATCH 04/10]     Bug 755869 - [7] Re-apply bug 722011 - Fix
     5  trailing commas at end of enum lists r=mattwoodrow
     7 ---
     8  gfx/skia/include/core/SkAdvancedTypefaceMetrics.h |    8 ++++----
     9  gfx/skia/include/core/SkBlitRow.h                 |    2 +-
    10  gfx/skia/include/core/SkCanvas.h                  |    2 +-
    11  gfx/skia/include/core/SkDevice.h                  |    2 +-
    12  gfx/skia/include/core/SkDeviceProfile.h           |    4 ++--
    13  gfx/skia/include/core/SkFlattenable.h             |    2 +-
    14  gfx/skia/include/core/SkFontHost.h                |    4 ++--
    15  gfx/skia/include/core/SkMaskFilter.h              |    2 +-
    16  gfx/skia/include/core/SkPaint.h                   |    4 ++--
    17  gfx/skia/include/core/SkScalerContext.h           |    9 +++++----
    18  gfx/skia/include/core/SkTypes.h                   |    2 +-
    19  gfx/skia/include/effects/SkLayerDrawLooper.h      |    2 +-
    20  gfx/skia/src/core/SkBitmap.cpp                    |    2 +-
    21  gfx/skia/src/core/SkGlyphCache.cpp                |    2 +-
    22  14 files changed, 24 insertions(+), 23 deletions(-)
    24 diff --git a/gfx/skia/include/core/SkAdvancedTypefaceMetrics.h b/gfx/skia/include/core/SkAdvancedTypefaceMetrics.h
    25 index 09fc9a9..5ffdb45 100644
    26 --- a/gfx/skia/include/core/SkAdvancedTypefaceMetrics.h
    27 +++ b/gfx/skia/include/core/SkAdvancedTypefaceMetrics.h
    28 @@ -34,7 +34,7 @@ public:
    29          kCFF_Font,
    30          kTrueType_Font,
    31          kOther_Font,
    32 -        kNotEmbeddable_Font,
    33 +        kNotEmbeddable_Font
    34      };
    35      // The type of the underlying font program.  This field determines which
    36      // of the following fields are valid.  If it is kOther_Font or
    37 @@ -56,7 +56,7 @@ public:
    38          kItalic_Style      = 0x00040,
    39          kAllCaps_Style     = 0x10000,
    40          kSmallCaps_Style   = 0x20000,
    41 -        kForceBold_Style   = 0x40000,
    42 +        kForceBold_Style   = 0x40000
    43      };
    44      uint16_t fStyle;        // Font style characteristics.
    45      int16_t fItalicAngle;   // Counterclockwise degrees from vertical of the
    46 @@ -75,7 +75,7 @@ public:
    47        kHAdvance_PerGlyphInfo   = 0x1, // Populate horizontal advance data.
    48        kVAdvance_PerGlyphInfo   = 0x2, // Populate vertical advance data.
    49        kGlyphNames_PerGlyphInfo = 0x4, // Populate glyph names (Type 1 only).
    50 -      kToUnicode_PerGlyphInfo  = 0x8, // Populate ToUnicode table, ignored
    51 +      kToUnicode_PerGlyphInfo  = 0x8  // Populate ToUnicode table, ignored
    52                                        // for Type 1 fonts
    53      };
    55 @@ -84,7 +84,7 @@ public:
    56          enum MetricType {
    57              kDefault,  // Default advance: fAdvance.count = 1
    58              kRange,    // Advances for a range: fAdvance.count = fEndID-fStartID
    59 -            kRun,      // fStartID-fEndID have same advance: fAdvance.count = 1
    60 +            kRun       // fStartID-fEndID have same advance: fAdvance.count = 1
    61          };
    62          MetricType fType;
    63          uint16_t fStartId;
    64 diff --git a/gfx/skia/include/core/SkBlitRow.h b/gfx/skia/include/core/SkBlitRow.h
    65 index 973ab4c..febc405 100644
    66 --- a/gfx/skia/include/core/SkBlitRow.h
    67 +++ b/gfx/skia/include/core/SkBlitRow.h
    68 @@ -42,7 +42,7 @@ public:
    70      enum Flags32 {
    71          kGlobalAlpha_Flag32     = 1 << 0,
    72 -        kSrcPixelAlpha_Flag32   = 1 << 1,
    73 +        kSrcPixelAlpha_Flag32   = 1 << 1
    74      };
    76      /** Function pointer that blends 32bit colors onto a 32bit destination.
    77 diff --git a/gfx/skia/include/core/SkCanvas.h b/gfx/skia/include/core/SkCanvas.h
    78 index 25cc94a..d942783 100644
    79 --- a/gfx/skia/include/core/SkCanvas.h
    80 +++ b/gfx/skia/include/core/SkCanvas.h
    81 @@ -148,7 +148,7 @@ public:
    82           * low byte to high byte: R, G, B, A.
    83           */
    84          kRGBA_Premul_Config8888,
    85 -        kRGBA_Unpremul_Config8888,
    86 +        kRGBA_Unpremul_Config8888
    87      };
    89      /**
    90 diff --git a/gfx/skia/include/core/SkDevice.h b/gfx/skia/include/core/SkDevice.h
    91 index 1e4e0a3..b4d44bf 100644
    92 --- a/gfx/skia/include/core/SkDevice.h
    93 +++ b/gfx/skia/include/core/SkDevice.h
    94 @@ -139,7 +139,7 @@ public:
    95  protected:
    96      enum Usage {
    97         kGeneral_Usage,
    98 -       kSaveLayer_Usage, // <! internal use only
    99 +       kSaveLayer_Usage  // <! internal use only
   100      };
   102      struct TextFlags {
   103 diff --git a/gfx/skia/include/core/SkDeviceProfile.h b/gfx/skia/include/core/SkDeviceProfile.h
   104 index 46b9781..f6a0bca 100644
   105 --- a/gfx/skia/include/core/SkDeviceProfile.h
   106 +++ b/gfx/skia/include/core/SkDeviceProfile.h
   107 @@ -17,7 +17,7 @@ public:
   108          kRGB_Horizontal_LCDConfig,
   109          kBGR_Horizontal_LCDConfig,
   110          kRGB_Vertical_LCDConfig,
   111 -        kBGR_Vertical_LCDConfig,
   112 +        kBGR_Vertical_LCDConfig
   113      };
   115      enum FontHintLevel {
   116 @@ -25,7 +25,7 @@ public:
   117          kSlight_FontHintLevel,
   118          kNormal_FontHintLevel,
   119          kFull_FontHintLevel,
   120 -        kAuto_FontHintLevel,
   121 +        kAuto_FontHintLevel
   122      };
   124      /**
   125 diff --git a/gfx/skia/include/core/SkFlattenable.h b/gfx/skia/include/core/SkFlattenable.h
   126 index 5714f9d..dc115fc 100644
   127 --- a/gfx/skia/include/core/SkFlattenable.h
   128 +++ b/gfx/skia/include/core/SkFlattenable.h
   129 @@ -272,7 +272,7 @@ public:
   130           *  Instructs the writer to inline Factory names as there are seen the
   131           *  first time (after that we store an index). The pipe code uses this.
   132           */
   133 -        kInlineFactoryNames_Flag = 0x02,
   134 +        kInlineFactoryNames_Flag = 0x02
   135      };
   136      Flags getFlags() const { return (Flags)fFlags; }
   137      void setFlags(Flags flags) { fFlags = flags; }
   138 diff --git a/gfx/skia/include/core/SkFontHost.h b/gfx/skia/include/core/SkFontHost.h
   139 index 732de5c..10f9bdf 100644
   140 --- a/gfx/skia/include/core/SkFontHost.h
   141 +++ b/gfx/skia/include/core/SkFontHost.h
   142 @@ -240,7 +240,7 @@ public:
   143      */
   144      enum LCDOrientation {
   145          kHorizontal_LCDOrientation = 0,    //!< this is the default
   146 -        kVertical_LCDOrientation   = 1,
   147 +        kVertical_LCDOrientation   = 1
   148      };
   150      static void SetSubpixelOrientation(LCDOrientation orientation);
   151 @@ -259,7 +259,7 @@ public:
   152      enum LCDOrder {
   153          kRGB_LCDOrder = 0,    //!< this is the default
   154          kBGR_LCDOrder = 1,
   155 -        kNONE_LCDOrder = 2,
   156 +        kNONE_LCDOrder = 2
   157      };
   159      static void SetSubpixelOrder(LCDOrder order);
   160 diff --git a/gfx/skia/include/core/SkMaskFilter.h b/gfx/skia/include/core/SkMaskFilter.h
   161 index 9a470a4..3422e27 100644
   162 --- a/gfx/skia/include/core/SkMaskFilter.h
   163 +++ b/gfx/skia/include/core/SkMaskFilter.h
   164 @@ -61,7 +61,7 @@ public:
   165          kNormal_BlurType,  //!< fuzzy inside and outside
   166          kSolid_BlurType,   //!< solid inside, fuzzy outside
   167          kOuter_BlurType,   //!< nothing inside, fuzzy outside
   168 -        kInner_BlurType,   //!< fuzzy inside, nothing outside
   169 +        kInner_BlurType    //!< fuzzy inside, nothing outside
   170      };
   172      struct BlurInfo {
   173 diff --git a/gfx/skia/include/core/SkPaint.h b/gfx/skia/include/core/SkPaint.h
   174 index ff37d77..7c96e193 100644
   175 --- a/gfx/skia/include/core/SkPaint.h
   176 +++ b/gfx/skia/include/core/SkPaint.h
   177 @@ -76,7 +76,7 @@ public:
   178          kNo_Hinting            = 0,
   179          kSlight_Hinting        = 1,
   180          kNormal_Hinting        = 2,     //!< this is the default
   181 -        kFull_Hinting          = 3,
   182 +        kFull_Hinting          = 3
   183      };
   185      Hinting getHinting() const {
   186 @@ -289,7 +289,7 @@ public:
   187          kStroke_Style,          //!< stroke the geometry
   188          kStrokeAndFill_Style,   //!< fill and stroke the geometry
   190 -        kStyleCount,
   191 +        kStyleCount
   192      };
   194      /** Return the paint's style, used for controlling how primitives'
   195 diff --git a/gfx/skia/include/core/SkScalerContext.h b/gfx/skia/include/core/SkScalerContext.h
   196 index 2cb171b..3dbce27 100644
   197 --- a/gfx/skia/include/core/SkScalerContext.h
   198 +++ b/gfx/skia/include/core/SkScalerContext.h
   199 @@ -182,21 +182,22 @@ public:
   200          kGenA8FromLCD_Flag        = 0x0800,
   202  #ifdef SK_USE_COLOR_LUMINANCE
   203 -        kLuminance_Bits           = 3,
   204 +        kLuminance_Bits           = 3
   205  #else
   206          // luminance : 0 for black text, kLuminance_Max for white text
   207          kLuminance_Shift          = 13, // shift to land in the high 3-bits of Flags
   208 -        kLuminance_Bits           = 3,  // ensure Flags doesn't exceed 16bits
   209 +        kLuminance_Bits           = 3   // ensure Flags doesn't exceed 16bits
   210  #endif
   211      };
   213      // computed values
   214      enum {
   215 -        kHinting_Mask   = kHintingBit1_Flag | kHintingBit2_Flag,
   216  #ifdef SK_USE_COLOR_LUMINANCE
   217 +        kHinting_Mask   = kHintingBit1_Flag | kHintingBit2_Flag
   218  #else
   219 +        kHinting_Mask   = kHintingBit1_Flag | kHintingBit2_Flag,
   220          kLuminance_Max  = (1 << kLuminance_Bits) - 1,
   221 -        kLuminance_Mask = kLuminance_Max << kLuminance_Shift,
   222 +        kLuminance_Mask = kLuminance_Max << kLuminance_Shift
   223  #endif
   224      };
   226 diff --git a/gfx/skia/include/core/SkTypes.h b/gfx/skia/include/core/SkTypes.h
   227 index 7963a7d..0c5c2d7 100644
   228 --- a/gfx/skia/include/core/SkTypes.h
   229 +++ b/gfx/skia/include/core/SkTypes.h
   230 @@ -438,7 +438,7 @@ public:
   231           *  current block is dynamically allocated, just return the old
   232           *  block.
   233           */
   234 -        kReuse_OnShrink,
   235 +        kReuse_OnShrink
   236      };
   238      /**
   239 diff --git a/gfx/skia/include/effects/SkLayerDrawLooper.h b/gfx/skia/include/effects/SkLayerDrawLooper.h
   240 index 0bc4af2..6cb8ef6 100644
   241 --- a/gfx/skia/include/effects/SkLayerDrawLooper.h
   242 +++ b/gfx/skia/include/effects/SkLayerDrawLooper.h
   243 @@ -41,7 +41,7 @@ public:
   244           *  - Flags and Color are always computed using the LayerInfo's
   245           *    fFlagsMask and fColorMode.
   246           */
   247 -        kEntirePaint_Bits = -1,
   248 +        kEntirePaint_Bits = -1
   250      };
   251      typedef int32_t BitFlags;
   252 diff --git a/gfx/skia/src/core/SkBitmap.cpp b/gfx/skia/src/core/SkBitmap.cpp
   253 index 6b99145..aff52fd 100644
   254 --- a/gfx/skia/src/core/SkBitmap.cpp
   255 +++ b/gfx/skia/src/core/SkBitmap.cpp
   256 @@ -1376,7 +1376,7 @@ enum {
   257      SERIALIZE_PIXELTYPE_RAW_WITH_CTABLE,
   258      SERIALIZE_PIXELTYPE_RAW_NO_CTABLE,
   259      SERIALIZE_PIXELTYPE_REF_DATA,
   260 -    SERIALIZE_PIXELTYPE_REF_PTR,
   261 +    SERIALIZE_PIXELTYPE_REF_PTR
   262  };
   264  /*
   265 diff --git a/gfx/skia/src/core/SkGlyphCache.cpp b/gfx/skia/src/core/SkGlyphCache.cpp
   266 index f3363cd..1fddc9d 100644
   267 --- a/gfx/skia/src/core/SkGlyphCache.cpp
   268 +++ b/gfx/skia/src/core/SkGlyphCache.cpp
   269 @@ -417,7 +417,7 @@ class SkGlyphCache_Globals {
   270  public:
   271      enum UseMutex {
   272          kNo_UseMutex,  // thread-local cache
   273 -        kYes_UseMutex, // shared cache
   274 +        kYes_UseMutex  // shared cache
   275      };
   277      SkGlyphCache_Globals(UseMutex um) {
   278 -- 
   279 1.7.5.4

mercurial