Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(262)

Unified Diff: gm/patch.cpp

Issue 1842753002: Style bikeshed - remove extraneous whitespace (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gm/ovals.cpp ('k') | gm/patchgrid.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/patch.cpp
diff --git a/gm/patch.cpp b/gm/patch.cpp
index 5b661f4b7c65e910150cadff8d0c43db30a48b89..d27c4e1a85fb18301603872850348cff5d98d27e 100644
--- a/gm/patch.cpp
+++ b/gm/patch.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2014 Google Inc.
*
@@ -16,7 +15,7 @@ static sk_sp<SkShader> make_shader() {
SK_ColorYELLOW,
};
const SkPoint pts[] = { { 100.f / 4.f, 0.f }, { 3.f * 100.f / 4.f, 100.f } };
-
+
return SkGradientShader::MakeLinear(pts, colors, nullptr, SK_ARRAY_COUNT(colors),
SkShader::kMirror_TileMode);
}
@@ -66,7 +65,7 @@ static void draw_control_points(SkCanvas* canvas, const SkPoint cubics[12]) {
DEF_SIMPLE_GM(patch_primitive, canvas, 800, 800) {
SkPaint paint;
-
+
// The order of the colors and points is clockwise starting at upper-left corner.
const SkPoint cubics[SkPatchUtils::kNumCtrlPts] = {
//top points
@@ -78,22 +77,22 @@ DEF_SIMPLE_GM(patch_primitive, canvas, 800, 800) {
//left points
{50,250},{150,150}
};
-
+
const SkColor colors[SkPatchUtils::kNumCorners] = {
SK_ColorRED, SK_ColorGREEN, SK_ColorBLUE, SK_ColorCYAN
};
const SkPoint texCoords[SkPatchUtils::kNumCorners] = {
{0.0f, 0.0f}, {100.0f, 0.0f}, {100.0f,100.0f}, {0.0f, 100.0f}}
;
-
+
const SkXfermode::Mode modes[] = {
SkXfermode::kSrc_Mode,
SkXfermode::kDst_Mode,
SkXfermode::kModulate_Mode,
};
-
+
sk_sp<SkShader> shader(make_shader());
-
+
canvas->save();
for (int y = 0; y < 3; y++) {
SkAutoTUnref<SkXfermode> xfer(SkXfermode::Create(modes[y]));
@@ -121,7 +120,7 @@ DEF_SIMPLE_GM(patch_primitive, canvas, 800, 800) {
default:
break;
}
-
+
draw_control_points(canvas, cubics);
canvas->restore();
}
« no previous file with comments | « gm/ovals.cpp ('k') | gm/patchgrid.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698