Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync changes from mozilla-central gfx/wr #3839

Merged
merged 2 commits into from Jan 22, 2020
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

@@ -6228,7 +6228,7 @@ impl Default for RendererOptions {
device_pixel_ratio: 1.0,
resource_override_path: None,
enable_aa: true,
enable_dithering: true,
enable_dithering: false,
debug_flags: DebugFlags::empty(),
max_recorded_profiles: 0,
precache_flags: ShaderPrecacheFlags::empty(),
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -149,21 +149,10 @@ impl Reftest {
}
}

/// Check the negative case (expecting inequality) and report details if same
fn check_and_report_inequality_failure(
&self,
comparison: ReftestImageComparison,
) -> bool {
match comparison {
ReftestImageComparison::Equal => {
println!("REFTEST TEST-UNEXPECTED-FAIL | {} | image comparison", self);
println!("REFTEST TEST-END | {}", self);
false
}
ReftestImageComparison::NotEqual { .. } => {
true
}
}
/// Report details of the negative case
fn report_unexpected_equality(&self) {
println!("REFTEST TEST-UNEXPECTED-FAIL | {} | image comparison", self);
println!("REFTEST TEST-END | {}", self);
}
}

@@ -704,7 +693,15 @@ impl<'a> ReftestHarness<'a> {
// Ensure that the final image *doesn't* match the reference
let test = images.pop().unwrap();
let comparison = test.compare(&reference);
t.check_and_report_inequality_failure(comparison)
match comparison {
ReftestImageComparison::Equal => {
t.report_unexpected_equality();
false
}
ReftestImageComparison::NotEqual { .. } => {
true
}
}
}
ReftestOp::Accurate => {
// Ensure that *all* images match the reference
@@ -724,14 +721,18 @@ impl<'a> ReftestHarness<'a> {
}
ReftestOp::Inaccurate => {
// Ensure that at least one of the images doesn't match the reference
let mut found_mismatch = false;
let all_same = images.iter().all(|image| {
match image.compare(&reference) {
ReftestImageComparison::Equal => true,
ReftestImageComparison::NotEqual { .. } => false,
}
});

for test in images.drain(..) {
let comparison = test.compare(&reference);
found_mismatch |= t.check_and_report_inequality_failure(comparison);
if all_same {
t.report_unexpected_equality();
}

found_mismatch
!all_same
}
}
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.