Return early when drawing image::Overlay if not visible
This commit is contained in:
parent
c4e6e42759
commit
00e4de88bf
1 changed files with 5 additions and 4 deletions
|
|
@ -536,11 +536,12 @@ where
|
||||||
) {
|
) {
|
||||||
let bounds = layout.bounds();
|
let bounds = layout.bounds();
|
||||||
let clip_bounds = bounds.zoom(self.image.scale);
|
let clip_bounds = bounds.zoom(self.image.scale);
|
||||||
let style = theme.style(&self.image.class);
|
|
||||||
|
|
||||||
let clip_bounds = clip_bounds
|
let Some(clip_bounds) = clip_bounds.intersection(&self.viewport) else {
|
||||||
.intersection(&self.viewport)
|
return;
|
||||||
.unwrap_or(self.viewport);
|
};
|
||||||
|
|
||||||
|
let style = theme.style(&self.image.class);
|
||||||
|
|
||||||
if style.shadow.color.a > 0.0 {
|
if style.shadow.color.a > 0.0 {
|
||||||
renderer.with_layer(
|
renderer.with_layer(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue