Style bikeshed - remove extraneous whitespace
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1842753002
Review URL: https://codereview.chromium.org/1842753002
diff --git a/tools/VisualBench/VisualBench.cpp b/tools/VisualBench/VisualBench.cpp
index cbd1abe..578ff92 100644
--- a/tools/VisualBench/VisualBench.cpp
+++ b/tools/VisualBench/VisualBench.cpp
@@ -192,4 +192,3 @@
SkOSWindow* create_sk_window(void* hwnd, int argc, char** argv) {
return new VisualBench(hwnd, argc, argv);
}
-
diff --git a/tools/VisualBench/VisualInteractiveModule.cpp b/tools/VisualBench/VisualInteractiveModule.cpp
index 986709a..898315e 100755
--- a/tools/VisualBench/VisualInteractiveModule.cpp
+++ b/tools/VisualBench/VisualInteractiveModule.cpp
@@ -41,7 +41,7 @@
canvas->drawRect(rect, paint);
// draw the 16ms line
paint.setColor(SK_ColorLTGRAY);
- canvas->drawLine(rect.fLeft, rect.fBottom - kBaseMS*kPixelPerMS,
+ canvas->drawLine(rect.fLeft, rect.fBottom - kBaseMS*kPixelPerMS,
rect.fRight, rect.fBottom - kBaseMS*kPixelPerMS, paint);
paint.setColor(SK_ColorRED);
paint.setStyle(SkPaint::kStroke_Style);
@@ -53,7 +53,7 @@
int i = fCurrentMeasurement;
do {
int endY = startY - (int)(fMeasurements[i] * kPixelPerMS + 0.5); // round to nearest value
- canvas->drawLine(SkIntToScalar(x), SkIntToScalar(startY),
+ canvas->drawLine(SkIntToScalar(x), SkIntToScalar(startY),
SkIntToScalar(x), SkIntToScalar(endY), paint);
i++;
i &= (kMeasurementCount - 1); // fast mod
diff --git a/tools/android/SkAndroidSDKCanvas.cpp b/tools/android/SkAndroidSDKCanvas.cpp
index d31f93b..c1a40f4 100644
--- a/tools/android/SkAndroidSDKCanvas.cpp
+++ b/tools/android/SkAndroidSDKCanvas.cpp
@@ -300,7 +300,7 @@
bool SkAndroidSDKCanvas::onAccessTopLayerPixels(SkPixmap* pmap) {
SkASSERT(pmap);
SkImageInfo info;
- size_t rowBytes;
+ size_t rowBytes;
const void* addr = fProxyTarget->accessTopLayerPixels(&info, &rowBytes, nullptr);
if (addr) {
pmap->reset(info, addr, rowBytes);
@@ -355,5 +355,3 @@
}
void SkAndroidSDKCanvas::onDiscard() { fProxyTarget->discard(); }
-
-
diff --git a/tools/android/SkAndroidSDKCanvas.h b/tools/android/SkAndroidSDKCanvas.h
index 812775f..78cfa93 100644
--- a/tools/android/SkAndroidSDKCanvas.h
+++ b/tools/android/SkAndroidSDKCanvas.h
@@ -107,4 +107,3 @@
};
#endif // SkAndroidSDKCanvas_DEFINED
-
diff --git a/tools/chrome_fuzz.cpp b/tools/chrome_fuzz.cpp
index f49e126..c59c741 100644
--- a/tools/chrome_fuzz.cpp
+++ b/tools/chrome_fuzz.cpp
@@ -79,4 +79,3 @@
SkDebugf("#EOF\n");
return ret;
}
-
diff --git a/tools/create_test_font.cpp b/tools/create_test_font.cpp
index 1de08ac..5183981 100644
--- a/tools/create_test_font.cpp
+++ b/tools/create_test_font.cpp
@@ -255,7 +255,7 @@
}
}
fprintf(out, "\n};\n\n");
-
+
// all fonts are now 0x00, 0x20 - 0xFE
// don't need to generate or output character codes?
fprintf(out, "const unsigned %sCharCodes[] = {\n", fontname);
@@ -275,7 +275,7 @@
}
}
fprintf(out, "\n};\n\n");
-
+
SkString widthsStr;
fprintf(out, "const SkFixed %sWidths[] = {\n", fontname);
for (int index = 0; index < offsetCount; ++index) {
@@ -283,7 +283,7 @@
}
widthsStr = strip_final(widthsStr);
fprintf(out, "%s\n};\n\n", widthsStr.c_str());
-
+
fprintf(out, "const int %sCharCodesCount = (int) SK_ARRAY_COUNT(%sCharCodes);\n\n",
fontname, fontname);
diff --git a/tools/debugger/SkDebugCanvas.cpp b/tools/debugger/SkDebugCanvas.cpp
index 4c58b96..cf3da5d 100644
--- a/tools/debugger/SkDebugCanvas.cpp
+++ b/tools/debugger/SkDebugCanvas.cpp
@@ -218,13 +218,13 @@
if (fPaintFilterCanvas) {
fPaintFilterCanvas->addCanvas(canvas);
canvas = fPaintFilterCanvas.get();
-
+
}
if (fMegaVizMode) {
this->markActiveCommands(index);
}
-
+
#if SK_SUPPORT_GPU
// If we have a GPU backend we can also visualize the batching information
GrAuditTrail* at = nullptr;
@@ -237,7 +237,7 @@
if (i == index && fFilter) {
canvas->clear(0xAAFFFFFF);
}
-
+
#if SK_SUPPORT_GPU
GrAuditTrail::AutoCollectBatches* acb = nullptr;
if (at) {
@@ -457,7 +457,7 @@
Json::Value SkDebugCanvas::toJSON(UrlDataManager& urlDataManager, int n, SkCanvas* canvas) {
this->drawAndCollectBatches(n, canvas);
-
+
// now collect json
#if SK_SUPPORT_GPU
GrAuditTrail* at = this->getAuditTrail(canvas);
diff --git a/tools/debugger/SkDebugCanvas.h b/tools/debugger/SkDebugCanvas.h
index fa02874..47aaf75 100644
--- a/tools/debugger/SkDebugCanvas.h
+++ b/tools/debugger/SkDebugCanvas.h
@@ -1,4 +1,3 @@
-
/*
* Copyright 2012 Google Inc.
*
@@ -44,8 +43,8 @@
void setClipVizColor(SkColor clipVizColor) { this->fClipVizColor = clipVizColor; }
SkColor getClipVizColor() const { return fClipVizColor; }
- void setDrawGpuBatchBounds(bool drawGpuBatchBounds) {
- fDrawGpuBatchBounds = drawGpuBatchBounds;
+ void setDrawGpuBatchBounds(bool drawGpuBatchBounds) {
+ fDrawGpuBatchBounds = drawGpuBatchBounds;
}
bool getDrawGpuBatchBounds() const { return fDrawGpuBatchBounds; }
@@ -156,7 +155,7 @@
/**
Returns a JSON object representing up to the Nth draw, where N is less than
- SkDebugCanvas::getSize(). The encoder may use the UrlDataManager to store binary data such
+ SkDebugCanvas::getSize(). The encoder may use the UrlDataManager to store binary data such
as images, referring to them via URLs embedded in the JSON.
*/
Json::Value toJSON(UrlDataManager& urlDataManager, int n, SkCanvas*);
diff --git a/tools/debugger/SkDrawCommand.cpp b/tools/debugger/SkDrawCommand.cpp
index af1270c..fcd2885 100644
--- a/tools/debugger/SkDrawCommand.cpp
+++ b/tools/debugger/SkDrawCommand.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2012 Google Inc.
*
@@ -474,7 +473,7 @@
case SkPath::kInverseEvenOdd_FillType:
result[SKDEBUGCANVAS_ATTRIBUTE_FILLTYPE] = SKDEBUGCANVAS_FILLTYPE_INVERSEEVENODD;
break;
- }
+ }
Json::Value verbs(Json::arrayValue);
SkPath::Iter iter(path, false);
SkPoint pts[4];
@@ -563,7 +562,7 @@
return Json::Value(SKDEBUGCANVAS_POINTMODE_POINTS);
case SkCanvas::kLines_PointMode:
return Json::Value(SKDEBUGCANVAS_POINTMODE_LINES);
- case SkCanvas::kPolygon_PointMode:
+ case SkCanvas::kPolygon_PointMode:
return Json::Value(SKDEBUGCANVAS_POINTMODE_POLYGON);
default:
SkASSERT(false);
@@ -571,7 +570,7 @@
};
}
-static void store_scalar(Json::Value* target, const char* key, SkScalar value,
+static void store_scalar(Json::Value* target, const char* key, SkScalar value,
SkScalar defaultValue) {
if (value != defaultValue) {
(*target)[key] = Json::Value(value);
@@ -584,14 +583,14 @@
}
}
-static void encode_data(const void* bytes, size_t count, const char* contentType,
+static void encode_data(const void* bytes, size_t count, const char* contentType,
UrlDataManager& urlDataManager, Json::Value* target) {
SkAutoTUnref<SkData> data(SkData::NewWithCopy(bytes, count));
SkString url = urlDataManager.addData(data, contentType);
*target = Json::Value(url.c_str());
}
-static void flatten(const SkFlattenable* flattenable, Json::Value* target,
+static void flatten(const SkFlattenable* flattenable, Json::Value* target,
UrlDataManager& urlDataManager) {
SkWriteBuffer buffer;
flattenable->flatten(buffer);
@@ -611,7 +610,7 @@
out->write(data, length);
}
-void SkDrawCommand::WritePNG(const png_bytep rgba, png_uint_32 width, png_uint_32 height,
+void SkDrawCommand::WritePNG(const png_bytep rgba, png_uint_32 width, png_uint_32 height,
SkWStream& out) {
png_structp png = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
SkASSERT(png != nullptr);
@@ -644,11 +643,11 @@
sk_free(pixels);
}
-static bool SK_WARN_UNUSED_RESULT flatten(const SkImage& image, Json::Value* target,
+static bool SK_WARN_UNUSED_RESULT flatten(const SkImage& image, Json::Value* target,
UrlDataManager& urlDataManager) {
size_t rowBytes = 4 * image.width();
SkAutoFree buffer(sk_malloc_throw(rowBytes * image.height()));
- SkImageInfo dstInfo = SkImageInfo::Make(image.width(), image.height(),
+ SkImageInfo dstInfo = SkImageInfo::Make(image.width(), image.height(),
kN32_SkColorType, kPremul_SkAlphaType);
if (!image.readPixels(dstInfo, buffer.get(), rowBytes, 0, 0)) {
SkDebugf("readPixels failed\n");
@@ -700,7 +699,7 @@
}
}
-static Json::ArrayIndex decode_data(Json::Value data, UrlDataManager& urlDataManager,
+static Json::ArrayIndex decode_data(Json::Value data, UrlDataManager& urlDataManager,
const void** target) {
UrlDataManager::UrlData* urlData = urlDataManager.getDataFromUrl(SkString(data.asCString()));
if (urlData == nullptr) {
@@ -713,7 +712,7 @@
return (Json::ArrayIndex) urlData->fData->size();
}
-static SkFlattenable* load_flattenable(Json::Value jsonFlattenable,
+static SkFlattenable* load_flattenable(Json::Value jsonFlattenable,
UrlDataManager& urlDataManager) {
if (!jsonFlattenable.isMember(SKDEBUGCANVAS_ATTRIBUTE_NAME)) {
return nullptr;
@@ -816,7 +815,7 @@
return result;
}
-static bool SK_WARN_UNUSED_RESULT flatten(const SkBitmap& bitmap, Json::Value* target,
+static bool SK_WARN_UNUSED_RESULT flatten(const SkBitmap& bitmap, Json::Value* target,
UrlDataManager& urlDataManager) {
bitmap.lockPixels();
sk_sp<SkImage> image(SkImage::MakeFromBitmap(bitmap));
@@ -917,7 +916,7 @@
}
}
-static void apply_paint_maskfilter(const SkPaint& paint, Json::Value* target,
+static void apply_paint_maskfilter(const SkPaint& paint, Json::Value* target,
UrlDataManager& urlDataManager) {
SkMaskFilter* maskFilter = paint.getMaskFilter();
if (maskFilter != nullptr) {
@@ -966,7 +965,7 @@
}
}
-static void apply_paint_patheffect(const SkPaint& paint, Json::Value* target,
+static void apply_paint_patheffect(const SkPaint& paint, Json::Value* target,
UrlDataManager& urlDataManager) {
SkPathEffect* pathEffect = paint.getPathEffect();
if (pathEffect != nullptr) {
@@ -991,7 +990,7 @@
}
}
}
-
+
static void apply_paint_textalign(const SkPaint& paint, Json::Value* target) {
SkPaint::Align textAlign = paint.getTextAlign();
if (textAlign != SkPaint::kLeft_Align) {
@@ -1009,7 +1008,7 @@
}
}
-static void apply_paint_typeface(const SkPaint& paint, Json::Value* target,
+static void apply_paint_typeface(const SkPaint& paint, Json::Value* target,
UrlDataManager& urlDataManager) {
SkTypeface* typeface = paint.getTypeface();
if (typeface != nullptr) {
@@ -1019,7 +1018,7 @@
void* data = sk_malloc_throw(buffer.bytesWritten());
buffer.copyTo(data);
Json::Value jsonData;
- encode_data(data, buffer.bytesWritten(), "application/octet-stream", urlDataManager,
+ encode_data(data, buffer.bytesWritten(), "application/octet-stream", urlDataManager,
&jsonData);
jsonTypeface[SKDEBUGCANVAS_ATTRIBUTE_DATA] = jsonData;
sk_free(data);
@@ -1027,7 +1026,7 @@
}
}
-static void apply_paint_shader(const SkPaint& paint, Json::Value* target,
+static void apply_paint_shader(const SkPaint& paint, Json::Value* target,
UrlDataManager& urlDataManager) {
SkFlattenable* shader = paint.getShader();
if (shader != nullptr) {
@@ -1037,7 +1036,7 @@
}
}
-static void apply_paint_xfermode(const SkPaint& paint, Json::Value* target,
+static void apply_paint_xfermode(const SkPaint& paint, Json::Value* target,
UrlDataManager& urlDataManager) {
SkFlattenable* xfermode = paint.getXfermode();
if (xfermode != nullptr) {
@@ -1057,7 +1056,7 @@
}
}
-static void apply_paint_colorfilter(const SkPaint& paint, Json::Value* target,
+static void apply_paint_colorfilter(const SkPaint& paint, Json::Value* target,
UrlDataManager& urlDataManager) {
SkFlattenable* colorFilter = paint.getColorFilter();
if (colorFilter != nullptr) {
@@ -1067,7 +1066,7 @@
}
}
-static void apply_paint_looper(const SkPaint& paint, Json::Value* target,
+static void apply_paint_looper(const SkPaint& paint, Json::Value* target,
UrlDataManager& urlDataManager) {
SkFlattenable* looper = paint.getLooper();
if (looper != nullptr) {
@@ -1080,11 +1079,11 @@
Json::Value make_json_paint(const SkPaint& paint, UrlDataManager& urlDataManager) {
Json::Value result(Json::objectValue);
store_scalar(&result, SKDEBUGCANVAS_ATTRIBUTE_STROKEWIDTH, paint.getStrokeWidth(), 0.0f);
- store_scalar(&result, SKDEBUGCANVAS_ATTRIBUTE_STROKEMITER, paint.getStrokeMiter(),
+ store_scalar(&result, SKDEBUGCANVAS_ATTRIBUTE_STROKEMITER, paint.getStrokeMiter(),
SkPaintDefaults_MiterLimit);
store_bool(&result, SKDEBUGCANVAS_ATTRIBUTE_ANTIALIAS, paint.isAntiAlias(), false);
store_bool(&result, SKDEBUGCANVAS_ATTRIBUTE_DITHER, paint.isDither(), false);
- store_scalar(&result, SKDEBUGCANVAS_ATTRIBUTE_TEXTSIZE, paint.getTextSize(),
+ store_scalar(&result, SKDEBUGCANVAS_ATTRIBUTE_TEXTSIZE, paint.getTextSize(),
SkPaintDefaults_TextSize);
store_scalar(&result, SKDEBUGCANVAS_ATTRIBUTE_TEXTSCALEX, paint.getTextScaleX(), SK_Scalar1);
store_scalar(&result, SKDEBUGCANVAS_ATTRIBUTE_TEXTSCALEX, paint.getTextSkewX(), 0.0f);
@@ -1119,7 +1118,7 @@
}
}
-static void extract_json_paint_shader(Json::Value& jsonPaint, UrlDataManager& urlDataManager,
+static void extract_json_paint_shader(Json::Value& jsonPaint, UrlDataManager& urlDataManager,
SkPaint* target) {
if (jsonPaint.isMember(SKDEBUGCANVAS_ATTRIBUTE_SHADER)) {
Json::Value jsonShader = jsonPaint[SKDEBUGCANVAS_ATTRIBUTE_SHADER];
@@ -1130,7 +1129,7 @@
}
}
-static void extract_json_paint_patheffect(Json::Value& jsonPaint, UrlDataManager& urlDataManager,
+static void extract_json_paint_patheffect(Json::Value& jsonPaint, UrlDataManager& urlDataManager,
SkPaint* target) {
if (jsonPaint.isMember(SKDEBUGCANVAS_ATTRIBUTE_PATHEFFECT)) {
Json::Value jsonPathEffect = jsonPaint[SKDEBUGCANVAS_ATTRIBUTE_PATHEFFECT];
@@ -1142,7 +1141,7 @@
}
}
-static void extract_json_paint_maskfilter(Json::Value& jsonPaint, UrlDataManager& urlDataManager,
+static void extract_json_paint_maskfilter(Json::Value& jsonPaint, UrlDataManager& urlDataManager,
SkPaint* target) {
if (jsonPaint.isMember(SKDEBUGCANVAS_ATTRIBUTE_MASKFILTER)) {
Json::Value jsonMaskFilter = jsonPaint[SKDEBUGCANVAS_ATTRIBUTE_MASKFILTER];
@@ -1154,7 +1153,7 @@
}
}
-static void extract_json_paint_colorfilter(Json::Value& jsonPaint, UrlDataManager& urlDataManager,
+static void extract_json_paint_colorfilter(Json::Value& jsonPaint, UrlDataManager& urlDataManager,
SkPaint* target) {
if (jsonPaint.isMember(SKDEBUGCANVAS_ATTRIBUTE_COLORFILTER)) {
Json::Value jsonColorFilter = jsonPaint[SKDEBUGCANVAS_ATTRIBUTE_COLORFILTER];
@@ -1166,7 +1165,7 @@
}
}
-static void extract_json_paint_xfermode(Json::Value& jsonPaint, UrlDataManager& urlDataManager,
+static void extract_json_paint_xfermode(Json::Value& jsonPaint, UrlDataManager& urlDataManager,
SkPaint* target) {
if (jsonPaint.isMember(SKDEBUGCANVAS_ATTRIBUTE_XFERMODE)) {
Json::Value jsonXfermode = jsonPaint[SKDEBUGCANVAS_ATTRIBUTE_XFERMODE];
@@ -1178,7 +1177,7 @@
}
}
-static void extract_json_paint_looper(Json::Value& jsonPaint, UrlDataManager& urlDataManager,
+static void extract_json_paint_looper(Json::Value& jsonPaint, UrlDataManager& urlDataManager,
SkPaint* target) {
if (jsonPaint.isMember(SKDEBUGCANVAS_ATTRIBUTE_LOOPER)) {
Json::Value jsonLooper = jsonPaint[SKDEBUGCANVAS_ATTRIBUTE_LOOPER];
@@ -1189,11 +1188,11 @@
}
}
-static void extract_json_paint_imagefilter(Json::Value& jsonPaint, UrlDataManager& urlDataManager,
+static void extract_json_paint_imagefilter(Json::Value& jsonPaint, UrlDataManager& urlDataManager,
SkPaint* target) {
if (jsonPaint.isMember(SKDEBUGCANVAS_ATTRIBUTE_IMAGEFILTER)) {
Json::Value jsonImageFilter = jsonPaint[SKDEBUGCANVAS_ATTRIBUTE_IMAGEFILTER];
- SkImageFilter* imageFilter = (SkImageFilter*) load_flattenable(jsonImageFilter,
+ SkImageFilter* imageFilter = (SkImageFilter*) load_flattenable(jsonImageFilter,
urlDataManager);
if (imageFilter != nullptr) {
target->setImageFilter(imageFilter);
@@ -1202,7 +1201,7 @@
}
}
-static void extract_json_paint_typeface(Json::Value& jsonPaint, UrlDataManager& urlDataManager,
+static void extract_json_paint_typeface(Json::Value& jsonPaint, UrlDataManager& urlDataManager,
SkPaint* target) {
if (jsonPaint.isMember(SKDEBUGCANVAS_ATTRIBUTE_TYPEFACE)) {
Json::Value jsonTypeface = jsonPaint[SKDEBUGCANVAS_ATTRIBUTE_TYPEFACE];
@@ -1234,14 +1233,14 @@
if (jsonPaint.isMember(SKDEBUGCANVAS_ATTRIBUTE_STROKEWIDTH)) {
float strokeWidth = jsonPaint[SKDEBUGCANVAS_ATTRIBUTE_STROKEWIDTH].asFloat();
target->setStrokeWidth(strokeWidth);
- }
+ }
}
static void extract_json_paint_strokemiter(Json::Value& jsonPaint, SkPaint* target) {
if (jsonPaint.isMember(SKDEBUGCANVAS_ATTRIBUTE_STROKEMITER)) {
float strokeMiter = jsonPaint[SKDEBUGCANVAS_ATTRIBUTE_STROKEMITER].asFloat();
target->setStrokeMiter(strokeMiter);
- }
+ }
}
static void extract_json_paint_strokejoin(Json::Value& jsonPaint, SkPaint* target) {
@@ -1402,7 +1401,7 @@
}
}
-static void extract_json_paint(Json::Value& paint, UrlDataManager& urlDataManager,
+static void extract_json_paint(Json::Value& paint, UrlDataManager& urlDataManager,
SkPaint* result) {
extract_json_paint_color(paint, result);
extract_json_paint_shader(paint, urlDataManager, result);
@@ -1439,21 +1438,21 @@
static void extract_json_rrect(Json::Value& rrect, SkRRect* result) {
SkVector radii[4] = {
- { rrect[1][0].asFloat(), rrect[1][1].asFloat() },
- { rrect[2][0].asFloat(), rrect[2][1].asFloat() },
- { rrect[3][0].asFloat(), rrect[3][1].asFloat() },
+ { rrect[1][0].asFloat(), rrect[1][1].asFloat() },
+ { rrect[2][0].asFloat(), rrect[2][1].asFloat() },
+ { rrect[3][0].asFloat(), rrect[3][1].asFloat() },
{ rrect[4][0].asFloat(), rrect[4][1].asFloat() }
};
- result->setRectRadii(SkRect::MakeLTRB(rrect[0][0].asFloat(), rrect[0][1].asFloat(),
- rrect[0][2].asFloat(), rrect[0][3].asFloat()),
+ result->setRectRadii(SkRect::MakeLTRB(rrect[0][0].asFloat(), rrect[0][1].asFloat(),
+ rrect[0][2].asFloat(), rrect[0][3].asFloat()),
radii);
}
static void extract_json_matrix(Json::Value& matrix, SkMatrix* result) {
- SkScalar values[] = {
+ SkScalar values[] = {
matrix[0][0].asFloat(), matrix[0][1].asFloat(), matrix[0][2].asFloat(),
matrix[1][0].asFloat(), matrix[1][1].asFloat(), matrix[1][2].asFloat(),
- matrix[2][0].asFloat(), matrix[2][1].asFloat(), matrix[2][2].asFloat()
+ matrix[2][0].asFloat(), matrix[2][1].asFloat(), matrix[2][2].asFloat()
};
result->set9(values);
}
@@ -1584,11 +1583,11 @@
return result;
}
-SkClipPathCommand* SkClipPathCommand::fromJSON(Json::Value& command,
+SkClipPathCommand* SkClipPathCommand::fromJSON(Json::Value& command,
UrlDataManager& urlDataManager) {
SkPath path;
extract_json_path(command[SKDEBUGCANVAS_ATTRIBUTE_PATH], &path);
- return new SkClipPathCommand(path, get_json_regionop(command[SKDEBUGCANVAS_ATTRIBUTE_REGIONOP]),
+ return new SkClipPathCommand(path, get_json_regionop(command[SKDEBUGCANVAS_ATTRIBUTE_REGIONOP]),
command[SKDEBUGCANVAS_ATTRIBUTE_ANTIALIAS].asBool());
}
@@ -1612,7 +1611,7 @@
return result;
}
-SkClipRegionCommand* SkClipRegionCommand::fromJSON(Json::Value& command,
+SkClipRegionCommand* SkClipRegionCommand::fromJSON(Json::Value& command,
UrlDataManager& urlDataManager) {
SkASSERT(false);
return nullptr;
@@ -1641,11 +1640,11 @@
return result;
}
-SkClipRectCommand* SkClipRectCommand::fromJSON(Json::Value& command,
+SkClipRectCommand* SkClipRectCommand::fromJSON(Json::Value& command,
UrlDataManager& urlDataManager) {
SkRect rect;
extract_json_rect(command[SKDEBUGCANVAS_ATTRIBUTE_COORDS], &rect);
- return new SkClipRectCommand(rect, get_json_regionop(command[SKDEBUGCANVAS_ATTRIBUTE_REGIONOP]),
+ return new SkClipRectCommand(rect, get_json_regionop(command[SKDEBUGCANVAS_ATTRIBUTE_REGIONOP]),
command[SKDEBUGCANVAS_ATTRIBUTE_ANTIALIAS].asBool());
}
@@ -1677,12 +1676,12 @@
return result;
}
-SkClipRRectCommand* SkClipRRectCommand::fromJSON(Json::Value& command,
+SkClipRRectCommand* SkClipRRectCommand::fromJSON(Json::Value& command,
UrlDataManager& urlDataManager) {
SkRRect rrect;
extract_json_rrect(command[SKDEBUGCANVAS_ATTRIBUTE_COORDS], &rrect);
- return new SkClipRRectCommand(rrect,
- get_json_regionop(command[SKDEBUGCANVAS_ATTRIBUTE_REGIONOP]),
+ return new SkClipRRectCommand(rrect,
+ get_json_regionop(command[SKDEBUGCANVAS_ATTRIBUTE_REGIONOP]),
command[SKDEBUGCANVAS_ATTRIBUTE_ANTIALIAS].asBool());
}
@@ -1753,7 +1752,7 @@
return result;
}
-SkDrawBitmapCommand* SkDrawBitmapCommand::fromJSON(Json::Value& command,
+SkDrawBitmapCommand* SkDrawBitmapCommand::fromJSON(Json::Value& command,
UrlDataManager& urlDataManager) {
SkBitmap* bitmap = load_bitmap(command[SKDEBUGCANVAS_ATTRIBUTE_BITMAP], urlDataManager);
if (bitmap == nullptr) {
@@ -1769,7 +1768,7 @@
else {
paintPtr = nullptr;
}
- SkDrawBitmapCommand* result = new SkDrawBitmapCommand(*bitmap, point[0].asFloat(),
+ SkDrawBitmapCommand* result = new SkDrawBitmapCommand(*bitmap, point[0].asFloat(),
point[1].asFloat(), paintPtr);
delete bitmap;
return result;
@@ -1820,7 +1819,7 @@
return result;
}
-SkDrawBitmapNineCommand* SkDrawBitmapNineCommand::fromJSON(Json::Value& command,
+SkDrawBitmapNineCommand* SkDrawBitmapNineCommand::fromJSON(Json::Value& command,
UrlDataManager& urlDataManager) {
SkBitmap* bitmap = load_bitmap(command[SKDEBUGCANVAS_ATTRIBUTE_BITMAP], urlDataManager);
if (bitmap == nullptr) {
@@ -1903,7 +1902,7 @@
return result;
}
-SkDrawBitmapRectCommand* SkDrawBitmapRectCommand::fromJSON(Json::Value& command,
+SkDrawBitmapRectCommand* SkDrawBitmapRectCommand::fromJSON(Json::Value& command,
UrlDataManager& urlDataManager) {
SkBitmap* bitmap = load_bitmap(command[SKDEBUGCANVAS_ATTRIBUTE_BITMAP], urlDataManager);
if (bitmap == nullptr) {
@@ -1921,7 +1920,7 @@
paintPtr = nullptr;
}
SkCanvas::SrcRectConstraint constraint;
- if (command.isMember(SKDEBUGCANVAS_ATTRIBUTE_STRICT) &&
+ if (command.isMember(SKDEBUGCANVAS_ATTRIBUTE_STRICT) &&
command[SKDEBUGCANVAS_ATTRIBUTE_STRICT].asBool()) {
constraint = SkCanvas::kStrict_SrcRectConstraint;
}
@@ -1988,7 +1987,7 @@
return result;
}
-SkDrawImageCommand* SkDrawImageCommand::fromJSON(Json::Value& command,
+SkDrawImageCommand* SkDrawImageCommand::fromJSON(Json::Value& command,
UrlDataManager& urlDataManager) {
sk_sp<SkImage> image = load_image(command[SKDEBUGCANVAS_ATTRIBUTE_IMAGE], urlDataManager);
if (image == nullptr) {
@@ -2037,7 +2036,7 @@
}
void SkDrawImageRectCommand::execute(SkCanvas* canvas) const {
- canvas->legacy_drawImageRect(fImage, fSrc.getMaybeNull(), fDst, fPaint.getMaybeNull(),
+ canvas->legacy_drawImageRect(fImage, fSrc.getMaybeNull(), fDst, fPaint.getMaybeNull(),
fConstraint);
}
@@ -2070,7 +2069,7 @@
return result;
}
-SkDrawImageRectCommand* SkDrawImageRectCommand::fromJSON(Json::Value& command,
+SkDrawImageRectCommand* SkDrawImageRectCommand::fromJSON(Json::Value& command,
UrlDataManager& urlDataManager) {
sk_sp<SkImage> image = load_image(command[SKDEBUGCANVAS_ATTRIBUTE_IMAGE], urlDataManager);
if (image == nullptr) {
@@ -2088,7 +2087,7 @@
paintPtr = nullptr;
}
SkCanvas::SrcRectConstraint constraint;
- if (command.isMember(SKDEBUGCANVAS_ATTRIBUTE_STRICT) &&
+ if (command.isMember(SKDEBUGCANVAS_ATTRIBUTE_STRICT) &&
command[SKDEBUGCANVAS_ATTRIBUTE_STRICT].asBool()) {
constraint = SkCanvas::kStrict_SrcRectConstraint;
}
@@ -2145,7 +2144,7 @@
return result;
}
-SkDrawOvalCommand* SkDrawOvalCommand::fromJSON(Json::Value& command,
+SkDrawOvalCommand* SkDrawOvalCommand::fromJSON(Json::Value& command,
UrlDataManager& urlDataManager) {
SkRect coords;
extract_json_rect(command[SKDEBUGCANVAS_ATTRIBUTE_COORDS], &coords);
@@ -2177,7 +2176,7 @@
return result;
}
-SkDrawPaintCommand* SkDrawPaintCommand::fromJSON(Json::Value& command,
+SkDrawPaintCommand* SkDrawPaintCommand::fromJSON(Json::Value& command,
UrlDataManager& urlDataManager) {
SkPaint paint;
extract_json_paint(command[SKDEBUGCANVAS_ATTRIBUTE_PAINT], urlDataManager, &paint);
@@ -2209,7 +2208,7 @@
return result;
}
-SkDrawPathCommand* SkDrawPathCommand::fromJSON(Json::Value& command,
+SkDrawPathCommand* SkDrawPathCommand::fromJSON(Json::Value& command,
UrlDataManager& urlDataManager) {
SkPath path;
extract_json_path(command[SKDEBUGCANVAS_ATTRIBUTE_PATH], &path);
@@ -2336,7 +2335,7 @@
return result;
}
-SkDrawPointsCommand* SkDrawPointsCommand::fromJSON(Json::Value& command,
+SkDrawPointsCommand* SkDrawPointsCommand::fromJSON(Json::Value& command,
UrlDataManager& urlDataManager) {
SkCanvas::PointMode mode;
const char* jsonMode = command[SKDEBUGCANVAS_ATTRIBUTE_MODE].asCString();
@@ -2392,7 +2391,7 @@
Json::Value SkDrawPosTextCommand::toJSON(UrlDataManager& urlDataManager) const {
Json::Value result = INHERITED::toJSON(urlDataManager);
- result[SKDEBUGCANVAS_ATTRIBUTE_TEXT] = Json::Value((const char*) fText,
+ result[SKDEBUGCANVAS_ATTRIBUTE_TEXT] = Json::Value((const char*) fText,
((const char*) fText) + fByteLength);
Json::Value coords(Json::arrayValue);
size_t numCoords = fPaint.textToGlyphs(fText, fByteLength, nullptr);
@@ -2404,7 +2403,7 @@
return result;
}
-SkDrawPosTextCommand* SkDrawPosTextCommand::fromJSON(Json::Value& command,
+SkDrawPosTextCommand* SkDrawPosTextCommand::fromJSON(Json::Value& command,
UrlDataManager& urlDataManager) {
const char* text = command[SKDEBUGCANVAS_ATTRIBUTE_TEXT].asCString();
SkPaint paint;
@@ -2579,7 +2578,7 @@
return result;
}
-SkDrawTextBlobCommand* SkDrawTextBlobCommand::fromJSON(Json::Value& command,
+SkDrawTextBlobCommand* SkDrawTextBlobCommand::fromJSON(Json::Value& command,
UrlDataManager& urlDataManager) {
SkTextBlobBuilder builder;
Json::Value runs = command[SKDEBUGCANVAS_ATTRIBUTE_RUNS];
@@ -2683,7 +2682,7 @@
return result;
}
-SkDrawPatchCommand* SkDrawPatchCommand::fromJSON(Json::Value& command,
+SkDrawPatchCommand* SkDrawPatchCommand::fromJSON(Json::Value& command,
UrlDataManager& urlDataManager) {
Json::Value jsonCubics = command[SKDEBUGCANVAS_ATTRIBUTE_CUBICS];
SkPoint cubics[12];
@@ -2744,7 +2743,7 @@
return result;
}
-SkDrawRectCommand* SkDrawRectCommand::fromJSON(Json::Value& command,
+SkDrawRectCommand* SkDrawRectCommand::fromJSON(Json::Value& command,
UrlDataManager& urlDataManager) {
SkRect coords;
extract_json_rect(command[SKDEBUGCANVAS_ATTRIBUTE_COORDS], &coords);
@@ -2778,7 +2777,7 @@
return result;
}
-SkDrawRRectCommand* SkDrawRRectCommand::fromJSON(Json::Value& command,
+SkDrawRRectCommand* SkDrawRRectCommand::fromJSON(Json::Value& command,
UrlDataManager& urlDataManager) {
SkRRect coords;
extract_json_rrect(command[SKDEBUGCANVAS_ATTRIBUTE_COORDS], &coords);
@@ -2817,7 +2816,7 @@
return result;
}
-SkDrawDRRectCommand* SkDrawDRRectCommand::fromJSON(Json::Value& command,
+SkDrawDRRectCommand* SkDrawDRRectCommand::fromJSON(Json::Value& command,
UrlDataManager& urlDataManager) {
SkRRect outer;
extract_json_rrect(command[SKDEBUGCANVAS_ATTRIBUTE_INNER], &outer);
@@ -2850,7 +2849,7 @@
Json::Value SkDrawTextCommand::toJSON(UrlDataManager& urlDataManager) const {
Json::Value result = INHERITED::toJSON(urlDataManager);
- result[SKDEBUGCANVAS_ATTRIBUTE_TEXT] = Json::Value((const char*) fText,
+ result[SKDEBUGCANVAS_ATTRIBUTE_TEXT] = Json::Value((const char*) fText,
((const char*) fText) + fByteLength);
Json::Value coords(Json::arrayValue);
result[SKDEBUGCANVAS_ATTRIBUTE_COORDS] = make_json_point(fX, fY);
@@ -2858,13 +2857,13 @@
return result;
}
-SkDrawTextCommand* SkDrawTextCommand::fromJSON(Json::Value& command,
+SkDrawTextCommand* SkDrawTextCommand::fromJSON(Json::Value& command,
UrlDataManager& urlDataManager) {
const char* text = command[SKDEBUGCANVAS_ATTRIBUTE_TEXT].asCString();
SkPaint paint;
extract_json_paint(command[SKDEBUGCANVAS_ATTRIBUTE_PAINT], urlDataManager, &paint);
Json::Value coords = command[SKDEBUGCANVAS_ATTRIBUTE_COORDS];
- return new SkDrawTextCommand(text, strlen(text), coords[0].asFloat(), coords[1].asFloat(),
+ return new SkDrawTextCommand(text, strlen(text), coords[0].asFloat(), coords[1].asFloat(),
paint);
}
@@ -2899,7 +2898,7 @@
Json::Value SkDrawTextOnPathCommand::toJSON(UrlDataManager& urlDataManager) const {
Json::Value result = INHERITED::toJSON(urlDataManager);
- result[SKDEBUGCANVAS_ATTRIBUTE_TEXT] = Json::Value((const char*) fText,
+ result[SKDEBUGCANVAS_ATTRIBUTE_TEXT] = Json::Value((const char*) fText,
((const char*) fText) + fByteLength);
Json::Value coords(Json::arrayValue);
result[SKDEBUGCANVAS_ATTRIBUTE_PATH] = make_json_path(fPath);
@@ -2910,7 +2909,7 @@
return result;
}
-SkDrawTextOnPathCommand* SkDrawTextOnPathCommand::fromJSON(Json::Value& command,
+SkDrawTextOnPathCommand* SkDrawTextOnPathCommand::fromJSON(Json::Value& command,
UrlDataManager& urlDataManager) {
const char* text = command[SKDEBUGCANVAS_ATTRIBUTE_TEXT].asCString();
SkPaint paint;
@@ -3069,7 +3068,7 @@
result[SKDEBUGCANVAS_ATTRIBUTE_BOUNDS] = make_json_rect(fBounds);
}
if (fPaintPtr != nullptr) {
- result[SKDEBUGCANVAS_ATTRIBUTE_PAINT] = make_json_paint(*fPaintPtr,
+ result[SKDEBUGCANVAS_ATTRIBUTE_PAINT] = make_json_paint(*fPaintPtr,
urlDataManager);
}
if (fBackdrop != nullptr) {
@@ -3084,7 +3083,7 @@
return result;
}
-SkSaveLayerCommand* SkSaveLayerCommand::fromJSON(Json::Value& command,
+SkSaveLayerCommand* SkSaveLayerCommand::fromJSON(Json::Value& command,
UrlDataManager& urlDataManager) {
SkCanvas::SaveLayerRec rec;
SkRect bounds;
@@ -3130,7 +3129,7 @@
return result;
}
-SkSetMatrixCommand* SkSetMatrixCommand::fromJSON(Json::Value& command,
+SkSetMatrixCommand* SkSetMatrixCommand::fromJSON(Json::Value& command,
UrlDataManager& urlDataManager) {
SkMatrix matrix;
extract_json_matrix(command[SKDEBUGCANVAS_ATTRIBUTE_MATRIX], &matrix);
diff --git a/tools/debugger/SkDrawCommand.h b/tools/debugger/SkDrawCommand.h
index 7eaf354..ac9e476 100644
--- a/tools/debugger/SkDrawCommand.h
+++ b/tools/debugger/SkDrawCommand.h
@@ -59,7 +59,7 @@
static const int kOpTypeCount = kLast_OpType + 1;
- static void WritePNG(const png_bytep rgba, png_uint_32 width, png_uint_32 height,
+ static void WritePNG(const png_bytep rgba, png_uint_32 width, png_uint_32 height,
SkWStream& out);
SkDrawCommand(OpType opType);
diff --git a/tools/debugger/SkObjectParser.cpp b/tools/debugger/SkObjectParser.cpp
index 5f3fa44..3642783 100644
--- a/tools/debugger/SkObjectParser.cpp
+++ b/tools/debugger/SkObjectParser.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2012 Google Inc.
*
@@ -26,7 +25,7 @@
mBitmap->appendS32(bitmap.width());
mBitmap->append(" H: ");
mBitmap->appendS32(bitmap.height());
-
+
const char* gColorTypeStrings[] = {
"None", "A8", "565", "4444", "RGBA", "BGRA", "Index8", "G8", "RGBAf16"
};
@@ -136,7 +135,7 @@
SkString* SkObjectParser::PathToString(const SkPath& path) {
SkString* mPath = new SkString;
-
+
mPath->appendf("Path (%d) (", path.getGenerationID());
static const char* gFillStrings[] = {
diff --git a/tools/gpuveto.cpp b/tools/gpuveto.cpp
index 41ca0c8..59b3bef 100644
--- a/tools/gpuveto.cpp
+++ b/tools/gpuveto.cpp
@@ -52,8 +52,8 @@
// The SkPicture tracking information is only generated during recording
// an isn't serialized. Replay the picture to regenerated the tracking data.
SkPictureRecorder recorder;
- picture->playback(recorder.beginRecording(picture->cullRect().width(),
- picture->cullRect().height(),
+ picture->playback(recorder.beginRecording(picture->cullRect().width(),
+ picture->cullRect().height(),
nullptr, 0));
sk_sp<SkPicture> recorded(recorder.finishRecordingAsPicture());
diff --git a/tools/imgblur.cpp b/tools/imgblur.cpp
index c47bb02..3a0ae00 100644
--- a/tools/imgblur.cpp
+++ b/tools/imgblur.cpp
@@ -37,7 +37,7 @@
if (!FLAGS_quiet) {
SkDebugf("Sigma must be greater than zero (it is %f).\n", FLAGS_sigma);
}
- return kError;
+ return kError;
}
sk_sp<SkData> data(SkData::MakeFromFileName(FLAGS_in[0]));
@@ -70,7 +70,7 @@
if (!FLAGS_quiet) {
SkDebugf("Couldn't write to file: %s\n", FLAGS_out[0]);
}
- return kError;
+ return kError;
}
return kSuccess;
diff --git a/tools/imgslice.cpp b/tools/imgslice.cpp
index 3585c06..2fdc819 100644
--- a/tools/imgslice.cpp
+++ b/tools/imgslice.cpp
@@ -42,21 +42,21 @@
SkDebugf("Channel (--rgb) must be between 0 and 3 (inclusive) - value is %d.\n",
FLAGS_rgb);
}
- return kError;
+ return kError;
}
if (FLAGS_row >= 0 && FLAGS_column >= 0) {
if (!FLAGS_quiet) {
SkDebugf("Only one of '-c' or '-r' can be specified at at time.\n");
}
- return kError;
+ return kError;
}
if (FLAGS_row < 0 && FLAGS_column < 0) {
if (!FLAGS_quiet) {
SkDebugf("At least one of '-c' or '-r' need to be specified.\n");
}
- return kError;
+ return kError;
}
sk_sp<SkData> data(SkData::MakeFromFileName(FLAGS_image[0]));
@@ -128,7 +128,7 @@
SkDebugf(", %d", ((c) >> (FLAGS_rgb*8)) & 0xFF);
}
- }
+ }
}
SkDebugf("\n");
diff --git a/tools/lua/lua_pictures.cpp b/tools/lua/lua_pictures.cpp
index 0edea25..9776002 100644
--- a/tools/lua/lua_pictures.cpp
+++ b/tools/lua/lua_pictures.cpp
@@ -145,7 +145,7 @@
auto pic(load_picture(path));
if (pic.get()) {
SkAutoTUnref<SkLuaCanvas> canvas(
- new SkLuaCanvas(SkScalarCeilToInt(pic->cullRect().width()),
+ new SkLuaCanvas(SkScalarCeilToInt(pic->cullRect().width()),
SkScalarCeilToInt(pic->cullRect().height()),
L.get(), gAccumulateFunc));
diff --git a/tools/pinspect.cpp b/tools/pinspect.cpp
index 1cbc2e1..57aaf1e 100644
--- a/tools/pinspect.cpp
+++ b/tools/pinspect.cpp
@@ -38,7 +38,7 @@
SkDebugf("Could not create SkPicture: %s\n", path);
return nullptr;
}
- printf("picture cullRect: [%f %f %f %f]\n",
+ printf("picture cullRect: [%f %f %f %f]\n",
pic->cullRect().fLeft, pic->cullRect().fTop,
pic->cullRect().fRight, pic->cullRect().fBottom);
return pic;
diff --git a/tools/sk_tool_utils.cpp b/tools/sk_tool_utils.cpp
index 10e5c30..f46ebb6 100644
--- a/tools/sk_tool_utils.cpp
+++ b/tools/sk_tool_utils.cpp
@@ -91,7 +91,7 @@
const char* emoji_sample_text() {
if (!strcmp(sk_tool_utils::platform_os_emoji(), "CBDT")) {
return "Hamburgefons";
- }
+ }
if (!strcmp(sk_tool_utils::platform_os_emoji(), "SBIX")) {
return "\xF0\x9F\x92\xB0" "\xF0\x9F\x8F\xA1" "\xF0\x9F\x8E\x85" // 💰🏡🎅
"\xF0\x9F\x8D\xAA" "\xF0\x9F\x8D\x95" "\xF0\x9F\x9A\x80" // 🍪🍕🚀
@@ -167,7 +167,7 @@
SkTypeface* face = create_font(name, style);
SkSafeUnref(paint->setTypeface(face));
}
-
+
void write_pixels(SkCanvas* canvas, const SkBitmap& bitmap, int x, int y,
SkColorType colorType, SkAlphaType alphaType) {
SkBitmap tmp(bitmap);
@@ -256,7 +256,7 @@
for (int x = dst.fLeft; x < dst.fRight; ++x) {
norm.fX = (x + 0.5f - center.fX) / halfSize.fX;
norm.fY = (y + 0.5f - center.fY) / halfSize.fY;
-
+
SkScalar tmp = norm.fX * norm.fX + norm.fY * norm.fY;
if (tmp >= 1.0f) {
norm.set(0.0f, 0.0f, 1.0f);
@@ -295,13 +295,13 @@
norm = locX >= locY ? right : down; // LR corner
} else {
norm = locX > -locY ? right : up; // UR corner
- }
+ }
} else {
if (locY > 0.0f) {
norm = -locX > locY ? left : down; // LL corner
} else {
norm = locX > locY ? up : left; // UL corner
- }
+ }
}
}
@@ -331,13 +331,13 @@
norm = locX >= locY ? rightUp : down; // LR corner
} else {
norm = rightUp;
- }
+ }
} else {
if (locY > 0.0f) {
norm = -locX > locY ? leftUp : down; // LL corner
} else {
norm = leftUp;
- }
+ }
}
norm_to_rgb(bm, x, y, norm);
@@ -439,7 +439,7 @@
*dst.getAddr32(x, y) = blur_pixel(src, x, y, kernel.get(), wh);
}
}
-
+
return dst;
}
diff --git a/tools/sk_tool_utils.h b/tools/sk_tool_utils.h
index 1e67afb..1d80731 100644
--- a/tools/sk_tool_utils.h
+++ b/tools/sk_tool_utils.h
@@ -167,13 +167,13 @@
static void SetTempMark(TopoTestNode* node) { node->fTempMark = true; }
static void ResetTempMark(TopoTestNode* node) { node->fTempMark = false; }
static bool IsTempMarked(TopoTestNode* node) { return node->fTempMark; }
- static void Output(TopoTestNode* node, int outputPos) {
+ static void Output(TopoTestNode* node, int outputPos) {
SkASSERT(-1 != outputPos);
- node->fOutputPos = outputPos;
+ node->fOutputPos = outputPos;
}
static bool WasOutput(TopoTestNode* node) { return (-1 != node->fOutputPos); }
static int NumDependencies(TopoTestNode* node) { return node->fDependencies.count(); }
- static TopoTestNode* Dependency(TopoTestNode* node, int index) {
+ static TopoTestNode* Dependency(TopoTestNode* node, int index) {
return node->fDependencies[index];
}
diff --git a/tools/skiaserve/Request.cpp b/tools/skiaserve/Request.cpp
index 47b467c..1d946ab 100644
--- a/tools/skiaserve/Request.cpp
+++ b/tools/skiaserve/Request.cpp
@@ -55,7 +55,7 @@
// write to png
SkDynamicMemoryWStream buffer;
- SkDrawCommand::WritePNG((const png_bytep) bmp->getPixels(), bmp->width(), bmp->height(),
+ SkDrawCommand::WritePNG((const png_bytep) bmp->getPixels(), bmp->width(), bmp->height(),
buffer);
return buffer.copyToData();
}
@@ -155,7 +155,7 @@
return surface;
}
-bool Request::enableGPU(bool enable) {
+bool Request::enableGPU(bool enable) {
if (enable) {
SkSurface* surface = this->createGPUSurface();
if (surface) {
@@ -175,7 +175,7 @@
fSurface.reset(this->createCPUSurface());
fGPUEnabled = false;
return true;
-}
+}
bool Request::initPictureFromStream(SkStream* stream) {
// parse picture from stream
@@ -254,4 +254,3 @@
bitmap->unlockPixels();
return result;
}
-
diff --git a/tools/skiaserve/Request.h b/tools/skiaserve/Request.h
index eecfe33..e3bc373 100644
--- a/tools/skiaserve/Request.h
+++ b/tools/skiaserve/Request.h
@@ -59,7 +59,7 @@
UploadContext* fUploadContext;
SkAutoTUnref<SkDebugCanvas> fDebugCanvas;
UrlDataManager fUrlDataManager;
-
+
private:
SkData* writeCanvasToPng(SkCanvas* canvas);
void drawToCanvas(int n, int m = -1);
@@ -67,7 +67,7 @@
SkSurface* createGPUSurface();
SkIRect getBounds();
GrContext* getContext();
-
+
sk_sp<SkPicture> fPicture;
GrContextFactory* fContextFactory;
SkAutoTUnref<SkSurface> fSurface;
@@ -75,4 +75,3 @@
};
#endif
-
diff --git a/tools/skiaserve/skiaserve.cpp b/tools/skiaserve/skiaserve.cpp
index 164f595..fd96251 100644
--- a/tools/skiaserve/skiaserve.cpp
+++ b/tools/skiaserve/skiaserve.cpp
@@ -86,7 +86,7 @@
address.sin_port = htons(FLAGS_port);
int result = inet_pton(AF_INET, FLAGS_address[0], &address.sin_addr);
if (result != 1) {
- printf("inet_pton for %s:%d failed with return %d %s\n",
+ printf("inet_pton for %s:%d failed with return %d %s\n",
FLAGS_address[0], FLAGS_port, result, strerror(errno));
return 1;
}
@@ -97,7 +97,7 @@
daemon = MHD_start_daemon(MHD_USE_SELECT_INTERNALLY
#ifdef SK_DEBUG
| MHD_USE_DEBUG
-#endif
+#endif
, FLAGS_port, nullptr, nullptr,
&answer_to_connection, &request,
MHD_OPTION_SOCK_ADDR, &address,
diff --git a/tools/skiaserve/urlhandlers/BatchBoundsHandler.cpp b/tools/skiaserve/urlhandlers/BatchBoundsHandler.cpp
index 4044986..b14db19 100644
--- a/tools/skiaserve/urlhandlers/BatchBoundsHandler.cpp
+++ b/tools/skiaserve/urlhandlers/BatchBoundsHandler.cpp
@@ -35,4 +35,3 @@
request->fDebugCanvas->setDrawGpuBatchBounds(enabled);
return SendOK(connection);
}
-
diff --git a/tools/skiaserve/urlhandlers/BatchesHandler.cpp b/tools/skiaserve/urlhandlers/BatchesHandler.cpp
index 221c539..b245c4d 100644
--- a/tools/skiaserve/urlhandlers/BatchesHandler.cpp
+++ b/tools/skiaserve/urlhandlers/BatchesHandler.cpp
@@ -31,11 +31,10 @@
// /batches
if (0 == strcmp(method, MHD_HTTP_METHOD_GET)) {
int n = request->getLastOp();
-
+
SkAutoTUnref<SkData> data(request->getJsonBatchList(n));
return SendData(connection, data, "application/json");
}
return MHD_NO;
}
-
diff --git a/tools/skiaserve/urlhandlers/BreakHandler.cpp b/tools/skiaserve/urlhandlers/BreakHandler.cpp
index b701955..16bf507 100644
--- a/tools/skiaserve/urlhandlers/BreakHandler.cpp
+++ b/tools/skiaserve/urlhandlers/BreakHandler.cpp
@@ -83,4 +83,3 @@
SkAutoTUnref<SkData> data(stream.copyToData());
return SendData(connection, data, "application/json");
}
-
diff --git a/tools/skiaserve/urlhandlers/ClipAlphaHandler.cpp b/tools/skiaserve/urlhandlers/ClipAlphaHandler.cpp
index 4ab5096..a931f93 100644
--- a/tools/skiaserve/urlhandlers/ClipAlphaHandler.cpp
+++ b/tools/skiaserve/urlhandlers/ClipAlphaHandler.cpp
@@ -35,4 +35,3 @@
request->fDebugCanvas->setClipVizColor(SkColorSetARGB(alpha, 0, 0, 0));
return SendOK(connection);
}
-
diff --git a/tools/skiaserve/urlhandlers/CmdHandler.cpp b/tools/skiaserve/urlhandlers/CmdHandler.cpp
index 1699bcb..09fdc17 100644
--- a/tools/skiaserve/urlhandlers/CmdHandler.cpp
+++ b/tools/skiaserve/urlhandlers/CmdHandler.cpp
@@ -36,7 +36,7 @@
} else {
sscanf(commands[1].c_str(), "%d", &n);
}
-
+
SkAutoTUnref<SkData> data(request->getJsonOps(n));
return SendData(connection, data, "application/json");
}
@@ -60,4 +60,3 @@
return MHD_NO;
}
-
diff --git a/tools/skiaserve/urlhandlers/DataHandler.cpp b/tools/skiaserve/urlhandlers/DataHandler.cpp
index 0c94530..397be8f 100644
--- a/tools/skiaserve/urlhandlers/DataHandler.cpp
+++ b/tools/skiaserve/urlhandlers/DataHandler.cpp
@@ -37,4 +37,3 @@
}
return MHD_NO;
}
-
diff --git a/tools/skiaserve/urlhandlers/DownloadHandler.cpp b/tools/skiaserve/urlhandlers/DownloadHandler.cpp
index fd9308d..4e23915 100644
--- a/tools/skiaserve/urlhandlers/DownloadHandler.cpp
+++ b/tools/skiaserve/urlhandlers/DownloadHandler.cpp
@@ -31,4 +31,3 @@
return SendData(connection, data, "application/octet-stream", true,
"attachment; filename=something.skp;");
}
-
diff --git a/tools/skiaserve/urlhandlers/EnableGPUHandler.cpp b/tools/skiaserve/urlhandlers/EnableGPUHandler.cpp
index b5d0c7a..68eb86f 100644
--- a/tools/skiaserve/urlhandlers/EnableGPUHandler.cpp
+++ b/tools/skiaserve/urlhandlers/EnableGPUHandler.cpp
@@ -38,4 +38,3 @@
}
return SendOK(connection);
}
-
diff --git a/tools/skiaserve/urlhandlers/ImgHandler.cpp b/tools/skiaserve/urlhandlers/ImgHandler.cpp
index a0e58bc..91ea6d0 100644
--- a/tools/skiaserve/urlhandlers/ImgHandler.cpp
+++ b/tools/skiaserve/urlhandlers/ImgHandler.cpp
@@ -43,4 +43,3 @@
SkAutoTUnref<SkData> data(request->drawToPng(n, m));
return SendData(connection, data, "image/png");
}
-
diff --git a/tools/skiaserve/urlhandlers/InfoHandler.cpp b/tools/skiaserve/urlhandlers/InfoHandler.cpp
index 65bbeb9..464bbb3 100644
--- a/tools/skiaserve/urlhandlers/InfoHandler.cpp
+++ b/tools/skiaserve/urlhandlers/InfoHandler.cpp
@@ -40,4 +40,3 @@
SkAutoTUnref<SkData> data(request->getJsonInfo(n));
return SendData(connection, data, "application/json");
}
-
diff --git a/tools/skiaserve/urlhandlers/PostHandler.cpp b/tools/skiaserve/urlhandlers/PostHandler.cpp
index ce59920..34beefa 100644
--- a/tools/skiaserve/urlhandlers/PostHandler.cpp
+++ b/tools/skiaserve/urlhandlers/PostHandler.cpp
@@ -66,11 +66,10 @@
fprintf(stderr, "Could not create picture from stream.\n");
return MHD_NO;
}
-
+
// clear upload context
delete request->fUploadContext;
request->fUploadContext = nullptr;
return SendTemplate(connection, true, "/");
}
-
diff --git a/tools/skiaserve/urlhandlers/RootHandler.cpp b/tools/skiaserve/urlhandlers/RootHandler.cpp
index 03b87f3..647c198 100644
--- a/tools/skiaserve/urlhandlers/RootHandler.cpp
+++ b/tools/skiaserve/urlhandlers/RootHandler.cpp
@@ -23,4 +23,3 @@
const char* upload_data, size_t* upload_data_size) {
return SendTemplate(connection);
}
-
diff --git a/tools/skiaserve/urlhandlers/UrlHandler.h b/tools/skiaserve/urlhandlers/UrlHandler.h
index 4fa9731..02a07b0 100644
--- a/tools/skiaserve/urlhandlers/UrlHandler.h
+++ b/tools/skiaserve/urlhandlers/UrlHandler.h
@@ -56,7 +56,7 @@
};
/**
- Controls whether GPU rendering is enabled. Posting to /enableGPU/1 turns GPU on, /enableGPU/0
+ Controls whether GPU rendering is enabled. Posting to /enableGPU/1 turns GPU on, /enableGPU/0
disables it.
*/
class EnableGPUHandler : public UrlHandler {
@@ -128,4 +128,3 @@
const char* url, const char* method,
const char* upload_data, size_t* upload_data_size) override;
};
-
diff --git a/tools/skpmaker.cpp b/tools/skpmaker.cpp
index 99e6adf..e7418ad 100644
--- a/tools/skpmaker.cpp
+++ b/tools/skpmaker.cpp
@@ -77,9 +77,9 @@
}
SkColor color = SkColorSetRGB(FLAGS_red, FLAGS_green, FLAGS_blue);
- make_skp(SkIntToScalar(FLAGS_width),
- SkIntToScalar(FLAGS_height),
- SkIntToScalar(FLAGS_border),
+ make_skp(SkIntToScalar(FLAGS_width),
+ SkIntToScalar(FLAGS_height),
+ SkIntToScalar(FLAGS_border),
color, FLAGS_writePath[0]);
return 0;
}
diff --git a/tools/test_font_monospace.cpp b/tools/test_font_monospace.cpp
index 64639be..4b14dc6 100644
--- a/tools/test_font_monospace.cpp
+++ b/tools/test_font_monospace.cpp
@@ -4845,4 +4845,3 @@
0x30307833, -0.83252f, -0.83252f, 0.300293f, 0.300293f, 0, 0.791992f, 0.0123749f,
-0.0942383f, 0.697754f, 0.538086f, 0.0104446f, 0.100098f, 0.23291f
};
-
diff --git a/tools/test_font_sans_serif.cpp b/tools/test_font_sans_serif.cpp
index 859375e..b0d433d 100644
--- a/tools/test_font_sans_serif.cpp
+++ b/tools/test_font_sans_serif.cpp
@@ -4855,4 +4855,3 @@
0x30307833, -1.02979f, -0.905273f, 0.211914f, 0.303223f, 0.0327148f, 1.3374f, 0.0208969f,
-0.208984f, 1.12842f, 0.537598f, 0.0109024f, 0.10498f, 0.105957f
};
-
diff --git a/tools/test_font_serif.cpp b/tools/test_font_serif.cpp
index 14a5433..49279ce 100644
--- a/tools/test_font_serif.cpp
+++ b/tools/test_font_serif.cpp
@@ -5147,4 +5147,3 @@
0x30307833, -0.980957f, -0.891113f, 0.216309f, 0.303223f, 0.0424805f, 1.32861f, 0.0207596f,
-0.178223f, 1.15039f, 0.469727f, 0.0103607f, 0.0952148f, 0.108887f
};
-