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:
parent
064779aa18
commit
74887b6edd
@ -41,7 +41,7 @@ protected:
|
||||
|
||||
virtual void onDrawContent(SkCanvas* canvas) {
|
||||
// bitmap definitions
|
||||
const char bits[numModes][numChars] = {
|
||||
const uint8_t bits[numModes][numChars] = {
|
||||
{ 0x18, 0x00, 0x3c, 0x00, 0x7e, 0x00, 0xdb, 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
|
||||
}else { // if transition off add the span as a path
|
||||
inRun = 0;
|
||||
path->addRect(SkRect::MakeXYWH(start, lineIdx, i-start, 1),
|
||||
path->addRect(SkRect::MakeXYWH(start, lineIdx, i-start, SK_Scalar1),
|
||||
SkPath::kCW_Direction);
|
||||
}
|
||||
}
|
||||
@ -85,10 +85,11 @@ static void Line2path_span(SkPath* path, const char* line,
|
||||
int end = 0;
|
||||
if ( GetBit(line,width-1) ) ++end;
|
||||
path->addRect(SkRect::MakeXYWH(start, lineIdx,
|
||||
width - 1 + end - start, 1),
|
||||
width - SK_Scalar1 + end - start, SK_Scalar1),
|
||||
SkPath::kCW_Direction);
|
||||
} else if ( GetBit(line,width-1) ) { // if last pixel on add rect
|
||||
path->addRect(SkRect::MakeXYWH(width-1, lineIdx, 1, 1),
|
||||
} else if ( GetBit(line, width - SK_Scalar1) ) { // if last pixel on add
|
||||
path->addRect(SkRect::MakeXYWH(width - SK_Scalar1, lineIdx,
|
||||
SK_Scalar1, SK_Scalar1),
|
||||
SkPath::kCW_Direction);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user