Clang warnings for SkFontHost_FreeType_common.cpp

Signed/unsigned comparison warnings while attempting to build with Clang
on Linux.

R=bungeman@google.com,joshualitt@chromium.org

Review URL: https://codereview.chromium.org/961103002
This commit is contained in:
fmalita 2015-02-27 08:46:39 -08:00 committed by Commit bot
parent a9061de9ff
commit cf808aa862

View File

@ -80,10 +80,10 @@ static void copyFT2LCD16(const FT_Bitmap& bitmap, const SkMask& mask, int lcdIsB
{
SkASSERT(SkMask::kLCD16_Format == mask.fFormat);
if (FT_PIXEL_MODE_LCD != bitmap.pixel_mode) {
SkASSERT(mask.fBounds.width() == bitmap.width);
SkASSERT(mask.fBounds.width() == static_cast<int>(bitmap.width));
}
if (FT_PIXEL_MODE_LCD_V != bitmap.pixel_mode) {
SkASSERT(mask.fBounds.height() == bitmap.rows);
SkASSERT(mask.fBounds.height() == static_cast<int>(bitmap.rows));
}
const uint8_t* src = bitmap.buffer;
@ -113,7 +113,7 @@ static void copyFT2LCD16(const FT_Bitmap& bitmap, const SkMask& mask, int lcdIsB
}
break;
case FT_PIXEL_MODE_LCD:
SkASSERT(3 * mask.fBounds.width() == bitmap.width);
SkASSERT(3 * mask.fBounds.width() == static_cast<int>(bitmap.width));
for (int y = height; y --> 0;) {
const uint8_t* triple = src;
if (lcdIsBGR) {
@ -136,7 +136,7 @@ static void copyFT2LCD16(const FT_Bitmap& bitmap, const SkMask& mask, int lcdIsB
}
break;
case FT_PIXEL_MODE_LCD_V:
SkASSERT(3 * mask.fBounds.height() == bitmap.rows);
SkASSERT(3 * mask.fBounds.height() == static_cast<int>(bitmap.rows));
for (int y = height; y --> 0;) {
const uint8_t* srcR = src;
const uint8_t* srcG = srcR + bitmap.pitch;