Skip to content

Commit

Permalink
Match on RampStops::Many rather than wildcard (#750)
Browse files Browse the repository at this point in the history
  • Loading branch information
waywardmonkeys authored Nov 28, 2024
1 parent 9551ba7 commit 543791c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions vello_encoding/src/encoding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ impl Encoding {
RampStops::One(color) => {
self.encode_color(color);
}
_ => {
RampStops::Many => {
self.draw_tags.push(DrawTag::LINEAR_GRADIENT);
self.draw_data
.extend_from_slice(bytemuck::bytes_of(&gradient));
Expand All @@ -386,7 +386,7 @@ impl Encoding {
match self.add_ramp(color_stops, alpha, extend) {
RampStops::Empty => self.encode_color(palette::css::TRANSPARENT),
RampStops::One(color) => self.encode_color(color),
_ => {
RampStops::Many => {
self.draw_tags.push(DrawTag::RADIAL_GRADIENT);
self.draw_data
.extend_from_slice(bytemuck::bytes_of(&gradient));
Expand All @@ -411,7 +411,7 @@ impl Encoding {
match self.add_ramp(color_stops, alpha, extend) {
RampStops::Empty => self.encode_color(palette::css::TRANSPARENT),
RampStops::One(color) => self.encode_color(color),
_ => {
RampStops::Many => {
self.draw_tags.push(DrawTag::SWEEP_GRADIENT);
self.draw_data
.extend_from_slice(bytemuck::bytes_of(&gradient));
Expand Down

0 comments on commit 543791c

Please sign in to comment.