Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
crbug_847759.cpp
Go to the documentation of this file.
1/*
2 * Copyright 2018 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8#include "gm/gm.h"
12
13DEF_SIMPLE_GM(crbug_847759, canvas, 500, 500) {
14 // This path exposed an issue in AAHairlinePathRenderer. When converting from cubics to quads
15 // we produced quads where the previously vertical tangents at the left and right tips of the
16 // squashed oval-like path became slightly non-vertical. This caused a missed pixel of AA just
17 // outside each tip.
18 SkPathBuilder path;
19 path.moveTo(97,374.5f);
20 path.cubicTo(97,359.8644528f,155.8745488f,348,228.5f,348);
21 path.cubicTo(301.1254512f,348,360,359.8644528f,360,374.5f);
22 path.cubicTo(360,389.1355472f,301.1254512f,401,228.5f,401);
23 path.cubicTo(155.8745488f,401,97,389.1355472f,97,374.5f);
24 path.close();
26 paint.setAntiAlias(true);
27 paint.setStrokeWidth(0);
28 paint.setStrokeMiter(1.5);
30 canvas->translate(-80, -330);
31 canvas->drawPath(path.detach(), paint);
32}
@ kStroke_Style
set to stroke geometry
Definition SkPaint.h:194
const Paint & paint
#define DEF_SIMPLE_GM(NAME, CANVAS, W, H)
Definition gm.h:50