Fix blade validation failure (#9172)

Fix: #9167

Release Notes:

- N/A
This commit is contained in:
白山風露 2024-03-12 00:06:20 +09:00 committed by GitHub
parent 830e107921
commit eb5e18c66d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 17 additions and 29 deletions

View file

@ -859,12 +859,11 @@ impl<'a> ElementContext<'a> {
shadow_bounds.dilate(shadow.spread_radius);
self.window.next_frame.scene.insert_primitive(Shadow {
order: 0,
blur_radius: shadow.blur_radius.scale(scale_factor),
bounds: shadow_bounds.scale(scale_factor),
content_mask: content_mask.scale(scale_factor),
corner_radii: corner_radii.scale(scale_factor),
color: shadow.color,
blur_radius: shadow.blur_radius.scale(scale_factor),
pad: 0,
});
}
}
@ -877,6 +876,7 @@ impl<'a> ElementContext<'a> {
let content_mask = self.content_mask();
self.window.next_frame.scene.insert_primitive(Quad {
order: 0,
pad: 0,
bounds: quad.bounds.scale(scale_factor),
content_mask: content_mask.scale(scale_factor),
background: quad.background,
@ -919,6 +919,7 @@ impl<'a> ElementContext<'a> {
self.window.next_frame.scene.insert_primitive(Underline {
order: 0,
pad: 0,
bounds: bounds.scale(scale_factor),
content_mask: content_mask.scale(scale_factor),
color: style.color.unwrap_or_default(),
@ -944,6 +945,7 @@ impl<'a> ElementContext<'a> {
self.window.next_frame.scene.insert_primitive(Underline {
order: 0,
pad: 0,
bounds: bounds.scale(scale_factor),
content_mask: content_mask.scale(scale_factor),
thickness: style.thickness.scale(scale_factor),
@ -1000,6 +1002,7 @@ impl<'a> ElementContext<'a> {
.scene
.insert_primitive(MonochromeSprite {
order: 0,
pad: 0,
bounds,
content_mask,
color,
@ -1054,12 +1057,11 @@ impl<'a> ElementContext<'a> {
.scene
.insert_primitive(PolychromeSprite {
order: 0,
grayscale: false,
bounds,
corner_radii: Default::default(),
content_mask,
tile,
grayscale: false,
pad: 0,
});
}
Ok(())
@ -1096,6 +1098,7 @@ impl<'a> ElementContext<'a> {
.scene
.insert_primitive(MonochromeSprite {
order: 0,
pad: 0,
bounds,
content_mask,
color,
@ -1131,12 +1134,11 @@ impl<'a> ElementContext<'a> {
.scene
.insert_primitive(PolychromeSprite {
order: 0,
grayscale,
bounds,
content_mask,
corner_radii,
tile,
grayscale,
pad: 0,
});
Ok(())
}