Sanitizing source files in Skia_Nightly_House_Keeping

git-svn-id: http://skia.googlecode.com/svn/trunk@5346 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
skia.committer@gmail.com 2012-08-30 14:38:00 +00:00
parent 1cf58d03a8
commit a27096b474
15 changed files with 26 additions and 26 deletions

View File

@ -949,19 +949,19 @@ int main (int argc, char * const argv[]) {
// otherwise output only the average
if (!logPerIter) {
fWallStr.set(" msecs = ");
fWallStr.appendf(normalTimeFormat.c_str(),
fWallStr.appendf(normalTimeFormat.c_str(),
printMin ? fWallMin : fWallSum / repeatDraw);
fCpuStr.set(" cmsecs = ");
fCpuStr.appendf(normalTimeFormat.c_str(),
fCpuStr.appendf(normalTimeFormat.c_str(),
printMin ? fCpuMin : fCpuSum / repeatDraw);
fTruncatedWallStr.set(" Wmsecs = ");
fTruncatedWallStr.appendf(normalTimeFormat.c_str(),
fTruncatedWallStr.appendf(normalTimeFormat.c_str(),
printMin ? fTruncatedWallMin : fTruncatedWallSum / repeatDraw);
fTruncatedCpuStr.set(" Cmsecs = ");
fTruncatedCpuStr.appendf(normalTimeFormat.c_str(),
fTruncatedCpuStr.appendf(normalTimeFormat.c_str(),
printMin ? fTruncatedCpuMin : fTruncatedCpuSum / repeatDraw);
fGpuStr.set(" gmsecs = ");
fGpuStr.appendf(normalTimeFormat.c_str(),
fGpuStr.appendf(normalTimeFormat.c_str(),
printMin ? fGpuMin : fGpuSum / repeatDraw);
}
SkString str;

View File

@ -70,7 +70,7 @@ inline bool approximately_zero(double x) {
}
inline bool approximately_zero(float x) {
return fabs(x) < FLT_EPSILON;
}

View File

@ -207,7 +207,7 @@ int comparePaths(const SkPath& one, const SkPath& two, SkBitmap& bitmap,
}
const int MAX_ERRORS = 5;
if (errors2x2 > MAX_ERRORS && gComparePathsAssert) {
SkDebugf("%s errors=%d\n", __FUNCTION__, errors);
SkDebugf("%s errors=%d\n", __FUNCTION__, errors);
showPath(one);
showPath(two, "simplified:");
SkASSERT(0);
@ -396,7 +396,7 @@ void initializeTests(const char* test, size_t testNameSize) {
size_t inLen = inData.count();
inFile.read(inData.begin(), inLen);
inFile.setPath(NULL);
char* insert = strstr(inData.begin(), marker);
char* insert = strstr(inData.begin(), marker);
if (insert) {
insert += sizeof(marker) - 1;
const char* numLoc = insert + 4 /* indent spaces */ + testNameSize - 1;
@ -454,12 +454,12 @@ void outputToStream(const State4& state, const char* pathStr, SkPath::FillType p
}
outFile.writeText(pathStr);
outFile.writeText("</div>\n\n");
outFile.writeText(marker);
outFile.writeText(" ");
writeTestName(pathFillType, outFile);
outFile.writeText(",\n\n\n");
outFile.writeText("static void ");
writeTestName(pathFillType, outFile);
outFile.writeText("() {\n SkPath path;\n");

View File

@ -549,7 +549,7 @@ public:
bool isHorizontal() const {
return fDy == 0 && fDDy == 0 && fDDDy == 0;
}
// high precision version
#if HIGH_DEF_ANGLES
void set(const SkPoint* orig, SkPath::Verb verb, const Segment* segment,
@ -575,7 +575,7 @@ public:
fDDDy = approximately_pin(pts[3].y + 3 * (pts[1].y - pts[2].y) - pts[0].y);
}
#else
#else
// since all angles share a point, this needs to know which point
// is the common origin, i.e., whether the center is at pts[0] or pts[verb]
// practically, this should only be called by addAngle

View File

@ -513,7 +513,7 @@ static void testLine19x() {
SkPath path;
path.setFillType(SkPath::kEvenOdd_FillType);
path.addRect(0, 0, 12, 12, (SkPath::Direction) 0);
path.addRect(12, 16, 21, 21, (SkPath::Direction) 0);
path.addRect(12, 16, 21, 21, (SkPath::Direction) 0);
testSimplifyx(path);
}

View File

@ -96,7 +96,7 @@ private:
const uint32_t fUniqueID;
static uint32_t NextUniqueID();
typedef SkRefCnt INHERITED;
};

View File

@ -48,7 +48,7 @@ public:
* Swap the contents of the two pictures. Guaranteed to succeed.
*/
void swap(SkPicture& other);
/**
* Creates a thread-safe clone of the picture that is ready for playback.
*/

View File

@ -137,7 +137,7 @@ private:
const int fWidth;
const int fHeight;
uint32_t fGenerationID;
typedef SkRefCnt INHERITED;
};

View File

@ -56,7 +56,7 @@ public:
void reset();
uint32_t* reserve(size_t size); // size MUST be multiple of 4
/**
* Specify the single block to back the writer, rathern than dynamically
* allocating the memory. If block == NULL, then the writer reverts to

View File

@ -468,7 +468,7 @@ SkDevice* SkCanvas::init(SkDevice* device) {
fExternalMatrix.reset();
fExternalInverse.reset();
fUseExternalMatrix = false;
fSurfaceBase = NULL;
return this->setDevice(device);

View File

@ -325,7 +325,7 @@ void SkPicturePlayback::flattenToBuffer(SkOrderedWriteBuffer& buffer) const {
buffer.writePaint((*fPaints)[i]);
}
}
if ((n = SafeCount(fPathHeap.get())) > 0) {
writeTagSize(buffer, PICT_PATH_BUFFER_TAG, n);
fPathHeap->flatten(buffer);

View File

@ -141,7 +141,7 @@ uint32_t* SkWriter32::reserve(size_t size) {
uint32_t* SkWriter32::peek32(size_t offset) {
SkDEBUGCODE(this->validate();)
SkASSERT(SkAlign4(offset) == offset);
SkASSERT(offset <= fSize);
@ -175,11 +175,11 @@ void SkWriter32::rewindToOffset(size_t offset) {
if (fSingleBlock) {
return;
}
// Similar to peek32, except that we free up any following blocks
Block* block = fHead;
SkASSERT(NULL != block);
while (offset >= block->fAllocatedSoFar) {
offset -= block->fAllocatedSoFar;
block = block->fNext;
@ -188,7 +188,7 @@ void SkWriter32::rewindToOffset(size_t offset) {
fTail = block;
block->fAllocatedSoFar = offset;
// free up any following blocks
SkASSERT(block);
block = block->fNext;

View File

@ -113,7 +113,7 @@ public:
kSmearAlpha_InConfigFlag = 0x02,
/**
Smear the red channel across all four channels. This flag is
Smear the red channel across all four channels. This flag is
incompatible with kSmearAlpha. It is preferable to use
GL_ARB_texture_swizzle instead of this flag.
*/

View File

@ -641,7 +641,7 @@ void SkFontHost::FilterRec(SkScalerContext::Rec* rec) {
if (rec->fTextSize > SkIntToScalar(1 << 14)) {
rec->fTextSize = SkIntToScalar(1 << 14);
}
if (!gLCDSupportValid) {
InitFreetype();
FT_Done_FreeType(gFTLibrary);

View File

@ -24,7 +24,7 @@ static void check_contents(skiatest::Reporter* reporter, const SkWriter32& write
static void test_rewind(skiatest::Reporter* reporter) {
SkSWriter32<32> writer(32);
int32_t array[3] = { 1, 2, 4 };
REPORTER_ASSERT(reporter, 0 == writer.bytesWritten());
for (size_t i = 0; i < SK_ARRAY_COUNT(array); ++i) {
writer.writeInt(array[i]);