Fixed the bugs that crashed the build bots

git-svn-id: http://skia.googlecode.com/svn/trunk@9845 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
dierk@google.com 2013-07-01 19:30:14 +00:00
Родитель 064779aa18
Коммит 74887b6edd
2 изменённых файлов: 6 добавлений и 5 удалений

Просмотреть файл

@ -41,7 +41,7 @@ protected:
virtual void onDrawContent(SkCanvas* canvas) { virtual void onDrawContent(SkCanvas* canvas) {
// bitmap definitions // bitmap definitions
const char bits[numModes][numChars] = { const uint8_t bits[numModes][numChars] = {
{ 0x18, 0x00, 0x3c, 0x00, 0x7e, 0x00, 0xdb, 0x00, { 0x18, 0x00, 0x3c, 0x00, 0x7e, 0x00, 0xdb, 0x00,
0xff, 0x00, 0x24, 0x00, 0x5a, 0x00, 0xa5, 0x00 }, 0xff, 0x00, 0x24, 0x00, 0x5a, 0x00, 0xa5, 0x00 },

Просмотреть файл

@ -75,7 +75,7 @@ static void Line2path_span(SkPath* path, const char* line,
start = i; // mark beginning of span start = i; // mark beginning of span
}else { // if transition off add the span as a path }else { // if transition off add the span as a path
inRun = 0; inRun = 0;
path->addRect(SkRect::MakeXYWH(start, lineIdx, i-start, 1), path->addRect(SkRect::MakeXYWH(start, lineIdx, i-start, SK_Scalar1),
SkPath::kCW_Direction); SkPath::kCW_Direction);
} }
} }
@ -85,10 +85,11 @@ static void Line2path_span(SkPath* path, const char* line,
int end = 0; int end = 0;
if ( GetBit(line,width-1) ) ++end; if ( GetBit(line,width-1) ) ++end;
path->addRect(SkRect::MakeXYWH(start, lineIdx, path->addRect(SkRect::MakeXYWH(start, lineIdx,
width - 1 + end - start, 1), width - SK_Scalar1 + end - start, SK_Scalar1),
SkPath::kCW_Direction); SkPath::kCW_Direction);
} else if ( GetBit(line,width-1) ) { // if last pixel on add rect } else if ( GetBit(line, width - SK_Scalar1) ) { // if last pixel on add
path->addRect(SkRect::MakeXYWH(width-1, lineIdx, 1, 1), path->addRect(SkRect::MakeXYWH(width - SK_Scalar1, lineIdx,
SK_Scalar1, SK_Scalar1),
SkPath::kCW_Direction); SkPath::kCW_Direction);
} }
} }