diff --git a/gfx/wr/webrender/src/prim_store/gradient.rs b/gfx/wr/webrender/src/prim_store/gradient.rs index faf66e5dab3e..7249ef2e20f9 100644 --- a/gfx/wr/webrender/src/prim_store/gradient.rs +++ b/gfx/wr/webrender/src/prim_store/gradient.rs @@ -166,22 +166,25 @@ impl From for LinearGradientTemplate { // Fast path not supported on segmented (border-image) gradients. item.nine_patch.is_none(); - let mut prev_offset = None; // Convert the stops to more convenient representation // for the current gradient builder. + let mut prev_color = None; + let stops: Vec = item.stops.iter().map(|stop| { let color: ColorF = stop.color.into(); min_alpha = min_alpha.min(color.a); - // The fast path doesn't support hard color stops, yet. - // Since the length of the gradient is a fixed size (512 device pixels), if there - // is a hard stop you will see bilinear interpolation with this method, instead - // of an abrupt color change. - if prev_offset == Some(stop.offset) { - supports_caching = false; + if let Some(prev_color) = prev_color { + // The fast path doesn't support hard color stops, yet. + // Since the length of the gradient is a fixed size (512 device pixels), if there + // is a hard stop you will see bilinear interpolation with this method, instead + // of an abrupt color change. + if prev_color == color { + supports_caching = false; + } } - prev_offset = Some(stop.offset); + prev_color = Some(color); GradientStop { offset: stop.offset, diff --git a/gfx/wr/wrench/reftests/gradient/linear-hard-stop-ref.png b/gfx/wr/wrench/reftests/gradient/linear-hard-stop-ref.png deleted file mode 100644 index 6eb62e79d71a..000000000000 Binary files a/gfx/wr/wrench/reftests/gradient/linear-hard-stop-ref.png and /dev/null differ diff --git a/gfx/wr/wrench/reftests/gradient/linear-hard-stop.yaml b/gfx/wr/wrench/reftests/gradient/linear-hard-stop.yaml deleted file mode 100644 index b9249e7f2af4..000000000000 --- a/gfx/wr/wrench/reftests/gradient/linear-hard-stop.yaml +++ /dev/null @@ -1,8 +0,0 @@ ---- -root: - items: - - type: gradient - bounds: 50 50 200 200 - start: 0 0 - end: 0 100 - stops: [0.0, blue, 0.5 , red, 0.5, green] diff --git a/gfx/wr/wrench/reftests/gradient/reftest.list b/gfx/wr/wrench/reftests/gradient/reftest.list index f62836b2b294..1c4f6caeba4e 100644 --- a/gfx/wr/wrench/reftests/gradient/reftest.list +++ b/gfx/wr/wrench/reftests/gradient/reftest.list @@ -14,8 +14,6 @@ platform(linux,mac) fuzzy(1,35000) == linear-stops.yaml linear-stops-ref.png == linear-clamp-1b.yaml linear-clamp-1-ref.yaml == linear-clamp-2.yaml linear-clamp-2-ref.yaml -== linear-hard-stop.yaml linear-hard-stop-ref.png - # dithering requires us to fuzz here fuzzy(1,20000) == linear.yaml linear-ref.yaml fuzzy(1,20000) == linear-reverse.yaml linear-ref.yaml diff --git a/layout/reftests/css-gradients/reftest.list b/layout/reftests/css-gradients/reftest.list index bfbf9b4e266f..f14c865d6a0d 100644 --- a/layout/reftests/css-gradients/reftest.list +++ b/layout/reftests/css-gradients/reftest.list @@ -4,7 +4,8 @@ fuzzy-if(!contentSameGfxBackendAsCanvas,0-2,0-88500) fuzzy-if(azureSkiaGL,0-2,0- == linear-diagonal-2a.html linear-diagonal-2-ref.html == linear-diagonal-3a.html linear-diagonal-3-ref.html == linear-diagonal-4a.html linear-diagonal-4-ref.html -fuzzy-if(webrender, 0-1, 23000-43000) == linear-premul.html linear-premul-ref.html +== linear-premul.html linear-premul-ref.html + fuzzy(0-1,0-800000) == linear-flipped-1.html linear-flipped-1-ref.html == linear-position-1a.html linear-position-1-ref.html == linear-repeat-1a.html linear-repeat-1-ref.html diff --git a/testing/web-platform/meta/css/css-backgrounds/background-image-none-gradient-repaint.html.ini b/testing/web-platform/meta/css/css-backgrounds/background-image-none-gradient-repaint.html.ini new file mode 100644 index 000000000000..d2e96f2d3f6a --- /dev/null +++ b/testing/web-platform/meta/css/css-backgrounds/background-image-none-gradient-repaint.html.ini @@ -0,0 +1,3 @@ +[background-image-none-gradient-repaint.html] + expected: + if webrender and (os == "win"): FAIL diff --git a/testing/web-platform/meta/css/css-values/angle-units-001.html.ini b/testing/web-platform/meta/css/css-values/angle-units-001.html.ini new file mode 100644 index 000000000000..c3d629fe84e1 --- /dev/null +++ b/testing/web-platform/meta/css/css-values/angle-units-001.html.ini @@ -0,0 +1,3 @@ +[angle-units-001.html] + expected: + if (os == "win") and webrender: FAIL diff --git a/testing/web-platform/meta/css/css-values/angle-units-002.html.ini b/testing/web-platform/meta/css/css-values/angle-units-002.html.ini new file mode 100644 index 000000000000..82661101eb8f --- /dev/null +++ b/testing/web-platform/meta/css/css-values/angle-units-002.html.ini @@ -0,0 +1,3 @@ +[angle-units-002.html] + expected: + if (os == "win") and webrender: FAIL diff --git a/testing/web-platform/meta/css/css-values/angle-units-003.html.ini b/testing/web-platform/meta/css/css-values/angle-units-003.html.ini new file mode 100644 index 000000000000..e108fb429d3e --- /dev/null +++ b/testing/web-platform/meta/css/css-values/angle-units-003.html.ini @@ -0,0 +1,3 @@ +[angle-units-003.html] + expected: + if (os == "win") and webrender: FAIL diff --git a/testing/web-platform/meta/css/css-values/angle-units-005.html.ini b/testing/web-platform/meta/css/css-values/angle-units-005.html.ini new file mode 100644 index 000000000000..1cc6ef2b0caf --- /dev/null +++ b/testing/web-platform/meta/css/css-values/angle-units-005.html.ini @@ -0,0 +1,3 @@ +[angle-units-005.html] + expected: + if (os == "win") and webrender: FAIL