Bug 1652266 - implement Gaussian blur fast-path for SWGL. r=jrmuizel

Differential Revision: https://phabricator.services.mozilla.com/D95654
This commit is contained in:
Lee Salzman 2020-11-03 17:03:32 +00:00
parent eeae815abc
commit 17c5e8a4aa
17 changed files with 273 additions and 29 deletions

View File

@ -3010,6 +3010,13 @@ pub fn ast_to_hir(state: &mut State, tu: &syntax::TranslationUnit) -> Translatio
Type::new(Int),
],
);
declare_function(
state,
"ivec4",
Some("make_ivec4"),
Type::new(IVec4),
vec![Type::new(Vec4)],
);
declare_function(
state,
"ivec4",
@ -3720,6 +3727,22 @@ pub fn ast_to_hir(state: &mut State, tu: &syntax::TranslationUnit) -> Translatio
Type::new(Void),
vec![Type::new(*s), Type::new(Vec2), Type::new(Float), Type::new(Int)],
);
declare_function(
state,
"swgl_commitGaussianBlurRGBA8",
None,
Type::new(Void),
vec![Type::new(*s), Type::new(Vec2), Type::new(Vec4), Type::new(Bool),
Type::new(Int), Type::new(Vec2), Type::new(Int)],
);
declare_function(
state,
"swgl_commitGaussianBlurR8",
None,
Type::new(Void),
vec![Type::new(*s), Type::new(Vec2), Type::new(Vec4), Type::new(Bool),
Type::new(Int), Type::new(Vec2), Type::new(Int)],
);
}
TranslationUnit(tu.0.map(state, translate_external_declaration))

View File

@ -557,9 +557,8 @@ struct YUVConverter {};
// [G] = [1.1643835616438358, -0.3917622900949137, -0.8129676472377708 ] x [U - 128]
// [B] [1.1643835616438356, 2.017232142857143, 8.862867620416422e-17] [V - 128]
// clang-format on
static constexpr double YUVMatrix601[4] = {
1.5960267857142858, -0.3917622900949137, -0.8129676472377708,
2.017232142857143};
constexpr double YUVMatrix601[4] = {1.5960267857142858, -0.3917622900949137,
-0.8129676472377708, 2.017232142857143};
template <>
struct YUVConverter<REC_601> : YUVConverterImpl<YUVMatrix601> {};

View File

@ -536,6 +536,10 @@ vec2 step(vec2 edge, vec2 x) {
return vec2(step(edge.x, x.x), step(edge.y, x.y));
}
vec2_scalar step(vec2_scalar edge, vec2_scalar x) {
return vec2_scalar(step(edge.x, x.x), step(edge.y, x.y));
}
vec2 max(vec2 a, vec2 b) { return vec2(max(a.x, b.x), max(a.y, b.y)); }
vec2 max(vec2 a, Float b) { return vec2(max(a.x, b), max(a.y, b)); }
@ -1751,6 +1755,10 @@ vec4_scalar make_vec4(float x, float y, const vec2_scalar& v) {
return vec4_scalar{x, y, v.x, v.y};
}
ivec4_scalar make_ivec4(const vec4_scalar& v) {
return ivec4_scalar{int32_t(v.x), int32_t(v.y), int32_t(v.z), int32_t(v.w)};
}
template <typename N>
vec4 make_vec4(const N& n) {
return vec4(n);
@ -1810,6 +1818,13 @@ SI vec4 clamp(vec4 a, vec4 minVal, vec4 maxVal) {
return vec4(clamp(a.x, minVal.x, maxVal.x), clamp(a.y, minVal.y, maxVal.y),
clamp(a.z, minVal.z, maxVal.z), clamp(a.w, minVal.w, maxVal.w));
}
SI vec4_scalar clamp(vec4_scalar a, vec4_scalar minVal, vec4_scalar maxVal) {
return vec4_scalar{
clamp(a.x, minVal.x, maxVal.x), clamp(a.y, minVal.y, maxVal.y),
clamp(a.z, minVal.z, maxVal.z), clamp(a.w, minVal.w, maxVal.w)};
}
template <typename T>
auto lessThanEqual(T x, T y) -> decltype(x <= y) {
return x <= y;

View File

@ -182,6 +182,37 @@ static ALWAYS_INLINE T swgl_linearQuantizeStep(S s, T p) {
#define swgl_commitTextureLinearColorR8(s, p, color, ...) \
swgl_commitTextureLinearColor(R8, s, p, color, __VA_ARGS__)
// Commit an entire span of a separable pass of a Gaussian blur that falls
// within the given radius scaled by supplied coefficients, clamped to uv_rect
// bounds.
#define swgl_commitGaussianBlur(format, type, s, p, uv_rect, hori, radius, \
coeffs, ...) \
do { \
vec2_scalar size = {float(s->width), float(s->height)}; \
ivec2_scalar curUV = make_ivec2(force_scalar(p) * size); \
ivec4_scalar bounds = make_ivec4(uv_rect * make_vec4(size, size)); \
int endX = min(bounds.z, curUV.x + swgl_SpanLength * swgl_StepSize); \
if (hori) { \
for (; curUV.x + swgl_StepSize <= endX; curUV.x += swgl_StepSize) { \
swgl_commitChunk(format, gaussianBlurHorizontal<type>( \
s, curUV, bounds.x, bounds.z, radius, \
coeffs.x, coeffs.y, __VA_ARGS__)); \
} \
} else { \
for (; curUV.x + swgl_StepSize <= endX; curUV.x += swgl_StepSize) { \
swgl_commitChunk(format, gaussianBlurVertical<type>( \
s, curUV, bounds.y, bounds.w, radius, \
coeffs.x, coeffs.y, __VA_ARGS__)); \
} \
} \
} while (0)
#define swgl_commitGaussianBlurRGBA8(s, p, uv_rect, hori, radius, coeffs, ...) \
swgl_commitGaussianBlur(RGBA8, uint32_t, s, p, uv_rect, hori, radius, \
coeffs, __VA_ARGS__)
#define swgl_commitGaussianBlurR8(s, p, uv_rect, hori, radius, coeffs, ...) \
swgl_commitGaussianBlur(R8, uint8_t, s, p, uv_rect, hori, radius, coeffs, \
__VA_ARGS__)
// Dispatch helper used by the GLSL translator to swgl_drawSpan functions.
// The number of pixels committed is tracked by checking for the difference in
// swgl_SpanLength. Any varying interpolants used will be advanced past the

View File

@ -480,8 +480,9 @@ SI T linearQuantize(T P, float scale, S sampler) {
}
// Compute clamped offset of first row for linear interpolation
template <typename S>
SI I32 computeRow(S sampler, ivec2 i, int32_t zoffset, size_t margin = 1) {
template <typename S, typename I>
SI auto computeRow(S sampler, I i, int32_t zoffset, size_t margin = 1)
-> decltype(i.x) {
return clampCoord(i.x, sampler->width - margin) +
clampCoord(i.y, sampler->height) * sampler->stride + zoffset;
}
@ -1069,4 +1070,152 @@ static PackedRG8 textureLinearPackedRG8(S sampler, ivec2 i, int zoffset = 0) {
return pack(WideRG8(abcdl));
}
template <int N>
static ALWAYS_INLINE VectorType<uint16_t, N> addsat(VectorType<uint16_t, N> x,
VectorType<uint16_t, N> y) {
auto r = x + y;
return r | (r < x);
}
template <typename P, typename S>
static VectorType<uint8_t, 4 * sizeof(P)> gaussianBlurHorizontal(
S sampler, const ivec2_scalar& i, int minX, int maxX, int radius,
float coeff, float coeffStep, int zoffset = 0) {
// Packed and unpacked vectors for a chunk of the given pixel type.
typedef VectorType<uint8_t, 4 * sizeof(P)> packed_type;
typedef VectorType<uint16_t, 4 * sizeof(P)> unpacked_type;
// Pre-scale the coefficient by 8 bits of fractional precision, so that when
// the sample is multiplied by it, it will yield a 16 bit unsigned integer
// that will use all 16 bits of precision to accumulate the sum.
coeff *= 1 << 8;
float coeffStep2 = coeffStep * coeffStep;
int row = computeRow(sampler, i, zoffset);
P* buf = (P*)sampler->buf;
auto pixelsRight = unaligned_load<V4<P>>(&buf[row]);
auto pixelsLeft = pixelsRight;
auto sum = CONVERT(bit_cast<packed_type>(pixelsRight), unpacked_type) *
uint16_t(coeff + 0.5f);
// Here we use some trickery to reuse the pixels within a chunk, shifted over
// by one pixel, to get the next sample for the entire chunk. This allows us
// to sample only one pixel for each offset across the entire chunk in both
// the left and right directions. To avoid clamping within the loop to the
// texture bounds, we compute the valid radius that doesn't require clamping
// and fall back to a slower clamping loop outside of that valid radius.
int offset = 1;
int leftBound = i.x - max(minX, 0);
int rightBound = min(maxX, sampler->width) - (i.x + 4);
int validRadius = min(radius, min(leftBound, rightBound));
for (; offset <= validRadius; offset++) {
// Overwrite the pixel that needs to be shifted out with the new pixel, and
// shift it into the correct location.
pixelsRight.x = unaligned_load<P>(&buf[row + offset + 4 - 1]);
pixelsRight = pixelsRight.yzwx;
pixelsLeft = pixelsLeft.wxyz;
pixelsLeft.x = unaligned_load<P>(&buf[row - offset]);
// Accumulate the Gaussian coefficients step-wise.
coeff *= coeffStep;
coeffStep *= coeffStep2;
// Both left and right samples at this offset use the same coefficient.
sum = addsat(sum,
(CONVERT(bit_cast<packed_type>(pixelsRight), unpacked_type) +
CONVERT(bit_cast<packed_type>(pixelsLeft), unpacked_type)) *
uint16_t(coeff + 0.5f));
}
for (; offset <= radius; offset++) {
pixelsRight.x =
unaligned_load<P>(&buf[row + min(offset + 4 - 1, rightBound)]);
pixelsRight = pixelsRight.yzwx;
pixelsLeft = pixelsLeft.wxyz;
pixelsLeft.x = unaligned_load<P>(&buf[row - min(offset, leftBound)]);
coeff *= coeffStep;
coeffStep *= coeffStep2;
sum = addsat(sum,
(CONVERT(bit_cast<packed_type>(pixelsRight), unpacked_type) +
CONVERT(bit_cast<packed_type>(pixelsLeft), unpacked_type)) *
uint16_t(coeff + 0.5f));
}
// Shift away the intermediate precision.
return pack(sum >> 8);
}
template <typename P, typename S>
static VectorType<uint8_t, 4 * sizeof(P)> gaussianBlurVertical(
S sampler, const ivec2_scalar& i, int minY, int maxY, int radius,
float coeff, float coeffStep, int zoffset = 0) {
// Packed and unpacked vectors for a chunk of the given pixel type.
typedef VectorType<uint8_t, 4 * sizeof(P)> packed_type;
typedef VectorType<uint16_t, 4 * sizeof(P)> unpacked_type;
// Pre-scale the coefficient by 8 bits of fractional precision, so that when
// the sample is multiplied by it, it will yield a 16 bit unsigned integer
// that will use all 16 bits of precision to accumulate the sum.
coeff *= 1 << 8;
float coeffStep2 = coeffStep * coeffStep;
int rowAbove = computeRow(sampler, i, zoffset);
int rowBelow = rowAbove;
P* buf = (P*)sampler->buf;
auto pixels = unaligned_load<V4<P>>(&buf[rowAbove]);
auto sum = CONVERT(bit_cast<packed_type>(pixels), unpacked_type) *
uint16_t(coeff + 0.5f);
// For the vertical loop we can't be quite as creative with reusing old values
// as we were in the horizontal loop. We just do the obvious implementation of
// loading a chunk from each row in turn and accumulating it into the sum. We
// compute a valid radius within which we don't need to clamp the sampled row
// and use that to avoid any clamping in the main inner loop. We fall back to
// a slower clamping loop outside of that valid radius.
int offset = 1;
int belowBound = i.y - max(minY, 0);
int aboveBound = min(maxY, sampler->height) - (i.y + 1);
int validRadius = min(radius, min(belowBound, aboveBound));
for (; offset <= validRadius; offset++) {
rowAbove += sampler->stride;
rowBelow -= sampler->stride;
auto pixelsAbove = unaligned_load<V4<P>>(&buf[rowAbove]);
auto pixelsBelow = unaligned_load<V4<P>>(&buf[rowBelow]);
// Accumulate the Gaussian coefficients step-wise.
coeff *= coeffStep;
coeffStep *= coeffStep2;
// Both above and below samples at this offset use the same coefficient.
sum = addsat(sum,
(CONVERT(bit_cast<packed_type>(pixelsAbove), unpacked_type) +
CONVERT(bit_cast<packed_type>(pixelsBelow), unpacked_type)) *
uint16_t(coeff + 0.5f));
}
for (; offset <= radius; offset++) {
if (offset <= aboveBound) {
rowAbove += sampler->stride;
}
if (offset <= belowBound) {
rowBelow -= sampler->stride;
}
auto pixelsAbove = unaligned_load<V4<P>>(&buf[rowAbove]);
auto pixelsBelow = unaligned_load<V4<P>>(&buf[rowBelow]);
coeff *= coeffStep;
coeffStep *= coeffStep2;
sum = addsat(sum,
(CONVERT(bit_cast<packed_type>(pixelsAbove), unpacked_type) +
CONVERT(bit_cast<packed_type>(pixelsBelow), unpacked_type)) *
uint16_t(coeff + 0.5f));
}
// Shift away the intermediate precision.
return pack(sum >> 8);
}
} // namespace glsl

View File

@ -319,6 +319,8 @@ struct VectorType {
# define zwzw swizzle(2, 3, 2, 3)
# define zyxw swizzle(2, 1, 0, 3)
# define xyzz swizzle(0, 1, 2, 2)
# define yzwx swizzle(1, 2, 3, 0)
# define wxyz swizzle(3, 0, 1, 2)
# define xxxxyyyy XXXXYYYY()
VectorType<T, 8> XXXXYYYY() const {
return swizzle(0, 0, 0, 0).combine(swizzle(1, 1, 1, 1));

View File

@ -178,4 +178,29 @@ void main(void) {
oFragColor = vec4(avg_color);
}
#ifdef SWGL
#ifdef WR_FEATURE_COLOR_TARGET
void swgl_drawSpanRGBA8() {
if (!swgl_isTextureRGBA8(sPrevPassColor)) {
return;
}
int layer = swgl_textureLayerOffset(sPrevPassColor, vUvLayer);
swgl_commitGaussianBlurRGBA8(sPrevPassColor, vUv, vUvRect, vOffsetScale.x != 0.0,
vSupport, vGaussCoefficients, layer);
}
#else
void swgl_drawSpanR8() {
if (!swgl_isTextureR8(sPrevPassAlpha)) {
return;
}
int layer = swgl_textureLayerOffset(sPrevPassAlpha, vUvLayer);
swgl_commitGaussianBlurR8(sPrevPassAlpha, vUv, vUvRect, vOffsetScale.x != 0.0,
vSupport, vGaussCoefficients, layer);
}
#endif
#endif
#endif

View File

@ -5,7 +5,7 @@
platform(linux,mac) == inset-alpha.yaml inset-alpha.png
platform(linux,mac) == boxshadow-spread-only.yaml boxshadow-spread-only-ref.png
== box-shadow-clip.yaml box-shadow-clip-ref.yaml
fuzzy(1,402) == inset-large-offset.yaml inset-large-offset-ref.png
fuzzy(1,402) fuzzy-if(platform(swgl),2,1402) == inset-large-offset.yaml inset-large-offset-ref.png
platform(linux,mac) == inset-border-radius.yaml inset-border-radius.png
platform(linux,mac) == inset-offset.yaml inset-offset.png
platform(linux,mac) == inset-neg-offset.yaml inset-neg-offset.png
@ -23,7 +23,7 @@ platform(linux,mac) == inset-subpx.yaml inset-subpx.png
platform(linux,mac) fuzzy(1,4) == inset-downscale.yaml inset-downscale.png
platform(linux,mac) fuzzy(1,979) == box-shadow-cache.yaml box-shadow-cache.png
platform(linux,mac) fuzzy(1,685) == overlap1.yaml overlap1.png
fuzzy(2,757) == overlap2.yaml overlap2.png
fuzzy(2,757) fuzzy-if(platform(swgl),15,2456) == overlap2.yaml overlap2.png
platform(linux,mac) fuzzy(1,48) == no-stretch.yaml no-stretch.png
platform(linux,mac) fuzzy(1,9) == box-shadow-stretch-mode-x.yaml box-shadow-stretch-mode-x.png
platform(linux,mac) fuzzy(1,41) == box-shadow-stretch-mode-y.yaml box-shadow-stretch-mode-y.png

View File

@ -15,7 +15,7 @@ skip_on(android,device) == filter-color-matrix.yaml filter-color-matrix-ref.yaml
== filter-invert.yaml filter-invert-ref.yaml
== filter-invert-2.yaml filter-invert-2-ref.yaml
platform(linux,mac) fuzzy(1,133) == filter-large-blur-radius.yaml filter-large-blur-radius.png
skip_on(android,device) fuzzy(1,12) == draw_calls(6) color_targets(6) alpha_targets(0) filter-small-blur-radius.yaml filter-small-blur-radius.png # fails on Pixel2
skip_on(android,device) fuzzy(1,12) fuzzy-if(platform(swgl),2,12276) == draw_calls(6) color_targets(6) alpha_targets(0) filter-small-blur-radius.yaml filter-small-blur-radius.png # fails on Pixel2
== filter-saturate-red-1.yaml filter-saturate-red-1-ref.yaml
== filter-saturate-red-2.yaml filter-saturate-red-2-ref.yaml
== filter-saturate-red-3.yaml filter-saturate-red-3-ref.yaml
@ -30,7 +30,7 @@ skip_on(android,device) fuzzy(1,12) == draw_calls(6) color_targets(6) alpha_targ
== filter-saturate-blue-alpha-1.yaml filter-saturate-blue-alpha-1-ref.yaml
fuzzy(1,14) == filter-hue-rotate-1.yaml filter-hue-rotate-1-ref.yaml
skip_on(android,device) == filter-hue-rotate-alpha-1.yaml filter-hue-rotate-alpha-1-ref.yaml # Fails on Pixel2
skip_on(android,device) fuzzy(2,9072) fuzzy-if(platform(swgl),5,71071) == filter-long-chain.yaml filter-long-chain.png # fails on Pixel2
skip_on(android,device) fuzzy(2,9072) fuzzy-if(platform(swgl),9,109897) == filter-long-chain.yaml filter-long-chain.png # fails on Pixel2
platform(linux,mac) == filter-drop-shadow.yaml filter-drop-shadow.png
platform(linux,mac) == filter-drop-shadow-on-viewport-edge.yaml filter-drop-shadow-on-viewport-edge.png
platform(linux,mac) == blend-clipped.yaml blend-clipped.png
@ -49,7 +49,7 @@ skip_on(android,device) == filter-mix-blend-mode.yaml filter-mix-blend-mode-ref.
fuzzy(3,79400) == filter-drop-shadow-blur-clamping.yaml filter-drop-shadow-blur-clamping-ref.yaml
== filter-blur-scaled.yaml filter-blur-scaled-ref.yaml
== filter-blur-clamping.yaml filter-blur-clamping-ref.yaml
skip_on(android,device) fuzzy(1,104) == filter-blur-scaled-xonly.yaml filter-blur-scaled-xonly.png # fails on Pixel2
skip_on(android,device) fuzzy(1,104) fuzzy-if(platform(swgl),4,18484) == filter-blur-scaled-xonly.yaml filter-blur-scaled-xonly.png # fails on Pixel2
== svg-filter-component-transfer.yaml filter-component-transfer-ref.yaml
== svg-filter-flood.yaml svg-filter-flood-ref.yaml
skip_on(android,device) == svg-filter-blend.yaml svg-filter-blend-ref.yaml

View File

@ -14,13 +14,13 @@ fuzzy(1,1) == shadow-huge.yaml shadow-huge-ref.yaml
!= shadow-clipped-text.yaml blank.yaml
!= non-opaque.yaml non-opaque-notref.yaml
== decorations.yaml decorations-ref.yaml
skip_on(android,device) fuzzy(1,3001) fuzzy-if(platform(swgl),2,2658) == decorations-suite.yaml decorations-suite.png # Fails on Pixel2
skip_on(android,device) fuzzy(1,3001) fuzzy-if(platform(swgl),3,13867) == decorations-suite.yaml decorations-suite.png # Fails on Pixel2
== 1658.yaml 1658-ref.yaml
fuzzy(1,6) fuzzy-if(platform(swgl),1,391) == split-batch.yaml split-batch-ref.yaml
# Next 3 tests affected by bug 1548099 on Android
skip_on(android) == shadow-red.yaml shadow-red-ref.yaml
skip_on(android) fuzzy(1,999) fuzzy-if(platform(swgl),2,914) == shadow-grey.yaml shadow-grey-ref.yaml
skip_on(android) fuzzy(1,828) == shadow-grey-transparent.yaml shadow-grey-ref.yaml
skip_on(android) fuzzy(1,999) fuzzy-if(platform(swgl),2,1081) == shadow-grey.yaml shadow-grey-ref.yaml
skip_on(android) fuzzy(1,828) fuzzy-if(platform(swgl),1,1249) == shadow-grey-transparent.yaml shadow-grey-ref.yaml
== subtle-shadow.yaml subtle-shadow-ref.yaml
fuzzy(1,64) == shadow-atomic.yaml shadow-atomic-ref.yaml
fuzzy(1,64) == shadow-clip-rect.yaml shadow-atomic-ref.yaml

View File

@ -11,7 +11,7 @@ random != boxshadow-blur-2.html boxshadow-blur-2-notref.html # fixedpoint divisi
== boxshadow-rounding.html boxshadow-rounding-ref.html
# One uses old path, one uses WR box shadow.
== boxshadow-button.html boxshadow-button-ref.html
fuzzy-if(OSX==1010,0-1,0-24) fuzzy-if(d2d,0-16,0-999) fuzzy-if(skiaContent,0-14,0-179) == boxshadow-large-border-radius.html boxshadow-large-border-radius-ref.html # Bug 1209649
fuzzy-if(OSX==1010,0-1,0-24) fuzzy-if(d2d,0-16,0-999) fuzzy-if(skiaContent,0-14,0-179) fuzzy-if(webrender&&swgl,1-1,714-714) == boxshadow-large-border-radius.html boxshadow-large-border-radius-ref.html # Bug 1209649
== boxshadow-fileupload.html boxshadow-fileupload-ref.html
fuzzy-if(/^Windows\x20NT\x2010\.0/.test(http.oscpu),0-98,0-152) fuzzy-if(skiaContent,0-13,0-28) fuzzy-if(webrender,19-19,47-47) == boxshadow-inner-basic.html boxshadow-inner-basic-ref.svg
@ -26,14 +26,14 @@ fuzzy(0-2,0-440) == boxshadow-skiprect.html boxshadow-skiprect-ref.html
== boxshadow-opacity.html boxshadow-opacity-ref.html
== boxshadow-color-rounding.html boxshadow-color-rounding-ref.html
== boxshadow-color-rounding-middle.html boxshadow-color-rounding-middle-ref.html
fuzzy(0-3,0-500) fuzzy-if(d2d,0-2,0-1080) == boxshadow-border-radius-int.html boxshadow-border-radius-int-ref.html
fuzzy(0-3,0-500) fuzzy-if(d2d,0-2,0-1080) fuzzy-if(webrender&&swgl,1-1,1000-1000) == boxshadow-border-radius-int.html boxshadow-border-radius-int-ref.html
== boxshadow-inset-neg-spread.html about:blank
== boxshadow-inset-neg-spread2.html boxshadow-inset-neg-spread2-ref.html
fuzzy(0-26,0-3610) fuzzy-if(d2d,0-26,0-5910) fuzzy-if(webrender,4-6,4172-4350) == boxshadow-rotated.html boxshadow-rotated-ref.html # Bug 1211264
== boxshadow-inset-large-border-radius.html boxshadow-inset-large-border-radius-ref.html
# fuzzy due to blur going inside, but as long as it's essentially black instead of a light gray its ok.
fuzzy(0-13,0-9445) fuzzy-if(d2d,0-13,0-10926) fuzzy-if(webrender,14-15,11263-13267) == boxshadow-inset-large-offset.html boxshadow-inset-large-offset-ref.html
fuzzy(0-13,0-9445) fuzzy-if(d2d,0-13,0-10926) fuzzy-if(webrender,14-15,10967-13267) == boxshadow-inset-large-offset.html boxshadow-inset-large-offset-ref.html
== overflow-not-scrollable-1.html overflow-not-scrollable-1-ref.html
== overflow-not-scrollable-1.html overflow-not-scrollable-1-ref2.html

View File

@ -2,6 +2,6 @@
# e.g. filter: blur(3px) grayscale(0.5) invert(0.2);
# Some platforms render this complex filter chain a little differently, and that's ok.
fuzzy(0-5,0-13638) fuzzy-if(/^Windows\x20NT\x2010\.0/.test(http.oscpu)&&layersGPUAccelerated,0-35,0-13638) fuzzy-if(webrender,4-6,12000-19484) fuzzy-if(webrender&&swgl,9-9,19336-19336) == long-chain.html long-chain-ref.html # Win10: Bug 1258241
fuzzy(0-5,0-13638) fuzzy-if(/^Windows\x20NT\x2010\.0/.test(http.oscpu)&&layersGPUAccelerated,0-35,0-13638) fuzzy-if(webrender,4-6,12000-19484) fuzzy-if(webrender&&swgl,9-10,19336-20088) == long-chain.html long-chain-ref.html # Win10: Bug 1258241
== moz-element.html moz-element-ref.html
fuzzy-if(webrender,13-15,7676-7980) == same-filter.html same-filter-ref.html
fuzzy-if(webrender,13-15,7676-7980) fuzzy-if(webrender&&swgl,12-12,14052-14052) == same-filter.html same-filter-ref.html

View File

@ -6,7 +6,7 @@
== blur-calc.html blur-calc-ref.html
== blur-calc-negative.html blur-calc-negative-ref.html
fuzzy-if(cocoaWidget&&webrender,0-1,0-2) skip-if(d2d) == blur-cap-large-radius-on-software.html blur-cap-large-radius-on-software-ref.html
fuzzy-if(webrender,3-5,5500-8168) == blur-clip-rect.html ../feGaussianBlur-4-ref.svg
fuzzy-if(webrender,3-5,4764-8168) == blur-clip-rect.html ../feGaussianBlur-4-ref.svg
== blur-em-radius.html blur-em-radius-ref.html
== blur-invalid-radius.html blur-invalid-radius-ref.html
== blur-rem-radius.html blur-rem-radius-ref.html

View File

@ -39,10 +39,10 @@ fuzzy-if(d2d||skiaContent,0-1,0-10000) == feComposite-2.svg feComposite-2-ref.sv
fuzzy-if(d2d,0-1,0-6400) fuzzy-if(skiaContent,0-1,0-1600) == feFlood-1.svg feFlood-1-ref.svg
skip-if(d2d) fuzzy-if(skiaContent,0-1,0-6400) == feFlood-2.svg feFlood-2-ref.svg
fuzzy(0-1,0-6400) fuzzy-if(skiaContent,0-1,0-6404) fuzzy-if(webrender,178-178,3036-3042) == feGaussianBlur-1.svg feGaussianBlur-1-ref.svg
fuzzy(0-1,0-6400) fuzzy-if(skiaContent,0-1,0-6404) fuzzy-if(webrender,177-178,2556-3042) == feGaussianBlur-1.svg feGaussianBlur-1-ref.svg
fuzzy-if(webrender,0-2,0-304) == feGaussianBlur-2.svg feGaussianBlur-2-ref.svg
# != feGaussianBlur-3.svg feGaussianBlur-3-ref.svg
fuzzy-if(webrender,3-5,5500-8168) == feGaussianBlur-4.svg feGaussianBlur-4-ref.svg
fuzzy-if(webrender,3-5,4764-8168) == feGaussianBlur-4.svg feGaussianBlur-4-ref.svg
fuzzy-if(geckoview&&webrender,0-4,0-7) == feGaussianBlur-5.svg feGaussianBlur-5-ref.svg
== feGaussianBlur-6.svg feGaussianBlur-6-ref.svg
skip-if(d2d) == feGaussianBlur-cap-large-directional-radius-on-software.html feGaussianBlur-cap-large-directional-radius-on-software-ref.html
@ -104,11 +104,11 @@ fuzzy-if(skiaContent,0-1,0-400) == feDisplacementMap-alpha-01.svg pass.svg
fuzzy(0-2,0-500) == feDisplacementMap-colour-01.svg feDisplacementMap-colour-01-ref.svg
== feDisplacementMap-scale-01.svg pass.svg
fuzzy-if(/^Windows\x20NT\x2010\.0/.test(http.oscpu),0-2,0-25) fuzzy-if(webrender,55-98,14033-16001) == feDropShadow-01.svg feDropShadow-01-ref.svg
fuzzy-if(/^Windows\x20NT\x2010\.0/.test(http.oscpu),0-2,0-25) fuzzy-if(webrender,55-98,14033-16337) == feDropShadow-01.svg feDropShadow-01-ref.svg
== feFlood-color-01.svg pass.svg
fuzzy-if(webrender,20-21,5622-5646) == feGaussianBlur-alpha-01.svg feGaussianBlur-alpha-01-ref.svg
fuzzy-if(webrender,20-21,5540-5646) == feGaussianBlur-alpha-01.svg feGaussianBlur-alpha-01-ref.svg
== feMorphology-radius-negative-01.svg pass.svg
== feMorphology-radius-negative-02.svg pass.svg

View File

@ -9,8 +9,8 @@ fuzzy-if(webrender,3-5,17552-20155) == default-subregion.svg default-subregion-r
== different-StrokePaint-filter-regions.svg different-StrokePaint-filter-regions-ref.svg
== dont-clip-previous-primitives.svg dont-clip-previous-primitives-ref.svg
== intersecting-filter-regions.svg intersecting-filter-regions-ref.svg
fuzzy-if(webrender,9-9,5168-5536) == long-chain.svg simple-chain-ref.svg
fuzzy-if(webrender,9-9,5168-5536) == multiple-primitives-per-filter.svg simple-chain-ref.svg
fuzzy-if(/^Windows\x20NT\x2010\.0/.test(http.oscpu),0-1,0-173) fuzzy-if(webrender,9-9,5128-5494) == second-filter-uses-SourceAlpha.svg second-filter-uses-SourceAlpha-ref.svg
fuzzy-if(webrender,9-9,5168-5536) == second-filter-uses-SourceGraphic.svg simple-chain-ref.svg
fuzzy-if(webrender,9-9,5168-5536) fuzzy-if(webrender&&swgl,7-7,13184-13184) == long-chain.svg simple-chain-ref.svg
fuzzy-if(webrender,9-9,5168-5536) fuzzy-if(webrender&&swgl,7-7,13184-13184) == multiple-primitives-per-filter.svg simple-chain-ref.svg
fuzzy-if(/^Windows\x20NT\x2010\.0/.test(http.oscpu),0-1,0-173) fuzzy-if(webrender,9-9,5128-5494) fuzzy-if(webrender&&swgl,7-7,12836-12836) == second-filter-uses-SourceAlpha.svg second-filter-uses-SourceAlpha-ref.svg
fuzzy-if(webrender,9-9,5168-5536) fuzzy-if(webrender&&swgl,7-7,13184-13184) == second-filter-uses-SourceGraphic.svg simple-chain-ref.svg
== simple-chain.svg simple-chain-ref.svg

View File

@ -14,7 +14,7 @@ fuzzy-if(webrender,0-3,0-825) == quirks-decorations.html quirks-decorations-ref.
== standards-decorations.html standards-decorations-ref.html
== standards-line-height.html standards-line-height-ref.html
fuzzy-if(skiaContent,0-1,0-4200) fuzzy-if(webrender,0-47,0-6) == selection.html selection-ref.html
fuzzy-if(webrender,0-8,0-509) == marker-shadow.html marker-shadow-ref.html
fuzzy-if(webrender,0-8,0-509) fuzzy-if(webrender&&swgl,49-49,18-18) == marker-shadow.html marker-shadow-ref.html
fuzzy-if(webrender,0-3,0-25) == aligned-baseline.html aligned-baseline-ref.html
fuzzy-if(skiaContent,0-1,0-5) == clipped-elements.html clipped-elements-ref.html
== theme-overflow.html theme-overflow-ref.html

View File

@ -5,7 +5,7 @@ random-if(Android) == chrome://reftest/content/text-shadow/basic-negcoord.xhtml
!= chrome://reftest/content/text-shadow/blur.xhtml chrome://reftest/content/text-shadow/blur-notref.xhtml
== chrome://reftest/content/text-shadow/color-inherit.xhtml chrome://reftest/content/text-shadow/color-inherit-ref.xhtml
== chrome://reftest/content/text-shadow/multiple-noblur.xhtml chrome://reftest/content/text-shadow/multiple-noblur-ref.xhtml
== blur-opacity.html blur-opacity-ref.html
fuzzy-if(webrender&&swgl,2-2,6320-6320) == blur-opacity.html blur-opacity-ref.html
== basic.html basic-ref.html
== basic-negcoord.html basic-negcoord-ref.html