aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm
diff options
context:
space:
mode:
Diffstat (limited to 'gm')
-rw-r--r--gm/cgm.c12
-rw-r--r--gm/dashing.cpp2
-rw-r--r--gm/hardstop_gradients.cpp4
-rw-r--r--gm/reveal.cpp12
-rw-r--r--gm/skbug_5321.cpp4
5 files changed, 17 insertions, 17 deletions
diff --git a/gm/cgm.c b/gm/cgm.c
index 5e57225b64..bbd170b9d3 100644
--- a/gm/cgm.c
+++ b/gm/cgm.c
@@ -29,21 +29,21 @@ static sk_shader_t* make_shader() {
static void do_draw(sk_canvas_t* canvas) {
sk_paint_t* paint = sk_paint_new();
sk_paint_set_antialias(paint, true);
-
+
sk_paint_set_color(paint, 0xFFFFFFFF);
sk_canvas_draw_paint(canvas, paint);
-
+
sk_rect_t r = { 10, 10, W - 10, H - 10 };
-
+
sk_paint_set_color(paint, 0xFFFF0000);
sk_canvas_draw_rect(canvas, &r, paint);
-
+
sk_shader_t* shader = make_shader();
sk_paint_set_shader(paint, shader);
sk_shader_unref(shader);
-
+
sk_canvas_draw_oval(canvas, &r, paint);
-
+
sk_paint_delete(paint);
}
diff --git a/gm/dashing.cpp b/gm/dashing.cpp
index 68fe7f168f..a46d31f471 100644
--- a/gm/dashing.cpp
+++ b/gm/dashing.cpp
@@ -512,7 +512,7 @@ DEF_SIMPLE_GM(longpathdash, canvas, 612, 612) {
p.setStrokeWidth(1);
const SkScalar intervals[] = { 1, 1 };
p.setPathEffect(SkDashPathEffect::Make(intervals, SK_ARRAY_COUNT(intervals), 0));
-
+
canvas->translate(50, 50);
canvas->drawPath(lines, p);
}
diff --git a/gm/hardstop_gradients.cpp b/gm/hardstop_gradients.cpp
index 2ab2ed9c89..84b7ab8aab 100644
--- a/gm/hardstop_gradients.cpp
+++ b/gm/hardstop_gradients.cpp
@@ -58,7 +58,7 @@ const int RECT_HEIGHT = CELL_HEIGHT - (2 * PAD_HEIGHT);
static void shade_rect(SkCanvas* canvas, sk_sp<SkShader> shader, int cellRow, int cellCol) {
SkPaint paint;
paint.setShader(shader);
-
+
SkRect rect = SkRect::MakeXYWH(SkIntToScalar(cellCol * CELL_WIDTH + PAD_WIDTH),
SkIntToScalar(cellRow * CELL_HEIGHT + PAD_HEIGHT),
SkIntToScalar(RECT_WIDTH),
@@ -154,7 +154,7 @@ protected:
shade_rect(canvas, shader, cellRow, cellCol);
}
- }
+ }
}
private:
diff --git a/gm/reveal.cpp b/gm/reveal.cpp
index a793b2da54..eb08a3f8a8 100644
--- a/gm/reveal.cpp
+++ b/gm/reveal.cpp
@@ -28,7 +28,7 @@ constexpr int kClipOffset = 32;
class Object {
public:
virtual ~Object() {}
- // When it returns true, this call will have placed a device-space _circle, rect or
+ // When it returns true, this call will have placed a device-space _circle, rect or
// simple circular_ RRect in "rr"
virtual bool asDevSpaceRRect(const SkMatrix& ctm, SkRRect* rr) const = 0;
virtual SkPath asPath(SkScalar inset) const = 0;
@@ -173,7 +173,7 @@ public:
return true;
}
- SkPath asPath(SkScalar inset) const override {
+ SkPath asPath(SkScalar inset) const override {
SkRRect tmp = fRRect;
tmp.inset(inset, inset);
@@ -221,7 +221,7 @@ public:
return true;
}
- SkPath asPath(SkScalar inset) const override {
+ SkPath asPath(SkScalar inset) const override {
SkRect tmp = fRect;
tmp.inset(inset, inset);
@@ -382,7 +382,7 @@ protected:
std::unique_ptr<Object> clipObj((*clipMakes[x])(clipRect));
std::unique_ptr<Object> drawObj((*drawMakes[y])(cell));
- // The goal is to replace this clipped draw (which clips the
+ // The goal is to replace this clipped draw (which clips the
// shadow) with a draw using the geometric clip
if (kBlurMask_Mode == fMode) {
SkPath clippedPath;
@@ -488,8 +488,8 @@ protected:
case 'G':
fCoverageGeom = (CoverageGeom) ((fCoverageGeom+1) % kCoverageGeomCount);
return true;
- }
-
+ }
+
return false;
}
diff --git a/gm/skbug_5321.cpp b/gm/skbug_5321.cpp
index 0e39a685b2..740c4f4b24 100644
--- a/gm/skbug_5321.cpp
+++ b/gm/skbug_5321.cpp
@@ -13,13 +13,13 @@ DEF_SIMPLE_GM(skbug_5321, canvas, 128, 128) {
SkPaint paint;
paint.setStyle(SkPaint::kFill_Style);
paint.setTextSize(30);
-
+
paint.setTextEncoding(SkPaint::kUTF8_TextEncoding);
const char text[] = "x\314\200y"; // utf8(u"x\u0300y")
SkScalar x = 20, y = 45;
size_t byteLength = strlen(text);
canvas->drawText(text, byteLength, x, y, paint);
-
+
int glyph_count = paint.countText(text, byteLength);
SkAutoTMalloc<SkScalar> widths(glyph_count);
(void)paint.getTextWidths(text, byteLength, &widths[0]);