aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--debugger/SkDebugCanvas.h2
-rw-r--r--src/effects/SkBlurMask.cpp38
-rw-r--r--src/effects/SkBlurMask.h2
-rw-r--r--src/effects/SkBlurMaskFilter.cpp16
-rw-r--r--tests/FontHostTest.cpp6
5 files changed, 32 insertions, 32 deletions
diff --git a/debugger/SkDebugCanvas.h b/debugger/SkDebugCanvas.h
index 5afc7fca2f..a6afec3875 100644
--- a/debugger/SkDebugCanvas.h
+++ b/debugger/SkDebugCanvas.h
@@ -91,7 +91,7 @@ public:
Returns the vector of draw commands
*/
const SkTDArray<SkDrawCommand*>& getDrawCommands() const;
-
+
/**
Returns the vector of draw commands. Do not use this entry
point - it is going away!
diff --git a/src/effects/SkBlurMask.cpp b/src/effects/SkBlurMask.cpp
index 3b367024fd..8a92eef027 100644
--- a/src/effects/SkBlurMask.cpp
+++ b/src/effects/SkBlurMask.cpp
@@ -1189,8 +1189,8 @@ static float gaussianIntegral(float x) {
static int compute_profile_size(SkScalar radius) {
return SkScalarRoundToInt(radius * 3);
-
-}
+
+}
/* compute_profile allocates and fills in an array of floating
point values between 0 and 255 for the profile signature of
@@ -1205,7 +1205,7 @@ static int compute_profile_size(SkScalar radius) {
static void compute_profile(SkScalar radius, unsigned int **profile_out) {
int size = compute_profile_size(radius);
-
+
int center = size >> 1;
unsigned int *profile = SkNEW_ARRAY(unsigned int, size);
@@ -1242,46 +1242,46 @@ bool SkBlurMask::BlurRect(SkMask *dst, const SkRect &src,
SkScalar provided_radius, Style style,
SkIPoint *margin, SkMask::CreateMode createMode) {
int profile_size;
-
+
float radius = SkScalarToFloat(SkScalarMul(provided_radius, kBlurRadiusFudgeFactor));
// adjust blur radius to match interpretation from boxfilter code
radius = (radius + .5f) * 2.f;
profile_size = compute_profile_size(radius);
-
+
int pad = profile_size/2;
if (margin) {
margin->set( pad, pad );
}
- dst->fBounds.set(SkScalarRoundToInt(src.fLeft - pad),
- SkScalarRoundToInt(src.fTop - pad),
- SkScalarRoundToInt(src.fRight + pad),
+ dst->fBounds.set(SkScalarRoundToInt(src.fLeft - pad),
+ SkScalarRoundToInt(src.fTop - pad),
+ SkScalarRoundToInt(src.fRight + pad),
SkScalarRoundToInt(src.fBottom + pad));
dst->fRowBytes = dst->fBounds.width();
dst->fFormat = SkMask::kA8_Format;
dst->fImage = NULL;
-
+
int sw = SkScalarFloorToInt(src.width());
int sh = SkScalarFloorToInt(src.height());
-
+
if (createMode == SkMask::kJustComputeBounds_CreateMode) {
if (style == kInner_Style) {
- dst->fBounds.set(SkScalarRoundToInt(src.fLeft),
- SkScalarRoundToInt(src.fTop),
- SkScalarRoundToInt(src.fRight),
+ dst->fBounds.set(SkScalarRoundToInt(src.fLeft),
+ SkScalarRoundToInt(src.fTop),
+ SkScalarRoundToInt(src.fRight),
SkScalarRoundToInt(src.fBottom)); // restore trimmed bounds
dst->fRowBytes = sw;
}
return true;
}
unsigned int *profile = NULL;
-
+
compute_profile(radius, &profile);
SkAutoTDeleteArray<unsigned int> ada(profile);
-
+
size_t dstSize = dst->computeImageSize();
if (0 == dstSize) {
return false; // too big to allocate, abort
@@ -1345,9 +1345,9 @@ bool SkBlurMask::BlurRect(SkMask *dst, const SkRect &src,
}
SkMask::FreeImage(dp);
- dst->fBounds.set(SkScalarRoundToInt(src.fLeft),
- SkScalarRoundToInt(src.fTop),
- SkScalarRoundToInt(src.fRight),
+ dst->fBounds.set(SkScalarRoundToInt(src.fLeft),
+ SkScalarRoundToInt(src.fTop),
+ SkScalarRoundToInt(src.fRight),
SkScalarRoundToInt(src.fBottom)); // restore trimmed bounds
dst->fRowBytes = sw;
@@ -1360,7 +1360,7 @@ bool SkBlurMask::BlurRect(SkMask *dst, const SkRect &src,
for (int y = pad ; y < dstHeight-pad ; y++) {
uint8_t *dst_scanline = dp + y*dstWidth + pad;
memset(dst_scanline, 0xff, sw);
- }
+ }
}
// normal and solid styles are the same for analytic rect blurs, so don't
// need to handle solid specially.
diff --git a/src/effects/SkBlurMask.h b/src/effects/SkBlurMask.h
index 4849ee77a9..b60c2aadcc 100644
--- a/src/effects/SkBlurMask.h
+++ b/src/effects/SkBlurMask.h
@@ -31,7 +31,7 @@ public:
static bool BlurRect(SkMask *dst, const SkRect &src,
SkScalar radius, Style style,
- SkIPoint *margin = NULL,
+ SkIPoint *margin = NULL,
SkMask::CreateMode createMode=SkMask::kComputeBoundsAndRenderImage_CreateMode);
static bool Blur(SkMask* dst, const SkMask& src,
SkScalar radius, Style style, Quality quality,
diff --git a/src/effects/SkBlurMaskFilter.cpp b/src/effects/SkBlurMaskFilter.cpp
index 8385844f82..88043ff6fe 100644
--- a/src/effects/SkBlurMaskFilter.cpp
+++ b/src/effects/SkBlurMaskFilter.cpp
@@ -23,7 +23,7 @@ public:
virtual SkMask::Format getFormat() const SK_OVERRIDE;
virtual bool filterMask(SkMask* dst, const SkMask& src, const SkMatrix&,
SkIPoint* margin) const SK_OVERRIDE;
-
+
virtual BlurType asABlur(BlurInfo*) const SK_OVERRIDE;
virtual void computeFastBounds(const SkRect&, SkRect*) const SK_OVERRIDE;
@@ -33,8 +33,8 @@ protected:
virtual FilterReturn filterRectsToNine(const SkRect[], int count, const SkMatrix&,
const SkIRect& clipBounds,
NinePatch*) const SK_OVERRIDE;
-
- bool filterRectMask(SkMask* dstM, const SkRect& r, const SkMatrix& matrix,
+
+ bool filterRectMask(SkMask* dstM, const SkRect& r, const SkMatrix& matrix,
SkIPoint* margin, SkMask::CreateMode createMode) const;
private:
@@ -128,7 +128,7 @@ bool SkBlurMaskFilterImpl::filterRectMask(SkMask* dst, const SkRect& r,
// a request like 10,000)
static const SkScalar MAX_RADIUS = SkIntToScalar(128);
radius = SkMinScalar(radius, MAX_RADIUS);
-
+
return SkBlurMask::BlurRect(dst, r, radius, (SkBlurMask::Style)fBlurStyle,
margin, createMode);
}
@@ -210,17 +210,17 @@ SkBlurMaskFilterImpl::filterRectsToNine(const SkRect rects[], int count,
srcM.fImage = NULL;
srcM.fFormat = SkMask::kA8_Format;
srcM.fRowBytes = 0;
-
+
bool filterResult = false;
if (count == 1 && c_analyticBlurNinepatch) {
// special case for fast rect blur
// don't actually do the blur the first time, just compute the correct size
- filterResult = this->filterRectMask(&dstM, rects[0], matrix, &margin,
+ filterResult = this->filterRectMask(&dstM, rects[0], matrix, &margin,
SkMask::kJustComputeBounds_CreateMode);
} else {
filterResult = this->filterMask(&dstM, srcM, matrix, &margin);
}
-
+
if (!filterResult) {
return kFalse_FilterReturn;
}
@@ -290,7 +290,7 @@ SkBlurMaskFilterImpl::filterRectsToNine(const SkRect rects[], int count,
return kFalse_FilterReturn;
}
} else {
- if (!this->filterRectMask(&patch->fMask, smallR[0], matrix, &margin,
+ if (!this->filterRectMask(&patch->fMask, smallR[0], matrix, &margin,
SkMask::kComputeBoundsAndRenderImage_CreateMode)) {
return kFalse_FilterReturn;
}
diff --git a/tests/FontHostTest.cpp b/tests/FontHostTest.cpp
index 87c66803f0..e9961551e1 100644
--- a/tests/FontHostTest.cpp
+++ b/tests/FontHostTest.cpp
@@ -47,10 +47,10 @@ static void test_fontstream(skiatest::Reporter* reporter,
SkStream* stream, int ttcIndex) {
int n = SkFontStream::GetTableTags(stream, ttcIndex, NULL);
SkAutoTArray<SkFontTableTag> array(n);
-
+
int n2 = SkFontStream::GetTableTags(stream, ttcIndex, array.get());
REPORTER_ASSERT(reporter, n == n2);
-
+
for (int i = 0; i < n; ++i) {
#ifdef DUMP_TTC_TABLES
SkString str;
@@ -66,7 +66,7 @@ static void test_fontstream(skiatest::Reporter* reporter,
if (gKnownTableSizes[j].fTag == array[i]) {
REPORTER_ASSERT(reporter, gKnownTableSizes[j].fSize == size);
}
- }
+ }
}
}