Skip to content

Conversation

@eqrion
Copy link
Contributor

@eqrion eqrion commented Jan 29, 2017

@jrmuizel


This change is Reviewable

@glennw
Copy link
Member

glennw commented Jan 30, 2017

The reftest is failing on CI - I haven't looked into why yet.

@bors-servo
Copy link
Contributor

☔ The latest upstream changes (presumably #806) made this pull request unmergeable. Please resolve the merge conflicts.

@eqrion
Copy link
Contributor Author

eqrion commented Jan 30, 2017

Okay, I got run_tests.py/headless working locally on my machine.

The reftest failure is in the opacity test. Using 50% opacity on rgb(0,255,0) is giving rgb(127,255,127), while I hardcoded the reference to rgb(128,255,128). It was passing on my machine so I'm guessing it's hardware/software related. I don't know of any easy fix besides adding reftest fuzzing, so I'll remove the reftest for now.

@glennw
Copy link
Member

glennw commented Jan 30, 2017

The tests are always run on the OSMesa software rasterizer, and we compile a specific version of that to be used on the CI machines. So it should be fine to just update the reftest to expect the value that you're seeing on the CI machines.

@glennw
Copy link
Member

glennw commented Jan 30, 2017

(Or to be more specific, when running the tests locally, we should be using the headless mode - this will mean tests run locally should always match the results on CI).

Copy link
Member

@kvark kvark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got a few styling notes, nothing major. Looks good.

}

fn as_filter_op(&self) -> Option<FilterOp> {
if let Some(s) = self.as_str() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this function body is overly verbose and could be reduced by some refactoring
not required for this PR though

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I definitely agree. It'd be nice to have something like define-enum-conversion that works with more general enums.


// FIXME handle these
let filters: Vec<FilterOp> = Vec::new();
let filters: Vec<FilterOp> = yaml["filters"].as_vec_filter_op().unwrap_or(vec![]);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: doesn't need explicit type here

if let Some(v) = self.as_vec() {
Some(v.iter().map(|x| x.as_filter_op().unwrap()).collect())
} else {
if let Some(op) = self.as_filter_op() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this asks for self.as_filter_op().map(|op| vec![op])

@eqrion
Copy link
Contributor Author

eqrion commented Jan 31, 2017

Investigating the opacity reftest further, it looks like it's not just the color that's off but there is a one pixel border on the bottom and right edges that is a different color than the rest of the rect.

For now I think it's easiest to remove the test and maybe add it in later.

@glennw
Copy link
Member

glennw commented Jan 31, 2017

@bors-servo r+

@bors-servo
Copy link
Contributor

📌 Commit c9aced4 has been approved by glennw

@bors-servo
Copy link
Contributor

⌛ Testing commit c9aced4 with merge cd5a2ba...

bors-servo pushed a commit that referenced this pull request Jan 31, 2017
Support filters in wrench

@jrmuizel

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/801)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

☀️ Test successful - status-travis

@bors-servo bors-servo merged commit c9aced4 into servo:master Jan 31, 2017
@eqrion eqrion deleted the wrench-filter branch April 6, 2017 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants