aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xsrc/core/SkDistanceFieldGen.cpp10
-rw-r--r--src/gpu/GrTextStrike.cpp2
-rw-r--r--tools/PictureBenchmark.cpp8
3 files changed, 10 insertions, 10 deletions
diff --git a/src/core/SkDistanceFieldGen.cpp b/src/core/SkDistanceFieldGen.cpp
index 8370e0239c..cd469a4d95 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 7e3314bc08..0a1fd1e71f 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 f05f80565d..6d8cada09e 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,