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 radial gradients #16385

Merged
merged 9 commits into from Apr 29, 2017

Pass repeating gradients to webrender.

  • Loading branch information
pyfisch committed Apr 27, 2017
commit 1c4ae53a8866c2e8a1ac600469bc53eb9bd1889c
@@ -370,10 +370,15 @@ impl WebRenderDisplayItemConverter for DisplayItem {
let start_point = item.gradient.start_point.to_pointf();
let end_point = item.gradient.end_point.to_pointf();
let clip = item.base.clip.to_clip_region(builder);
let extend_mode = if item.gradient.repeating {
ExtendMode::Repeat
} else {
ExtendMode::Clamp
};
let gradient = builder.create_gradient(start_point,
end_point,
item.gradient.stops.clone(),
ExtendMode::Clamp);
extend_mode);
builder.push_gradient(rect,
clip,
gradient,
@@ -385,10 +390,15 @@ impl WebRenderDisplayItemConverter for DisplayItem {
let center = item.gradient.center.to_pointf();
let radius = item.gradient.radius.to_sizef();
let clip = item.base.clip.to_clip_region(builder);
let extend_mode = if item.gradient.repeating {
ExtendMode::Repeat
} else {
ExtendMode::Clamp
};
let gradient = builder.create_radial_gradient(center,
radius,
item.gradient.stops.clone(),
ExtendMode::Clamp);
extend_mode);
builder.push_radial_gradient(rect,
clip,
gradient,
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.