aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--bench/BitmapRectBench.cpp2
-rw-r--r--gm/colorfilterimagefilter.cpp2
-rw-r--r--gm/shadertext3.cpp14
-rw-r--r--include/gpu/GrContext.h4
-rw-r--r--src/core/SkBitmapProcState.cpp4
-rw-r--r--src/core/SkBlitter_ARGB32.cpp2
-rw-r--r--src/core/SkCoreBlitters.h6
-rwxr-xr-xsrc/effects/SkColorFilterImageFilter.cpp2
-rw-r--r--src/gpu/SkGpuDevice.cpp2
-rw-r--r--tests/ColorTest.cpp20
-rw-r--r--tests/MatrixTest.cpp6
11 files changed, 32 insertions, 32 deletions
diff --git a/bench/BitmapRectBench.cpp b/bench/BitmapRectBench.cpp
index 79c6aaf577..2bed21d6dc 100644
--- a/bench/BitmapRectBench.cpp
+++ b/bench/BitmapRectBench.cpp
@@ -54,7 +54,7 @@ public:
fBitmap.setIsOpaque(true);
fBitmap.eraseColor(SK_ColorBLACK);
drawIntoBitmap(fBitmap);
-
+
fSrcR.set(0, 0, w, h);
fDstR.set(0, 0, w, h);
}
diff --git a/gm/colorfilterimagefilter.cpp b/gm/colorfilterimagefilter.cpp
index 7963c8af73..556e88a186 100644
--- a/gm/colorfilterimagefilter.cpp
+++ b/gm/colorfilterimagefilter.cpp
@@ -71,7 +71,7 @@ protected:
virtual SkISize onISize() { return SkISize::Make(400, 100); }
virtual void onDraw(SkCanvas* canvas) {
-
+
SkRect r = SkRect::MakeWH(FILTER_WIDTH, FILTER_HEIGHT);
SkPaint paint;
paint.setColor(SK_ColorRED);
diff --git a/gm/shadertext3.cpp b/gm/shadertext3.cpp
index 22d93cbc13..4e9558801a 100644
--- a/gm/shadertext3.cpp
+++ b/gm/shadertext3.cpp
@@ -23,7 +23,7 @@ static void makebm(SkBitmap* bm, SkBitmap::Config config, int w, int h) {
static const SkScalar kPos[] = { 0, SK_Scalar1/2, SK_Scalar1 };
static const SkColor kColors0[] = {0x80F00080, 0xF0F08000, 0x800080F0 };
static const SkColor kColors1[] = {0xF08000F0, 0x8080F000, 0xF000F080 };
-
+
SkPaint paint;
@@ -71,7 +71,7 @@ protected:
if (bmp.isNull()) {
makebm(&bmp, SkBitmap::kARGB_8888_Config, kPointSize / 4, kPointSize / 4);
}
-
+
SkPaint bmpPaint;
bmpPaint.setAntiAlias(true);
bmpPaint.setFilterBitmap(true);
@@ -83,9 +83,9 @@ protected:
outlinePaint.setTextSize(SkIntToScalar(kPointSize));
outlinePaint.setStyle(SkPaint::kStroke_Style);
outlinePaint.setStrokeWidth(0.f);
-
+
canvas->translate(15.f, 15.f);
-
+
// draw glyphs scaled up
canvas->scale(2.f, 2.f);
@@ -93,13 +93,13 @@ protected:
SkShader::kRepeat_TileMode,
SkShader::kMirror_TileMode,
};
-
+
// position the baseline of the first run
canvas->translate(0.f, 0.75f * kPointSize);
-
+
canvas->save();
int i = 0;
- for (size_t tm0 = 0; tm0 < SK_ARRAY_COUNT(kTileModes); ++tm0) {
+ for (size_t tm0 = 0; tm0 < SK_ARRAY_COUNT(kTileModes); ++tm0) {
for (size_t tm1 = 0; tm1 < SK_ARRAY_COUNT(kTileModes); ++tm1) {
SkAutoTUnref<SkShader> shader(SkShader::CreateBitmapShader(bmp,
kTileModes[tm0],
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h
index 3158a03a15..a0e5cc91fc 100644
--- a/include/gpu/GrContext.h
+++ b/include/gpu/GrContext.h
@@ -695,7 +695,7 @@ public:
GrAssert(NULL != context);
this->restore();
-
+
fContext = context;
fMatrix = context->getMatrix();
this->preConcat(preConcat, paint);
@@ -709,7 +709,7 @@ public:
GrAssert(NULL != context);
this->restore();
-
+
if (NULL != paint) {
if (!paint->preConcatSamplerMatricesWithInverse(context->getMatrix())) {
return false;
diff --git a/src/core/SkBitmapProcState.cpp b/src/core/SkBitmapProcState.cpp
index a1eff9f2a7..283a1ec171 100644
--- a/src/core/SkBitmapProcState.cpp
+++ b/src/core/SkBitmapProcState.cpp
@@ -244,7 +244,7 @@ static void Clamp_S32_D32_nofilter_trans_shaderproc(const SkBitmapProcState& s,
SkASSERT(s.fInvKy == 0);
SkASSERT(count > 0 && colors != NULL);
SkASSERT(!s.fDoFilter);
-
+
const int maxX = s.fBitmap->width() - 1;
const int maxY = s.fBitmap->height() - 1;
int ix = s.fFilterOneX + x;
@@ -256,7 +256,7 @@ static void Clamp_S32_D32_nofilter_trans_shaderproc(const SkBitmapProcState& s,
SkIntToScalar(y) + SK_ScalarHalf, &pt);
int iy2 = SkClampMax(SkScalarFloorToInt(pt.fY), maxY);
int ix2 = SkScalarFloorToInt(pt.fX);
-
+
SkASSERT(iy == iy2);
SkASSERT(ix == ix2);
}
diff --git a/src/core/SkBlitter_ARGB32.cpp b/src/core/SkBlitter_ARGB32.cpp
index 109b7ad885..f944f44dc1 100644
--- a/src/core/SkBlitter_ARGB32.cpp
+++ b/src/core/SkBlitter_ARGB32.cpp
@@ -306,7 +306,7 @@ void SkARGB32_Shader_Blitter::blitH(int x, int y, int width) {
void SkARGB32_Shader_Blitter::blitRect(int x, int y, int width, int height) {
SkASSERT(x >= 0 && y >= 0 &&
x + width <= fDevice.width() && y + height <= fDevice.height());
-
+
uint32_t* device = fDevice.getAddr32(x, y);
size_t deviceRB = fDevice.rowBytes();
SkShader* shader = fShader;
diff --git a/src/core/SkCoreBlitters.h b/src/core/SkCoreBlitters.h
index b97eed82ca..48f85b0475 100644
--- a/src/core/SkCoreBlitters.h
+++ b/src/core/SkCoreBlitters.h
@@ -133,16 +133,16 @@ public:
virtual void blitRect(int x, int y, int width, int height) SK_OVERRIDE;
virtual void blitAntiH(int x, int y, const SkAlpha antialias[], const int16_t runs[]);
virtual void blitMask(const SkMask&, const SkIRect&);
-
+
private:
SkXfermode* fXfermode;
SkPMColor* fBuffer;
SkBlitRow::Proc32 fProc32;
SkBlitRow::Proc32 fProc32Blend;
-
+
// illegal
SkARGB32_Shader_Blitter& operator=(const SkARGB32_Shader_Blitter&);
-
+
typedef SkShaderBlitter INHERITED;
};
diff --git a/src/effects/SkColorFilterImageFilter.cpp b/src/effects/SkColorFilterImageFilter.cpp
index f8df51fbd0..22b5d12c9c 100755
--- a/src/effects/SkColorFilterImageFilter.cpp
+++ b/src/effects/SkColorFilterImageFilter.cpp
@@ -87,7 +87,7 @@ bool SkColorFilterImageFilter::onFilterImage(Proxy* proxy, const SkBitmap& sourc
SkColorFilter* parentColorFilter;
SkScalar parentMatrix[20];
while (parent && (parentColorFilter = parent->asColorFilter())
- && parentColorFilter->asColorMatrix(parentMatrix)
+ && parentColorFilter->asColorMatrix(parentMatrix)
&& !matrix_needs_clamping(parentMatrix)) {
SkScalar combinedMatrix[20];
mult_color_matrix(parentMatrix, colorMatrix, combinedMatrix);
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index 50cc12b4a9..a09b57ff10 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -903,7 +903,7 @@ bool drawWithGPUMaskFilter(GrContext* context, const SkPath& devPath,
if (!am.setIdentity(context, grp)) {
return false;
}
-
+
static const int MASK_IDX = GrPaint::kMaxCoverageStages - 1;
// we assume the last mask index is available for use
GrAssert(!grp->isCoverageStageEnabled(MASK_IDX));
diff --git a/tests/ColorTest.cpp b/tests/ColorTest.cpp
index 55fdd74f0a..a038a060bd 100644
--- a/tests/ColorTest.cpp
+++ b/tests/ColorTest.cpp
@@ -20,10 +20,10 @@ static bool S32A_D565_Blend_0(SkPMColor sc, uint16_t dc, U8CPU alpha) {
unsigned dst_scale = 255 - SkMulDiv255Round(SkGetPackedA32(sc), alpha);
unsigned dr = SkMulS16(SkPacked32ToR16(sc), alpha) + SkMulS16(SkGetPackedR16(dc), dst_scale);
unsigned dg = SkMulS16(SkPacked32ToG16(sc), alpha) + SkMulS16(SkGetPackedG16(dc), dst_scale);
-
+
unsigned rr = SkDiv255Round(dr);
unsigned rg = SkDiv255Round(dg);
-
+
if (rr <= 31 && rg <= 63) {
return true;
}
@@ -34,10 +34,10 @@ static bool S32A_D565_Blend_01(SkPMColor sc, uint16_t dc, U8CPU alpha) {
unsigned dst_scale = 255 - SkMulDiv255Round(SkGetPackedA32(sc), alpha);
unsigned dr = SkMulS16(SkGetPackedR32(sc), alpha) + SkMulS16(SkGetPackedR16(dc) << 3, dst_scale);
unsigned dg = SkMulS16(SkGetPackedG32(sc), alpha) + SkMulS16(SkGetPackedG16(dc) << 2, dst_scale);
-
+
unsigned rr = SkDiv255Round(dr) >> 3;
unsigned rg = SkDiv255Round(dg) >> 2;
-
+
if (rr <= 31 && rg <= 63) {
return true;
}
@@ -52,10 +52,10 @@ static bool S32A_D565_Blend_02(SkPMColor sc, uint16_t dc, U8CPU alpha) {
int rc = SkPack888ToRGB16(SkDiv255Round(dr),
SkDiv255Round(dg),
SkDiv255Round(db));
-
+
unsigned rr = SkGetPackedR16(rc);
unsigned rg = SkGetPackedG16(rc);
-
+
if (rr <= 31 && rg <= 63) {
return true;
}
@@ -66,10 +66,10 @@ static bool S32A_D565_Blend_1(SkPMColor sc, uint16_t dc, U8CPU alpha) {
unsigned dst_scale = 255 - SkMulDiv255Round(SkGetPackedA32(sc), alpha);
unsigned dr = (SkMulS16(SkGetPackedR32(sc), alpha) >> 3) + SkMulS16(SkGetPackedR16(dc), dst_scale);
unsigned dg = (SkMulS16(SkGetPackedG32(sc), alpha) >> 2) + SkMulS16(SkGetPackedG16(dc), dst_scale);
-
+
unsigned rr = SkDiv255Round(dr);
unsigned rg = SkDiv255Round(dg);
-
+
if (rr <= 31 && rg <= 63) {
return true;
}
@@ -85,10 +85,10 @@ static bool S32A_D565_Blend_2(SkPMColor sc, uint16_t dc, U8CPU alpha) {
alpha *= 255;
unsigned dr = (SkGetPackedR32(sc) >> 3) * alpha + SkGetPackedR16(dc) * dst_scale;
unsigned dg = (SkGetPackedG32(sc) >> 2) * alpha + SkGetPackedG16(dc) * dst_scale;
-
+
unsigned rr = SkDiv65025Round(dr);
unsigned rg = SkDiv65025Round(dg);
-
+
if (rr <= 31 && rg <= 63) {
return true;
}
diff --git a/tests/MatrixTest.cpp b/tests/MatrixTest.cpp
index 789a08c076..efbd02d2c6 100644
--- a/tests/MatrixTest.cpp
+++ b/tests/MatrixTest.cpp
@@ -84,18 +84,18 @@ static bool is_identity(const SkMatrix& m) {
static void test_matrix_recttorect(skiatest::Reporter* reporter) {
SkRect src, dst;
SkMatrix matrix;
-
+
src.set(0, 0, SK_Scalar1*10, SK_Scalar1*10);
dst = src;
matrix.setRectToRect(src, dst, SkMatrix::kFill_ScaleToFit);
REPORTER_ASSERT(reporter, SkMatrix::kIdentity_Mask == matrix.getType());
REPORTER_ASSERT(reporter, matrix.rectStaysRect());
-
+
dst.offset(SK_Scalar1, SK_Scalar1);
matrix.setRectToRect(src, dst, SkMatrix::kFill_ScaleToFit);
REPORTER_ASSERT(reporter, SkMatrix::kTranslate_Mask == matrix.getType());
REPORTER_ASSERT(reporter, matrix.rectStaysRect());
-
+
dst.fRight += SK_Scalar1;
matrix.setRectToRect(src, dst, SkMatrix::kFill_ScaleToFit);
REPORTER_ASSERT(reporter, SkMatrix::kTranslate_Mask | SkMatrix::kScale_Mask == matrix.getType());