CN-121996184-A - Display method and electronic equipment
Abstract
The embodiment of the application provides a display method and electronic equipment, and relates to the technical field of display. The problem of the electronic equipment with the chirality decline is solved. The method comprises the steps of generating first discard information after first operation is detected, responding to the first discard information and a first vertical synchronous signal when the number of frames of rendering data in a buffer queue is larger than or equal to a first number, taking out at least two frames of rendering data from the buffer queue, wherein the taken out at least two frames of rendering data comprise the first rendering data, the first number is a positive integer larger than 1, displaying first image frames of the first rendering data, storing second rendering data of the first operation in the buffer queue, taking out the second rendering data from the buffer queue after the second vertical synchronous signal is generated, and displaying second image frames corresponding to the second rendering data.
Inventors
- MA DA
Assignees
- 荣耀终端股份有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20241108
Claims (18)
- 1. A display method, applied to an electronic device, the electronic device including a buffer queue storing rendering data for synthesizing image frames, the method comprising: Generating first discard information after the first operation is detected; When the frame number of the rendering data in the buffer queue is greater than or equal to a first number, responding to the first discarding information and a first vertical synchronizing signal, and taking out at least two frames of rendering data from the buffer queue, wherein the at least two frames of rendering data taken out comprise first rendering data; displaying a first image frame of the first rendering data; storing second rendering data of the first operation into the cache queue; After generating a second vertical synchronization signal, the second rendering data is fetched from the cache queue, wherein the second vertical synchronization signal and the first vertical synchronization signal are both synchronization signals triggering processing of the rendering data, and the second vertical synchronization signal is a synchronization signal generated after the first vertical synchronization signal; and displaying a second image frame corresponding to the second rendering data.
- 2. The method of claim 1, wherein the at least two frames of rendering data fetched further comprise third rendering data, and wherein after the at least two frames of rendering data are fetched from the cache queue, the method further comprises: discarding the third rendering data, wherein the third rendering data is stored in the cache queue earlier than the first rendering data.
- 3. The method of claim 1 or 2, wherein after storing the second rendering data of the first operation in the cache queue, the cache queue further includes fourth rendering data, the method further comprising: generating second discard information, the second discard information being discard information generated after the first discard information; Retrieving the fourth rendering data from the buffer queue in response to the second discard information and the second vertical synchronization signal, in case that a number of frames of the rendering data in the buffer queue is greater than or equal to a first number; Discarding the fourth rendering data.
- 4. The method according to claim 1, wherein the method further comprises: Generating third discard information after the second operation is detected; When the buffer queue comprises fifth rendering data and the number of frames of the rendering data in the buffer queue is smaller than a first number, responding to the third discarding information and a third vertical synchronizing signal, and taking out a frame of the fifth rendering data from the buffer queue, wherein the third vertical synchronizing signal is a synchronizing signal triggering the rendering data processing; and displaying a third image frame of the fifth rendering data.
- 5. The method according to claim 1, wherein the method further comprises: Generating fourth discard information after the third operation is detected; When the frame number of the rendering data in the buffer queue is larger than or equal to a second number, responding to the fourth discarding information and a fourth vertical synchronizing signal, and taking out at least three frames of rendering data from the buffer queue, wherein the fourth vertical synchronizing signal is a synchronizing signal triggering the processing of the rendering data; discarding the seventh rendering data and eighth rendering data; And displaying a fourth image frame of the sixth rendering data.
- 6. The method of claim 5, wherein retrieving at least two frames of rendering data from the cache queue in response to the first discard information and the first vertical synchronization signal if the number of frames of rendering data in the cache queue is greater than or equal to a first number, comprises retrieving two frames of rendering data from the cache queue in response to the first discard information and the first vertical synchronization signal if the number of frames of rendering data in the cache queue is greater than or equal to the first number and less than the second number.
- 7. The method of claim 5, wherein prior to fetching at least three frames of rendering data from the cache queue, the method further comprises: And determining the third operation as a folding sliding operation, wherein folding sliding acceleration corresponding to the third operation is larger than a preset acceleration threshold value.
- 8. The method of claim 1, wherein retrieving the at least two frames of rendering data from the cache queue comprises retrieving all of the rendering data in the cache queue.
- 9. The method of any of claims 1-8, wherein the first operation is a fold-back sliding operation, and the fold-back sliding speed corresponding to the first operation is less than a preset speed threshold.
- 10. The method according to any of claims 1-9, wherein a maximum number of generated discard information does not exceed a third number before the first operation ends.
- 11. The method of any of claims 1-10, wherein the electronic device comprises a display screen, the method further comprising, prior to the generating the first discard information: detecting the sliding direction change of the user finger on the display screen; after the sliding direction is changed, the detected sliding track is larger than a preset distance value; determining that the first operation is detected.
- 12. The method of any of claims 1-11, wherein the electronic device comprises a display screen having a touch layer, the electronic device further comprising a touch-driven and input event manager, the method further comprising, after detecting the first operation: The touch driving trigger scans the touch layer to obtain one or more touch parameters, wherein the one or more touch parameters comprise a touch position, touch force and touch duration; the touch control driver generates an original input event corresponding to the one or more touch control parameters; the touch control driver configures a first mark bit in the original input event; The touch control driver reports the original input event carrying the first mark bit to the input event manager; The generating the first discard information includes the input event manager generating the first discard information in response to the first flag bit carried in the original input event.
- 13. The method of claim 12, wherein the electronic device further comprises an image synthesizer, the method further comprising: the input event management transparently passes the first discard information to the image synthesizer; The step of responding to the first discarding information and the first vertical synchronizing signal and retrieving at least two frames of rendering data from the buffer queue comprises the step of responding to the first discarding information and the first vertical synchronizing signal and retrieving at least two frames of rendering data from the buffer queue by the image synthesizer.
- 14. The method of claim 13, wherein the electronic device further comprises a first status register, wherein the image compositor fetches at least two frames of rendering data from the cache queue in response to the first discard information and a first vertical synchronization signal, comprising: The image synthesizer is used for responding to the first discarding information, and when the number of frames of rendering data in the buffer queue is greater than or equal to the first number, the first state register is modified from a first value to a second value; and when the first state register is a second value, the image synthesizer responds to the first vertical synchronous signal and fetches at least two frames of rendering data from the cache queue.
- 15. The method of claim 14, wherein after fetching at least two frames of rendering data from the cache queue, the method further comprises: the image compositor modifies the first status register from the second value to the first value to indicate that only one frame of rendering data is fetched from the buffer queue in response to a vertical synchronization signal.
- 16. An electronic device comprising a memory, a processor and a computer program stored on the memory, characterized in that the processor executes the computer program to carry out the steps of the method of any one of claims 1-15.
- 17. A computer readable storage medium having stored thereon a computer program/instruction, which when executed by a processor, implements the steps of the method of any of claims 1-15.
- 18. A computer program product comprising computer programs/instructions which, when executed by a processor, implement the steps of the method of any of claims 1-15.
Description
Display method and electronic equipment Technical Field The embodiment of the application relates to the technical field of display, in particular to a display method and electronic equipment. Background With continuous iteration of the electronic device, the requirement of the user on the human-computer interaction efficiency of the electronic device is higher. The fluency of the picture is one of important indexes for evaluating the man-machine interaction efficiency of the electronic equipment by a user. The smoothness of the picture of the electronic equipment is greatly influenced by the handedness of the electronic equipment. It will be appreciated that the chirality of an electronic device may be embodied as the length of delay time from "user input of an interactive operation to the electronic device" to "display of a graphical interface corresponding to the interactive operation by the electronic device". The longer the length of the delay time, the worse the chirality. Disclosure of Invention The embodiment of the application provides a display method and electronic equipment, which are used for improving the heel chirality of the electronic equipment when detecting the interactive operation made by a user. In order to achieve the above purpose, the embodiment of the present application adopts the following technical scheme: In a first aspect, an embodiment of the present application provides a display method. The method is applied to the electronic equipment. The electronic device includes a buffer queue that may store rendering data for synthesizing image frames. The rendering data may be, for example, rendered frames drawn by an application running in the foreground in the electronic device. It will be appreciated that during the running of the application program foreground, an interactive operation of the user, such as the first operation, is detected, and the faster the image frame corresponding to the first operation is displayed, the better the following chirality of the electronic device is indicated. In some embodiments, the electronic device may generate the first discard information immediately after detecting the first operation. After the first discard information is generated, a determination may be triggered as to whether a number of frames of rendering data in the buffer queue is greater than or equal to a first number, the first number being a positive integer greater than 1. If the number of frames of the rendering data in the buffer queue is greater than or equal to the first number, determining that the buffer queue has a problem of frame stacking. Accordingly, at least two frames of rendering data are reduced in the buffer queue in response to the first vertical synchronization signal. The reduced at least two frames of rendering data include the first rendering data. The electronic device may synthesize a first image frame corresponding to the first rendering data, and display the first image frame. In addition, the application program running in the foreground can draw and render second rendering data corresponding to the first operation, and the second rendering data is stored in the cache queue. In this way, after the second vertical synchronization signal is generated, the second rendering data is fetched from the buffer queue, and the second image frame corresponding to the second rendering data is synthesized. The second vertical synchronization signal and the first vertical synchronization signal are both synchronization signals triggering processing of rendering data, and the second vertical synchronization signal is the next synchronization signal generated after the first vertical synchronization signal. Therefore, when the first vertical synchronization signal is received, the time length of waiting to be processed in the buffer queue of the second rendering data corresponding to the first operation is reduced by consuming at least two frames of rendering data at the same time, and further, the time length between receiving the first operation and displaying the second image frame is shortened. Therefore, in the scene of frame accumulation rendering, the decline of chirality is avoided, and the man-machine interaction efficiency of the electronic equipment is improved. In some embodiments, the fetched at least two frames of rendering data further comprise third rendering data. After fetching at least two frames of rendering data from the buffer queue, the third rendering data may be discarded in addition to the first image frame synthesizing the first rendering data. Optionally, the third rendering data is stored in the buffer queue earlier than the first rendering data. Optionally, the frame number of the third rendering data is arranged before the frame number of the first rendering data. It can be understood that each frame of rendering data corresponds to a frame number, and the arrangement sequence between the frame numbers can indicate the original display s