From 0b70816eb157ed6492623eea1e55005ef40c908c Mon Sep 17 00:00:00 2001 From: "skia.committer@gmail.com" Date: Wed, 12 Mar 2014 03:02:18 +0000 Subject: [PATCH] Sanitizing source files in Housekeeper-Nightly git-svn-id: http://skia.googlecode.com/svn/trunk@13755 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/core/SkDistanceFieldGen.cpp | 10 +++++----- src/gpu/GrTextStrike.cpp | 2 +- tools/PictureBenchmark.cpp | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/core/SkDistanceFieldGen.cpp b/src/core/SkDistanceFieldGen.cpp index 8370e02..cd469a4 100755 --- a/src/core/SkDistanceFieldGen.cpp +++ b/src/core/SkDistanceFieldGen.cpp @@ -32,7 +32,7 @@ static bool found_edge(const unsigned char* imagePtr, int width) { } static void init_glyph_data(DFData* data, unsigned char* edges, const unsigned char* image, - int dataWidth, int dataHeight, + int dataWidth, int dataHeight, int imageWidth, int imageHeight, int pad) { data += pad*dataWidth; @@ -118,11 +118,11 @@ static void init_distances(DFData* data, unsigned char* edges, int width, int he // if you're inside, gradient points away from edge SkPoint currGrad; currGrad.fX = (prevData+1)->fAlpha - (prevData-1)->fAlpha - + SK_ScalarSqrt2*(currData+1)->fAlpha + + SK_ScalarSqrt2*(currData+1)->fAlpha - SK_ScalarSqrt2*(currData-1)->fAlpha + (nextData+1)->fAlpha - (nextData-1)->fAlpha; - currGrad.fY = (nextData-1)->fAlpha - (prevData-1)->fAlpha - + SK_ScalarSqrt2*nextData->fAlpha + currGrad.fY = (nextData-1)->fAlpha - (prevData-1)->fAlpha + + SK_ScalarSqrt2*nextData->fAlpha - SK_ScalarSqrt2*prevData->fAlpha + (nextData+1)->fAlpha - (prevData+1)->fAlpha; currGrad.setLengthFast(1.0f); @@ -287,7 +287,7 @@ bool SkGenerateDistanceFieldFromImage(unsigned char* distanceField, SkASSERT(NULL != image); // the final distance field will have additional texels on each side to handle - // the maximum distance + // the maximum distance // we expand our temp data by one more on each side to simplify // the scanning code -- will always be treated as infinitely far away int pad = distanceMagnitude+1; diff --git a/src/gpu/GrTextStrike.cpp b/src/gpu/GrTextStrike.cpp index 7e3314b..0a1fd1e 100644 --- a/src/gpu/GrTextStrike.cpp +++ b/src/gpu/GrTextStrike.cpp @@ -305,7 +305,7 @@ bool GrTextStrike::addGlyphToAtlas(GrGlyph* glyph, GrFontScaler* scaler) { // alloc storage for distance field glyph size_t dfSize = dfWidth * dfHeight * bytesPerPixel; SkAutoSMalloc<1024> dfStorage(dfSize); - + if (1 == bytesPerPixel) { (void) SkGenerateDistanceFieldFromImage((unsigned char*)dfStorage.get(), (unsigned char*)storage.get(), diff --git a/tools/PictureBenchmark.cpp b/tools/PictureBenchmark.cpp index f05f805..6d8cada 100644 --- a/tools/PictureBenchmark.cpp +++ b/tools/PictureBenchmark.cpp @@ -173,10 +173,10 @@ void PictureBenchmark::run(SkPicture* pict) { SkString configName = tiledRenderer->getConfigName(); configName.appendf(": tile [%i,%i] out of [%i,%i]", x, y, xTiles, yTiles); - // TODO(borenet): Turn off per-iteration tile time reporting for now. - // Avoiding logging the time for every iteration for each tile cuts - // down on data file size by a significant amount. Re-enable this once - // we're loading the bench data directly into a data store and are no + // TODO(borenet): Turn off per-iteration tile time reporting for now. + // Avoiding logging the time for every iteration for each tile cuts + // down on data file size by a significant amount. Re-enable this once + // we're loading the bench data directly into a data store and are no // longer generating SVG graphs. #if 0 SkString result = perTileTimerData.getResult(timeFormat.c_str(), fTimerResult, -- 2.7.4