Reduce render allocations and redundant work in core components
This commit is contained in:
@@ -2051,7 +2051,11 @@ impl RenderOnce for Input {
|
||||
canvas
|
||||
.with_animation(
|
||||
animation_id,
|
||||
Animation::new(CARET_BLINK_INTERVAL * 2).repeat(),
|
||||
// The blink needs four repaints per period,
|
||||
// not the display's refresh rate.
|
||||
Animation::new(CARET_BLINK_INTERVAL * 2)
|
||||
.repeat()
|
||||
.with_max_fps(4.0),
|
||||
|canvas, _| canvas,
|
||||
)
|
||||
.into_any_element()
|
||||
|
||||
Reference in New Issue
Block a user