Fix r6808 fix & some compiler warnings
https://codereview.appspot.com/6948047/
git-svn-id: http://skia.googlecode.com/svn/trunk@6820 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/include/core/SkShader.h b/include/core/SkShader.h
index 0ec892e..389be35 100644
--- a/include/core/SkShader.h
+++ b/include/core/SkShader.h
@@ -159,7 +159,7 @@
*/
virtual void endContext();
- SkDEBUGCODE(bool setContextHasBeenCalled() const { return fInSetContext ? true : false; })
+ SkDEBUGCODE(bool setContextHasBeenCalled() const { return SkToBool(fInSetContext); })
/**
* Called for each span of the object being drawn. Your subclass should
diff --git a/src/effects/SkDashPathEffect.cpp b/src/effects/SkDashPathEffect.cpp
index f2e36cc..4f695ad 100644
--- a/src/effects/SkDashPathEffect.cpp
+++ b/src/effects/SkDashPathEffect.cpp
@@ -198,9 +198,13 @@
addedSegment = true;
if (specialLine) {
- lineRec.addSegment(distance, distance + dlen, dst);
+ lineRec.addSegment(SkDoubleToScalar(distance),
+ SkDoubleToScalar(distance + dlen),
+ dst);
} else {
- meas.getSegment(distance, distance + dlen, dst, true);
+ meas.getSegment(SkDoubleToScalar(distance),
+ SkDoubleToScalar(distance + dlen),
+ dst, true);
}
}
distance += dlen;
diff --git a/tests/BitmapTransformerTest.cpp b/tests/BitmapTransformerTest.cpp
index 17d0a00..d9ce696 100644
--- a/tests/BitmapTransformerTest.cpp
+++ b/tests/BitmapTransformerTest.cpp
@@ -46,7 +46,7 @@
// Bytes we expect to get:
const int kWidth = 3;
const int kHeight = 5;
- const char comparisonBuffer[] = {
+ const unsigned char comparisonBuffer[] = {
// kHeight rows, each with kWidth pixels, premultiplied ARGB for each pixel
0xff,0xff,0x00,0x00, 0xff,0xff,0x00,0x00, 0xff,0xff,0x00,0x00, // red
0xff,0x00,0xff,0x00, 0xff,0x00,0xff,0x00, 0xff,0x00,0xff,0x00, // green