Sanitizing source files in Housekeeper-Nightly

git-svn-id: http://skia.googlecode.com/svn/trunk@9423 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
skia.committer@gmail.com 2013-06-04 07:00:53 +00:00
Родитель 055aa52b2d
Коммит 11f2b44450
4 изменённых файлов: 17 добавлений и 17 удалений

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

@ -83,8 +83,8 @@ private:
SkRect innerClip = { -kHalfSquareSize, -kHalfSquareSize, kHalfSquareSize, kHalfSquareSize };
innerClip.offset(x, y);
SkRect outerClip = {
-kHalfOuterClipSize-kHalfSquareSize, -kHalfOuterClipSize-kHalfSquareSize,
SkRect outerClip = {
-kHalfOuterClipSize-kHalfSquareSize, -kHalfOuterClipSize-kHalfSquareSize,
kHalfOuterClipSize+kHalfSquareSize, kHalfOuterClipSize+kHalfSquareSize
};
outerClip.offset(x, y);
@ -124,7 +124,7 @@ private:
// while a difference clip stays at the location of the original rect.
// Each blurred rect is drawn with a draw looper where the original (non-
// blurred rect) is offset to reside outside of the large outer clip (so
// it never appears) but the offset in the draw looper is used to translate
// it never appears) but the offset in the draw looper is used to translate
// the blurred version back into the clip.
void draw4x1(SkCanvas* canvas, SkScalar x, SkScalar y) {
@ -134,9 +134,9 @@ private:
loopPaint.setLooper(create1Looper(-kOffsetToOutsideClip, 0, gColors[i]));
loopPaint.setAntiAlias(true);
SkRect outerClip = {
-kHalfOuterClipSize, -kHalfOuterClipSize,
kHalfOuterClipSize, kHalfOuterClipSize
SkRect outerClip = {
-kHalfOuterClipSize, -kHalfOuterClipSize,
kHalfOuterClipSize, kHalfOuterClipSize
};
outerClip.offset(x, y);
// center it on the blurred rect
@ -160,7 +160,7 @@ private:
}
}
// Create a 1-tier drawlooper
// Create a 1-tier drawlooper
SkLayerDrawLooper* create1Looper(SkScalar xOff, SkScalar yOff, SkColor color) {
SkLayerDrawLooper* looper = new SkLayerDrawLooper;
SkLayerDrawLooper::LayerInfo info;
@ -186,8 +186,8 @@ private:
SkRect rect = { -kHalfSquareSize, -kHalfSquareSize, kHalfSquareSize, kHalfSquareSize };
rect.offset(x, y);
SkRect outerClip = {
-kHalfOuterClipSize-kHalfSquareSize, -kHalfOuterClipSize-kHalfSquareSize,
SkRect outerClip = {
-kHalfOuterClipSize-kHalfSquareSize, -kHalfOuterClipSize-kHalfSquareSize,
kHalfOuterClipSize+kHalfSquareSize, kHalfOuterClipSize+kHalfSquareSize
};
outerClip.offset(x, y);
@ -235,9 +235,9 @@ private:
};
const SkPoint MegaLooperGM::gBlurOffsets[4] = {
{ kHalfSquareSize, kHalfSquareSize },
{ -kHalfSquareSize, kHalfSquareSize },
{ kHalfSquareSize, -kHalfSquareSize },
{ kHalfSquareSize, kHalfSquareSize },
{ -kHalfSquareSize, kHalfSquareSize },
{ kHalfSquareSize, -kHalfSquareSize },
{ -kHalfSquareSize, -kHalfSquareSize }
};

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

@ -107,7 +107,7 @@ public:
* Returns NULL on failure.
*/
static SkData* NewFromFD(int fd);
/**
* Create a new dataref using a subset of the data in the specified
* src dataref.

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

@ -75,6 +75,6 @@ void* sk_fmmap(SkFILE* f, size_t* size) {
if (fd < 0) {
return NULL;
}
return sk_fdmmap(fd, size);
}

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

@ -263,11 +263,11 @@ static void test_files(skiatest::Reporter* reporter) {
if (skiatest::Test::GetTmpDir().isEmpty()) {
return;
}
const char* tmpDir = skiatest::Test::GetTmpDir().c_str();
SkString path;
path.printf("%s%s", tmpDir, "data_test");
const char s[] = "abcdefghijklmnopqrstuvwxyz";
{
SkFILEWStream writer(path.c_str());
@ -285,7 +285,7 @@ static void test_files(skiatest::Reporter* reporter) {
REPORTER_ASSERT(reporter, r1.get() != NULL);
REPORTER_ASSERT(reporter, r1->size() == 26);
REPORTER_ASSERT(reporter, strncmp(static_cast<const char*>(r1->data()), s, 26) == 0);
int fd = sk_fileno(file);
SkAutoTUnref<SkData> r2(SkData::NewFromFD(fd));
REPORTER_ASSERT(reporter, r2.get() != NULL);