Hal Canary | 6c8422c | 2020-01-10 15:22:09 -0500 | [diff] [blame] | 1 | // Copyright 2020 Google LLC. |
| 2 | // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. |
| 3 | #include "tools/fiddle/examples.h" |
| 4 | REG_FIDDLE(gpuconicbug, 300, 200, false, 0) { |
| 5 | void draw(SkCanvas* canvas) { |
| 6 | SkPath path; |
| 7 | path.moveTo(SkBits2Float(0x43507c37), SkBits2Float(0x4278037b)); // 208.485f, 62.0034f |
| 8 | path.lineTo(SkBits2Float(0x434fdd66), SkBits2Float(0x41701eb0)); // 207.865f, 15.0075f |
| 9 | path.lineTo(SkBits2Float(0x434fdd67), SkBits2Float(0x41701eb0)); // 207.865f, 15.0075f |
| 10 | path.conicTo( |
| 11 | SkBits2Float(0x4350260c), SkBits2Float(0x41700f50), SkBits2Float(0x43506eb3), |
| 12 | SkBits2Float(0x417007a8), |
| 13 | SkBits2Float(0x3f7fffa5)); // 208.149f, 15.0037f, 208.432f, 15.0019f, 0.999995f |
| 14 | path.lineTo(SkBits2Float(0x4350be1b), SkBits2Float(0x427800df)); // 208.743f, 62.0009f |
| 15 | path.lineTo(SkBits2Float(0x4350be1b), SkBits2Float(0x427800de)); // 208.743f, 62.0008f |
| 16 | path.conicTo( |
| 17 | SkBits2Float(0x43509d29), SkBits2Float(0x427801bc), SkBits2Float(0x43507c38), |
| 18 | SkBits2Float(0x42780379), |
| 19 | SkBits2Float(0x3f7fffa5)); // 208.614f, 62.0017f, 208.485f, 62.0034f, 0.999995f |
| 20 | path.lineTo(SkBits2Float(0x43507c37), SkBits2Float(0x4278037b)); // 208.485f, 62.0034f |
| 21 | path.close(); |
| 22 | |
| 23 | SkPaint paint; |
| 24 | paint.setAntiAlias(true); |
| 25 | canvas->drawPath(path, paint); |
| 26 | canvas->scale(.533333333333333f, .5333333333333f); |
| 27 | paint.setColor(SK_ColorRED); |
| 28 | canvas->drawPath(path, paint); |
| 29 | } |
| 30 | } // END FIDDLE |