Sanitizing source files in Housekeeper-Nightly

git-svn-id: http://skia.googlecode.com/svn/trunk@13061 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
skia.committer@gmail.com 2014-01-14 07:01:42 +00:00
Родитель 3e62ebf93b
Коммит 2e9a7157ee
4 изменённых файлов: 36 добавлений и 37 удалений

Просмотреть файл

@ -83,11 +83,11 @@ void SkDoubleRowBoxBlur_NEON(const SkPMColor** src, int srcStride, SkPMColor** d
store_2_pixels<dstDirection>(resultPixels, dptr, width);
if (x >= leftOffset) {
sum = vsubw_u8(sum,
sum = vsubw_u8(sum,
load_2_pixels<srcDirection>(sptr - leftOffset * srcStrideX, srcStride));
}
if (x + rightOffset + 1 < width) {
sum = vaddw_u8(sum,
sum = vaddw_u8(sum,
load_2_pixels<srcDirection>(sptr + (rightOffset + 1) * srcStrideX, srcStride));
}
sptr += srcStrideX;

Просмотреть файл

@ -18,7 +18,7 @@ void SkPictureUtils::GatherPixelRefsAndRects(SkPicture* pict,
SkGatherPixelRefsAndRectsDevice device(pict->width(), pict->height(), prCont);
SkNoSaveLayerCanvas canvas(&device);
canvas.clipRect(SkRect::MakeWH(SkIntToScalar(pict->width()),
canvas.clipRect(SkRect::MakeWH(SkIntToScalar(pict->width()),
SkIntToScalar(pict->height())),
SkRegion::kIntersect_Op, false);
canvas.drawPicture(*pict);

Просмотреть файл

@ -23,7 +23,7 @@ class SkGatherPixelRefsAndRectsDevice : public SkBaseDevice {
public:
SK_DECLARE_INST_COUNT(SkGatherPixelRefsAndRectsDevice)
SkGatherPixelRefsAndRectsDevice(int width, int height,
SkGatherPixelRefsAndRectsDevice(int width, int height,
SkPictureUtils::SkPixelRefContainer* prCont) {
fSize.set(width, height);
fPRCont = prCont;
@ -118,7 +118,7 @@ protected:
SkRect pathBounds = path.getBounds();
if (NULL != prePathMatrix) {
prePathMatrix->mapRect(&pathBounds);
}
}
this->drawRect(draw, pathBounds, paint);
}
@ -127,7 +127,7 @@ protected:
SkMatrix totMatrix;
totMatrix.setConcat(*draw.fMatrix, matrix);
SkRect bitmapRect = SkRect::MakeWH(SkIntToScalar(bitmap.width()),
SkRect bitmapRect = SkRect::MakeWH(SkIntToScalar(bitmap.width()),
SkIntToScalar(bitmap.height()));
SkRect mappedRect;
totMatrix.mapRect(&mappedRect, bitmapRect);
@ -144,7 +144,7 @@ protected:
SkMatrix matrix;
matrix.setTranslate(SkIntToScalar(x), SkIntToScalar(y));
SkRect bitmapRect = SkRect::MakeWH(SkIntToScalar(bitmap.width()),
SkRect bitmapRect = SkRect::MakeWH(SkIntToScalar(bitmap.width()),
SkIntToScalar(bitmap.height()));
SkRect mappedRect;
matrix.mapRect(&mappedRect, bitmapRect);
@ -159,7 +159,7 @@ protected:
const SkRect* srcOrNull, const SkRect& dst,
const SkPaint& paint,
SkCanvas::DrawBitmapRectFlags flags) SK_OVERRIDE {
SkRect bitmapRect = SkRect::MakeWH(SkIntToScalar(bitmap.width()),
SkRect bitmapRect = SkRect::MakeWH(SkIntToScalar(bitmap.width()),
SkIntToScalar(bitmap.height()));
SkMatrix matrix;
matrix.setRectToRect(bitmapRect, dst, SkMatrix::kFill_ScaleToFit);
@ -281,7 +281,7 @@ protected:
const SkColor colors[], SkXfermode* xmode,
const uint16_t indices[], int indexCount,
const SkPaint& paint) SK_OVERRIDE {
this->drawPoints(draw, SkCanvas::kPolygon_PointMode, vertexCount, verts, paint);
this->drawPoints(draw, SkCanvas::kPolygon_PointMode, vertexCount, verts, paint);
}
virtual void drawDevice(const SkDraw&, SkBaseDevice*, int x, int y,
const SkPaint&) SK_OVERRIDE {
@ -347,4 +347,3 @@ private:
};
#endif // SkGatherPixelRefsAndRects_DEFINED

Просмотреть файл

@ -65,7 +65,7 @@ static void init_paint(SkPaint* paint, const SkBitmap &bm) {
paint->setShader(shader)->unref();
}
typedef void (*DrawBitmapProc)(SkCanvas*, const SkBitmap&,
typedef void (*DrawBitmapProc)(SkCanvas*, const SkBitmap&,
const SkBitmap&, const SkPoint&,
SkTDArray<SkPixelRef*>* usedPixRefs);
@ -87,11 +87,11 @@ static void drawpoints_proc(SkCanvas* canvas, const SkBitmap& bm,
// draw a rect
SkPoint points[5] = {
{ pos.fX, pos.fY },
{ pos.fX + bm.width() - 1, pos.fY },
{ pos.fX + bm.width() - 1, pos.fY + bm.height() - 1 },
{ pos.fX, pos.fY + bm.height() - 1 },
{ pos.fX, pos.fY },
{ pos.fX, pos.fY },
{ pos.fX + bm.width() - 1, pos.fY },
{ pos.fX + bm.width() - 1, pos.fY + bm.height() - 1 },
{ pos.fX, pos.fY + bm.height() - 1 },
{ pos.fX, pos.fY },
};
canvas->drawPoints(SkCanvas::kPolygon_PointMode, 5, points, paint);
@ -278,11 +278,11 @@ static void drawverts_proc(SkCanvas* canvas, const SkBitmap& bm,
SkPaint paint;
init_paint(&paint, bm);
SkPoint verts[4] = {
{ pos.fX, pos.fY },
{ pos.fX + bm.width(), pos.fY },
{ pos.fX + bm.width(), pos.fY + bm.height() },
{ pos.fX, pos.fY + bm.height() }
SkPoint verts[4] = {
{ pos.fX, pos.fY },
{ pos.fX + bm.width(), pos.fY },
{ pos.fX + bm.width(), pos.fY + bm.height() },
{ pos.fX, pos.fY + bm.height() }
};
SkPoint texs[4] = { { 0, 0 },
{ SkIntToScalar(bm.width()), 0 },
@ -296,10 +296,10 @@ static void drawverts_proc(SkCanvas* canvas, const SkBitmap& bm,
}
// Return a picture with the bitmaps drawn at the specified positions.
static SkPicture* record_bitmaps(const SkBitmap bm[],
static SkPicture* record_bitmaps(const SkBitmap bm[],
const SkPoint pos[],
SkTDArray<SkPixelRef*> analytic[],
int count,
int count,
DrawBitmapProc proc) {
SkPicture* pic = new SkPicture;
SkCanvas* canvas = pic->beginRecording(1000, 1000);
@ -405,9 +405,9 @@ static void gather_from_image(const SkBitmap& bm, SkPixelRef* const refs[],
}
static void gather_from_analytic(const SkPoint pos[], SkScalar w, SkScalar h,
const SkTDArray<SkPixelRef*> analytic[],
int count,
SkTDArray<SkPixelRef*>* result,
const SkTDArray<SkPixelRef*> analytic[],
int count,
SkTDArray<SkPixelRef*>* result,
const SkRect& subset) {
for (int i = 0; i < count; ++i) {
SkRect rect = SkRect::MakeXYWH(pos[i].fX, pos[i].fY, w, h);
@ -425,13 +425,13 @@ static const DrawBitmapProc gProcs[] = {
drawoval_proc,
drawrrect_proc,
drawpath_proc,
drawbitmap_proc,
drawbitmap_proc,
drawbitmap_withshader_proc,
drawsprite_proc,
#if 0
drawsprite_withshader_proc,
#endif
drawbitmaprect_proc,
drawbitmaprect_proc,
drawbitmaprect_withshader_proc,
drawtext_proc,
drawpostext_proc,
@ -440,15 +440,15 @@ static const DrawBitmapProc gProcs[] = {
};
static void create_textures(SkBitmap* bm, SkPixelRef** refs, int num, int w, int h) {
// Our convention is that the color components contain an encoding of
// the index of their corresponding bitmap/pixelref. (0,0,0,0) is
// Our convention is that the color components contain an encoding of
// the index of their corresponding bitmap/pixelref. (0,0,0,0) is
// reserved for the background
for (int i = 0; i < num; ++i) {
make_bm(&bm[i], w, h,
SkColorSetARGB(0xFF,
gColorScale*i+gColorOffset,
gColorScale*i+gColorOffset,
gColorScale*i+gColorOffset),
make_bm(&bm[i], w, h,
SkColorSetARGB(0xFF,
gColorScale*i+gColorOffset,
gColorScale*i+gColorOffset,
gColorScale*i+gColorOffset),
true);
refs[i] = bm[i].pixelRef();
}
@ -599,7 +599,7 @@ static void test_gatherpixelrefsandrects(skiatest::Reporter* reporter) {
if (1 == count) {
REPORTER_ASSERT(reporter, gatheredRefs[0] == refs[i]);
} else if (2 == count) {
REPORTER_ASSERT(reporter,
REPORTER_ASSERT(reporter,
(gatheredRefs[0] == refs[i] && gatheredRefs[1] == refs[i+N]) ||
(gatheredRefs[1] == refs[i] && gatheredRefs[0] == refs[i+N]));
}
@ -631,7 +631,7 @@ static void test_gatherpixelrefsandrects(skiatest::Reporter* reporter) {
}
// Everything in the analytic list should appear in the gathered
// list.
// list.
for (int i = 0; i < fromAnalytic.count(); ++i) {
REPORTER_ASSERT(reporter, -1 != gatheredRefs.find(fromAnalytic[i]));
}