gfx/skia/patches/archive/fix-comma-end-enum-list.patch

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gfx/skia/patches/archive/fix-comma-end-enum-list.patch	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,380 @@
     1.4 +diff --git a/gfx/skia/include/core/SkAdvancedTypefaceMetrics.h b/gfx/skia/include/core/SkAdvancedTypefaceMetrics.h
     1.5 +--- a/gfx/skia/include/core/SkAdvancedTypefaceMetrics.h
     1.6 ++++ b/gfx/skia/include/core/SkAdvancedTypefaceMetrics.h
     1.7 +@@ -29,17 +29,17 @@ public:
     1.8 +     SkString fFontName;
     1.9 + 
    1.10 +     enum FontType {
    1.11 +         kType1_Font,
    1.12 +         kType1CID_Font,
    1.13 +         kCFF_Font,
    1.14 +         kTrueType_Font,
    1.15 +         kOther_Font,
    1.16 +-        kNotEmbeddable_Font,
    1.17 ++        kNotEmbeddable_Font
    1.18 +     };
    1.19 +     // The type of the underlying font program.  This field determines which
    1.20 +     // of the following fields are valid.  If it is kOther_Font or
    1.21 +     // kNotEmbeddable_Font, the per glyph information will never be populated.
    1.22 +     FontType fType;
    1.23 + 
    1.24 +     // fMultiMaster may be true for Type1_Font or CFF_Font.
    1.25 +     bool fMultiMaster;
    1.26 +@@ -51,17 +51,17 @@ public:
    1.27 +         kFixedPitch_Style  = 0x00001,
    1.28 +         kSerif_Style       = 0x00002,
    1.29 +         kSymbolic_Style    = 0x00004,
    1.30 +         kScript_Style      = 0x00008,
    1.31 +         kNonsymbolic_Style = 0x00020,
    1.32 +         kItalic_Style      = 0x00040,
    1.33 +         kAllCaps_Style     = 0x10000,
    1.34 +         kSmallCaps_Style   = 0x20000,
    1.35 +-        kForceBold_Style   = 0x40000,
    1.36 ++        kForceBold_Style   = 0x40000
    1.37 +     };
    1.38 +     uint16_t fStyle;        // Font style characteristics.
    1.39 +     int16_t fItalicAngle;   // Counterclockwise degrees from vertical of the
    1.40 +                             // dominant vertical stroke for an Italic face.
    1.41 +     // The following fields are all in font units.
    1.42 +     int16_t fAscent;       // Max height above baseline, not including accents.
    1.43 +     int16_t fDescent;      // Max depth below baseline (negative).
    1.44 +     int16_t fStemV;        // Thickness of dominant vertical stem.
    1.45 +@@ -70,26 +70,26 @@ public:
    1.46 +     SkIRect fBBox;  // The bounding box of all glyphs (in font units).
    1.47 + 
    1.48 +     // The type of advance data wanted.
    1.49 +     enum PerGlyphInfo {
    1.50 +       kNo_PerGlyphInfo         = 0x0, // Don't populate any per glyph info.
    1.51 +       kHAdvance_PerGlyphInfo   = 0x1, // Populate horizontal advance data.
    1.52 +       kVAdvance_PerGlyphInfo   = 0x2, // Populate vertical advance data.
    1.53 +       kGlyphNames_PerGlyphInfo = 0x4, // Populate glyph names (Type 1 only).
    1.54 +-      kToUnicode_PerGlyphInfo  = 0x8, // Populate ToUnicode table, ignored
    1.55 ++      kToUnicode_PerGlyphInfo  = 0x8  // Populate ToUnicode table, ignored
    1.56 +                                       // for Type 1 fonts
    1.57 +     };
    1.58 + 
    1.59 +     template <typename Data>
    1.60 +     struct AdvanceMetric {
    1.61 +         enum MetricType {
    1.62 +             kDefault,  // Default advance: fAdvance.count = 1
    1.63 +             kRange,    // Advances for a range: fAdvance.count = fEndID-fStartID
    1.64 +-            kRun,      // fStartID-fEndID have same advance: fAdvance.count = 1
    1.65 ++            kRun       // fStartID-fEndID have same advance: fAdvance.count = 1
    1.66 +         };
    1.67 +         MetricType fType;
    1.68 +         uint16_t fStartId;
    1.69 +         uint16_t fEndId;
    1.70 +         SkTDArray<Data> fAdvance;
    1.71 +         SkTScopedPtr<AdvanceMetric<Data> > fNext;
    1.72 +     };
    1.73 + 
    1.74 +diff --git a/gfx/skia/include/core/SkBlitRow.h b/gfx/skia/include/core/SkBlitRow.h
    1.75 +--- a/gfx/skia/include/core/SkBlitRow.h
    1.76 ++++ b/gfx/skia/include/core/SkBlitRow.h
    1.77 +@@ -44,17 +44,17 @@ public:
    1.78 + 
    1.79 +     //! Public entry-point to return a blit function ptr
    1.80 +     static Proc Factory(unsigned flags, SkBitmap::Config);
    1.81 + 
    1.82 +     ///////////// D32 version
    1.83 + 
    1.84 +     enum Flags32 {
    1.85 +         kGlobalAlpha_Flag32     = 1 << 0,
    1.86 +-        kSrcPixelAlpha_Flag32   = 1 << 1,
    1.87 ++        kSrcPixelAlpha_Flag32   = 1 << 1
    1.88 +     };
    1.89 + 
    1.90 +     /** Function pointer that blends 32bit colors onto a 32bit destination.
    1.91 +         @param dst  array of dst 32bit colors
    1.92 +         @param src  array of src 32bit colors (w/ or w/o alpha)
    1.93 +         @param count number of colors to blend
    1.94 +         @param alpha global alpha to be applied to all src colors
    1.95 +      */
    1.96 +diff --git a/gfx/skia/include/core/SkCanvas.h b/gfx/skia/include/core/SkCanvas.h
    1.97 +--- a/gfx/skia/include/core/SkCanvas.h
    1.98 ++++ b/gfx/skia/include/core/SkCanvas.h
    1.99 +@@ -132,17 +132,17 @@ public:
   1.100 +          * low byte to high byte: B, G, R, A.
   1.101 +          */
   1.102 +         kBGRA_Premul_Config8888,
   1.103 +         kBGRA_Unpremul_Config8888,
   1.104 +         /**
   1.105 +          * low byte to high byte: R, G, B, A.
   1.106 +          */
   1.107 +         kRGBA_Premul_Config8888,
   1.108 +-        kRGBA_Unpremul_Config8888,
   1.109 ++        kRGBA_Unpremul_Config8888
   1.110 +     };
   1.111 + 
   1.112 +     /**
   1.113 +      *  On success (returns true), copy the canvas pixels into the bitmap.
   1.114 +      *  On failure, the bitmap parameter is left unchanged and false is
   1.115 +      *  returned.
   1.116 +      *
   1.117 +      *  The canvas' pixels are converted to the bitmap's config. The only
   1.118 +diff --git a/gfx/skia/include/core/SkDevice.h b/gfx/skia/include/core/SkDevice.h
   1.119 +--- a/gfx/skia/include/core/SkDevice.h
   1.120 ++++ b/gfx/skia/include/core/SkDevice.h
   1.121 +@@ -134,17 +134,17 @@ public:
   1.122 +      *  Return the device's origin: its offset in device coordinates from
   1.123 +      *  the default origin in its canvas' matrix/clip
   1.124 +      */
   1.125 +     const SkIPoint& getOrigin() const { return fOrigin; }
   1.126 + 
   1.127 + protected:
   1.128 +     enum Usage {
   1.129 +        kGeneral_Usage,
   1.130 +-       kSaveLayer_Usage, // <! internal use only
   1.131 ++       kSaveLayer_Usage // <! internal use only
   1.132 +     };
   1.133 + 
   1.134 +     struct TextFlags {
   1.135 +         uint32_t            fFlags;     // SkPaint::getFlags()
   1.136 +         SkPaint::Hinting    fHinting;
   1.137 +     };
   1.138 + 
   1.139 +     /**
   1.140 +diff --git a/gfx/skia/include/core/SkFlattenable.h b/gfx/skia/include/core/SkFlattenable.h
   1.141 +--- a/gfx/skia/include/core/SkFlattenable.h
   1.142 ++++ b/gfx/skia/include/core/SkFlattenable.h
   1.143 +@@ -216,17 +216,17 @@ public:
   1.144 +     SkFactorySet* setFactoryRecorder(SkFactorySet*);
   1.145 + 
   1.146 +     enum Flags {
   1.147 +         kCrossProcess_Flag       = 0x01,
   1.148 +         /**
   1.149 +          *  Instructs the writer to inline Factory names as there are seen the
   1.150 +          *  first time (after that we store an index). The pipe code uses this.
   1.151 +          */
   1.152 +-        kInlineFactoryNames_Flag = 0x02,
   1.153 ++        kInlineFactoryNames_Flag = 0x02
   1.154 +     };
   1.155 +     Flags getFlags() const { return (Flags)fFlags; }
   1.156 +     void setFlags(Flags flags) { fFlags = flags; }
   1.157 +     
   1.158 +     bool isCrossProcess() const {
   1.159 +         return SkToBool(fFlags & kCrossProcess_Flag);
   1.160 +     }
   1.161 +     bool inlineFactoryNames() const {
   1.162 +diff --git a/gfx/skia/include/core/SkFontHost.h b/gfx/skia/include/core/SkFontHost.h
   1.163 +--- a/gfx/skia/include/core/SkFontHost.h
   1.164 ++++ b/gfx/skia/include/core/SkFontHost.h
   1.165 +@@ -245,17 +245,17 @@ public:
   1.166 +         vertically. When rendering subpixel glyphs we need to know which way
   1.167 +         round they are.
   1.168 + 
   1.169 +         Note, if you change this after startup, you'll need to flush the glyph
   1.170 +         cache because it'll have the wrong type of masks cached.
   1.171 +     */
   1.172 +     enum LCDOrientation {
   1.173 +         kHorizontal_LCDOrientation = 0,    //!< this is the default
   1.174 +-        kVertical_LCDOrientation   = 1,
   1.175 ++        kVertical_LCDOrientation   = 1
   1.176 +     };
   1.177 + 
   1.178 +     static void SetSubpixelOrientation(LCDOrientation orientation);
   1.179 +     static LCDOrientation GetSubpixelOrientation();
   1.180 + 
   1.181 +     /** LCD color elements can vary in order. For subpixel text we need to know
   1.182 +         the order which the LCDs uses so that the color fringes are in the
   1.183 +         correct place.
   1.184 +@@ -264,17 +264,17 @@ public:
   1.185 +         cache because it'll have the wrong type of masks cached.
   1.186 + 
   1.187 +         kNONE_LCDOrder means that the subpixel elements are not spatially
   1.188 +         separated in any usable fashion.
   1.189 +      */
   1.190 +     enum LCDOrder {
   1.191 +         kRGB_LCDOrder = 0,    //!< this is the default
   1.192 +         kBGR_LCDOrder = 1,
   1.193 +-        kNONE_LCDOrder = 2,
   1.194 ++        kNONE_LCDOrder = 2
   1.195 +     };
   1.196 + 
   1.197 +     static void SetSubpixelOrder(LCDOrder order);
   1.198 +     static LCDOrder GetSubpixelOrder();
   1.199 + 
   1.200 + #ifdef SK_BUILD_FOR_ANDROID
   1.201 +     ///////////////////////////////////////////////////////////////////////////
   1.202 + 
   1.203 +diff --git a/gfx/skia/include/core/SkMaskFilter.h b/gfx/skia/include/core/SkMaskFilter.h
   1.204 +--- a/gfx/skia/include/core/SkMaskFilter.h
   1.205 ++++ b/gfx/skia/include/core/SkMaskFilter.h
   1.206 +@@ -57,17 +57,17 @@ public:
   1.207 + 
   1.208 +     virtual void flatten(SkFlattenableWriteBuffer& ) {}
   1.209 + 
   1.210 +     enum BlurType {
   1.211 +         kNone_BlurType,    //!< this maskfilter is not a blur
   1.212 +         kNormal_BlurType,  //!< fuzzy inside and outside
   1.213 +         kSolid_BlurType,   //!< solid inside, fuzzy outside
   1.214 +         kOuter_BlurType,   //!< nothing inside, fuzzy outside
   1.215 +-        kInner_BlurType,   //!< fuzzy inside, nothing outside
   1.216 ++        kInner_BlurType    //!< fuzzy inside, nothing outside
   1.217 +     };
   1.218 + 
   1.219 +     struct BlurInfo {
   1.220 +         SkScalar fRadius;
   1.221 +         bool     fIgnoreTransform;
   1.222 +         bool     fHighQuality;
   1.223 +     };
   1.224 + 
   1.225 +diff --git a/gfx/skia/include/core/SkPaint.h b/gfx/skia/include/core/SkPaint.h
   1.226 +--- a/gfx/skia/include/core/SkPaint.h
   1.227 ++++ b/gfx/skia/include/core/SkPaint.h
   1.228 +@@ -70,17 +70,17 @@ public:
   1.229 +            kFull_Hinting   -> <same as kNormalHinting, unless we are rendering
   1.230 +                               subpixel glyphs, in which case TARGET_LCD or
   1.231 +                               TARGET_LCD_V is used>
   1.232 +     */
   1.233 +     enum Hinting {
   1.234 +         kNo_Hinting            = 0,
   1.235 +         kSlight_Hinting        = 1,
   1.236 +         kNormal_Hinting        = 2,     //!< this is the default
   1.237 +-        kFull_Hinting          = 3,
   1.238 ++        kFull_Hinting          = 3
   1.239 +     };
   1.240 + 
   1.241 +     Hinting getHinting() const {
   1.242 +         return static_cast<Hinting>(fHinting);
   1.243 +     }
   1.244 + 
   1.245 +     void setHinting(Hinting hintingLevel);
   1.246 + 
   1.247 +@@ -282,17 +282,17 @@ public:
   1.248 +         results may not appear the same as if it was drawn twice, filled and
   1.249 +         then stroked.
   1.250 +     */
   1.251 +     enum Style {
   1.252 +         kFill_Style,            //!< fill the geometry
   1.253 +         kStroke_Style,          //!< stroke the geometry
   1.254 +         kStrokeAndFill_Style,   //!< fill and stroke the geometry
   1.255 + 
   1.256 +-        kStyleCount,
   1.257 ++        kStyleCount
   1.258 +     };
   1.259 + 
   1.260 +     /** Return the paint's style, used for controlling how primitives'
   1.261 +         geometries are interpreted (except for drawBitmap, which always assumes
   1.262 +         kFill_Style).
   1.263 +         @return the paint's Style
   1.264 +     */
   1.265 +     Style getStyle() const { return (Style)fStyle; }
   1.266 +diff --git a/gfx/skia/include/core/SkScalerContext.h b/gfx/skia/include/core/SkScalerContext.h
   1.267 +--- a/gfx/skia/include/core/SkScalerContext.h
   1.268 ++++ b/gfx/skia/include/core/SkScalerContext.h
   1.269 +@@ -172,24 +172,24 @@ public:
   1.270 +         kHintingBit2_Flag         = 0x0100,
   1.271 + 
   1.272 +         // these should only ever be set if fMaskFormat is LCD16 or LCD32
   1.273 +         kLCD_Vertical_Flag        = 0x0200,    // else Horizontal
   1.274 +         kLCD_BGROrder_Flag        = 0x0400,    // else RGB order
   1.275 + 
   1.276 +         // luminance : 0 for black text, kLuminance_Max for white text
   1.277 +         kLuminance_Shift          = 11, // to shift into the other flags above
   1.278 +-        kLuminance_Bits           = 3,  // ensure Flags doesn't exceed 16bits
   1.279 ++        kLuminance_Bits           = 3  // ensure Flags doesn't exceed 16bits
   1.280 +     };
   1.281 +     
   1.282 +     // computed values
   1.283 +     enum {
   1.284 +         kHinting_Mask   = kHintingBit1_Flag | kHintingBit2_Flag,
   1.285 +         kLuminance_Max  = (1 << kLuminance_Bits) - 1,
   1.286 +-        kLuminance_Mask = kLuminance_Max << kLuminance_Shift,
   1.287 ++        kLuminance_Mask = kLuminance_Max << kLuminance_Shift
   1.288 +     };
   1.289 + 
   1.290 +     struct Rec {
   1.291 +         uint32_t    fOrigFontID;
   1.292 +         uint32_t    fFontID;
   1.293 +         SkScalar    fTextSize, fPreScaleX, fPreSkewX;
   1.294 +         SkScalar    fPost2x2[2][2];
   1.295 +         SkScalar    fFrameWidth, fMiterLimit;
   1.296 +diff --git a/gfx/skia/include/core/SkTypes.h b/gfx/skia/include/core/SkTypes.h
   1.297 +--- a/gfx/skia/include/core/SkTypes.h
   1.298 ++++ b/gfx/skia/include/core/SkTypes.h
   1.299 +@@ -433,17 +433,17 @@ public:
   1.300 +          */
   1.301 +         kAlloc_OnShrink,
   1.302 +         
   1.303 +         /**
   1.304 +          *  If the requested size is smaller than the current size, and the
   1.305 +          *  current block is dynamically allocated, just return the old
   1.306 +          *  block.
   1.307 +          */
   1.308 +-        kReuse_OnShrink,
   1.309 ++        kReuse_OnShrink
   1.310 +     };
   1.311 + 
   1.312 +     /**
   1.313 +      *  Reallocates the block to a new size. The ptr may or may not change.
   1.314 +      */
   1.315 +     void* reset(size_t size, OnShrink shrink = kAlloc_OnShrink) {
   1.316 +         if (size == fSize || (kReuse_OnShrink == shrink && size < fSize)) {
   1.317 +             return fPtr;
   1.318 +diff --git a/gfx/skia/include/effects/SkLayerDrawLooper.h b/gfx/skia/include/effects/SkLayerDrawLooper.h
   1.319 +--- a/gfx/skia/include/effects/SkLayerDrawLooper.h
   1.320 ++++ b/gfx/skia/include/effects/SkLayerDrawLooper.h
   1.321 +@@ -36,17 +36,17 @@ public:
   1.322 +         
   1.323 +         /**
   1.324 +          *  Use the layer's paint entirely, with these exceptions:
   1.325 +          *  - We never override the draw's paint's text_encoding, since that is
   1.326 +          *    used to interpret the text/len parameters in draw[Pos]Text.
   1.327 +          *  - Flags and Color are always computed using the LayerInfo's
   1.328 +          *    fFlagsMask and fColorMode.
   1.329 +          */
   1.330 +-        kEntirePaint_Bits = -1,
   1.331 ++        kEntirePaint_Bits = -1
   1.332 +         
   1.333 +     };
   1.334 +     typedef int32_t BitFlags;
   1.335 + 
   1.336 +     /**
   1.337 +      *  Info for how to apply the layer's paint and offset.
   1.338 +      *
   1.339 +      *  fFlagsMask selects which flags in the layer's paint should be applied.
   1.340 +diff --git a/gfx/skia/src/core/SkBitmap.cpp b/gfx/skia/src/core/SkBitmap.cpp
   1.341 +--- a/gfx/skia/src/core/SkBitmap.cpp
   1.342 ++++ b/gfx/skia/src/core/SkBitmap.cpp
   1.343 +@@ -1357,17 +1357,17 @@ bool SkBitmap::extractAlpha(SkBitmap* ds
   1.344 + 
   1.345 + ///////////////////////////////////////////////////////////////////////////////
   1.346 + 
   1.347 + enum {
   1.348 +     SERIALIZE_PIXELTYPE_NONE,
   1.349 +     SERIALIZE_PIXELTYPE_RAW_WITH_CTABLE,
   1.350 +     SERIALIZE_PIXELTYPE_RAW_NO_CTABLE,
   1.351 +     SERIALIZE_PIXELTYPE_REF_DATA,
   1.352 +-    SERIALIZE_PIXELTYPE_REF_PTR,
   1.353 ++    SERIALIZE_PIXELTYPE_REF_PTR
   1.354 + };
   1.355 + 
   1.356 + static void writeString(SkFlattenableWriteBuffer& buffer, const char str[]) {
   1.357 +     size_t len = strlen(str);
   1.358 +     buffer.write32(len);
   1.359 +     buffer.writePad(str, len);
   1.360 + }
   1.361 + 
   1.362 +diff --git a/gfx/skia/src/core/SkMatrix.cpp b/gfx/skia/src/core/SkMatrix.cpp
   1.363 +--- a/gfx/skia/src/core/SkMatrix.cpp
   1.364 ++++ b/gfx/skia/src/core/SkMatrix.cpp
   1.365 +@@ -1715,17 +1715,17 @@ SkScalar SkMatrix::getMaxStretch() const
   1.366 + const SkMatrix& SkMatrix::I() {
   1.367 +     static SkMatrix gIdentity;
   1.368 +     static bool gOnce;
   1.369 +     if (!gOnce) {
   1.370 +         gIdentity.reset();
   1.371 +         gOnce = true;
   1.372 +     }
   1.373 +     return gIdentity;
   1.374 +-};
   1.375 ++}
   1.376 + 
   1.377 + const SkMatrix& SkMatrix::InvalidMatrix() {
   1.378 +     static SkMatrix gInvalid;
   1.379 +     static bool gOnce;
   1.380 +     if (!gOnce) {
   1.381 +         gInvalid.setAll(SK_ScalarMax, SK_ScalarMax, SK_ScalarMax,
   1.382 +                         SK_ScalarMax, SK_ScalarMax, SK_ScalarMax,
   1.383 +                         SK_ScalarMax, SK_ScalarMax, SK_ScalarMax);

mercurial