Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/)
This CL is part III of IV (I broke down the 1280 files into 4 CLs).
Review URL: https://codereview.appspot.com/6475053
git-svn-id: http://skia.googlecode.com/svn/trunk@5264 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/samplecode/SampleTiling.cpp b/samplecode/SampleTiling.cpp
index d72544b..e7b6a7f 100644
--- a/samplecode/SampleTiling.cpp
+++ b/samplecode/SampleTiling.cpp
@@ -27,14 +27,14 @@
bm->setConfig(config, w, h);
bm->allocPixels();
bm->eraseColor(0);
-
+
SkCanvas canvas(*bm);
SkPoint pts[] = { { 0, 0 }, { SkIntToScalar(w), SkIntToScalar(h) } };
SkColor colors[] = { SK_ColorRED, SK_ColorGREEN, SK_ColorBLUE };
SkScalar pos[] = { 0, SK_Scalar1/2, SK_Scalar1 };
SkPaint paint;
-
- SkUnitMapper* um = NULL;
+
+ SkUnitMapper* um = NULL;
um = new SkCosineMapper;
// um = new SkDiscreteMapper(12);
@@ -66,7 +66,7 @@
SkPicture* fTextPicture;
SkBlurDrawLooper fLooper;
public:
- TilingView()
+ TilingView()
: fLooper(SkIntToScalar(1), SkIntToScalar(2), SkIntToScalar(2),
0x88000000) {
fTextPicture = new SkPicture();
@@ -80,7 +80,7 @@
}
SkBitmap fTexture[SK_ARRAY_COUNT(gConfigs)];
-
+
protected:
// overrides from SkEventSink
virtual bool onQuery(SkEvent* evt) {
@@ -90,15 +90,15 @@
}
return this->INHERITED::onQuery(evt);
}
-
+
virtual void onDrawContent(SkCanvas* canvas) {
SkRect r = { 0, 0, SkIntToScalar(gWidth*2), SkIntToScalar(gHeight*2) };
static const char* gConfigNames[] = { "8888", "565", "4444" };
-
+
static const bool gFilters[] = { false, true };
static const char* gFilterNames[] = { "point", "bilinear" };
-
+
static const SkShader::TileMode gModes[] = { SkShader::kClamp_TileMode, SkShader::kRepeat_TileMode, SkShader::kMirror_TileMode };
static const char* gModeNames[] = { "C", "R", "M" };
@@ -122,12 +122,12 @@
p.setTextAlign(SkPaint::kCenter_Align);
textCanvas->drawText(str.c_str(), str.size(), x + r.width()/2, y, p);
-
+
x += r.width() * 4 / 3;
}
}
}
-
+
y += SkIntToScalar(16);
for (size_t i = 0; i < SK_ARRAY_COUNT(gConfigs); i++) {
@@ -138,12 +138,12 @@
SkPaint paint;
setup(&paint, fTexture[i], gFilters[j], gModes[kx], gModes[ky]);
paint.setDither(true);
-
+
canvas->save();
canvas->translate(x, y);
canvas->drawRect(r, paint);
canvas->restore();
-
+
x += r.width() * 4 / 3;
}
}
@@ -162,7 +162,7 @@
canvas->drawPicture(*fTextPicture);
}
-
+
private:
typedef SampleView INHERITED;
};