Bug 765038; fix a Clang compilation bug in Skia; r=jwatt
authorNicholas Cameron <ncameron@mozilla.com>
Fri, 15 Jun 2012 11:52:15 +0100
changeset 96823 3ec9d53ce65c61287e2d3991544a51f5686940b1
parent 96822 c4b46347c04bd25be43d2cb4e71d11e574e0524e
child 96824 ea52f4eb380c1ff57efc7675b2b570699efd48f6
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersjwatt
bugs765038
milestone16.0a1
Bug 765038; fix a Clang compilation bug in Skia; r=jwatt
gfx/skia/patches/0014-Bug-765038-Fix-clang-build.patch
gfx/skia/patches/README
gfx/skia/src/sfnt/SkOTTable_head.h
new file mode 100644
--- /dev/null
+++ b/gfx/skia/patches/0014-Bug-765038-Fix-clang-build.patch
@@ -0,0 +1,29 @@
+# HG changeset patch
+# Parent 9ded7a9f94a863dfa1f3227d3013367f51b8b522
+# User Nicholas Cameron <ncameron@mozilla.com>
+Bug 765038; fix a Clang compilation bug in Skia; r=jwatt
+
+diff --git a/gfx/skia/src/sfnt/SkOTTable_head.h b/gfx/skia/src/sfnt/SkOTTable_head.h
+--- a/gfx/skia/src/sfnt/SkOTTable_head.h
++++ b/gfx/skia/src/sfnt/SkOTTable_head.h
+@@ -109,18 +109,18 @@ struct SkOTTableHead {
+         } raw;
+     } macStyle;
+     SK_OT_USHORT lowestRecPPEM;
+     struct FontDirectionHint {
+         SK_TYPED_ENUM(Value, SK_OT_SHORT,
+             ((FullyMixedDirectionalGlyphs, SkTEndian_SwapBE16(0)))
+             ((OnlyStronglyLTR, SkTEndian_SwapBE16(1)))
+             ((StronglyLTR, SkTEndian_SwapBE16(2)))
+-            ((OnlyStronglyRTL, static_cast<SK_OT_SHORT>(SkTEndian_SwapBE16(-1))))
+-            ((StronglyRTL, static_cast<SK_OT_SHORT>(SkTEndian_SwapBE16(-2))))
++            ((OnlyStronglyRTL, static_cast<SK_OT_SHORT>(SkTEndian_SwapBE16(static_cast<SK_OT_USHORT>(-1)))))
++            ((StronglyRTL, static_cast<SK_OT_SHORT>(SkTEndian_SwapBE16(static_cast<SK_OT_USHORT>(-2)))))
+             SK_SEQ_END,
+         (value)SK_SEQ_END)
+     } fontDirectionHint;
+     struct IndexToLocFormat {
+         SK_TYPED_ENUM(Value, SK_OT_SHORT,
+             ((ShortOffsets, SkTEndian_SwapBE16(0)))
+             ((LongOffsets, SkTEndian_SwapBE16(1)))
+             SK_SEQ_END,
--- a/gfx/skia/patches/README
+++ b/gfx/skia/patches/README
@@ -11,8 +11,9 @@ 0005-Bug-731384-Fix-clang-SK_OVERRIDE.pa
 0006-Bug-751814-ARM-EDSP-ARMv6-Skia-fixes.patch
 0007-Bug-719872-Old-Android-FontHost.patch
 0008-Bug-687188-Skia-radial-gradients.patch
 0009-Bug-755869-FreeBSD-Hurd.patch
 0010-Bug-689069-ARM-Opts.patch
 0011-Bug-719575-Fix-clang-build.patch
 0012-Bug-759683-make-ssse3-conditional.patch
 0013-Bug-761890-fonts.patch
+0014-Bug-765038-Fix-clang-build.patch
--- a/gfx/skia/src/sfnt/SkOTTable_head.h
+++ b/gfx/skia/src/sfnt/SkOTTable_head.h
@@ -109,18 +109,18 @@ struct SkOTTableHead {
         } raw;
     } macStyle;
     SK_OT_USHORT lowestRecPPEM;
     struct FontDirectionHint {
         SK_TYPED_ENUM(Value, SK_OT_SHORT,
             ((FullyMixedDirectionalGlyphs, SkTEndian_SwapBE16(0)))
             ((OnlyStronglyLTR, SkTEndian_SwapBE16(1)))
             ((StronglyLTR, SkTEndian_SwapBE16(2)))
-            ((OnlyStronglyRTL, static_cast<SK_OT_SHORT>(SkTEndian_SwapBE16(-1))))
-            ((StronglyRTL, static_cast<SK_OT_SHORT>(SkTEndian_SwapBE16(-2))))
+            ((OnlyStronglyRTL, static_cast<SK_OT_SHORT>(SkTEndian_SwapBE16(static_cast<SK_OT_USHORT>(-1)))))
+            ((StronglyRTL, static_cast<SK_OT_SHORT>(SkTEndian_SwapBE16(static_cast<SK_OT_USHORT>(-2)))))
             SK_SEQ_END,
         (value)SK_SEQ_END)
     } fontDirectionHint;
     struct IndexToLocFormat {
         SK_TYPED_ENUM(Value, SK_OT_SHORT,
             ((ShortOffsets, SkTEndian_SwapBE16(0)))
             ((LongOffsets, SkTEndian_SwapBE16(1)))
             SK_SEQ_END,