mirror of
https://github.com/penpot/penpot.git
synced 2026-09-10 22:19:19 +00:00
🐛 Keep text with inherited shadows off the fast paths
This commit is contained in:
parent
774f5af013
commit
87d9110ec5
@ -1404,6 +1404,13 @@ impl RenderState {
|
|||||||
.inner_shadows_visible()
|
.inner_shadows_visible()
|
||||||
.any(|s| s.is_perceptible_at_scale_for(scale, shape.is_recursive())));
|
.any(|s| s.is_perceptible_at_scale_for(scale, shape.is_recursive())));
|
||||||
|
|
||||||
|
let has_inherited_drop_shadows = !skip_drop_shadows
|
||||||
|
&& self.nested_shadows.iter().flatten().any(|shadow| {
|
||||||
|
!shadow.hidden()
|
||||||
|
&& shadow.style() == crate::shapes::ShadowStyle::Drop
|
||||||
|
&& shadow.is_perceptible_at_scale(scale)
|
||||||
|
});
|
||||||
|
|
||||||
// Clip is allowed: we apply the same stack on Current after scale+translate.
|
// Clip is allowed: we apply the same stack on Current after scale+translate.
|
||||||
// Opacity < 1 with SrcOver is OK: render_shape_enter already opened a
|
// Opacity < 1 with SrcOver is OK: render_shape_enter already opened a
|
||||||
// save_layer on Current; painting fills/strokes into that layer matches
|
// save_layer on Current; painting fills/strokes into that layer matches
|
||||||
@ -1421,8 +1428,9 @@ impl RenderState {
|
|||||||
shape.shape_type,
|
shape.shape_type,
|
||||||
Type::Rect(_) | Type::Circle | Type::Path(_) | Type::Bool(_) | Type::Frame(_)
|
Type::Rect(_) | Type::Circle | Type::Path(_) | Type::Bool(_) | Type::Frame(_)
|
||||||
) && !(shape.fills.is_empty() && has_nested_fills);
|
) && !(shape.fills.is_empty() && has_nested_fills);
|
||||||
let is_direct_text =
|
let is_direct_text = matches!(shape.shape_type, Type::Text(_))
|
||||||
matches!(shape.shape_type, Type::Text(_)) && !shape.has_visible_strokes();
|
&& !shape.has_visible_strokes()
|
||||||
|
&& !has_inherited_drop_shadows;
|
||||||
let can_render_directly = apply_to_current_surface
|
let can_render_directly = apply_to_current_surface
|
||||||
&& offset.is_none()
|
&& offset.is_none()
|
||||||
&& parent_shadows.is_none()
|
&& parent_shadows.is_none()
|
||||||
@ -1632,6 +1640,7 @@ impl RenderState {
|
|||||||
&& parent_shadows.is_none()
|
&& parent_shadows.is_none()
|
||||||
&& (skip_effects
|
&& (skip_effects
|
||||||
|| (shape.blur.is_none()
|
|| (shape.blur.is_none()
|
||||||
|
&& !has_inherited_drop_shadows
|
||||||
&& !shape
|
&& !shape
|
||||||
.drop_shadows_visible()
|
.drop_shadows_visible()
|
||||||
.any(|s| s.is_perceptible_at_scale(self.get_scale()))
|
.any(|s| s.is_perceptible_at_scale(self.get_scale()))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user