aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/utils/SkPathUtils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/SkPathUtils.cpp')
-rw-r--r--src/utils/SkPathUtils.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/utils/SkPathUtils.cpp b/src/utils/SkPathUtils.cpp
index 3ece6fc028..dd50ff7957 100644
--- a/src/utils/SkPathUtils.cpp
+++ b/src/utils/SkPathUtils.cpp
@@ -27,7 +27,7 @@ static void FillRandomBits( int chars, char* bits ){
bits[i] = rand.nextU();
}
}OA
-*/
+*/
static int GetBit( const char* buffer, int x ) {
int byte = x >> 3;
@@ -117,11 +117,11 @@ void SkPathUtils::BitsToPath_Region(SkPath* path,
bool inRun = 0;
int start = 1;
const char* line = &bitmap[y * stride];
-
- // loop for each pixel
+
+ // loop for each pixel
for (int i = 0; i < w; ++i) {
int curPixel = GetBit(line,i);
-
+
if ( (curPixel!=0) != inRun ) { // if transition
if (curPixel) { // if transition on
inRun = 1;
@@ -140,7 +140,7 @@ void SkPathUtils::BitsToPath_Region(SkPath* path,
// add the thing here
region.op(SkIRect::MakeXYWH(start, y, w-1-start+end, 1),
SkRegion::kUnion_Op );
-
+
} else if ( GetBit(line,w-1) ) { // if last pixel on add rect
// add the thing here
region.op(SkIRect::MakeXYWH(w-1, y, 1, 1),