Fix trickycubicstrokes and widebuttcaps bg colors on GpuTess

Setting the max tessellation segments to 5 for GpuTess caused some of
these backgrounds to incorrectly show up as red.

Change-Id: Ie6b7b44e5500e1dd23df2e7f6b3783bcabcc614d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/412556
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
This commit is contained in:
Chris Dalton 2021-05-25 23:49:39 -06:00 committed by Skia Commit-Bot
parent ace17c2f46
commit b0355a7643
2 changed files with 6 additions and 6 deletions

View File

@ -104,9 +104,9 @@ static void draw_test(SkCanvas* canvas, SkPaint::Cap cap, SkPaint::Join join) {
if (canvas->recordingContext() &&
canvas->recordingContext()->priv().caps()->shaderCaps()->tessellationSupport() &&
canvas->recordingContext()->priv().caps()->shaderCaps()->maxTessellationSegments() < 64) {
// There are fewer tessellation segments than the spec minimum. It must have been overriden
// for testing. Indicate this in the background color.
canvas->recordingContext()->priv().caps()->shaderCaps()->maxTessellationSegments() == 5) {
// The caller successfully overrode the max tessellation segments to 5. Indicate this in the
// background color.
canvas->clear(SkColorSetARGB(255, 64, 0, 0));
} else {
canvas->clear(SK_ColorBLACK);

View File

@ -51,9 +51,9 @@ static void draw_test(SkCanvas* canvas) {
if (canvas->recordingContext() &&
canvas->recordingContext()->priv().caps()->shaderCaps()->tessellationSupport() &&
canvas->recordingContext()->priv().caps()->shaderCaps()->maxTessellationSegments() < 64) {
// There are fewer tessellation segments than the spec minimum. It must have been overriden
// for testing. Indicate this in the background color.
canvas->recordingContext()->priv().caps()->shaderCaps()->maxTessellationSegments() == 5) {
// The caller successfully overrode the max tessellation segments to 5. Indicate this in the
// background color.
canvas->clear(SkColorSetARGB(255, 64, 0, 0));
} else {
canvas->clear(SK_ColorBLACK);