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

Implement partial support for `box-shadow` and add support for clipping out (rectangle subtraction) to the clipper. #11

Merged
merged 1 commit into from Oct 7, 2015

Conversation

@pcwalton
Copy link
Collaborator

pcwalton commented Oct 6, 2015

Known issues:

  • Clipping out does not clip the uv coordinates properly.
  • Clipping to rounded rectangle corners does not work yet.
  • Box shadows with elliptical radii are unsupported (also in master
    Servo).
  • Box shadows with heterogeneous radii for each corner are unsupported
    (also in master Servo).

This PR depends on some changes to Servo to support the new border
radius field in box shadow display items: servo/servo#7896

r? @glennw

@pcwalton pcwalton force-pushed the pcwalton:box-shadow branch from 17eb288 to 41e51fd Oct 6, 2015
out (rectangle subtraction) to the clipper.

Known issues:

* Clipping out does not clip the uv coordinates properly.

* Clipping to rounded rectangle corners does not work yet.

* Box shadows with elliptical radii are unsupported (also in master
  Servo).

* Box shadows with heterogeneous radii for each corner are unsupported
  (also in master Servo).

This PR depends on some changes to Servo to support the new border
radius field in box shadow display items: servo/servo#7896
let t1 = precise_time_ns();
let ms = (t1 - self.t0) as f64 / 1000000f64;
//if ms > 0.1 {
if self.name.chars().next() != Some(' ') {

This comment has been minimized.

@glennw

glennw Oct 6, 2015

Member

Was this just to reduce log spam?

@glennw
Copy link
Member

glennw commented Oct 6, 2015

@pcwalton Nice, looks fairly straight forward. Just the one question / change above, then I'll merge it.

};

// FIXME(pcwalton): Clip the u and v too.
let mut result = vec![];

This comment has been minimized.

@Manishearth

Manishearth Oct 6, 2015

Member

with_capacity

This comment has been minimized.

@Manishearth

Manishearth Oct 6, 2015

Member

(My clipping PR has some reusable buffers that could be used here to be even more efficient)

glennw added a commit that referenced this pull request Oct 7, 2015
Implement partial support for `box-shadow` and add support for clipping out (rectangle subtraction) to the clipper.
@glennw glennw merged commit 81c2017 into servo:master Oct 7, 2015
nox pushed a commit to nox/webrender that referenced this pull request Aug 6, 2016
Setup continuous integration with Travis CI.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.