Merge remote-tracking branch 'refs/remotes/git-svn'
changed all makeXYWH args to SkScalar
Fixed non-constant array size in test.
Merge remote-tracking branch 'refs/remotes/git-svn'
Fixed non-constant array size in test.
Merge remote-tracking branch 'refs/remotes/git-svn'
fixed SkPathUtils.cpp:78
Fixed PathUtils.cpp:90
Fixed the float being passed to an int method
Fixed the bugs that crashed the build bots
git-svn-id: http://skia.googlecode.com/svn/trunk@9849 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/utils/SkPathUtils.cpp b/src/utils/SkPathUtils.cpp
index 6a0b121..3ece6fc 100644
--- a/src/utils/SkPathUtils.cpp
+++ b/src/utils/SkPathUtils.cpp
@@ -75,7 +75,7 @@
start = i; // mark beginning of span
}else { // if transition off add the span as a path
inRun = 0;
- path->addRect(SkRect::MakeXYWH(start, lineIdx,
+ path->addRect(SkRect::MakeXYWH(SkIntToScalar(start), SkIntToScalar(lineIdx),
SkIntToScalar(i-start), SK_Scalar1),
SkPath::kCW_Direction);
}
@@ -85,11 +85,11 @@
if (inRun==1) { // close any open spans
int end = 0;
if ( GetBit(line,width-1) ) ++end;
- path->addRect(SkRect::MakeXYWH(start, lineIdx,
- width - SK_Scalar1 + end - start, SK_Scalar1),
+ path->addRect(SkRect::MakeXYWH(SkIntToScalar(start), SkIntToScalar(lineIdx),
+ SkIntToScalar(width - 1 + end - start), SK_Scalar1),
SkPath::kCW_Direction);
} else if ( GetBit(line, width - 1) ) { // if last pixel on add
- path->addRect(SkRect::MakeXYWH(width - SK_Scalar1, lineIdx,
+ path->addRect(SkRect::MakeXYWH(width - SK_Scalar1, SkIntToScalar(lineIdx),
SK_Scalar1, SK_Scalar1),
SkPath::kCW_Direction);
}