43e3e91883
This reverts commit 4b25d41d96
.
Reason for revert: grrrr, broke some layout test (a little)
https://test-results.appspot.com/data/layout_results/linux-blink-rel/40609/blink_web_tests%20%28with%20patch%29/layout-test-results/results.html
Original change's description:
> use pathbuilder
>
> Change-Id: I4b7cd6aed0c8da44e6065bb171332e25988ec8cc
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/313376
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
TBR=reed@google.com
Change-Id: I7a073aafcfddc398ab9a761719230f2427c987c6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/313420
Reviewed-by: Mike Reed <reed@google.com>
28 lines
872 B
C++
28 lines
872 B
C++
/*
|
|
* Copyright 2019 Google LLC.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
#include "gm/gm.h"
|
|
#include "include/core/SkCanvas.h"
|
|
#include "include/core/SkPath.h"
|
|
|
|
// Repro case for http://skbug.com/9453
|
|
DEF_SIMPLE_GM(inverseclip, canvas, 400, 400) {
|
|
SkPath clip;
|
|
clip.setFillType(SkPathFillType::kInverseWinding);
|
|
clip.moveTo(195.448f, 31);
|
|
clip.cubicTo(97.9925f, 31, 18.99f, 105.23f, 18.99f, 196.797f);
|
|
clip.cubicTo(18.99f, 288.365f, 97.9925f, 362.595f, 195.448f, 362.595f);
|
|
clip.cubicTo(292.905f, 362.595f, 371.905f, 288.365f, 371.905f, 196.797f);
|
|
clip.cubicTo(371.905f, 105.23f, 292.905f, 31, 195.448f, 31);
|
|
clip.close();
|
|
canvas->clipPath(clip, true);
|
|
|
|
SkPaint paint;
|
|
paint.setColor(SK_ColorBLUE);
|
|
canvas->drawRect(SkRect::MakeWH(400, 400), paint);
|
|
}
|