Frame rate switching method and apparatus
AssigneeHonor Device Co., Ltd.
InventorsLifeng Cai, Kai Zhang, Xuechen Sun
Life of this patent
Estimating the term…
Abstract
Embodiments of this application provide a frame rate switching method and apparatus, applied to the field of terminal technologies. The method includes: drawing and rendering, by an application thread, a first image frame at a frame interval corresponding to a first frame rate in a first period; drawing and rendering, by the application thread, a second image frame at a frame interval corresponding to a second frame rate in a second period, where the second period is preceded by the first period, and the second frame rate is different from the first frame rate.
Claims14
A frame rate switching method, comprising:
- drawing and rendering, by an application thread, a first image frame at a frame interval corresponding to a first frame rate in a first period;
- obtaining, by a compositing thread, a vertical synchronization identifier (VsyncID) of the first image frame from a frame interval array in the first period, wherein the VsyncID of the first image frame is a currently latest VsyncID stored in the frame interval array, and the frame interval array stores a plurality of VsyncIDs and frame intervals respectively corresponding to the plurality of VsyncIDs;
- generating, by the compositing thread, a frame interval modification notification message based on the VsyncID of the first image frame;
- transmitting, by the compositing thread, the frame interval modification notification message to a Vsync thread;
- drawing and rendering, by the application thread, a second image frame at a frame interval corresponding to a second frame rate in a second period, wherein the second period is preceded by the first period, and the second frame rate is different from the first frame rate;
- triggering, by a system, the compositing thread to transmit a first frame-rate-switching request to a hardware composer in a third period, wherein the third period is preceded by the second period, or the third period coincides with the second period;
- and
- switching, by the hardware composer, a frame rate from the first frame rate to the second frame rate in response to the first frame-rate-switching request so that the second image frame is displayed at the second frame rate.
Dependencies are inferred from the claim text.