Render-Thread Animation Playback Under High UI Thread Load
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Animation interfaces in electronic devices often freeze due to high load on the main thread, leading to poor user experience.
Innovation Solution
Decouple animation processing from the main thread by using a render thread to compute, draw, and render animations, ensuring animation display is not affected by high load or time-consuming service logic.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If the UI thread processes service events and executes animations, then the animation can be displayed, but the animation interface freezes when the UI thread has high load or processes time-consuming service logic
Solution Approach 1:
The patent segments the animation processing workflow into distinct phases: the UI thread handles service events and triggers animation, while a separate render thread performs the actual animation computation, drawing, and rendering. This segmentation isolates the animation execution from the UI thread's service processing, preventing animation freezing when the UI thread is under high load.
Solution Approach 2:
The patent extracts the animation execution logic from the UI thread and places it in a dedicated render thread. The UI thread only retains the responsibility of triggering animations and providing initial/final property information, while the render thread independently handles the computationally intensive animation frame generation, thereby resolving the conflict between service processing and animation display.
2Ease of operation
If the UI thread executes animations and performs page measurement, layout, and drawing, then the user interface can be updated, but animation frame loss occurs when the UI thread is busy
Solution Approach 1:
The patent divides the animation execution responsibilities from the UI thread's interface management tasks. The render thread is dedicated solely to animation frame generation, while the UI thread focuses on page measurement, layout, and drawing. This segmentation ensures that animation frame loss is prevented as the render thread can execute animation frames without being blocked by UI thread's time-consuming operations.
Solution Approach 2:
The patent extracts the animation rendering process from the UI thread's workload. By creating a separate render thread that independently handles animation computation and frame generation, the system eliminates the time loss associated with the UI thread being busy with service events, ensuring smooth animation playback even during intensive UI operations.
3Power
If the render thread is woken up by a service thread when data is synchronized per frame, then the render thread can perform rendering, but animation drawing is not executed when the UI thread has high time consumption
Solution Approach 1:
The patent segments the thread responsibilities such that the render thread is dedicated to animation rendering while the UI thread handles service events. The render thread is triggered by the UI thread providing initial and final property information, and then independently executes the complete animation processing pipeline including computation, drawing, and rendering, ensuring high animation processing throughput independent of UI thread's service processing speed.
Data Source
AI summary
An electronic device receives a first operation of a user, which is used to trigger playing of a first animation of a first application. The electronic device invokes a user interface (UI) thread in response to the first operation, to obtain first initial property information and first final property information. The electronic device determines, through a render thread based on the first initial property information and the first final property information, at least one piece of first intermediate property information corresponding to the first animation. The electronic device draws and renders the first animation through the render thread based on the first initial property information, the first final property information, and the at least one piece of first intermediate property information, to obtain M image frames of the first animation. The electronic device plays the first animation based on the M image frames.


