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:
parent
ace17c2f46
commit
b0355a7643
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user