Skip to content

Rendering loop: replace the Arc<AtomicBool> with a Cell<bool> for has_pending_animation_tick in ScriptThread #37946

@gterzian

Description

@gterzian

has_pending_animation_tick: Arc<AtomicBool>,

Could be a Cell<bool> instead, and the shared ownership introduced with the clone below

let trigger_script_thread_animation = self.has_pending_animation_tick.clone();

could be replaced by a call to set_has_pending_animation_tick in the timer callback as seen the below:

with_script_thread(|script_thread| {
    script_thread.set_has_pending_animation_tick();
 })

I'm marking as an easy issue for someone who wants to make the actual code change.

Metadata

Metadata

Assignees

Labels

E-less-complexStraightforward. Recommended for a new contributor.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions