1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/gfx/skia/patches/archive/mingw-fix.patch Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,57 @@ 1.4 +diff --git a/gfx/skia/include/core/SkPostConfig.h b/gfx/skia/include/core/SkPostConfig.h 1.5 +index 0135b85..bb108f8 100644 1.6 +--- a/gfx/skia/include/core/SkPostConfig.h 1.7 ++++ b/gfx/skia/include/core/SkPostConfig.h 1.8 +@@ -253,7 +253,7 @@ 1.9 + ////////////////////////////////////////////////////////////////////// 1.10 + 1.11 + #ifndef SK_OVERRIDE 1.12 +-#if defined(SK_BUILD_FOR_WIN) 1.13 ++#if defined(_MSC_VER) 1.14 + #define SK_OVERRIDE override 1.15 + #elif defined(__clang__) 1.16 + // Some documentation suggests we should be using __attribute__((override)), 1.17 +diff --git a/gfx/skia/src/ports/SkFontHost_win.cpp b/gfx/skia/src/ports/SkFontHost_win.cpp 1.18 +index dd9c5dc..ca2c3dc 100644 1.19 +--- a/gfx/skia/src/ports/SkFontHost_win.cpp 1.20 ++++ b/gfx/skia/src/ports/SkFontHost_win.cpp 1.21 +@@ -22,7 +22,7 @@ 1.22 + #ifdef WIN32 1.23 + #include "windows.h" 1.24 + #include "tchar.h" 1.25 +-#include "Usp10.h" 1.26 ++#include "usp10.h" 1.27 + 1.28 + // always packed xxRRGGBB 1.29 + typedef uint32_t SkGdiRGB; 1.30 +@@ -1033,6 +1033,10 @@ SkAdvancedTypefaceMetrics* SkFontHost::GetAdvancedTypefaceMetrics( 1.31 + HFONT savefont = (HFONT)SelectObject(hdc, font); 1.32 + HFONT designFont = NULL; 1.33 + 1.34 ++ const char stem_chars[] = {'i', 'I', '!', '1'}; 1.35 ++ int16_t min_width; 1.36 ++ unsigned glyphCount; 1.37 ++ 1.38 + // To request design units, create a logical font whose height is specified 1.39 + // as unitsPerEm. 1.40 + OUTLINETEXTMETRIC otm; 1.41 +@@ -1046,7 +1050,7 @@ SkAdvancedTypefaceMetrics* SkFontHost::GetAdvancedTypefaceMetrics( 1.42 + if (!GetOutlineTextMetrics(hdc, sizeof(otm), &otm)) { 1.43 + goto Error; 1.44 + } 1.45 +- const unsigned glyphCount = calculateGlyphCount(hdc); 1.46 ++ glyphCount = calculateGlyphCount(hdc); 1.47 + 1.48 + info = new SkAdvancedTypefaceMetrics; 1.49 + info->fEmSize = otm.otmEMSquare; 1.50 +@@ -1115,9 +1119,8 @@ SkAdvancedTypefaceMetrics* SkFontHost::GetAdvancedTypefaceMetrics( 1.51 + 1.52 + // Figure out a good guess for StemV - Min width of i, I, !, 1. 1.53 + // This probably isn't very good with an italic font. 1.54 +- int16_t min_width = SHRT_MAX; 1.55 ++ min_width = SHRT_MAX; 1.56 + info->fStemV = 0; 1.57 +- char stem_chars[] = {'i', 'I', '!', '1'}; 1.58 + for (size_t i = 0; i < SK_ARRAY_COUNT(stem_chars); i++) { 1.59 + ABC abcWidths; 1.60 + if (GetCharABCWidths(hdc, stem_chars[i], stem_chars[i], &abcWidths)) {