aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-06-01 07:01:39 +0000
committerGravatar skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-06-01 07:01:39 +0000
commit26da7f00aedba107d4b3e382283034e265db09b6 (patch)
tree80821ef4218a63c070bd30e3bfb057b39ac37b70
parente1613d8284d94d39f7c1b784853cc7d0d019b5b1 (diff)
Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@9387 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r--bench/GameBench.cpp22
-rw-r--r--gm/colortype.cpp8
-rw-r--r--gm/filterbitmap.cpp40
-rw-r--r--gyp/utils.gyp2
-rw-r--r--include/core/SkPath.h2
-rw-r--r--src/core/SkBitmapProcBicubic.cpp6
-rw-r--r--src/core/SkEdgeBuilder.cpp4
-rw-r--r--src/core/SkPath.cpp12
-rw-r--r--src/fonts/SkGScalerContext.cpp24
-rw-r--r--src/fonts/SkGScalerContext.h8
-rw-r--r--tools/lua/lua_pictures.cpp2
11 files changed, 65 insertions, 65 deletions
diff --git a/bench/GameBench.cpp b/bench/GameBench.cpp
index ba7f76550e..2e1113659c 100644
--- a/bench/GameBench.cpp
+++ b/bench/GameBench.cpp
@@ -26,7 +26,7 @@ public:
kPartial_Clear
};
- GameBench(void* param, Type type, Clear clear,
+ GameBench(void* param, Type type, Clear clear,
bool aligned = false, bool useAtlas = false)
: INHERITED(param)
, fType(type)
@@ -171,7 +171,7 @@ protected:
}
canvas->concat(mat);
- if (fUseAtlas) {
+ if (fUseAtlas) {
static int curCell = 0;
src = fAtlasRects[curCell % (kNumAtlasedX)][curCell / (kNumAtlasedX)];
curCell = (curCell + 1) % (kNumAtlasedX*kNumAtlasedY);
@@ -288,25 +288,25 @@ private:
};
// Partial clear
-DEF_BENCH( return SkNEW_ARGS(GameBench, (p, GameBench::kScale_Type,
+DEF_BENCH( return SkNEW_ARGS(GameBench, (p, GameBench::kScale_Type,
GameBench::kPartial_Clear)); )
-DEF_BENCH( return SkNEW_ARGS(GameBench, (p, GameBench::kTranslate_Type,
+DEF_BENCH( return SkNEW_ARGS(GameBench, (p, GameBench::kTranslate_Type,
GameBench::kPartial_Clear)); )
-DEF_BENCH( return SkNEW_ARGS(GameBench, (p, GameBench::kTranslate_Type,
+DEF_BENCH( return SkNEW_ARGS(GameBench, (p, GameBench::kTranslate_Type,
GameBench::kPartial_Clear, true)); )
-DEF_BENCH( return SkNEW_ARGS(GameBench, (p, GameBench::kRotate_Type,
+DEF_BENCH( return SkNEW_ARGS(GameBench, (p, GameBench::kRotate_Type,
GameBench::kPartial_Clear)); )
// Full clear
-DEF_BENCH( return SkNEW_ARGS(GameBench, (p, GameBench::kScale_Type,
+DEF_BENCH( return SkNEW_ARGS(GameBench, (p, GameBench::kScale_Type,
GameBench::kFull_Clear)); )
-DEF_BENCH( return SkNEW_ARGS(GameBench, (p, GameBench::kTranslate_Type,
+DEF_BENCH( return SkNEW_ARGS(GameBench, (p, GameBench::kTranslate_Type,
GameBench::kFull_Clear)); )
-DEF_BENCH( return SkNEW_ARGS(GameBench, (p, GameBench::kTranslate_Type,
+DEF_BENCH( return SkNEW_ARGS(GameBench, (p, GameBench::kTranslate_Type,
GameBench::kFull_Clear, true)); )
-DEF_BENCH( return SkNEW_ARGS(GameBench, (p, GameBench::kRotate_Type,
+DEF_BENCH( return SkNEW_ARGS(GameBench, (p, GameBench::kRotate_Type,
GameBench::kFull_Clear)); )
// Atlased
-DEF_BENCH( return SkNEW_ARGS(GameBench, (p, GameBench::kTranslate_Type,
+DEF_BENCH( return SkNEW_ARGS(GameBench, (p, GameBench::kTranslate_Type,
GameBench::kFull_Clear, false, true)); )
diff --git a/gm/colortype.cpp b/gm/colortype.cpp
index 4cb16fae13..f8a9522add 100644
--- a/gm/colortype.cpp
+++ b/gm/colortype.cpp
@@ -22,16 +22,16 @@ public:
SkMatrix local;
local.setRotate(180);
s->setLocalMatrix(local);
-
+
SkPaint paint;
paint.setAntiAlias(true);
paint.setShader(s)->unref();
-
+
SkAutoTUnref<SkTypeface> orig(SkTypeface::CreateFromName("Times",
SkTypeface::kBold));
fColorType = SkNEW_ARGS(SkGTypeface, (orig, paint));
}
-
+
virtual ~ColorTypeGM() {
fColorType->unref();
}
@@ -49,7 +49,7 @@ protected:
SkPaint paint;
paint.setAntiAlias(true);
paint.setTypeface(fColorType);
-
+
for (SkScalar size = 10; size <= 100; size += 10) {
paint.setTextSize(size);
canvas->translate(0, paint.getFontMetrics(NULL));
diff --git a/gm/filterbitmap.cpp b/gm/filterbitmap.cpp
index 3431cfd504..830790c03c 100644
--- a/gm/filterbitmap.cpp
+++ b/gm/filterbitmap.cpp
@@ -42,13 +42,13 @@ static void draw_col(SkCanvas* canvas, const SkBitmap& bm, const SkMatrix& mat,
class FilterBitmapGM : public skiagm::GM {
void onOnceBeforeDraw() {
-
+
make_bitmap();
-
+
SkScalar cx = SkScalarHalf(fBM.width());
SkScalar cy = SkScalarHalf(fBM.height());
SkScalar scale = get_scale();
-
+
fMatrix[0].setScale(scale, scale);
fMatrix[1].setRotate(30, cx, cy); fMatrix[1].postScale(scale, scale);
@@ -58,7 +58,7 @@ public:
SkBitmap fBM;
SkMatrix fMatrix[2];
SkString fName;
-
+
FilterBitmapGM()
{
this->setBGColor(0xFFDDDDDD);
@@ -76,10 +76,10 @@ protected:
virtual SkISize onISize() SK_OVERRIDE {
return SkISize::Make(920, 480);
}
-
+
virtual void make_bitmap() = 0;
virtual SkScalar get_scale() = 0;
-
+
virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE {
canvas->translate(10, 10);
@@ -106,14 +106,14 @@ class FilterBitmapTextGM: public FilterBitmapGM {
sprintf( name, "filterbitmap_text_%.2fpt", fTextSize );
setName( name );
}
-
+
protected:
float fTextSize;
-
+
SkScalar get_scale() SK_OVERRIDE {
return 32.f/fTextSize;
}
-
+
void make_bitmap() SK_OVERRIDE {
fBM.setConfig(SkBitmap::kARGB_8888_Config, int(fTextSize * 8), int(fTextSize * 6));
fBM.allocPixels();
@@ -134,7 +134,7 @@ class FilterBitmapTextGM: public FilterBitmapGM {
setTypeface(&paint, "Times", SkTypeface::kBoldItalic);
canvas.drawText("Hamburgefons", 12, fTextSize/2, 4.8f*fTextSize, paint);
}
- private:
+ private:
typedef FilterBitmapGM INHERITED;
};
@@ -147,15 +147,15 @@ class FilterBitmapCheckerboardGM: public FilterBitmapGM {
sprintf( name, "filterbitmap_checkerboard_%d_%d", fSize, fNumChecks );
setName( name );
}
-
+
protected:
int fSize;
int fNumChecks;
-
+
SkScalar get_scale() SK_OVERRIDE {
return 192.f/fSize;
}
-
+
void make_bitmap() SK_OVERRIDE {
fBM.setConfig(SkBitmap::kARGB_8888_Config, fSize, fSize);
fBM.allocPixels();
@@ -166,14 +166,14 @@ class FilterBitmapCheckerboardGM: public FilterBitmapGM {
int cx = (x * fNumChecks) / fSize;
int cy = (y * fNumChecks) / fSize;
if ((cx+cy)%2) {
- *s = 0xFFFFFFFF;
- } else {
+ *s = 0xFFFFFFFF;
+ } else {
*s = 0xFF000000;
}
}
}
}
- private:
+ private:
typedef FilterBitmapGM INHERITED;
};
@@ -186,15 +186,15 @@ class FilterBitmapImageGM: public FilterBitmapGM {
sprintf( name, "filterbitmap_image_%s", filename );
setName( name );
}
-
+
protected:
SkString fFilename;
int fSize;
-
+
SkScalar get_scale() SK_OVERRIDE {
return 192.f/fSize;
}
-
+
void make_bitmap() SK_OVERRIDE {
SkString path(skiagm::GM::gResourcePath);
path.append( "/" );
@@ -217,7 +217,7 @@ class FilterBitmapImageGM: public FilterBitmapGM {
}
fSize = fBM.height();
}
- private:
+ private:
typedef FilterBitmapGM INHERITED;
};
diff --git a/gyp/utils.gyp b/gyp/utils.gyp
index 0791e19e62..ef2a0d8423 100644
--- a/gyp/utils.gyp
+++ b/gyp/utils.gyp
@@ -111,7 +111,7 @@
'../src/utils/win/SkHRESULT.cpp',
'../src/utils/win/SkIStream.cpp',
'../src/utils/win/SkWGL_win.cpp',
-
+
#testing
'../src/fonts/SkGScalerContext.cpp',
'../src/fonts/SkGScalerContext.h',
diff --git a/include/core/SkPath.h b/include/core/SkPath.h
index 9300863c80..c5e50d78a9 100644
--- a/include/core/SkPath.h
+++ b/include/core/SkPath.h
@@ -420,7 +420,7 @@ public:
}
void rConicTo(SkScalar dx1, SkScalar dy1, SkScalar dx2, SkScalar dy2,
SkScalar w);
-
+
/** Add a cubic bezier from the last point, approaching control points
(x1,y1) and (x2,y2), and ending at (x3,y3). If no moveTo() call has been
made for this contour, the first point is automatically set to (0,0).
diff --git a/src/core/SkBitmapProcBicubic.cpp b/src/core/SkBitmapProcBicubic.cpp
index 1616808484..f2cd0e30e7 100644
--- a/src/core/SkBitmapProcBicubic.cpp
+++ b/src/core/SkBitmapProcBicubic.cpp
@@ -42,7 +42,7 @@ static void build_coeff4(SkFixed dst[4], float t) {
DS( 1.0 / 18.0), DS( 9.0 / 18.0), DS( 27.0 / 18.0), DS(-21.0 / 18.0),
DS( 0.0 / 18.0), DS( 0.0 / 18.0), DS( -6.0 / 18.0), DS( 7.0 / 18.0),
};
-
+
dst[0] = SkFloatToFixed(poly_eval(&coefficients[ 0], t));
dst[1] = SkFloatToFixed(poly_eval(&coefficients[ 4], t));
dst[2] = SkFloatToFixed(poly_eval(&coefficients[ 8], t));
@@ -107,7 +107,7 @@ static void bicubicFilter(const SkBitmapProcState& s, int x, int y,
int y1 = SkClampMax(sy , maxY);
int y2 = SkClampMax(sy + 1, maxY);
int y3 = SkClampMax(sy + 2, maxY);
-
+
*colors++ = doBicubicFilter( s.fBitmap, coeffX, coeffY, x0, x1, x2, x3, y0, y1, y2, y3 );
x++;
@@ -176,7 +176,7 @@ SkBitmapProcState::chooseBicubicFilterProc(const SkPaint& paint) {
if (0xFF != paint.getAlpha()) {
return NULL;
}
-
+
if (fInvType & SkMatrix::kAffine_Mask) {
return bicubicFilter;
} else if (fInvType & SkMatrix::kScale_Mask) {
diff --git a/src/core/SkEdgeBuilder.cpp b/src/core/SkEdgeBuilder.cpp
index 9ac4e97443..baf83c17a5 100644
--- a/src/core/SkEdgeBuilder.cpp
+++ b/src/core/SkEdgeBuilder.cpp
@@ -168,7 +168,7 @@ int SkEdgeBuilder::build(const SkPath& path, const SkIRect* iclip,
fShiftUp = shiftUp;
SkScalar conicTol = SK_ScalarHalf * (1 << shiftUp);
-
+
if (SkPath::kLine_SegmentMask == path.getSegmentMasks()) {
return this->buildPoly(path, iclip, shiftUp);
}
@@ -250,7 +250,7 @@ int SkEdgeBuilder::build(const SkPath& path, const SkIRect* iclip,
const int MAX_QUADS = 1 << MAX_POW2;
const int MAX_QUAD_PTS = 1 + 2 * MAX_QUADS;
SkPoint storage[MAX_QUAD_PTS];
-
+
SkConic conic;
conic.set(pts, iter.conicWeight());
int pow2 = conic.computeQuadPOW2(conicTol);
diff --git a/src/core/SkPath.cpp b/src/core/SkPath.cpp
index 7485c0b4ff..8e9be85596 100644
--- a/src/core/SkPath.cpp
+++ b/src/core/SkPath.cpp
@@ -810,15 +810,15 @@ void SkPath::rLineTo(SkScalar x, SkScalar y) {
void SkPath::quadTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2) {
SkDEBUGCODE(this->validate();)
-
+
this->injectMoveToIfNeeded();
-
+
SkPathRef::Editor ed(&fPathRef);
SkPoint* pts = ed.growForVerb(kQuad_Verb);
pts[0].set(x1, y1);
pts[1].set(x2, y2);
fSegmentMask |= kQuad_SegmentMask;
-
+
GEN_ID_INC;
DIRTY_AFTER_EDIT;
}
@@ -841,15 +841,15 @@ void SkPath::conicTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2,
this->quadTo(x1, y1, x2, y2);
} else {
SkDEBUGCODE(this->validate();)
-
+
this->injectMoveToIfNeeded();
-
+
SkPathRef::Editor ed(&fPathRef);
SkPoint* pts = ed.growForConic(w);
pts[0].set(x1, y1);
pts[1].set(x2, y2);
fSegmentMask |= kConic_SegmentMask;
-
+
GEN_ID_INC;
DIRTY_AFTER_EDIT;
}
diff --git a/src/fonts/SkGScalerContext.cpp b/src/fonts/SkGScalerContext.cpp
index 3e9535936d..616932ac98 100644
--- a/src/fonts/SkGScalerContext.cpp
+++ b/src/fonts/SkGScalerContext.cpp
@@ -14,7 +14,7 @@ class SkGScalerContext : public SkScalerContext {
public:
SkGScalerContext(SkGTypeface*, const SkDescriptor*);
virtual ~SkGScalerContext();
-
+
protected:
virtual unsigned generateGlyphCount() SK_OVERRIDE;
virtual uint16_t generateCharToGlyph(SkUnichar) SK_OVERRIDE;
@@ -24,7 +24,7 @@ protected:
virtual void generatePath(const SkGlyph&, SkPath*) SK_OVERRIDE;
virtual void generateFontMetrics(SkPaint::FontMetrics* mX,
SkPaint::FontMetrics* mY) SK_OVERRIDE;
-
+
private:
SkGTypeface* fFace;
SkScalerContext* fProxy;
@@ -78,7 +78,7 @@ uint16_t SkGScalerContext::generateCharToGlyph(SkUnichar uni) {
void SkGScalerContext::generateAdvance(SkGlyph* glyph) {
fProxy->getAdvance(glyph);
-
+
SkVector advance;
fMatrix.mapXY(SkFixedToScalar(glyph->fAdvanceX),
SkFixedToScalar(glyph->fAdvanceY), &advance);
@@ -117,13 +117,13 @@ void SkGScalerContext::generateImage(const SkGlyph& glyph) {
if (SkMask::kARGB32_Format == glyph.fMaskFormat) {
SkPath path;
fProxy->getPath(glyph, &path);
-
+
SkBitmap bm;
bm.setConfig(SkBitmap::kARGB_8888_Config, glyph.fWidth, glyph.fHeight,
glyph.rowBytes());
bm.setPixels(glyph.fImage);
bm.eraseColor(0);
-
+
SkCanvas canvas(bm);
canvas.translate(-SkIntToScalar(glyph.fLeft),
-SkIntToScalar(glyph.fTop));
@@ -215,21 +215,21 @@ size_t SkGTypeface::onGetTableData(SkFontTableTag tag, size_t offset,
class SkGFont : public SkRefCnt {
public:
virtual ~SkGFont();
-
+
int unicharToGlyph(SkUnichar) const;
-
+
int countGlyphs() const { return fCount; }
-
+
float getAdvance(int index) const {
SkASSERT((unsigned)index < (unsigned)fCount);
return fGlyphs[index].fAdvance;
}
-
+
const SkPath& getPath(int index) const {
SkASSERT((unsigned)index < (unsigned)fCount);
return fGlyphs[index].fPath;
}
-
+
private:
struct Glyph {
SkUnichar fUni;
@@ -238,13 +238,13 @@ private:
};
int fCount;
Glyph* fGlyphs;
-
+
friend class SkGFontBuilder;
SkGFont(int count, Glyph* array);
};
class SkGFontBuilder {
public:
-
+
};
#endif
diff --git a/src/fonts/SkGScalerContext.h b/src/fonts/SkGScalerContext.h
index 504bc7b647..b0a2d8a5d3 100644
--- a/src/fonts/SkGScalerContext.h
+++ b/src/fonts/SkGScalerContext.h
@@ -15,7 +15,7 @@ class SkGTypeface : public SkTypeface {
public:
SkGTypeface(SkTypeface* proxy, const SkPaint&);
virtual ~SkGTypeface();
-
+
SkTypeface* proxy() const { return fProxy; }
const SkPaint& paint() const { return fPaint; }
@@ -28,13 +28,13 @@ protected:
uint32_t glyphIDsCount) const SK_OVERRIDE;
virtual SkStream* onOpenStream(int* ttcIndex) const SK_OVERRIDE;
virtual void onGetFontDescriptor(SkFontDescriptor*, bool* isLocal) const SK_OVERRIDE;
-
+
virtual int onGetUPEM() const SK_OVERRIDE;
-
+
virtual int onGetTableTags(SkFontTableTag tags[]) const SK_OVERRIDE;
virtual size_t onGetTableData(SkFontTableTag, size_t offset,
size_t length, void* data) const SK_OVERRIDE;
-
+
private:
SkTypeface* fProxy;
SkPaint fPaint;
diff --git a/tools/lua/lua_pictures.cpp b/tools/lua/lua_pictures.cpp
index ca28f24388..a851cca4a3 100644
--- a/tools/lua/lua_pictures.cpp
+++ b/tools/lua/lua_pictures.cpp
@@ -111,7 +111,7 @@ int tool_main(int argc, char** argv) {
if (!FLAGS_headCode.isEmpty()) {
L.runCode(FLAGS_headCode[0]);
}
-
+
for (int i = 0; i < FLAGS_skpPath.count(); i ++) {
SkOSFile::Iter iter(FLAGS_skpPath[i], "skp");
SkString inputFilename;