зеркало из https://github.com/mozilla/gecko-dev.git
Backed out 4 changesets (bug 1700434) for causing bustages in src/glsl.h
CLOSED TREE Backed out changeset 78cc8dd9ed2a (bug 1700434) Backed out changeset eb02c32b173e (bug 1700434) Backed out changeset 9d932ee247a2 (bug 1700434) Backed out changeset 5ff6e9101b77 (bug 1700434)
This commit is contained in:
Родитель
0eabbb9d61
Коммит
1c4e911bb6
|
@ -788,14 +788,6 @@ impl Type {
|
|||
array_sizes: None,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new_array(kind: TypeKind, size: i32) -> Self {
|
||||
Type {
|
||||
kind,
|
||||
precision: None,
|
||||
array_sizes: Some(Box::new(ArraySizes { sizes: vec![make_const(TypeKind::Int, size)] })),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl LiftFrom<&syntax::FullySpecifiedType> for Type {
|
||||
|
@ -969,8 +961,6 @@ pub struct State {
|
|||
modified_globals: RefCell<Vec<SymRef>>,
|
||||
pub used_globals: RefCell<Vec<SymRef>>,
|
||||
pub texel_fetches: HashMap<(SymRef, SymRef), TexelFetchOffsets>,
|
||||
clip_dist_sym: SymRef,
|
||||
pub used_clip_dist: u32,
|
||||
}
|
||||
|
||||
impl State {
|
||||
|
@ -986,8 +976,6 @@ impl State {
|
|||
modified_globals: RefCell::new(Vec::new()),
|
||||
used_globals: RefCell::new(Vec::new()),
|
||||
texel_fetches: HashMap::new(),
|
||||
clip_dist_sym: SymRef(0),
|
||||
used_clip_dist: 0,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2230,18 +2218,6 @@ fn translate_expression(state: &mut State, e: &syntax::Expr) -> Expr {
|
|||
if !globals.contains(&global) {
|
||||
globals.push(global);
|
||||
}
|
||||
if global == state.clip_dist_sym {
|
||||
if let ExprKind::Bracket(_, idx) = &lhs.kind {
|
||||
// Get the constant array index used for gl_ClipDistance and add it to the used mask.
|
||||
let idx = match idx.kind {
|
||||
ExprKind::IntConst(idx) => idx,
|
||||
ExprKind::UIntConst(idx) => idx as i32,
|
||||
_ => panic!("bad index for gl_ClipDistance"),
|
||||
};
|
||||
assert!(idx >= 0 && idx < 4);
|
||||
state.used_clip_dist |= 1 << idx;
|
||||
}
|
||||
}
|
||||
}
|
||||
Expr {
|
||||
kind: ExprKind::Assignment(lhs, op.clone(), rhs),
|
||||
|
@ -3765,10 +3741,6 @@ pub fn ast_to_hir(state: &mut State, tu: &syntax::TranslationUnit) -> Translatio
|
|||
"gl_Position",
|
||||
SymDecl::Global(StorageClass::Out, None, Type::new(Vec4), RunClass::Vector),
|
||||
);
|
||||
state.clip_dist_sym = state.declare(
|
||||
"gl_ClipDistance",
|
||||
SymDecl::Global(StorageClass::Out, None, Type::new_array(Float, 4), RunClass::Vector),
|
||||
);
|
||||
|
||||
state.declare(
|
||||
"swgl_SpanLength",
|
||||
|
@ -3872,13 +3844,6 @@ pub fn ast_to_hir(state: &mut State, tu: &syntax::TranslationUnit) -> Translatio
|
|||
Type::new(Void),
|
||||
vec![Type::new(Vec4)],
|
||||
);
|
||||
declare_function(
|
||||
state,
|
||||
"swgl_blendSubpixelText",
|
||||
None,
|
||||
Type::new(Void),
|
||||
vec![Type::new(Vec4)],
|
||||
);
|
||||
declare_function(
|
||||
state,
|
||||
"swgl_clipMask",
|
||||
|
@ -3976,13 +3941,6 @@ pub fn ast_to_hir(state: &mut State, tu: &syntax::TranslationUnit) -> Translatio
|
|||
Type::new(Void),
|
||||
vec![Type::new(*s), Type::new(Vec2), Type::new(Vec4)],
|
||||
);
|
||||
declare_function(
|
||||
state,
|
||||
"swgl_commitTextureLinearR8ToRGBA8",
|
||||
None,
|
||||
Type::new(Void),
|
||||
vec![Type::new(*s), Type::new(Vec2), Type::new(Vec4)],
|
||||
);
|
||||
declare_function(
|
||||
state,
|
||||
"swgl_commitPartialTextureLinearR8",
|
||||
|
@ -4018,13 +3976,6 @@ pub fn ast_to_hir(state: &mut State, tu: &syntax::TranslationUnit) -> Translatio
|
|||
Type::new(Void),
|
||||
vec![Type::new(*s), Type::new(Vec2), Type::new(Vec4), Type::new(Float)],
|
||||
);
|
||||
declare_function(
|
||||
state,
|
||||
"swgl_commitTextureLinearColorR8ToRGBA8",
|
||||
None,
|
||||
Type::new(Void),
|
||||
vec![Type::new(*s), Type::new(Vec2), Type::new(Vec4), Type::new(Vec4)],
|
||||
);
|
||||
|
||||
declare_function(
|
||||
state,
|
||||
|
|
|
@ -535,9 +535,6 @@ fn write_load_attribs(state: &mut OutputState, attribs: &[hir::SymRef]) {
|
|||
fn write_store_outputs(state: &mut OutputState, outputs: &[hir::SymRef]) {
|
||||
let is_scalar = state.is_scalar.replace(true);
|
||||
write!(state, "public:\nstruct InterpOutputs {{\n");
|
||||
if state.hir.used_clip_dist != 0 {
|
||||
state.write(" Float swgl_ClipDistance;\n");
|
||||
}
|
||||
for i in outputs {
|
||||
let sym = state.hir.sym(*i);
|
||||
match &sym.decl {
|
||||
|
@ -563,15 +560,6 @@ fn write_store_outputs(state: &mut OutputState, outputs: &[hir::SymRef]) {
|
|||
state,
|
||||
" auto* dest = reinterpret_cast<InterpOutputs*>(dest_ptr);\n"
|
||||
);
|
||||
if state.hir.used_clip_dist != 0 {
|
||||
for (i, comp) in "xyzw".chars().enumerate() {
|
||||
if (state.hir.used_clip_dist & (1 << i)) != 0 {
|
||||
write!(state, " dest->swgl_ClipDistance.{} = get_nth(gl_ClipDistance[{}], n);\n", comp, i);
|
||||
} else {
|
||||
write!(state, " dest->swgl_ClipDistance.{} = 0.0f;\n", comp);
|
||||
}
|
||||
}
|
||||
}
|
||||
for i in outputs {
|
||||
let sym = state.hir.sym(*i);
|
||||
match &sym.decl {
|
||||
|
@ -3643,9 +3631,6 @@ fn write_abi(state: &mut OutputState) {
|
|||
state.write(" init_batch_func = (InitBatchFunc)&init_batch;\n");
|
||||
state.write(" load_attribs_func = (LoadAttribsFunc)&load_attribs;\n");
|
||||
state.write(" run_primitive_func = (RunPrimitiveFunc)&run;\n");
|
||||
if state.hir.used_clip_dist != 0 {
|
||||
state.write(" enable_clip_distance();\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
state.write("}\n");
|
||||
|
|
|
@ -153,11 +153,9 @@ those span boundary pixels to estimate the coverage based on edge slope.
|
|||
```
|
||||
void swgl_commitTextureLinearRGBA8(sampler, vec2 uv, vec4 uv_bounds);
|
||||
void swgl_commitTextureLinearR8(sampler, vec2 uv, vec4 uv_bounds);
|
||||
void swgl_commitTextureLinearR8ToRGBA8(sampler, vec2 uv, vec4 uv_bounds);
|
||||
|
||||
void swgl_commitTextureLinearColorRGBA8(sampler, vec2 uv, vec4 uv_bounds, vec4|float color);
|
||||
void swgl_commitTextureLinearColorR8(sampler, vec2 uv, vec4 uv_bounds, vec4|float color);
|
||||
void swgl_commitTextureLinearColorR8ToRGBA8(sampler, vec2 uv, vec4 uv_bounds, vec4|float color);
|
||||
|
||||
void swgl_commitTextureLinearRepeatRGBA8(sampler, vec2 uv, vec2 tile_repeat, vec4 uv_repeat, vec4 uv_bounds);
|
||||
void swgl_commitTextureLinearRepeatColorRGBA8(sampler, vec2 uv, vec2 tile_repeat, vec4 uv_repeat, vec4 uv_bounds, vec4|float color);
|
||||
|
@ -183,9 +181,7 @@ within the supplied uv bounds. The color variations also accept a supplied color
|
|||
that modulates the result.
|
||||
|
||||
The RGBA8 versions may only be used to commit within `swgl_drawSpanRGBA8`, and
|
||||
the R8 versions may only be used to commit within `swgl_drawSpanR8`. The R8ToRGBA8
|
||||
versions may be used to sample from an R8 source while committing to an RGBA8
|
||||
framebuffer.
|
||||
the R8 versions may only be used to commit within `swgl_drawSpanR8`.
|
||||
|
||||
The Linear variations use a linear filter that bilinearly interpolates between
|
||||
the four samples near the pixel. The Nearest variations use a nearest filter
|
||||
|
@ -208,8 +204,6 @@ useful for implementing clip-out modes by inverting the source texture value.
|
|||
```
|
||||
// Premultiplied alpha over blend, but with source color set to source alpha modulated with a constant color.
|
||||
void swgl_blendDropShadow(vec4 color);
|
||||
// Premultiplied alpha over blend, but treats the source as a subpixel mask modulated with a constant color.
|
||||
void swgl_blendSubpixelText(vec4 color);
|
||||
```
|
||||
|
||||
SWGL allows overriding the blend mode per-primitive by calling `swgl_blend`
|
||||
|
|
|
@ -155,16 +155,21 @@ static ALWAYS_INLINE P applyColor(P src, InvertColor) {
|
|||
|
||||
template <typename P>
|
||||
static ALWAYS_INLINE P applyColor(P src, P color) {
|
||||
return muldiv255(color, src);
|
||||
return muldiv256(src, color);
|
||||
}
|
||||
|
||||
static ALWAYS_INLINE WideRGBA8 applyColor(PackedRGBA8 src, WideRGBA8 color) {
|
||||
return applyColor(unpack(src), color);
|
||||
return muldiv256(unpack(src), color);
|
||||
}
|
||||
|
||||
// Packs a color on a scale of 0..256 rather than 0..255 to allow faster scale
|
||||
// math with muldiv256. Note that this can cause a slight rounding difference in
|
||||
// the result versus the 255 scale. To alleviate this we scale by 256.49, so
|
||||
// that the color rounds slightly up and in turn causes the the value it scales
|
||||
// to round slightly up as well.
|
||||
template <typename P, typename C>
|
||||
static ALWAYS_INLINE auto packColor(P* buf, C color) {
|
||||
return pack_span(buf, color, 255.0f);
|
||||
return pack_span(buf, color, 256.49f);
|
||||
}
|
||||
|
||||
template <typename P>
|
||||
|
@ -335,17 +340,17 @@ enum SWGLClipFlag {
|
|||
static int swgl_ClipFlags = 0;
|
||||
static BlendKey swgl_BlendOverride = BLEND_KEY_NONE;
|
||||
static WideRGBA8 swgl_BlendColorRGBA8 = {0};
|
||||
static WideRGBA8 swgl_BlendAlphaRGBA8 = {0};
|
||||
|
||||
// A pointer into the color buffer for the start of the span.
|
||||
static void* swgl_SpanBuf = nullptr;
|
||||
// A pointer into the clip mask for the start of the span.
|
||||
static uint8_t* swgl_ClipMaskBuf = nullptr;
|
||||
|
||||
static ALWAYS_INLINE WideR8 expand_mask(UNUSED uint8_t* buf, WideR8 mask) {
|
||||
static ALWAYS_INLINE WideR8 expand_clip_mask(UNUSED uint8_t* buf, WideR8 mask) {
|
||||
return mask;
|
||||
}
|
||||
static ALWAYS_INLINE WideRGBA8 expand_mask(UNUSED uint32_t* buf, WideR8 mask) {
|
||||
static ALWAYS_INLINE WideRGBA8 expand_clip_mask(UNUSED uint32_t* buf,
|
||||
WideR8 mask) {
|
||||
WideRG8 maskRG = zip(mask, mask);
|
||||
return zip(maskRG, maskRG);
|
||||
}
|
||||
|
@ -361,9 +366,9 @@ static ALWAYS_INLINE uint8_t* get_clip_mask(P* buf) {
|
|||
|
||||
template <typename P>
|
||||
static ALWAYS_INLINE auto load_clip_mask(P* buf, int span)
|
||||
-> decltype(expand_mask(buf, 0)) {
|
||||
return expand_mask(buf,
|
||||
unpack(load_span<PackedR8>(get_clip_mask(buf), span)));
|
||||
-> decltype(expand_clip_mask(buf, 0)) {
|
||||
return expand_clip_mask(
|
||||
buf, unpack(load_span<PackedR8>(get_clip_mask(buf), span)));
|
||||
}
|
||||
|
||||
// Temporarily removes masking from the blend stage, assuming the caller will
|
||||
|
@ -684,12 +689,6 @@ static PREFER_INLINE WideRGBA8 blend_pixels(uint32_t* buf, PackedRGBA8 pdst,
|
|||
return color + dst - muldiv255(dst, alphas(color));
|
||||
}
|
||||
|
||||
BLEND_CASE(SWGL_BLEND_SUBPIXEL_TEXT):
|
||||
// Premultiplied alpha over blend, but treats the source as a subpixel mask
|
||||
// modulated with a constant color.
|
||||
return applyColor(src, swgl_BlendColorRGBA8) + dst -
|
||||
muldiv255(dst, applyColor(src, swgl_BlendAlphaRGBA8));
|
||||
|
||||
default:
|
||||
UNREACHABLE;
|
||||
// return src;
|
||||
|
|
|
@ -180,10 +180,6 @@ struct IntRange {
|
|||
int end;
|
||||
|
||||
int len() const { return end - start; }
|
||||
|
||||
IntRange intersect(IntRange r) const {
|
||||
return {max(start, r.start), min(end, r.end)};
|
||||
}
|
||||
};
|
||||
|
||||
struct FloatRange {
|
||||
|
@ -623,8 +619,7 @@ struct Program {
|
|||
macro(GL_HSL_SATURATION_KHR, 0, 0, 0) \
|
||||
macro(GL_HSL_COLOR_KHR, 0, 0, 0) \
|
||||
macro(GL_HSL_LUMINOSITY_KHR, 0, 0, 0) \
|
||||
macro(SWGL_BLEND_DROP_SHADOW, 0, 0, 0) \
|
||||
macro(SWGL_BLEND_SUBPIXEL_TEXT, 0, 0, 0)
|
||||
macro(SWGL_BLEND_DROP_SHADOW, 0, 0, 0)
|
||||
|
||||
#define DEFINE_BLEND_KEY(...) BLEND_KEY(__VA_ARGS__),
|
||||
#define DEFINE_MASK_BLEND_KEY(...) MASK_BLEND_KEY(__VA_ARGS__),
|
||||
|
|
|
@ -213,4 +213,3 @@ typedef intptr_t GLintptr;
|
|||
#define GL_HSL_LUMINOSITY_KHR 0x92B0
|
||||
|
||||
#define SWGL_BLEND_DROP_SHADOW 0xB001
|
||||
#define SWGL_BLEND_SUBPIXEL_TEXT 0xB002
|
||||
|
|
|
@ -696,8 +696,6 @@ Float ceil(Float v) {
|
|||
SI int32_t roundeven(float v, float scale) {
|
||||
#if USE_SSE2
|
||||
return _mm_cvtss_si32(_mm_set_ss(v * scale));
|
||||
#elif USE_NEON
|
||||
return vcvtns_s32_f32(v * scale);
|
||||
#else
|
||||
return bit_cast<int32_t>(v * scale + float(0xC00000)) - 0x4B400000;
|
||||
#endif
|
||||
|
@ -706,8 +704,6 @@ SI int32_t roundeven(float v, float scale) {
|
|||
SI I32 roundeven(Float v, Float scale) {
|
||||
#if USE_SSE2
|
||||
return _mm_cvtps_epi32(v * scale);
|
||||
#elif USE_NEON
|
||||
return vcvtnq_s32_f32(v * scale);
|
||||
#else
|
||||
// Magic number implementation of round-to-nearest-even
|
||||
// see http://stereopsis.com/sree/fpu2006.html
|
||||
|
@ -724,8 +720,6 @@ SI I32 roundzero(Float v, Float scale) { return cast(v * scale); }
|
|||
SI I32 roundfast(Float v, Float scale) {
|
||||
#if USE_SSE2
|
||||
return _mm_cvtps_epi32(v * scale);
|
||||
#elif USE_NEON
|
||||
return vcvtnq_s32_f32(v * scale);
|
||||
#else
|
||||
return cast(v * scale + 0.5f);
|
||||
#endif
|
||||
|
|
|
@ -12,12 +12,6 @@ namespace glsl {
|
|||
// to operate in Float-sized chunks.
|
||||
typedef vec3 Interpolants;
|
||||
|
||||
// Clip distances, if enabled, are always stored in the first SIMD chunk of the
|
||||
// interpolants.
|
||||
static ALWAYS_INLINE Float get_clip_distances(const Interpolants& interp) {
|
||||
return interp.x;
|
||||
}
|
||||
|
||||
struct VertexShaderImpl;
|
||||
struct FragmentShaderImpl;
|
||||
|
||||
|
@ -34,9 +28,6 @@ struct ProgramImpl {
|
|||
|
||||
typedef ProgramImpl* (*ProgramLoader)();
|
||||
|
||||
// The maximum size of the gl_ClipDistance array.
|
||||
constexpr int32_t gl_MaxClipDistances = 4;
|
||||
|
||||
struct VertexShaderImpl {
|
||||
typedef void (*SetUniform1iFunc)(VertexShaderImpl*, int index, int value);
|
||||
typedef void (*SetUniform4fvFunc)(VertexShaderImpl*, int index,
|
||||
|
@ -56,17 +47,7 @@ struct VertexShaderImpl {
|
|||
LoadAttribsFunc load_attribs_func = nullptr;
|
||||
RunPrimitiveFunc run_primitive_func = nullptr;
|
||||
|
||||
enum FLAGS {
|
||||
CLIP_DISTANCE = 1 << 0,
|
||||
};
|
||||
int flags = 0;
|
||||
void enable_clip_distance() { flags |= CLIP_DISTANCE; }
|
||||
ALWAYS_INLINE bool use_clip_distance() const {
|
||||
return (flags & CLIP_DISTANCE) != 0;
|
||||
}
|
||||
|
||||
vec4 gl_Position;
|
||||
Float gl_ClipDistance[gl_MaxClipDistances];
|
||||
|
||||
void set_uniform_1i(int index, int value) {
|
||||
(*set_uniform_1i_func)(this, index, value);
|
||||
|
|
|
@ -561,36 +561,6 @@ static ALWAYS_INLINE IntRange aa_span(P* buf, const E& left, const E& right,
|
|||
return {leftAA.start, rightAA.end};
|
||||
}
|
||||
|
||||
// Calculate the span the user clip distances occupy from the left and right
|
||||
// edges at the current row.
|
||||
template <typename E>
|
||||
static ALWAYS_INLINE IntRange clip_distance_range(const E& left,
|
||||
const E& right) {
|
||||
Float leftClip = get_clip_distances(left.interp);
|
||||
Float rightClip = get_clip_distances(right.interp);
|
||||
// Get the change in clip dist per X step.
|
||||
Float clipStep = (rightClip - leftClip) / (right.cur_x() - left.cur_x());
|
||||
// Find the zero intercepts starting from the left edge.
|
||||
Float clipDist = left.cur_x() - leftClip * recip(clipStep);
|
||||
// Find the distance to the start of the span for any clip distances that
|
||||
// are increasing in value. If the clip distance is constant or decreasing
|
||||
// in value, then check if it starts outside the clip volume.
|
||||
Float start = if_then_else(clipStep > 0.0f, clipDist,
|
||||
if_then_else(leftClip < 0.0f, 1.0e6f, 0.0f));
|
||||
// Find the distance to the end of the span for any clip distances that are
|
||||
// decreasing in value. If the clip distance is constant or increasing in
|
||||
// value, then check if it ends inside the clip volume.
|
||||
Float end = if_then_else(clipStep < 0.0f, clipDist,
|
||||
if_then_else(rightClip >= 0.0f, 1.0e6f, 0.0f));
|
||||
// Find the furthest start offset.
|
||||
start = max(start, start.zwxy);
|
||||
// Find the closest end offset.
|
||||
end = min(end, end.zwxy);
|
||||
// Finally, round the offsets to an integer span that can be used to bound
|
||||
// the current span.
|
||||
return FloatRange{max(start.x, start.y), min(end.x, end.y)}.round();
|
||||
}
|
||||
|
||||
// Converts a run array into a flattened array of depth samples. This just
|
||||
// walks through every run and fills the samples with the depth value from
|
||||
// the run.
|
||||
|
@ -946,11 +916,6 @@ static inline void draw_quad_spans(int nump, Point2D p[4], uint32_t z,
|
|||
// Calculate a potentially AA'd span and check if it is non-empty.
|
||||
IntRange span = aa_span(fbuf, left, right, clipSpan);
|
||||
if (span.len() > 0) {
|
||||
// If user clip planes are enabled, use them to bound the current span.
|
||||
if (vertex_shader->use_clip_distance()) {
|
||||
span = span.intersect(clip_distance_range(left, right));
|
||||
if (span.len() <= 0) goto next_span;
|
||||
}
|
||||
ctx->shaded_rows++;
|
||||
ctx->shaded_pixels += span.len();
|
||||
// Advance color/depth buffer pointers to the start of the span.
|
||||
|
@ -1196,11 +1161,6 @@ static inline void draw_perspective_spans(int nump, Point3D* p,
|
|||
// Calculate a potentially AA'd span and check if it is non-empty.
|
||||
IntRange span = aa_span(fbuf, left, right, clipSpan);
|
||||
if (span.len() > 0) {
|
||||
// If user clip planes are enabled, use them to bound the current span.
|
||||
if (vertex_shader->use_clip_distance()) {
|
||||
span = span.intersect(clip_distance_range(left, right));
|
||||
if (span.len() <= 0) goto next_span;
|
||||
}
|
||||
ctx->shaded_rows++;
|
||||
ctx->shaded_pixels += span.len();
|
||||
// Advance color/depth buffer pointers to the start of the span.
|
||||
|
@ -1257,7 +1217,6 @@ static inline void draw_perspective_spans(int nump, Point3D* p,
|
|||
draw_span<true, true>(buf, depth, span.len(), packDepth);
|
||||
}
|
||||
}
|
||||
next_span:
|
||||
// Advance Y and edge interpolants to next row.
|
||||
y++;
|
||||
left.nextRow();
|
||||
|
|
|
@ -14,10 +14,10 @@ static void commit_masked_solid_span(P* buf, C color, int len) {
|
|||
for (P* end = &buf[len]; buf < end; buf += 4, mask += 4) {
|
||||
commit_span(
|
||||
buf,
|
||||
blend_span(
|
||||
buf,
|
||||
applyColor(expand_mask(buf, unpack(unaligned_load<PackedR8>(mask))),
|
||||
color)));
|
||||
blend_span(buf,
|
||||
applyColor(expand_clip_mask(
|
||||
buf, unpack(unaligned_load<PackedR8>(mask))),
|
||||
color)));
|
||||
}
|
||||
restore_clip_mask();
|
||||
}
|
||||
|
@ -614,44 +614,6 @@ static inline LinearFilter needsTextureLinear(S sampler, T P, int span) {
|
|||
#define swgl_commitTextureLinearColorR8(s, p, uv_rect, color) \
|
||||
swgl_commitTextureLinear(R8, s, p, uv_rect, color, swgl_SpanLength)
|
||||
|
||||
// Helper function that samples from an R8 texture while expanding it to support
|
||||
// a differing framebuffer format.
|
||||
template <bool BLEND, typename S, typename C, typename P>
|
||||
static inline int blendTextureLinearR8(S sampler, vec2 uv, int span,
|
||||
const vec4_scalar& uv_rect, C color,
|
||||
P* buf) {
|
||||
if (!swgl_isTextureR8(sampler)) {
|
||||
return 0;
|
||||
}
|
||||
LINEAR_QUANTIZE_UV(sampler, uv, uv_step, uv_rect, min_uv, max_uv);
|
||||
for (P* end = buf + span; buf < end; buf += swgl_StepSize, uv += uv_step) {
|
||||
commit_blend_span<BLEND>(
|
||||
buf, applyColor(expand_mask(buf, textureLinearUnpackedR8(
|
||||
sampler,
|
||||
ivec2(clamp(uv, min_uv, max_uv)))),
|
||||
color));
|
||||
}
|
||||
return span;
|
||||
}
|
||||
|
||||
// Commit an entire span with linear filtering while expanding from R8 to RGBA8
|
||||
#define swgl_commitTextureLinearColorR8ToRGBA8(s, p, uv_rect, color) \
|
||||
do { \
|
||||
auto packed_color = packColor(swgl_OutRGBA8, color); \
|
||||
int drawn = 0; \
|
||||
if (blend_key) { \
|
||||
drawn = blendTextureLinearR8<true>(s, p, swgl_SpanLength, uv_rect, \
|
||||
packed_color, swgl_OutRGBA8); \
|
||||
} else { \
|
||||
drawn = blendTextureLinearR8<false>(s, p, swgl_SpanLength, uv_rect, \
|
||||
packed_color, swgl_OutRGBA8); \
|
||||
} \
|
||||
swgl_OutRGBA8 += drawn; \
|
||||
swgl_SpanLength -= drawn; \
|
||||
} while (0)
|
||||
#define swgl_commitTextureLinearR8ToRGBA8(s, p, uv_rect) \
|
||||
swgl_commitTextureLinearColorR8ToRGBA8(s, p, uv_rect, NoColor())
|
||||
|
||||
// Compute repeating UVs, possibly constrained by tile repeat limits
|
||||
static inline vec2 tileRepeatUV(vec2 uv, const vec2_scalar& tile_repeat) {
|
||||
if (tile_repeat.x > 0.0f) {
|
||||
|
@ -1803,14 +1765,6 @@ static ALWAYS_INLINE int calcAAEdgeMask(bvec4_scalar mask) {
|
|||
swgl_BlendColorRGBA8 = packColor<uint32_t>(color); \
|
||||
} while (0)
|
||||
|
||||
#define swgl_blendSubpixelText(color) \
|
||||
do { \
|
||||
swgl_ClipFlags |= SWGL_CLIP_FLAG_BLEND_OVERRIDE; \
|
||||
swgl_BlendOverride = BLEND_KEY(SWGL_BLEND_SUBPIXEL_TEXT); \
|
||||
swgl_BlendColorRGBA8 = packColor<uint32_t>(color); \
|
||||
swgl_BlendAlphaRGBA8 = alphas(swgl_BlendColorRGBA8); \
|
||||
} while (0)
|
||||
|
||||
// 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
|
||||
|
|
|
@ -39,7 +39,6 @@
|
|||
#define SWGL_CLIP_MASK
|
||||
#define SWGL_ANTIALIAS
|
||||
#define SWGL_BLEND
|
||||
#define SWGL_CLIP_DIST
|
||||
#endif
|
||||
|
||||
#ifdef WR_VERTEX_SHADER
|
||||
|
|
|
@ -246,7 +246,7 @@ void brush_vs(
|
|||
|
||||
switch (color_mode) {
|
||||
case COLOR_MODE_ALPHA:
|
||||
case COLOR_MODE_BITMAP_SHADOW:
|
||||
case COLOR_MODE_BITMAP:
|
||||
#ifdef SWGL_BLEND
|
||||
swgl_blendDropShadow(image_data.color);
|
||||
v_mask_swizzle = vec2(1.0, 0.0);
|
||||
|
|
|
@ -32,7 +32,7 @@ varying vec2 vClipMaskUv;
|
|||
#define COLOR_MODE_SUBPX_BG_PASS1 4
|
||||
#define COLOR_MODE_SUBPX_BG_PASS2 5
|
||||
#define COLOR_MODE_SUBPX_DUAL_SOURCE 6
|
||||
#define COLOR_MODE_BITMAP_SHADOW 7
|
||||
#define COLOR_MODE_BITMAP 7
|
||||
#define COLOR_MODE_COLOR_BITMAP 8
|
||||
#define COLOR_MODE_IMAGE 9
|
||||
#define COLOR_MODE_MULTIPLY_DUAL_SOURCE 10
|
||||
|
|
|
@ -13,7 +13,7 @@ flat varying vec4 v_uv_bounds;
|
|||
varying vec2 v_uv;
|
||||
|
||||
|
||||
#if defined(WR_FEATURE_GLYPH_TRANSFORM) && !defined(SWGL_CLIP_DIST)
|
||||
#ifdef WR_FEATURE_GLYPH_TRANSFORM
|
||||
varying vec4 v_uv_clip;
|
||||
#endif
|
||||
|
||||
|
@ -214,14 +214,7 @@ void main() {
|
|||
|
||||
#ifdef WR_FEATURE_GLYPH_TRANSFORM
|
||||
vec2 f = (glyph_transform * vi.local_pos - glyph_rect.p0) / glyph_rect.size;
|
||||
#ifdef SWGL_CLIP_DIST
|
||||
gl_ClipDistance[0] = f.x;
|
||||
gl_ClipDistance[1] = f.y;
|
||||
gl_ClipDistance[2] = 1.0 - f.x;
|
||||
gl_ClipDistance[3] = 1.0 - f.y;
|
||||
#else
|
||||
v_uv_clip = vec4(f, 1.0 - f);
|
||||
#endif
|
||||
v_uv_clip = vec4(f, 1.0 - f);
|
||||
#else
|
||||
vec2 f = (vi.local_pos - glyph_rect.p0) / glyph_rect.size;
|
||||
#endif
|
||||
|
@ -233,15 +226,9 @@ void main() {
|
|||
v_mask_swizzle = vec3(0.0, 1.0, 1.0);
|
||||
v_color = text.color;
|
||||
break;
|
||||
case COLOR_MODE_BITMAP_SHADOW:
|
||||
#ifdef SWGL_BLEND
|
||||
swgl_blendDropShadow(text.color);
|
||||
v_mask_swizzle = vec3(1.0, 0.0, 0.0);
|
||||
v_color = vec4(1.0);
|
||||
#else
|
||||
v_mask_swizzle = vec3(0.0, 1.0, 0.0);
|
||||
v_color = text.color;
|
||||
#endif
|
||||
case COLOR_MODE_BITMAP:
|
||||
v_mask_swizzle = vec3(0.0, 1.0, 0.0);
|
||||
v_color = text.color;
|
||||
break;
|
||||
case COLOR_MODE_SUBPX_BG_PASS2:
|
||||
v_mask_swizzle = vec3(1.0, 0.0, 0.0);
|
||||
|
@ -258,14 +245,8 @@ void main() {
|
|||
v_color = vec4(text.color.a) * text.bg_color;
|
||||
break;
|
||||
case COLOR_MODE_SUBPX_DUAL_SOURCE:
|
||||
#ifdef SWGL_BLEND
|
||||
swgl_blendSubpixelText(text.color);
|
||||
v_mask_swizzle = vec3(1.0, 0.0, 0.0);
|
||||
v_color = vec4(1.0);
|
||||
#else
|
||||
v_mask_swizzle = vec3(text.color.a, 0.0, 0.0);
|
||||
v_color = text.color;
|
||||
#endif
|
||||
v_mask_swizzle = vec3(text.color.a, 0.0, 0.0);
|
||||
v_color = text.color;
|
||||
break;
|
||||
default:
|
||||
v_mask_swizzle = vec3(0.0, 0.0, 0.0);
|
||||
|
@ -296,13 +277,13 @@ Fragment text_fs(void) {
|
|||
mask.rgb = mask.rgb * v_mask_swizzle.x + mask.aaa * v_mask_swizzle.y;
|
||||
#endif
|
||||
|
||||
#if defined(WR_FEATURE_GLYPH_TRANSFORM) && !defined(SWGL_CLIP_DIST)
|
||||
#ifdef WR_FEATURE_GLYPH_TRANSFORM
|
||||
mask *= float(all(greaterThanEqual(v_uv_clip, vec4(0.0))));
|
||||
#endif
|
||||
|
||||
frag.color = v_color * mask;
|
||||
|
||||
#if defined(WR_FEATURE_DUAL_SOURCE_BLENDING) && !defined(SWGL_BLEND)
|
||||
#ifdef WR_FEATURE_DUAL_SOURCE_BLENDING
|
||||
frag.blend = mask * v_mask_swizzle.x + mask.aaaa * v_mask_swizzle.y;
|
||||
#endif
|
||||
|
||||
|
@ -318,7 +299,7 @@ void main() {
|
|||
|
||||
#if defined(WR_FEATURE_DEBUG_OVERDRAW)
|
||||
oFragColor = WR_DEBUG_OVERDRAW_COLOR;
|
||||
#elif defined(WR_FEATURE_DUAL_SOURCE_BLENDING) && !defined(SWGL_BLEND)
|
||||
#elif defined(WR_FEATURE_DUAL_SOURCE_BLENDING)
|
||||
oFragColor = frag.color;
|
||||
oFragBlend = frag.blend * clip_mask;
|
||||
#else
|
||||
|
@ -326,24 +307,4 @@ void main() {
|
|||
#endif
|
||||
}
|
||||
|
||||
#if defined(SWGL_DRAW_SPAN) && defined(SWGL_BLEND) && defined(SWGL_CLIP_DIST)
|
||||
void swgl_drawSpanRGBA8() {
|
||||
// Only support simple swizzles for now. More complex swizzles must either
|
||||
// be handled by blend overrides or the slow path.
|
||||
if (v_mask_swizzle.x != 0.0 && v_mask_swizzle.x != 1.0) {
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef WR_FEATURE_DUAL_SOURCE_BLENDING
|
||||
swgl_commitTextureLinearRGBA8(sColor0, v_uv, v_uv_bounds);
|
||||
#else
|
||||
if (swgl_isTextureR8(sColor0)) {
|
||||
swgl_commitTextureLinearColorR8ToRGBA8(sColor0, v_uv, v_uv_bounds, v_color);
|
||||
} else {
|
||||
swgl_commitTextureLinearColorRGBA8(sColor0, v_uv, v_uv_bounds, v_color);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // WR_FRAGMENT_SHADER
|
||||
|
|
|
@ -1271,9 +1271,14 @@ impl BatchBuilder {
|
|||
&glyph_keys,
|
||||
&mut self.glyph_fetch_buffer,
|
||||
gpu_cache,
|
||||
|texture_id, glyph_format, glyphs| {
|
||||
|texture_id, mut glyph_format, glyphs| {
|
||||
debug_assert_ne!(texture_id, TextureSource::Invalid);
|
||||
|
||||
// Ignore color and only sample alpha when shadowing.
|
||||
if run.shadow {
|
||||
glyph_format = glyph_format.ignore_color();
|
||||
}
|
||||
|
||||
let subpx_dir = subpx_dir.limit_by(glyph_format);
|
||||
|
||||
let textures = BatchTextures::prim_textured(
|
||||
|
@ -1304,22 +1309,22 @@ impl BatchBuilder {
|
|||
}
|
||||
}
|
||||
GlyphFormat::Alpha |
|
||||
GlyphFormat::TransformedAlpha |
|
||||
GlyphFormat::Bitmap => {
|
||||
GlyphFormat::TransformedAlpha => {
|
||||
(
|
||||
BlendMode::PremultipliedAlpha,
|
||||
ShaderColorMode::Alpha,
|
||||
)
|
||||
}
|
||||
GlyphFormat::Bitmap => {
|
||||
(
|
||||
BlendMode::PremultipliedAlpha,
|
||||
ShaderColorMode::Bitmap,
|
||||
)
|
||||
}
|
||||
GlyphFormat::ColorBitmap => {
|
||||
(
|
||||
BlendMode::PremultipliedAlpha,
|
||||
if run.shadow {
|
||||
// Ignore color and only sample alpha when shadowing.
|
||||
ShaderColorMode::BitmapShadow
|
||||
} else {
|
||||
ShaderColorMode::ColorBitmap
|
||||
},
|
||||
ShaderColorMode::ColorBitmap,
|
||||
)
|
||||
}
|
||||
};
|
||||
|
|
|
@ -759,14 +759,22 @@ pub enum GlyphFormat {
|
|||
}
|
||||
|
||||
impl GlyphFormat {
|
||||
pub fn ignore_color(self) -> Self {
|
||||
match self {
|
||||
GlyphFormat::ColorBitmap => GlyphFormat::Bitmap,
|
||||
_ => self,
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns the ImageFormat that a glyph should be stored as in the texture cache.
|
||||
/// can_use_r8_format should be set false on platforms where we have encountered
|
||||
/// issues with R8 textures, so that we do not use them for glyphs.
|
||||
pub fn image_format(&self, can_use_r8_format: bool) -> ImageFormat {
|
||||
match *self {
|
||||
GlyphFormat::Alpha |
|
||||
GlyphFormat::TransformedAlpha |
|
||||
GlyphFormat::Bitmap => {
|
||||
// GlyphFormat::Bitmap glyphs could be stored in an R8 texture. However, we currently
|
||||
// support drawing ColorBitmap glyphs (stored in a BGRA8 texture) in Bitmap mode, and
|
||||
// currently the text shader cannot differentiate between the two cases.
|
||||
GlyphFormat::Alpha | GlyphFormat::TransformedAlpha => {
|
||||
if can_use_r8_format {
|
||||
ImageFormat::R8
|
||||
} else {
|
||||
|
@ -775,6 +783,7 @@ impl GlyphFormat {
|
|||
}
|
||||
GlyphFormat::Subpixel |
|
||||
GlyphFormat::TransformedSubpixel |
|
||||
GlyphFormat::Bitmap |
|
||||
GlyphFormat::ColorBitmap => ImageFormat::BGRA8,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -312,7 +312,7 @@ pub enum ShaderColorMode {
|
|||
SubpixelWithBgColorPass1 = 4,
|
||||
SubpixelWithBgColorPass2 = 5,
|
||||
SubpixelDualSource = 6,
|
||||
BitmapShadow = 7,
|
||||
Bitmap = 7,
|
||||
ColorBitmap = 8,
|
||||
Image = 9,
|
||||
MultiplyDualSource = 10,
|
||||
|
@ -321,12 +321,11 @@ pub enum ShaderColorMode {
|
|||
impl From<GlyphFormat> for ShaderColorMode {
|
||||
fn from(format: GlyphFormat) -> ShaderColorMode {
|
||||
match format {
|
||||
GlyphFormat::Alpha |
|
||||
GlyphFormat::TransformedAlpha |
|
||||
GlyphFormat::Bitmap => ShaderColorMode::Alpha,
|
||||
GlyphFormat::Alpha | GlyphFormat::TransformedAlpha => ShaderColorMode::Alpha,
|
||||
GlyphFormat::Subpixel | GlyphFormat::TransformedSubpixel => {
|
||||
panic!("Subpixel glyph formats must be handled separately.");
|
||||
}
|
||||
GlyphFormat::Bitmap => ShaderColorMode::Bitmap,
|
||||
GlyphFormat::ColorBitmap => ShaderColorMode::ColorBitmap,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,11 +16,11 @@ fuzzy(1,1) == shadow-huge.yaml shadow-huge-ref.yaml
|
|||
== decorations.yaml decorations-ref.yaml
|
||||
skip_on(android,device) fuzzy(1,3635) fuzzy-if(platform(swgl),3,13395) == decorations-suite.yaml decorations-suite.png # Fails on Pixel2
|
||||
== 1658.yaml 1658-ref.yaml
|
||||
fuzzy(2,405) fuzzy-if(platform(swgl),2,1508) == split-batch.yaml split-batch-ref.yaml
|
||||
fuzzy(2,405) == 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,1324) == shadow-grey.yaml shadow-grey-ref.yaml
|
||||
skip_on(android) fuzzy(1,828) fuzzy-if(platform(swgl),2,1538) == 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
|
||||
|
|
|
@ -29,7 +29,7 @@ fuzzy(0-2,0-440) == boxshadow-skiprect.html boxshadow-skiprect-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
|
||||
== 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,0-6,378-4500) == boxshadow-rotated.html boxshadow-rotated-ref.html # Bug 1211264
|
||||
fuzzy(0-26,0-3610) fuzzy-if(d2d,0-26,0-5910) fuzzy-if(webrender,0-6,400-4500) == 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.
|
||||
|
|
|
@ -1646,7 +1646,7 @@ fuzzy-if(skiaContent,0-1,0-65536) == 654950-1.html 654950-1-ref.html # Quartz al
|
|||
== 655836-1.html 655836-1-ref.html
|
||||
!= 656875.html about:blank
|
||||
== 658952.html 658952-ref.html
|
||||
fuzzy-if(skiaContent,0-10,0-919) fuzzy-if(webrender&&cocoaWidget,2-2,4-23) == 660682-1.html 660682-1-ref.html
|
||||
fuzzy-if(skiaContent,0-10,0-919) fuzzy-if(webrender&&cocoaWidget,2-2,4-4) fuzzy-if(swgl&&cocoaWidget,2-2,148-148) == 660682-1.html 660682-1-ref.html
|
||||
fuzzy-if(d2d,0-1,0-256) fuzzy-if(skiaContent,0-1,0-68000) == chrome://reftest/content/bugs/664127-1.xhtml chrome://reftest/content/bugs/664127-1-ref.xhtml
|
||||
== 665597-1.html 665597-1-ref.html
|
||||
!= 665597-2.html 665597-2-ref.html
|
||||
|
@ -2026,7 +2026,7 @@ needs-focus != 1377447-1.html 1377447-2.html
|
|||
fuzzy-if(webrender,0-129,0-48) == 1406179.html 1406179-ref.html
|
||||
== 1406183-1.html 1406183-1-ref.html
|
||||
== 1410028.html 1410028-ref.html
|
||||
fuzzy-if(!webrender||(!gtkWidget&&!geckoview&&!swgl),1-2,17300-17500) == 1412375.html 1412375-ref.html
|
||||
fuzzy-if(!(webrender&&(gtkWidget||geckoview)&&!swgl),1-2,17300-17500) == 1412375.html 1412375-ref.html
|
||||
test-pref(font.size.systemFontScale,200) == 1412743.html 1412743-ref.html
|
||||
fuzzy(0-255,0-4054) == 1415987-1.html 1415987-1-ref.html # this is a large fuzz, without the fix the test fails in the range 246-255,3237-25110, which overlaps the fuzz range, but would still catch regressing this bug some of the time which is better than not having a test.
|
||||
== 1419820-1.html 1419820-1-ref.html
|
||||
|
@ -2036,7 +2036,7 @@ fuzzy(0-255,0-4054) == 1415987-1.html 1415987-1-ref.html # this is a large fuzz,
|
|||
== 1424680.html 1424680-ref.html
|
||||
== 1424798-1.html 1424798-ref.html
|
||||
fuzzy-if(!webrender,0-74,0-2234) == 1425243-1.html 1425243-1-ref.html
|
||||
fuzzy-if(Android,0-66,0-574) fuzzy-if(d2d,0-89,0-777) fuzzy-if(!Android&&!d2d,0-1,0-31412) fuzzy-if(webrender&&winWidget,1-1,31240-31412) fails-if(useDrawSnapshot) == 1425243-2.html 1425243-2-ref.html
|
||||
fuzzy-if(Android,0-66,0-574) fuzzy-if(d2d,0-89,0-777) fuzzy-if(!Android&&!d2d,0-1,0-31380) fuzzy-if(webrender&&winWidget&&!swgl,1-1,31240-31320) fails-if(useDrawSnapshot) == 1425243-2.html 1425243-2-ref.html
|
||||
== 1430869.html 1430869-ref.html
|
||||
== 1432541.html 1432541-ref.html
|
||||
== 1446470.html 1035091-ref.html
|
||||
|
|
|
@ -111,7 +111,7 @@ pref(layout.display-list.improve-fragmentation,false) fuzzy-if(OSX,23-23,1-1) ==
|
|||
== 115199-2b.html 115199-2-ref.html
|
||||
== 652178-1.html 652178-1-ref2.html
|
||||
fuzzy-if(cocoaWidget,0-1,0-5000) fuzzy-if(webrender&&swgl,0-1,0-9) == 745025-1.html 745025-1-ref.html
|
||||
== 820496-1.html 820496-1-ref.html
|
||||
fuzzy-if(cocoaWidget&&swgl,1-1,21-21) == 820496-1.html 820496-1-ref.html
|
||||
|
||||
# NOTE: These tests don't yet rigorously test what they're
|
||||
# trying to test (shrink-to-fit behavior), due to bug 967311.
|
||||
|
@ -133,7 +133,7 @@ fuzzy-if(cocoaWidget,0-1,0-5000) fuzzy-if(webrender&&swgl,0-1,0-9) == 745025-1.h
|
|||
== 1468654-1.html 1468654-1-ref.html
|
||||
== 1596310.html 1596310-ref.html
|
||||
|
||||
== content-url-element.html image.html
|
||||
fuzzy-if(cocoaWidget&&swgl,1-1,21-23) == content-url-element.html image.html
|
||||
fuzzy-if(cocoaWidget&&swgl,0-1,0-23) == content-url-pseudo.html content-url-pseudo-ref.html
|
||||
|
||||
== quirks.html quirks-ref.html
|
||||
|
@ -163,7 +163,7 @@ fuzzy-if(cocoaWidget&&swgl,0-1,0-23) == content-url-pseudo.html content-url-pseu
|
|||
== fieldset-00J.html fieldset-00J-ref.html
|
||||
== fieldset-00J-grid.html fieldset-00J-ref.html
|
||||
== fieldset-00K.html fieldset-00K-ref.html
|
||||
== fieldset-00L.html fieldset-00L-ref.html
|
||||
fuzzy-if(cocoaWidget&&swgl,1-1,21-21) == fieldset-00L.html fieldset-00L-ref.html
|
||||
|
||||
== block-max-height-001.html block-max-height-001-ref.html
|
||||
== block-max-height-002.html block-max-height-001-ref.html
|
||||
|
|
|
@ -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,7-10,19336-20088) == 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,7670-7982) fuzzy-if(webrender&&swgl,11-12,14052-14056) == same-filter.html same-filter-ref.html
|
||||
|
|
|
@ -50,11 +50,11 @@ fuzzy-if(/^Windows\x20NT\x2010\.0/.test(http.oscpu)||webrender,0-1,0-10000) == i
|
|||
== invert-over-one.html invert-over-one-ref.html
|
||||
fuzzy-if(webrender,0-1,0-10000) fuzzy-if(d2d,0-1,0-10000) == invert-percent.html invert-percent-ref.html
|
||||
== invert-zero.html invert-zero-ref.html
|
||||
fuzzy-if(webrender&&!geckoview,1-1,10000-10000) fuzzy-if(d2d,0-1,0-10000) == opacity.html opacity-ref.html
|
||||
fuzzy-if(webrender&&!geckoview&&!swgl,1-1,10000-10000) fuzzy-if(d2d,0-1,0-10000) == opacity.html opacity-ref.html
|
||||
== opacity-one.html opacity-one-ref.html
|
||||
== opacity-over-one.html opacity-over-one-ref.html
|
||||
fuzzy-if(skiaContent,0-1,0-10000) == opacity-over-one-translucent-source.html opacity-over-one-translucent-source-ref.html
|
||||
fuzzy-if(webrender&&!geckoview,1-1,10000-10000) fuzzy-if(d2d,0-1,0-10000) == opacity-percent.html opacity-percent-ref.html
|
||||
fuzzy-if(webrender&&!geckoview&&!swgl,1-1,10000-10000) fuzzy-if(d2d,0-1,0-10000) == opacity-percent.html opacity-percent-ref.html
|
||||
== opacity-zero.html opacity-zero-ref.html
|
||||
== saturate.html saturate-ref.html
|
||||
fuzzy-if(webrender&&!geckoview,1-1,10000-10000) fuzzy-if(d2d,0-1,0-10000) == saturate-desaturate.html saturate-desaturate-ref.html
|
||||
|
|
|
@ -223,7 +223,7 @@ skip pref(security.fileuri.strict_origin_policy,true) == filter-extref-different
|
|||
== filter-foreignObject-01.svg pass.svg
|
||||
== filter-in-mask-01.svg pass.svg
|
||||
== filter-invalidation-01.svg pass.svg
|
||||
fuzzy(0-71,0-821) fails-if(winWidget) fuzzy-if(webrender&&OSX&&!swgl,1-1,216-458) == filter-on-continuation-box-01.html filter-on-continuation-box-ref.html
|
||||
fuzzy(0-71,0-821) fails-if(winWidget) fuzzy-if(webrender&&OSX,1-1,216-458) == filter-on-continuation-box-01.html filter-on-continuation-box-ref.html
|
||||
== filter-result-01.svg filter-result-01-ref.svg
|
||||
== filter-scaled-01.svg pass.svg
|
||||
fuzzy-if(skiaContent,0-1,0-500) == filter-scaled-02.html filter-scaled-02-ref.html
|
||||
|
@ -613,5 +613,5 @@ fails-if(Android) != mask-resource.html about:blank # The image the test uses is
|
|||
!= bug-1562091.html bug-1562091-ref.html
|
||||
== 1570363-1.html 1570363-1-ref.html
|
||||
|
||||
fuzzy-if(webrender,0-1,0-150) fuzzy-if(!webrender,0-2,0-7882) == mask-opacity-invalidation-1.html mask-opacity-invalidation-1-ref.html # clip-path mask/opacity optimization
|
||||
fuzzy-if(webrender,0-1,0-96) fuzzy-if(!webrender,0-2,0-7882) == mask-opacity-invalidation-1.html mask-opacity-invalidation-1-ref.html # clip-path mask/opacity optimization
|
||||
skip-if(Android) skip-if(cocoaWidget&&webrender) skip-if(/^Windows\x20NT\x2010\.0/.test(http.oscpu)) == transform-animation-on-path.html transform-animation-on-path-ref.html #Bug 1638909
|
||||
|
|
|
@ -51,10 +51,10 @@ fuzzy-if(webrender,36-40,1096-1162) == clip-path-ellipse-008.html clip-path-elli
|
|||
== clip-path-inset-001b.html clip-path-inset-001-ref.html
|
||||
== clip-path-inset-001c.html clip-path-inset-001-ref.html
|
||||
# Anti-aliasing behavior for masking and borders is different
|
||||
fuzzy-if(!webrender,0-64,0-146) fuzzy-if(webrender,0-1,0-2) == clip-path-inset-002a.html clip-path-inset-002-ref.html
|
||||
fuzzy-if(!webrender,0-64,0-146) fuzzy-if(webrender,0-1,0-2) == clip-path-inset-002b.html clip-path-inset-002-ref.html
|
||||
fuzzy-if(!webrender,0-64,0-146) fuzzy-if(webrender,0-1,0-2) == clip-path-inset-002c.html clip-path-inset-002-ref.html
|
||||
fuzzy-if(!webrender,0-64,0-340) fuzzy-if(webrender,0-1,0-2) == clip-path-inset-003.html clip-path-inset-003-ref.html
|
||||
fuzzy-if(!webrender,0-64,0-146) fuzzy-if(webrender&&!swgl,0-1,0-2) fuzzy-if(webrender&&swgl,1-1,24-24) == clip-path-inset-002a.html clip-path-inset-002-ref.html
|
||||
fuzzy-if(!webrender,0-64,0-146) fuzzy-if(webrender&&!swgl,0-1,0-2) fuzzy-if(webrender&&swgl,1-1,24-24) == clip-path-inset-002b.html clip-path-inset-002-ref.html
|
||||
fuzzy-if(!webrender,0-64,0-146) fuzzy-if(webrender&&!swgl,0-1,0-2) fuzzy-if(webrender&&swgl,1-1,24-24) == clip-path-inset-002c.html clip-path-inset-002-ref.html
|
||||
fuzzy-if(!webrender,0-64,0-340) fuzzy-if(webrender&&!swgl,0-1,0-2) fuzzy-if(webrender&&swgl,1-1,49-49) == clip-path-inset-003.html clip-path-inset-003-ref.html
|
||||
|
||||
== clip-path-stroke-001.html clip-path-stroke-001-ref.html
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
disabled:
|
||||
if webrender and (os == "linux"): https://bugzilla.mozilla.org/show_bug.cgi?id=1526468
|
||||
expected:
|
||||
if swgl: PASS
|
||||
if os == "mac": FAIL
|
||||
if webrender and (os == "win"): FAIL
|
||||
if webrender and (os == 'android'): FAIL
|
||||
|
|
|
@ -2,3 +2,5 @@
|
|||
expected:
|
||||
if webrender: PASS
|
||||
FAIL
|
||||
fuzzy:
|
||||
if swgl: maxDifference=1-1;totalPixels=11016-11016
|
||||
|
|
|
@ -2,3 +2,5 @@
|
|||
expected:
|
||||
if webrender: PASS
|
||||
FAIL
|
||||
fuzzy:
|
||||
if swgl: maxDifference=1-1;totalPixels=11664-11664
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
[box-shadow-041.html]
|
||||
fuzzy:
|
||||
if swgl: maxDifference=1-1;totalPixels=2304-2304
|
|
@ -0,0 +1,3 @@
|
|||
[box-shadow-042.html]
|
||||
fuzzy:
|
||||
if swgl: maxDifference=1-1;totalPixels=2664-2664
|
|
@ -1,5 +1,5 @@
|
|||
[t32-opacity-basic-0.6-a.xht]
|
||||
expected:
|
||||
if os == "linux": PASS
|
||||
if webrender and not swgl and (os == "android"): PASS
|
||||
if webrender and (os == "android"): PASS
|
||||
FAIL
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[t422-rgba-a0.6-a.xht]
|
||||
expected:
|
||||
if os == "linux": PASS
|
||||
if webrender and not swgl and (os == "android"): PASS
|
||||
if webrender and (os == "android"): PASS
|
||||
FAIL
|
||||
|
|
|
@ -4,3 +4,5 @@
|
|||
if webrender and (os == "android"): PASS
|
||||
if (os == "mac") and not webrender: FAIL
|
||||
if (os == "android"): FAIL
|
||||
fuzzy:
|
||||
if swgl and ((os == "win") or (os == "mac")): maxDifference=1-1;totalPixels=76-90
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[t425-hsla-basic-a.xht]
|
||||
expected:
|
||||
if webrender and not swgl and (os == "android"): PASS
|
||||
if webrender and (os == "android"): PASS
|
||||
if os == "linux": PASS
|
||||
FAIL
|
||||
|
|
|
@ -4,3 +4,5 @@
|
|||
if (os == "android") and swgl: FAIL
|
||||
if webrender and (os == "android"): PASS
|
||||
if (os == "android"): FAIL
|
||||
fuzzy:
|
||||
if swgl and ((os == "win") or (os == "mac")): maxDifference=1-1;totalPixels=76-90
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
[clip-path-circle-001.html]
|
||||
expected:
|
||||
if not webrender: FAIL
|
||||
fuzzy:
|
||||
if swgl: maxDifference=1-1;totalPixels=168-168
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
[clip-path-circle-002.html]
|
||||
expected:
|
||||
if not webrender: FAIL
|
||||
fuzzy:
|
||||
if swgl: maxDifference=1-1;totalPixels=168-168
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
[clip-path-circle-003.html]
|
||||
expected:
|
||||
if not webrender: FAIL
|
||||
fuzzy:
|
||||
if swgl: maxDifference=1-1;totalPixels=168-168
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
[clip-path-circle-004.html]
|
||||
expected:
|
||||
if not webrender: FAIL
|
||||
fuzzy:
|
||||
if swgl: maxDifference=1-1;totalPixels=168-168
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
[clip-path-circle-005.html]
|
||||
expected:
|
||||
if not webrender: FAIL
|
||||
fuzzy:
|
||||
if swgl: maxDifference=1-1;totalPixels=168-168
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
[clip-path-circle-006.html]
|
||||
expected:
|
||||
if not webrender: FAIL
|
||||
fuzzy:
|
||||
if swgl: maxDifference=1-1;totalPixels=168-168
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
[clip-path-circle-007.html]
|
||||
expected:
|
||||
if not webrender: FAIL
|
||||
fuzzy:
|
||||
if swgl: maxDifference=1-1;totalPixels=168-168
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
[clip-path-circle-008.html]
|
||||
expected:
|
||||
if not webrender: FAIL
|
||||
fuzzy:
|
||||
if swgl: maxDifference=1-1;totalPixels=168-168
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
[clip-path-ellipse-001.html]
|
||||
expected:
|
||||
if not webrender: FAIL
|
||||
fuzzy:
|
||||
if swgl: maxDifference=1-1;totalPixels=78-78
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
[clip-path-ellipse-002.html]
|
||||
expected:
|
||||
if not webrender: FAIL
|
||||
fuzzy:
|
||||
if swgl: maxDifference=1-1;totalPixels=78-78
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
[clip-path-ellipse-003.html]
|
||||
expected:
|
||||
if not webrender: FAIL
|
||||
fuzzy:
|
||||
if swgl: maxDifference=1-1;totalPixels=168-168
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
[clip-path-ellipse-004.html]
|
||||
expected:
|
||||
if not webrender: FAIL
|
||||
fuzzy:
|
||||
if swgl: maxDifference=1-1;totalPixels=78-78
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
[clip-path-ellipse-005.html]
|
||||
expected:
|
||||
if not webrender: FAIL
|
||||
fuzzy:
|
||||
if swgl: maxDifference=1-1;totalPixels=78-78
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
[clip-path-ellipse-006.html]
|
||||
expected:
|
||||
if not webrender: FAIL
|
||||
fuzzy:
|
||||
if swgl: maxDifference=1-1;totalPixels=78-78
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
[clip-path-ellipse-007.html]
|
||||
expected:
|
||||
if not webrender: FAIL
|
||||
fuzzy:
|
||||
if swgl: maxDifference=1-1;totalPixels=78-78
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
[clip-path-ellipse-008.html]
|
||||
expected:
|
||||
if not webrender: FAIL
|
||||
fuzzy:
|
||||
if swgl: maxDifference=1-1;totalPixels=78-78
|
||||
|
|
|
@ -3,4 +3,5 @@
|
|||
if not webrender: FAIL
|
||||
if webrender: PASS
|
||||
fuzzy:
|
||||
if os != "win" and swgl: maxDifference=1-1;totalPixels=10000-10000
|
||||
if os == "win" and webrender: maxDifference=92;totalPixels=10894
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
[color-001.html]
|
||||
expected:
|
||||
if webrender and not swgl and (os == "win"): FAIL
|
||||
if webrender and (os == "win"): FAIL
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
[color-002.html]
|
||||
expected:
|
||||
if webrender and not swgl and (os == "win"): FAIL
|
||||
if webrender and (os == "win"): FAIL
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
[color-003.html]
|
||||
expected:
|
||||
if webrender and not swgl and (os == "win"): FAIL
|
||||
if webrender and (os == "win"): FAIL
|
||||
|
|
Загрузка…
Ссылка в новой задаче