diff options
Diffstat (limited to 'src/ports')
-rw-r--r-- | src/ports/SkFontHost_FreeType_common.cpp | 5 | ||||
-rw-r--r-- | src/ports/SkFontHost_mac.cpp | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/ports/SkFontHost_FreeType_common.cpp b/src/ports/SkFontHost_FreeType_common.cpp index 5627304956..bd15834775 100644 --- a/src/ports/SkFontHost_FreeType_common.cpp +++ b/src/ports/SkFontHost_FreeType_common.cpp @@ -15,6 +15,8 @@ #include "SkPath.h" #include "SkTo.h" +#include <utility> + #include <ft2build.h> #include FT_FREETYPE_H #include FT_BITMAP_H @@ -161,7 +163,8 @@ void copyFT2LCD16(const FT_Bitmap& bitmap, const SkMask& mask, int lcdIsBGR, const uint8_t* srcG = srcR + bitmap.pitch; const uint8_t* srcB = srcG + bitmap.pitch; if (lcdIsBGR) { - SkTSwap(srcR, srcB); + using std::swap; + swap(srcR, srcB); } for (int x = 0; x < width; x++) { dst[x] = packTriple(sk_apply_lut_if<APPLY_PREBLEND>(*srcR++, tableR), diff --git a/src/ports/SkFontHost_mac.cpp b/src/ports/SkFontHost_mac.cpp index 4c06e960a6..18d09b4ec0 100644 --- a/src/ports/SkFontHost_mac.cpp +++ b/src/ports/SkFontHost_mac.cpp @@ -49,6 +49,8 @@ #include <dlfcn.h> +#include <utility> + // Experimental code to use a global lock whenever we access CG, to see if this reduces // crashes in Chrome #define USE_GLOBAL_MUTEX_FOR_CG_ACCESS @@ -1170,7 +1172,8 @@ void SkScalerContext_Mac::generateMetrics(SkGlyph* glyph) { CTFontGetAdvancesForGlyphs(fCTFont.get(), kCTFontOrientationVertical, &cgGlyph, &cgAdvance, 1); // Vertical advances are returned as widths instead of heights. - SkTSwap(cgAdvance.height, cgAdvance.width); + using std::swap; + swap(cgAdvance.height, cgAdvance.width); cgAdvance.height = -cgAdvance.height; } else { CTFontGetAdvancesForGlyphs(fCTFont.get(), kCTFontOrientationHorizontal, |