Image display method and electronic equipment
By increasing the Vsync signal frequency to 360Hz, the response delay problem of electronic devices during user interaction is solved, faster picture and chirality is achieved, especially at high refresh rate, which significantly improves the response speed.
Patent Information
- Application Number
- CN202410034308.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-09
- Publication Date
- 2025-07-18
AI Technical Summary
In the prior art, electronic devices have slow response speed when touching the display screen for interactive operation, resulting in poor chirality, especially with significant delays under high refresh rate.
By increasing the Vsync signal frequency of the display screen, for example from 120Hz to 360Hz, shortening the image display driver waiting time, quickly respond to user interactions and refreshing the display data.
It effectively shortens the time for electronic devices to respond to user touch operations, improves display screen and chirality, and significantly reduces delays at high refresh rates.
Smart Images

Figure CN120340385A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of display technology, and in particular to an image display method and an electronic device. Background Art
[0002] The refresh rate of the display screen of the electronic device can be 60 Hz, 70 Hz, 75 Hz, 80 Hz, 90 Hz or 120 Hz, etc. When the display screen uses different refresh rates for image display, the time length that the image display driver of the electronic device waits for sending the image to the display screen (sending the image is writing the display data of the image to the display screen) to drive the display screen to display the screen change is also different. Take the display screen using refresh rates of 60 Hz and 120 Hz for image refresh display as an example. When the display screen uses a refresh rate of 60 Hz, the waiting time for the image display driver to write the display data of the image to the display screen can reach up to 1 / 60 seconds (s) ≈ 0.01667 (s) ≈ 16.667 milliseconds (ms). When the display screen uses a refresh rate of 120 Hz, the waiting time for the image display driver to write the display data of the image to the display screen also needs to reach up to 1 / 120 (s) ≈ 0.00833 (s) ≈ 8.33 (ms).
[0003] However, when users use electronic devices, it is common for them to touch the display screen to interact. If the image display driver waits for the display data of the image to be written to the display screen to drive the display screen to display the image, the longer the electronic device's overall response to the user's touch operation to display the screen changes will be worse. Even when the electronic device's display screen uses a 120Hz refresh rate to respond to the user's touch operation to display the screen changes, the user will still feel that the screen changes are poorly followed. Therefore, how to effectively shorten the response time of the electronic device to the user's touch operation, thereby improving the display screen's follow-up performance with the user's touch operation, is a technical problem that needs to be solved in the current field. Summary of the invention
[0004] The embodiments of the present application provide an image display method and an electronic device, which are used to shorten the time taken for the electronic device to change the display screen in response to the user interaction operation, thereby improving the tracking performance of the display screen in response to the user interaction operation.
[0005] To achieve the above object, the embodiments of the present application adopt the following technical solutions: When the image display driver of the electronic device increases the frequency of the output Vsync signal, the image display driver responds to the Vsync signal after the frequency increase, and writes the display data of the image obtained by the electronic device in response to the user's interaction operation into the display screen of the electronic device, so as to quickly drive the display screen to display the image. In this way, it is possible to effectively shorten the time consumed for the electronic device to respond to user interactions such as touch and change the display screen, thereby improving the followability of the display screen of the device to change with user interactions.
[0006] In a first aspect, the present application provides an image display method. This method is applied to an electronic device. At a first moment, the electronic device generates a first Vsync signal. In response to the first Vsync signal, the display screen of the electronic device displays a first image. At a second moment, the electronic device responds to the user's interaction operation and obtains the display data of the second image corresponding to the interaction operation. At a third moment after the second moment, the electronic device generates a second Vsync signal. In response to the second Vsync signal, the display screen displays a second image. Among them, the first image is an image composed of multiple identical image frames. The first Vsync signal corresponds to a first Vsync period, the second Vsync signal corresponds to a second Vsync period, and the second Vsync period is less than the first Vsync period. Moreover, the time interval between the second moment and the third moment is also less than the first Vsync period.
[0007] In the present application, the display screen of the electronic device outputs a first Vsync signal at the first moment, and the first Vsync signal corresponds to a first Vsync period. Moreover, the display screen starts to display the first image in response to the first Vsync signal at the first moment. The electronic device increases the frequency of the Vsync signal output by the display screen during the process of continuously displaying the first image on the display screen. At a second moment after the first moment, the electronic device responds to the user's interaction operation and obtains the display data of the second image corresponding to the interaction operation. At a third moment after the second moment, the display screen outputs a second Vsync signal with an increased frequency corresponding to a second Vsync period less than the first Vsync period, and in response to the second Vsync signal, the display screen quickly refreshes and displays the second image.
[0008] Since the electronic device increases the frequency of the output Vsync signal, thus, after receiving the display data of the second image corresponding to the user interaction operation, the electronic device can respond to the second Vsync signal with a smaller Vsync period and refresh and display the display data of the second image after only waiting for a very short time, so as to achieve quick response to the user interaction operation for image refresh display. In this way, the image display method provided by this application can effectively shorten the time consumed for the electronic device to respond to user touch and other interaction operations for display screen change, thereby improving the followability of the display screen of the device with the change of user interaction operations.
[0009] In a possible implementation manner of the first aspect, at the fourth moment, the electronic device generates a third Vsync signal. Among them, the third Vsync signal corresponds to a third Vsync period, and the second Vsync period is equal to the third Vsync period. The fourth moment is after the first moment and before the third moment.
[0010] In this application, after the display screen starts to display the first image in response to the first Vsync signal at the first moment, the electronic device can increase the frequency of the Vsync signal output by the display screen. Thus, at any fourth moment between the first moment and the third moment, the display screen can output a third Vsync signal that is the same as the above-mentioned second Vsync signal at the increased frequency. The second Vsync signal and the third Vsync signal being the same means that the second Vsync period corresponding to the second Vsync signal is equal to the third Vsync period corresponding to the third Vsync signal.
[0011] In a possible implementation manner of the first aspect, since the electronic device does not receive any user interaction operations between the first moment and the fourth moment, the first image that the display screen starts to refresh and display at the first moment will continue to remain unchanged. Therefore, even if the electronic device generates a third Vsync signal at the fourth moment, the display screen will continue to display the first image in response to the third Vsync signal. Or, the display screen can also not respond to the third Vsync signal for image refresh, that is, the image display driver of the electronic device does not send an image to the display screen in response to the third Vsync signal at the fourth moment.
[0012] In a possible implementation manner of the first aspect, the electronic device can increase the frequency of the Vsync signal output by the display screen before responding to the user interaction operation. In this way, the above-mentioned fourth moment is before the second moment.
[0013] In a possible implementation of the first aspect, the time interval between the fourth moment and the first moment is greater than or equal to 58 ms. For example, when the electronic device generates a first Vsync signal at the first moment, and after the display screen starts to display the first image in response to the first Vsync signal, if the first display duration during which the display screen continuously displays the first image is greater than or equal to 58 ms, the electronic device increases the frequency of the Vsync signal output by the display screen. In this way, the time interval between the fourth moment when the display screen outputs the third Vsync signal at the increased frequency and the first moment is at least equal to 58 ms, or even greater than 58 ms.
[0014] In a possible implementation of the first aspect, the electronic device further includes an image display driver. Based on this, in response to the action of the display screen starting to display the first image at the first moment, the image display driver of the electronic device begins to calculate the first display duration during which the display screen displays the first image. After that, in response to the first display duration being greater than or equal to 58 ms, the image display driver sends a control instruction to the display screen to increase the frequency of the Vsync signal output by the display screen. In this way, at the fourth moment after the first moment, the display screen generates the third Vsync signal at the increased frequency.
[0015] In a possible implementation of the first aspect, before the electronic device responds to the user's interaction operation, the image display driver increases the frequency of the Vsync signal output by the display screen, and at the same time stops responding to the third Vsync signal output by the display screen at the increased frequency, or stops receiving the third Vsync signal. In this way, it can be ensured that the image display driver does not continuously monitor the Vsync signal after the display screen continuously displays the first image for 58 ms and enters the stationary state, resulting in unnecessary waste of device power consumption.
[0016] In a possible implementation of the first aspect, if the image display driver increases the frequency of the Vsync signal output before the electronic device responds to the user's interaction operation and at the same time stops responding to the Vsync signal output by the display screen at the increased frequency, when the electronic device subsequently starts to respond to the user's interaction operation, the image display driver needs to start responding to the Vsync signal again. In this way, it can be ensured that after the image display driver receives the display data of the second image obtained by the electronic device in response to the user's interaction operation and performs drawing (or drawing + rendering, or drawing + rendering + composition), it can timely receive the second Vsync signal output by the display screen and respond to the second Vsync signal to write the display data of the second image to the display screen, realizing fast driving the display screen to refresh and display the second image.
[0017] In a possible implementation of the first aspect, the electronic device can also increase the frequency of the Vsync signal output by the display screen after responding to the user's interaction operation, that is, the fourth moment is after the second moment. In this case, the image display driver can directly respond to the user's interaction operation and increase the frequency of the output Vsync signal when the electronic device responds to the user's interaction operation to start drawing the display data of the second image. In this way, after receiving the display data of the second image, the image display driver receives the second Vsync signal output by the display screen at the second moment, and thus the display screen writes the display data of the second image in response to the second Vsync signal.
[0018] In this application, by synchronously increasing the frequency of the Vsync signal output by the display screen when the image display driver starts to respond to the interaction operation performed by the user after the display screen enters the stationary state, it can be achieved that before the electronic device responds to the user's interaction operation, the display screen will not continuously output the third Vsync signal at the increased frequency. In this way, it can not only ensure that after receiving the display data of the second image, the image display driver receives and responds to the second Vsync signal output by the display screen and writes the display data of the second image into the display screen, but also further reduce the power consumption waste caused by the display screen refreshing and outputting the Vsync signal.
[0019] In a possible implementation of the first aspect, during the process of the display screen refreshing and displaying images with the Vsync period corresponding to a frequency of 120 Hz, which is 1 / 120 ≈ 8.3 ms, if the display screen also uses a frequency of 120 Hz as the frequency of the output Vsync signal, then the first Vsync period is 8.3 ms. However, if the electronic device increases the frequency of the output Vsync signal from 120 Hz to 360 Hz during the display of the first image on the display screen (assuming the display screen supports a base frequency of 360 Hz, the electronic device can increase the frequency of the output Vsync signal to 360 Hz), then the second Vsync period is 1 / 360 ≈ 2.8 ms.
[0020] In a possible implementation of the first aspect, when the second Vsync period is 2.8 ms, the interval duration between the second moment and the third moment can be less than 2.8 ms. That is, the electronic device can respond to the user's interaction operation to obtain the display data of the second image and respond to the second Vsync signal, and start refreshing and displaying the second image on the display screen within a second Vsync period of 2.8 ms at the fastest.
[0021] In a possible implementation of the first aspect, after the electronic device responds to the second Vsync signal at the third moment and the display screen starts to display the second image, the electronic device can also reduce the frequency of the Vsync signal output by the display screen. That is, at the fifth moment after the third moment, the electronic device generates a fourth Vsync signal. Herein, the fourth Vsync signal corresponds to a fourth Vsync period, and the fourth Vsync period is greater than the second Vsync period.
[0022] In a possible implementation of the first aspect, the display duration of the third image is greater than the preset interval duration; the third image is the image displayed in the previous frame at the fifth moment, and the preset interval duration is the interval duration between the fifth moment and the sixth moment minus the time consumption required to reduce the frequency of the output Vsync signal, and the sixth moment is the moment when the third image is written into the display screen.
[0023] In this application, after the display screen starts to display the second image, in response to the display duration of the third image being greater than the interval duration between the fifth moment and the sixth moment minus the time consumption required to reduce the frequency of the output Vsync signal, the electronic device reduces the frequency of the output Vsync signal. Thus, at the fifth moment after the third moment, the electronic device generates a fourth Vsync signal with a period less than the second Vsync period. Herein, the third image is the second image itself or the image in the frame after the second image. The sixth moment is the moment when the third image is written into the display screen. That is, in the case where the third image is the second image itself, the sixth moment is the third moment when the display screen responds to the third Vsync signal and starts to display the second image (at this time, the second image is written into the display screen by the display screen starting to display), and in the case where the third image is the image in the frame after the second image, the sixth moment is the moment when the display screen starts to display the image in the frame after the second image (at this time, the image in the frame after the second image is written into the display screen by the display screen starting to display). The interval length between the fifth moment and the sixth moment is the first display duration corresponding to the above first Vsync period.
[0024] Exemplarily, such as Figure 15As shown, taking the third image as the second image itself and the sixth moment as the third moment itself as an example, after the display screen starts to display the second image (Image 1) at the third moment (t6), the electronic device calculates the second display duration of Image 1 in real time. When the second display duration is greater than the interval duration of 8.3 ms between the fifth moment (t9) and t6 minus the duration consumed for reducing the output frequency of the Vsync signal (the consumed duration is the duration between the moment shown by the vertical dotted line on the right side of the figure and t6, assumed to be 1 ms), the electronic device reduces the output frequency of the Vsync signal at the moment shown by the vertical dotted line on the right side of the figure. Thus, at the t9 moment, the electronic device generates a fourth Vsync signal (Vsync signal 1) with a fourth Vsync period of 8.3 ms (greater than the second Vsync period of 2.8 ms).
[0025] In this application, by reducing the output frequency of the Vsync signal, it is possible to avoid waste of device power consumption caused by the display screen outputting the Vsync signal with increased frequency (the second Vsync signal and the third Vsync signal) for a long time, thereby achieving the purpose of saving device power consumption.
[0026] In a possible implementation manner of the first aspect, the fifth moment is N 8.3 ms away from the third moment, where N is a positive integer greater than or equal to 1.
[0027] In a possible implementation manner of the first aspect, after the display screen of the electronic device displays the second image, the image display driver of the electronic device determines whether the display data of the next frame of the second image has been received within the second display duration of the display screen displaying the second image. And, when it is determined to be yes, the image display driver reduces the output frequency of the Vsync signal of the display screen.
[0028] In this application, by further determining that the display of the second image on the display screen tends to be stable and then reducing the output frequency of the Vsync signal. In this way, it is possible to avoid waste of device power consumption caused by the display screen outputting the Vsync signal with increased frequency for a long time, thereby achieving the purpose of saving device power consumption.
[0029] In another possible implementation manner of the first aspect, after the display screen of the electronic device displays the second image, the electronic device can also detect whether the display data of the Nth frame after the second image has been received within the display duration of the (N - 1)th frame after the second image is displayed on the display screen by the image display driver. Here, N is a positive integer greater than 1.
[0030] Thus, when it is detected that within the display duration of the (N-1)th frame image after the second image is displayed on the display screen, the display data of the Nth frame image after the second image is received, the image display driver reduces the frequency of the Vsync signal output by the display screen again.
[0031] In this application, after determining that the display of the (N-1)th frame image after the second image on the display screen tends to be stable, the frequency of the output Vsync signal is reduced. This can also avoid the waste of device power consumption caused by the display screen still outputting the Vsync signal with an increased frequency after the display of the image tends to be stable.
[0032] Moreover, by reducing the frequency of the output Vsync signal after the display of the (N-1)th frame image after the second image on the display screen tends to be stable, the phenomenon of frequently increasing and decreasing the frequency of the output Vsync signal can also be avoided, thereby further saving the power consumption required for the device to frequently adjust the frequency of the output Vsync signal.
[0033] In a possible implementation manner of the first aspect, the electronic device can also stop responding to the second Vsync signal output by the display screen when the second display duration of the second image is less than or equal to the preset delay duration, so as to refuse to write the display data of the next frame image of the second image to the display screen in advance. Herein, the preset delay duration is the difference between the first Vsync period and the second Vsync period.
[0034] In this application, if the electronic device reduces the frequency of the output Vsync signal when the second display duration is greater than the above preset delay duration, the display screen will continue to refresh and output the second Vsync signal before the frequency of the output Vsync signal is reduced. At this time, it is necessary not to respond to the second Vsync signal within the second display duration, so as to avoid the second image displayed on the display screen from being interrupted in advance, resulting in the second image on the display screen becoming a short frame.
[0035] In a possible implementation manner of the first aspect, the electronic device can detect the first display duration of the first image displayed on the display screen through a first-frame detection module configured in the image display driver before the electronic device responds to the user's interaction operation. Thus, when the first display duration is greater than or equal to 58 ms and the image display driver has received the display data of the second image, the image display driver responds to the second Vsync signal output by the display screen at the third moment, so as to quickly write the display data of the second image to the display screen to drive the display screen to refresh and display the second image.
[0036] Second aspect, the present application provides an electronic device, which has the function of implementing the method described in the first aspect above. This function can be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.
[0037] Third aspect, the present application provides an electronic device, including: a processor and a memory; the memory is used to store computer program code, and the computer program code includes computer execution instructions. When the electronic device runs, the processor executes the computer execution instructions to enable the electronic device to execute the method described in the first aspect above.
[0038] Fourth aspect, the present application provides an electronic device, including: a processor; the processor is used to be coupled with the memory, and after reading the instructions in the memory, execute the method described in the first aspect above according to the instructions.
[0039] Fifth aspect, the present application provides a computer-readable storage medium, in which computer instructions are stored. When it runs on an electronic device, it enables the electronic device to execute the method described in the first aspect above.
[0040] Sixth aspect, the present application provides a computer program product containing instructions. When it runs on a computer, it enables the computer to execute the method described in the first aspect above.
[0041] Seventh aspect, a device is provided, which includes a processor for supporting an electronic device to implement the functions involved in the first aspect above. In a possible design, the device further includes a memory for storing necessary program instructions and data of the electronic device.
[0042] Among them, the technical effects brought by any one of the design methods in the second aspect to the seventh aspect can refer to the technical effects brought by different implementation methods in the first aspect, which will not be elaborated here. Description of the Drawings
[0043] Figure 1 It is a schematic diagram of a scenario where a user performs an interactive operation based on a display screen according to an embodiment of the present application;
[0044] Figure 2 It is a schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present application;
[0045] Figure 3 It is a schematic diagram of the system architecture of an electronic device in the conventional technology;
[0046] Figure 4AIt is a waveform diagram of the first-frame image display drive response when the display screen outputs a Vsync signal at a frequency of 60Hz in the conventional technology;
[0047] Figure 4B It is a waveform diagram of the first-frame image display drive response when the display screen outputs a Vsync signal at a frequency of 90Hz in the conventional technology;
[0048] Figure 4C It is a waveform diagram of the first-frame image display drive response when the display screen outputs a Vsync signal at a frequency of 120Hz in the conventional technology;
[0049] Figure 5 It is a waveform diagram of the first-frame image display drive response related to the method provided in the embodiment of the present application;
[0050] Figure 6 It is a schematic diagram of the principle of image drawing, rendering, synthesis, and image refresh display of the electronic device related to the embodiment of the present application;
[0051] Figure 7 It is a schematic diagram of the process related to the embodiment of the present application;
[0052] Figure 8 It is a schematic diagram of a control logic related to the embodiment of the present application;
[0053] Figure 9 It is a schematic diagram of the principle of increasing the frequency of the Vsync signal and performing image drawing, rendering, synthesis, and image refresh display related to the embodiment of the present application;
[0054] Figure 10 It is a schematic diagram of the principle of doubling the frequency of the Vsync signal to make the display screen perform the first-frame image refresh display related to the embodiment of the present application;
[0055] Figure 11 It is a schematic diagram of the principle of increasing the frequency of the Vsync signal by 1.5 times to make the display screen perform the first-frame image refresh display related to the embodiment of the present application;
[0056] Figure 12 It is a schematic diagram of the system architecture of an electronic device in the embodiment of the present application;
[0057] Figure 13 It is a schematic diagram of another control logic related to the embodiment of the present application;
[0058] Figure 14 It is a schematic diagram of the principle of reducing the frequency of the Vsync signal of an electronic device related to the embodiment of the present application;
[0059] Figure 15This is a schematic diagram of the principle for another electronic device in an embodiment of this application to reduce the frequency of the Vsync signal. Detailed implementation manners
[0060] An embodiment of this application provides an image display method. This method can be applied to an electronic device including a display screen. When the image display driver of the electronic device increases the frequency of the Vsync signal, in response to the Vsync signal with the increased frequency, the image display driver writes the display data of a second image obtained by the electronic device in response to a user's interaction operation into the display screen of the electronic device, so as to quickly drive the display screen to display the second image. In this way, the time consumed for the electronic device to respond to a user's touch or other interaction operations and change the display screen can be effectively shortened, thereby improving the responsiveness of the display screen of the device to change with the user's interaction operations.
[0061] It should be noted that the above-mentioned electronic device can be a mobile phone, a tablet computer, a desktop / laptop / handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, and a personal digital assistant (PDA), an augmented reality (AR) / virtual reality (VR) device, etc., which are electronic devices with a display screen. The specific form of the electronic device in the embodiment of this application is not particularly limited.
[0062] Before introducing the embodiment of this application, relevant technical terms involved in the embodiment of this application will be briefly introduced here.
[0063] 1. The base frequency of the display screen of the electronic device.
[0064] The base frequency of the display screen is also called the base frame rate, which can specifically be 60 hertz (Hz), 70 Hz, 75 Hz, 80 Hz, 90 Hz, 120 Hz, or 360 Hz, etc. In addition, the display screen may support different refresh rates, that is, the refresh rate of the display screen can be switched between the above different base frequencies. When the display screen has a base frequency of 360 Hz, it can be realized that the refresh rate of the display screen is increased from 60 Hz, 70 Hz, 75 Hz, 80 Hz, 90 Hz, or 120 Hz to 360 Hz, or the refresh rate of the display screen is decreased from 360 Hz to 60 Hz, 70 Hz, 75 Hz, 80 Hz, 90 Hz, or 120 Hz. In addition, the refresh rate of the electronic device in the embodiment of this application is the refresh rate currently used by the display screen of the electronic device. Therefore, in some feasible embodiments of this application, the refresh rate of the electronic device or the refresh rate of the display screen of the electronic device can also be called the current refresh rate.
[0065] 2. Vertical synchronization (Vsync) signal.
[0066] The Vsync signal is a periodic discrete signal involved in the process of electronic devices applying Vsync technology, which is used to trigger the hardware to refresh the display image frame. When electronic devices use Vsync technology to refresh the image display, there will be a Vsync signal triggered by the hardware (such as the display screen) every single refresh cycle (also known as refresh duration, etc.).
[0067] In addition, the name of the Vsync signal may be different in different systems or architectures. For example, in some systems or architectures, the above-mentioned Vsync signal may specifically be VSYNC_APP, or it may be VSYNC_SF or HW_VSYNC. However, no matter what the name of the Vsync signal is, as long as it is a synchronization signal with similar functions and conforms to the technical ideas of the image display method provided in the embodiments of the present application, it should be covered within the scope of protection of the present application. Moreover, in different systems or architectures, the definition of the above-mentioned Vsync signal may also be different, but similarly, no matter what definition is made for the Vsync signal, as long as it is a synchronization signal with similar functions and conforms to the technical ideas of the image display method provided in the embodiments of the present application, it should also be covered within the scope of protection of the present application.
[0068] 3. The static state of the display screen.
[0069] In the process of displaying an image based on 60Hz, 70Hz, 75Hz, 80Hz, 90Hz or 120Hz as the current refresh rate of the display screen of the electronic device, if the image display driver of the electronic device does not send an image to the display screen (write the display data of the image) for about 58ms, the display screen will enter a static state. At this time, the image displayed by the display screen appears to be static and unchanged. In addition, when the display screen is in a static state, the image display driver of the electronic device can also stop monitoring the Vsync signal of the display screen. In this way, power consumption can be reduced when the image displayed on the display screen does not change. Therefore, the static state of the display screen can also be referred to as a low power consumption mode of the display screen (or electronic device).
[0070] 4. First frame image.
[0071] After the display screen of the electronic device enters the above-mentioned stationary state, if the user of the electronic device performs interactive operations such as touch, swipe, click, etc. on the display screen (the interactive operations may also include interactive actions between the user and the electronic device through voice, gestures, and eye gaze, etc., which are not specifically limited here), the second image generated by the electronic device in response to this interactive operation is the first frame image. The image display driver writes the display data of the first frame image into the display screen to drive the display screen to display the first frame image, that is, it is manifested as the image displayed on the display screen changes again after the image displayed on the display screen stops changing.
[0072] As Figure 1 shown, assume that after the display screen of the electronic device has not changed for more than about 58 ms while displaying the left desktop image, the display screen enters the stationary state. At this time, if the user performs a left touch swipe operation on the display screen, the electronic device will respond to the left swipe operation performed by the user to generate a corresponding image obtained by translating the desktop image to the left. In this case, Figure 1 the left-translated desktop image shown on the right is the first frame image. After the display screen enters the stationary state, it responds to the image display driver to refresh and display the first frame image, that is, it is manifested as the desktop image displayed on the display screen controlled by the user changes from the stationary and unchanged state to the dynamic state of moving to the left.
[0073] The implementation manners of the embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0074] Please refer to Figure 2 , Figure 2 which is a schematic structural diagram of an electronic device 100 provided by an embodiment of the present application. As Figure 2 shown, the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 111, a power management module 112, a battery 113, an antenna 1, an antenna 2, a mobile communication module 140, a wireless communication module 150, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.
[0075] It can be understood that the structure illustrated in the embodiments of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than those shown in the figure, or combine certain components, or split certain components, or have different component arrangements. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0076] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors. Among them, the controller may be the nerve center and command center of the electronic device 100. The controller may generate operation control signals according to the instruction operation code and timing signal to complete the control of fetching and executing instructions.
[0077] A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory may save the instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can directly call it from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0078] In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0079] It can be understood that the interface connection relationships between the modules illustrated in the embodiments of the present invention are only illustrative and do not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0080] The charging management module 111 is configured to receive a charging input from a charger. While charging the battery 113, the charging management module 111 can also supply power to the electronic device through the power management module 112. The wireless communication function of the electronic device 100 can be implemented by the antenna 1, the antenna 2, the mobile communication module 140, the wireless communication module 150, the modulation and demodulation processor, and the baseband processor, etc.
[0081] The antenna 1 and the antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization rate of the antennas. For example: the antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0082] The mobile communication module 140 may provide solutions for wireless communications including 2G / 3G / 4G / 5G / 6G, etc., which are applied to the electronic device 100. The modem processor may include a modulator and a demodulator. The wireless communication module 150 may provide solutions for wireless communications including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100.
[0083] The electronic device 100 implements the display function through the GPU, the display screen 194, and the application processor, etc. The GPU is a microprocessor for image processing, which is connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or change the display information.
[0084] The display screen (or screen) 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel may include, but is not limited to, a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a mini organic light-emitting diode (MINILED), a micro organic light-emitting diode (MicroLed), a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
[0085] The electronic device 100 can implement the shooting function through the ISP, camera 193, video codec, GPU, display screen 194, application processor, etc.
[0086] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to implement the storage capacity expansion of the electronic device 200.
[0087] The internal memory 121 can be used to store computer-executable program codes, and the executable program codes include instructions.
[0088] The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 can include a program storage area and a data storage area. Among them, the program storage area can store the operating system, application programs required for at least one function (such as the sound playback function, image playback function, etc.). The data storage area can store the data created during the use of the electronic device 100 (such as audio data, phone book, etc.). In addition, the internal memory 121 can include high-speed random access memory and can also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.
[0089] The electronic device 100 can implement the audio function through the audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor, etc. Such as music playback, recording, etc.
[0090] The keys 190 include a power-on key, volume keys, etc. The indicator 192 can be an indicator light.
[0091] The sensor module 180 can include a folding angle detection sensor, pressure sensor, gyroscope sensor, barometric pressure sensor, magnetic sensor, acceleration sensor, distance sensor, proximity light sensor, fingerprint sensor, temperature sensor, touch sensor, ambient light sensor, bone conduction sensor, etc.
[0092] It should be noted that in the embodiments of the present application, the display screen of the electronic device applying the image display method provided in the embodiments of the present application belongs to the screen type that supports refreshing the interrupt of the re-execution initialization document command (source). For example, the display screen can be a display screen using low temperature polysilicon oxide (LTPO). It should be understood that based on different design requirements of actual applications, the display screen of the electronic device can of course also use other types of transistors. However, no matter what specific type the transistor used in the display screen is, as long as it belongs to the screen type that supports the refresh interrupt of the source command, it should be included in the protection scope of the image display method provided in the embodiments of the present application.
[0093] In addition, in the embodiments of the present application, the display screen can trigger the Vsync signal according to the base frequency supported by itself. For example, if the base frequency supported by the display screen is 120Hz, the display screen can trigger a Vsync signal every 8.3ms according to the refresh period of 8.3ms corresponding to 120Hz. In addition, in the embodiments of the present application, the base frequencies supported by the display screen include but are not limited to 60Hz, 120Hz, and 360Hz. In this case, the display screen can adaptively switch the base frequency to trigger Vsync signals with different refresh periods based on the control of the image display driver of the electronic device.
[0094] In addition, in the embodiments of the present application, the Vsync signal can be generated and fed back to the APP, modem processor, GPU, ISP, and controller, etc. by the above-mentioned display screen. Therefore, the Vsync signal can also be regarded as a type of tearing effect (TE) signal fed back from the display screen 194 to the processor 110.
[0095] It should be noted that the software and hardware systems of the above-mentioned electronic device can adopt a layered architecture, event-driven architecture, microkernel architecture, microservices architecture, or cloud architecture. For the convenience of understanding, the embodiments of the present application take the Android TM system as an example to elaborate on the electronic device applying the image display method provided in the embodiments of the present application in detail.
[0096] Next, in combination with Figure 3 , taking the example that the electronic device responds to the Vsync signal to send (or write) an image to the display screen for display, the software and hardware processing flow of the electronic device of the Android TM system in this process will be introduced.
[0097] As Figure 3As shown in the figure, the software and hardware architecture of the electronic device adopts a hierarchical design. Among them, the software layer includes the application layer (application, APP), the application framework layer (Framework), the hardware abstraction layer (Hal), and the kernel layer (Kernel), and the hardware layer includes the display screen (panel). The application layer can include various application programs running in the electronic device, such as: gallery, browser, theme application, and wallpaper application, etc. The application framework layer is mainly involved in services for graphics processing, such as: the image rendering service (surface flinger, SF) for rendering the to-be-displayed images given by the application, and the image composition service (GPU) for compositing multiple layers of the to-be-displayed images. The kernel layer mainly includes the image display driver, which is mainly used to send the to-be-displayed images processed and sent down by the upper layer of the system (the application layer, the application framework layer, and the hardware abstraction layer above the kernel layer) to the display screen. The hardware layer mainly includes the display screen (panel) that refreshes and displays the to-be-displayed images based on the call of the image display driver.
[0098] In the system framework of the electronic device as Figure 3 shown in the figure, the drawing and display of images need to be coordinated by each system layer based on the Vsync signal triggered by the display screen. Application programs APP such as the gallery, browser, theme application, or wallpaper application in the application layer, when receiving the Vsync signal triggered and fed back by the display screen, draw images in response to the Vsync signal. When the Vsync signal triggered by the display screen arrives, the APP sends the drawn images down to the application framework layer in response to the Vsync signal, so that the SF and GPU in the application framework layer respectively perform image rendering and layer composition processing on the drawn images to obtain the display data of the to-be-displayed images, and transfer the display data of the to-be-displayed images to the image display driver of the kernel layer through the hardware abstraction layer. When the display screen triggers the Vsync signal again, the image display driver calls the display module serial interface (DSI) through the display engine (smart display engine, SDE) in response to the Vsync signal, writes the display data of the to-be-displayed images into the DDIC of the display screen, and the DDIC of the display screen stores the image data written from the software side in the buffer, so as to control the display panel to complete the refresh display (display) of the images by scanning (or reading) the display data in the buffer.
[0099] In the above-mentioned processing flow of image display of the electronic device, since when the display screen displays images at different refresh rates, the response time for the display screen to respond to the user's touch operation and change the display screen is different.
[0100] AsFigure 4A As shown, when the display screen of an electronic device refreshes and displays images at a refresh rate of 60 Hz and simultaneously applies the Vsync technology to trigger the Vsync signal at a frequency of 60 Hz, if the upper layer of the system sends the display data of the image to the image display driver of the electronic device at time T1 after the display screen enters the static state, since a Vsync signal was just output by the display screen before this, the image display driver then needs to wait for approximately one complete refresh cycle of 16.6 ms before it can receive the next Vsync signal output by the display screen, and then respond to the Vsync signal to write the display data of the image to the display screen. That is, when the display screen refreshes and displays images at a frequency of 60 Hz, the maximum duration for the image display driver to wait to send the image to the display screen to drive the display screen to display the image can reach approximately 16.6 ms.
[0101] In addition, as Figure 4B shown, when the display screen of an electronic device has a refresh rate of 90 Hz and simultaneously applies the Vsync technology to trigger the Vsync signal at a frequency of 90 Hz for image refresh and display, the maximum duration for the image display driver of the electronic device to wait to send the image to the display screen to drive the display screen to perform image display can reach approximately 11.1 ms. And as Figure 4C shown, when the display screen has a refresh rate of 120 Hz and simultaneously applies the Vsync technology to trigger the Vsync signal at a frequency of 120 Hz for image refresh and display, the maximum duration for the image display driver to wait to send the image to the display screen to drive the display screen to perform image display can still reach approximately 8.3 ms.
[0102] However, when users use an electronic device, the scenario where they touch the display screen to interact after the display screen enters the static state commonly occurs. Thus, if the duration for the image display driver to wait to send the image to the display screen is longer, the responsiveness of the electronic device to display screen changes in response to the user's interaction operations will be worse. Even when the display screen refreshes and displays images at a refresh rate of 120 Hz, when the electronic device responds to the first-frame image corresponding to the user's interaction operation to change the display screen of the device, the image display driver also needs to wait up to approximately 8.3 ms to respond to the Vsync signal to write the display data of the first-frame image to the display screen. In this way, adding the time consumed by the upper layer of the electronic device's system to draw and render (render and / or composite) the first-frame image, users may still feel that the first-frame responsiveness of the screen change after the device's display screen is static is relatively poor.
[0103] In view of the above, how to shorten the waiting time for the image display driver to send the first frame of image to the display screen, thereby speeding up the overall response speed of the electronic device to the interactive operations performed by the user after the display screen enters a static state, and further improving the chirality of the first frame that changes with the user's interactive operations after the display screen is static, has become a technical problem that needs to be urgently solved in the current display technology field.
[0104] In view of this, an embodiment of the present application provides an image display method, in which the image display driver of the electronic device responds to a high-frequency Vsync signal to write the display data of the first frame image corresponding to the interactive operation performed by the user after the display screen enters a static state into the display screen. In this way, the image display driver does not need to wait for a maximum of 16.6ms / 11.1ms / 8.3ms like the above before writing the display data of the first frame image to the display screen, but can write the display data of the first frame image to the display screen after only waiting for a single refresh cycle (such as 2.8ms) of the high-frequency Vsync signal, so as to quickly drive the display screen to refresh the image.
[0105] In a feasible implementation of the embodiment of the present application, as Figure 5 As shown, when the display screen of the electronic device uses a 120Hz refresh rate for image refresh and triggers a Vsync signal at a frequency of 120Hz, the image display driver of the electronic device increases the frequency of the Vsync signal output by the display screen from 120Hz to 360Hz in advance. In this way, after the display screen enters a static state, if the upper layer of the system of the electronic device sends the display data of the second image obtained in response to the user's interactive operation to the image display driver of the electronic device at time T1, the image display driver can receive the Vsync signal a with the frequency increased triggered by the display screen after only waiting for a single refresh cycle corresponding to a frequency of 360Hz, which is about 2.8ms at most, so as to respond to the Vsync signal a and write the display data of the second image to the display screen to quickly drive the display screen to refresh and display the second image.
[0106] So, even with Figure 4C Compared with the solution in which the image display driver needs to wait for up to 8.3ms before writing the display data of the image to the display screen, the image display method provided in the embodiment of the present application can at least enable the image display driver to send the image to the display screen about 5.6ms (8.3ms-2.8ms) in advance. That is, the image display method provided in the embodiment of the present application effectively shortens the waiting time for the image display driver to send the image to the display screen, thereby speeding up the overall speed at which the electronic device responds to the interactive operations performed by the user after the display screen enters the static state, thereby improving the chirality of the first frame that changes with the user's interactive operation after the display screen is static.
[0107] Based on the overall overview of the image display method provided in the embodiments of the present application above, the following will sequentially elaborate on each specific embodiment of the image display method provided in the embodiments of the present application.
[0108] Next, in combination with Figure 6 , a feasible specific implementation manner of the image display method provided in the embodiments of the present application will be described.
[0109] As Figure 6 shown, during the process of the display screen (with a 360Hz base frequency) of the electronic device refreshing and displaying images at the current refresh rate of 120Hz, it is assumed that the display screen has entered a static state before the second moment (t1), and the image display driver of the electronic device has pre - increased the frequency of the Vsync signal output by the display screen from 120Hz to 360Hz. Thus, the display screen will continuously trigger the second Vsync signal (Vsync signal a) with the increased frequency of 360Hz thereafter.
[0110] After that, when the user manipulates the display screen to perform an interactive operation at the moment t1, the APP at the upper layer of the electronic device system responds to the user's interactive operation at the moment t1 to draw the display data of the second image (image 1). Then, when the APP has drawn the display data of image 1 before the moment t4, in response to the Vsync signal a output by the display screen at the moment t4, the APP sends the display data of image 1 to the image rendering service SF in the application framework layer.
[0111] After receiving the display data of image 1, SF directly starts the process of image rendering. When image 1 needs to perform layer composition, SF further sends the rendered display data of image 1 to the image composition service GPU, and the GPU starts to perform the composition process on the display data of image 1. Thus, after the GPU has completed the composition process on the display data of image 1 before the moment t6, it sends the display data of image 1 after the composition process to the image display driver.
[0112] Therefore, the image display driver can respond to the Vsync signal a triggered by the display screen at the second moment (t6), write the display data of image 1 to the display screen, and quickly drive the display screen to start refreshing and displaying image 1 from the moment t6.
[0113] After that, the image display driver reduces the frequency of the Vsync signal from 360 Hz back to 120 Hz. Thus, the display screen will trigger the Vsync signal again at a frequency of 120 Hz hereafter. In this way, since the APP continues to draw at time t4 to obtain the display data of the next frame (image 2) of image 1, and the image display driver receives the display data of image 2 within 8.3 ms when the display screen refreshes and displays image 1, the image display driver can respond to the Vsync signal triggered by the display screen at time t7 and write the display data of image 2 to the display screen, so as to drive the display screen to start refreshing and displaying image 2 at time t7.
[0114] It should be noted that Figure 6 the moments pointed by the dashed arrows shown in [figure] are all the moments when the image display driver does not receive the Vsync signal a output by the display screen. Or, in some feasible embodiments, Figure 6 the moments pointed by the dashed arrows shown in [figure] can also be the moments when the image display driver does not respond to the Vsync signal a and writes the image display data to the display screen.
[0115] Compared with the traditional solution, in the image display method provided by the embodiments of the present application, after the display screen enters the static state, if the user performs an interaction operation (such as swiping on the screen, etc.), and the electronic device responds to the user's interaction operation and obtains the display data of the first frame of the image after the device display screen becomes static, the image display driver responds to the Vsync signal with an increased frequency and writes the display data of the first frame of the image to the display screen more quickly, so as to quickly drive the display screen to refresh and display the first frame of the image. In this way, the image display method provided by the embodiments of the present application can effectively shorten the waiting time for the image display driver to send the first frame of the image to the display screen in the scenario where the display screen of the electronic device changes from static display to responding to the user's operation, thereby overall accelerating the speed of the electronic device to respond to the user's interaction operation and refresh and display the first frame of the image, and further improving the followability of the first frame when the display screen changes with the user's interaction operation after becoming static.
[0116] Based on the above overall overview of the image display method provided by the embodiments of the present application, the following will successively elaborate on each specific embodiment of the image display method provided by the embodiments of the present application.
[0117] Please refer to Figure 7 , Figure 7 which is a schematic flowchart of the image display method provided by the embodiments of the present application in a specific implementation. It should be understood that although Figure 7 shows the execution order of some method steps, the image display method provided by the embodiments of the present application can of course adopt an execution order different from that shown in the figure based on different design requirements of actual applications. That is, Figure 7The sequence of the method steps shown does not limit the execution logic sequence of the image display method provided in the embodiments of the present application. Any other reasonable variations based on Figure 7 the sequence of the method steps shown should be included within the protection scope of the image display method provided in the embodiments of the present application.
[0118] In a feasible embodiment of the image display method provided in the embodiments of the present application, at a first moment, an electronic device generates a first Vsync signal. In response to the first Vsync signal, the display screen of the electronic device displays a first image. At a second moment, the electronic device obtains the display data of a second image corresponding to the user's interaction operation in response to the interaction operation. At a third moment after the second moment, the electronic device generates a second Vsync signal. In response to the second Vsync signal, the display screen displays the second image. Among them, the first image is an image composed of multiple identical image frames. The first Vsync signal corresponds to a first Vsync period, and the second Vsync signal corresponds to a second Vsync period. The second Vsync period is less than the first Vsync period. Moreover, the time interval between the second moment and the third moment is also less than the first Vsync period.
[0119] It should be noted that in the embodiments of the present application, the display screen of the electronic device outputs a first Vsync signal at the first moment, and the first Vsync signal corresponds to a first Vsync period. Moreover, the display screen starts to display the first image in response to the first Vsync signal at the first moment. The electronic device increases the frequency of the Vsync signal output by the display screen during the process of the display screen continuously displaying the first image. At a second moment after the first moment, the electronic device obtains the display data of a second image corresponding to the interaction operation in response to the user's interaction operation. At a third moment after the second moment, the display screen outputs a second Vsync signal corresponding to a second Vsync period less than the first Vsync period at the increased frequency, and in response to the second Vsync signal, the display screen quickly refreshes and displays the second image.
[0120] In the embodiments of the present application, during the process of the display screen refreshing and displaying images with a Vsync period of 1 / 120≈8.3ms corresponding to a frequency of 120Hz, if the display screen also uses a frequency of 120Hz as the frequency of outputting the Vsync signal, then the first Vsync period is 8.3ms. However, if the electronic device increases the frequency of the output Vsync signal from 120Hz to 360Hz during the process of the display screen displaying the first image (assuming the display screen supports a base frequency of 360Hz, the electronic device can increase the frequency of the output Vsync signal to 360Hz), then the second Vsync period is 1 / 360≈2.8ms.
[0121] When the second Vsync period is 2.8 ms, the interval duration between the second moment and the third moment can be less than 2.8 ms. That is, the electronic device can respond to the user's interaction operation to obtain the display data of the second image and respond to the second Vsync signal at the fastest within a second Vsync period of 2.8 ms, and the display screen starts to refresh and display the second image.
[0122] In the embodiments of the present application, since the electronic device increases the frequency of the output Vsync signal, after the electronic device receives the display data of the second image corresponding to the user interaction operation, it can respond to the second Vsync signal with a smaller Vsync period and refresh and display the display data of the second image only after waiting for a very short time, so as to quickly respond to the user interaction operation for image refresh and display. In this way, the image display method provided in the present application can effectively shorten the time consumed for the electronic device to respond to user touch and other interaction operations to change the display screen, thereby improving the followability of the device's display screen to change with the user interaction operation.
[0123] In a feasible embodiment, when the image display method is executed by an electronic device, after the display screen enters the static state, the image display driver increases the frequency of the Vsync signal, and after receiving the display data of the first frame of image obtained by responding to the user interaction operation, in response to the Vsync signal with the increased frequency, writes the display data of the first frame of image into the display screen to realize the process of quickly driving the display screen to display the first frame of image, which can refer to Figure 7 S1 to S4 shown below.
[0124] S1: Increase the frequency of the Vsync signal.
[0125] In the embodiments of the present application, the electronic device includes the above-mentioned display screen and image display driver. The image display driver of the electronic device increases the frequency of the Vsync signal output by the display screen after the display screen of the electronic device enters the static state.
[0126] It should be noted that in the embodiments of the present application, when the first image displayed by the display screen remains unchanged for a certain period of time (such as 58 ms) starting from the first moment, it can be considered that the display screen enters the static state. For example, the image display driver can determine that the display screen enters the static state by monitoring the duration of the display of the first image on the display screen, and then can increase the frequency of the Vsync signal output by the display screen when it detects that the duration of the display of the first image on the display screen exceeds 58 ms.
[0127] In addition, whether the screen displayed by the display screen is refreshed (switching from displaying the first frame of image to displaying the second frame of image) depends on whether the image display driver writes the display data of the second frame of image to the display screen when the display screen displays the first frame of image to drive the display screen to be refreshed. Thus, the image display driver can also determine that the display screen has entered the static state at this time by recording the duration during which it continuously fails to write the display data of the image to the display screen and determining that the duration exceeds 58 ms. Thereby, the frequency of the Vsync signal output by the display screen is increased.
[0128] Exemplarily, as Figure 8 shown, after the image display driver of the electronic device receives the display data of the image sent by the SF / GPU at the upper layer of the system, it immediately refreshes the delay function (delay worker) included in itself to determine whether it has exceeded 58 ms since it last wrote the display data of the image to the display screen. If the delay worker is triggered, it indicates that the current time has exceeded 58 ms since the image display driver last sent an image to the display screen. Thus, the image display driver determines that the display screen has entered the static state at this time. In this way, the image display driver can increase the frequency of the Vsync signal output by the display screen.
[0129] S2: Receive the display data of the second image corresponding to the user interaction operation.
[0130] In the embodiment of the present application, at the second moment after the display screen of the electronic device enters the static state, the user of the electronic device triggers an interaction operation again based on the display screen. The electronic device responds to the user's interaction operation, and thus the APP at the upper layer of the system starts to draw the image corresponding to the interaction operation and determines that the drawn image is the first frame of image received after the display screen enters the static state. After that, the APP uses the display data of the first frame of image that has been drawn as the display data of the second image corresponding to the current received user interaction operation, and passes the display data of the second image to the SF and GPU for corresponding processing. After the GPU completes the synthesis processing of the display data of the second image, the GPU can directly further send the processed display data of the second image to the image display driver of the electronic device. The image display driver then receives the display data of the second image obtained by the electronic device in response to the user's interaction operation.
[0131] S3: Feedback the Vsync signal with an increased frequency.
[0132] In the embodiment of the present application, since the image display driver of the electronic device increases the frequency of the Vsync signal output by the display screen when the display screen enters the static state, the display screen of the electronic device continuously outputs the second Vsync signal with the increased frequency according to the increased frequency, and feeds back the second Vsync signal to the image display driver and other software / hardware modules in the upper layer of the electronic device system.
[0133] In the embodiment of the present application, after the electronic device starts to display the first image in response to the first Vsync signal at the first moment, the electronic device can increase the frequency of the Vsync signal output by the display screen. Thus, at any fourth moment between the first moment and the third moment, the display screen can output the third Vsync signal that is the same as the second Vsync signal at the increased frequency. The second Vsync signal and the third Vsync signal being the same means that the second Vsync period corresponding to the second Vsync signal is equal to the third Vsync period corresponding to the third Vsync signal.
[0134] In a possible implementation manner of the first aspect, since the electronic device does not receive any user interaction operations between the first moment and the fourth moment, the first image that the display screen starts to refresh and display at the first moment will continue to remain unchanged. Therefore, even if the electronic device generates the third Vsync signal at the fourth moment, the display screen will continue to display the first image in response to the third Vsync signal. Alternatively, the display screen may also not respond to the third Vsync signal for image refreshing, that is, the image display driver of the electronic device does not send an image to the display screen in response to the third Vsync signal at the fourth moment.
[0135] In a possible implementation manner of the first aspect, the electronic device can increase the frequency of the Vsync signal output by the display screen before responding to the user's interaction operation. In this way, the above-mentioned fourth moment is before the second moment.
[0136] In a possible implementation manner of the first aspect, the time interval between the fourth moment and the first moment is greater than or equal to 58 ms. For example, when the electronic device generates the first Vsync signal at the first moment, and after the display screen starts to display the first image in response to the first Vsync signal, if the first display duration during which the display screen continuously displays the first image is greater than or equal to 58 ms, the electronic device will increase the frequency of the Vsync signal output by the display screen. In this way, the time interval between the fourth moment when the display screen outputs the third Vsync signal at the increased frequency and the first moment is at least equal to 58 ms, or even greater than 58 ms.
[0137] S4: Write the display data of the second image.
[0138] In the embodiment of the present application, after the image display driver of the electronic device receives the display data of the second image, if it further receives the second Vsync signal output by the display screen, it writes the display data of the second image to the display screen in response to the second Vsync signal, so as to quickly drive the display screen to refresh and display the second image, so as to switch from the static state to the state of restarting image refresh display.
[0139] It should be noted that, in the embodiment of the present application, after the electronic device starts to draw the display data of the second image in response to the user's interaction operation and sends the display data of the second image to the image display driver, the image display driver can resume monitoring the signal of the display screen. In this way, after the image display driver receives the display data of the second image, it receives the first second Vsync signal triggered by the display screen and writes the display data of the second image to the display screen in response to the second Vsync signal.
[0140] Exemplarily, assuming that the display screen of the electronic device supports a base frequency of 360Hz, during the process of the display screen displaying the first image at the current refresh rate of 120Hz, if the duration of the display screen displaying the first image exceeds 58ms since the first moment, the image display driver determines that the display screen has entered the static state and controls the display screen to turn on the pre-set 360Hz-TE high-frequency synchronization scheme, so as to increase the frequency of the Vsync signal output by the display screen from 120Hz to 360Hz. In this way, the display screen can trigger the second Vsync signal with the increased frequency according to the second Vsync period of 2.8ms corresponding to the 360Hz frequency after that.
[0141] At the subsequent second moment, if the user performs an interaction operation by touching the display screen, the electronic device responds to the interaction operation and the APP at the upper layer of the system draws the display data of the second image corresponding to the interaction operation, and after the SF and GPU respectively perform corresponding processing (SF rendering + GPU composition) on the display data of the second image, it is sent to the image display driver. Thus, after the image display driver receives the display data of the second image sent by the GPU, it responds to the second Vsync signal output by the display screen at the third moment, so as to write the display data of the second image to the display screen within no more than 2.8ms, so as to quickly drive the display screen to display the second image.
[0142] It should be noted that in the embodiments of the present application, the 360Hz-TE high-frequency synchronization scheme can be a Vsync signal output control scheme pre-added to the display screen for the display screen to switch the frequency of the refreshed output Vsync signal as needed. It should be understood that based on different design requirements of actual applications, other Vsync signal output control schemes of the same type but with different frequency magnitudes can of course be pre-added to the display screen. For example, the 60Hz-TE low-frequency synchronization scheme and the 120Hz-TE standard frequency synchronization scheme, etc.
[0143] In addition, when the display screen responds to enabling a synchronization scheme with a certain frequency magnitude, it refreshes and outputs the Vsync signal at the period of the refresh duration of the Vsync signal corresponding to that frequency magnitude. For example, when the display screen responds to enabling the 360Hz-TE high-frequency synchronization scheme, it refreshes and outputs a Vsync signal every 2.8ms, which is the single refresh period of the Vsync signal corresponding to the 360Hz frequency. When the display screen responds to enabling the 120Hz-TE standard frequency synchronization scheme, it refreshes and outputs a Vsync signal every 8.3ms, which is the single refresh period of the Vsync signal corresponding to the 120Hz frequency. When the display screen responds to enabling the 60Hz-TE low-frequency synchronization scheme, it refreshes and outputs a Vsync signal every 16.6ms, which is the single refresh period of the Vsync signal corresponding to the 60Hz frequency.
[0144] In the embodiments of the present application, if the electronic device does not increase the frequency of the Vsync signal after the display screen enters the static state as in the traditional solution, the display screen refreshes the Vsync signal at a frequency of 60Hz. After the image display driver receives the display data of the second image, it will wait for about 16.6ms at most before waiting for the Vsync signal triggered by the display screen, and respond to the Vsync signal to write the display data of the second image into the display screen. Even if the display screen refreshes the Vsync signal at a frequency of 120Hz, after the image display driver receives the display data of the second image, it still needs to wait for about 8.3ms at most before waiting for the Vsync signal triggered by the display screen, and respond to the Vsync signal to write the display data of the second image into the display screen. However, for the image display method provided by the embodiments of the present application, after the electronic device obtains the display data of the second image by responding to the interaction operation performed by the user after the display screen enters the static state, the image display driver receives the second Vsync signal with an increased frequency within a maximum waiting duration not exceeding 2.8ms, and responds to the second Vsync signal to more quickly write the display data of the second image into the display screen. That is, the image display method provided by the embodiments of the present application can effectively shorten the duration for the image display driver to wait for sending the image to the display screen in the scenario where the display screen of the electronic device changes from static display to responding to user operations (such as swiping on the screen, etc.), thereby improving the speed at which the electronic device responds to user interaction operations to change the display screen, and further improving the followability of the display screen of the electronic device to change with user interaction operations.
[0145] In some feasible embodiments, the electronic device can increase the frequency of the Vsync signal output by the display screen before responding to the user's interaction operation. In this way, the above-mentioned fourth moment is before the second moment.
[0146] It should be noted that in the embodiments of the present application, the interval duration between the above-mentioned fourth moment and the first moment is greater than or equal to 58ms. For example, if the electronic device generates a first Vsync signal at the first moment, and after the display screen starts to display the first image in response to the first Vsync signal, if the first display duration of the first image continuously displayed by the display screen is greater than or equal to 58ms, the electronic device will increase the frequency of the Vsync signal output by the display screen. In this way, the interval duration between the fourth moment when the display screen outputs the third Vsync signal at the increased frequency and the first moment is at least equal to 58ms, or even greater than 58ms.
[0147] In an embodiment of the present application, the electronic device further includes an image display driver. Based on this, in response to the action that the display screen starts to display the first image at the first moment, the image display driver of the electronic device starts to calculate the first display duration for which the display screen displays the first image. After that, in response to the first display duration being greater than or equal to 58 ms, the image display driver sends a control instruction to the display screen to increase the frequency of the Vsync signal output by the display screen. Thus, at the fourth moment after the first moment, the display screen generates the third Vsync signal at the increased frequency.
[0148] When the image display method provided by the embodiment of the present application is executed by the electronic device, the operation of the image display driver of the electronic device to increase the frequency of the Vsync signal can be executed before the electronic device responds to the user's interaction operation. At this time, the image display driver can detect the duration for which the display screen continuously displays the first image without a change in the display screen, that is, the first display duration of the first image, and compare the first display duration with the preset duration threshold of 58 ms. Thus, when it is found through comparison that the first display duration is greater than or equal to 58 ms, the image display driver increases the frequency of the Vsync signal output by the display screen.
[0149] It should be noted that in the embodiment of the application, the first image continuously displayed by the display screen is the image before the above-mentioned second image. The first image is composed of consecutive multiple frames of the same image data. During the process of the display screen displaying the first image, the display screen shows a static state where the display screen does not change continuously. The duration threshold of 58 ms can be an empirical value pre-added by the developer or user of the electronic device to the image display driver. Or, the duration threshold of 58 ms can also be a duration value temporarily determined by the electronic device based on its own real-time system resource occupancy, device energy storage margin, and performance performance, etc. It should be understood that based on different design requirements of actual applications, the above-mentioned duration threshold can of course be other durations different from 58 ms. That is, the image display method provided by the embodiment of the present application does not limit the specific value of the duration threshold.
[0150] In some feasible embodiments, in response to the action that the display screen starts to display the first image at the first moment, the image display driver of the electronic device starts to calculate the first display duration for which the display screen displays the first image. After that, in response to the first display duration being greater than or equal to 58 ms, the image display driver sends a control instruction to the display screen to increase the frequency of the Vsync signal output by the display screen. Thus, at the fourth moment after the first moment, the display screen generates the third Vsync signal at the increased frequency.
[0151] Before the image display driver in the electronic device responds to the user's interaction operation, it increases the frequency of the Vsync signal output by the display screen, and at the same time stops responding to the third Vsync signal output by the display screen at the increased frequency, or stops receiving the third Vsync signal. In this way, it can be ensured that the image display driver will not continuously monitor the Vsync signal after the display screen continuously displays the first image for 58 ms and enters the stationary state, resulting in unnecessary waste of device power consumption.
[0152] In the application embodiment, when the image display driver of the electronic device increases the frequency of the Vsync signal output by the display screen before the electronic device responds to the user's interaction operation at the second moment, it can output a control instruction to the display screen to control the display screen to increase the frequency of the Vsync signal output. And, the image display driver also simultaneously stops responding to the third Vsync signal with an increased frequency output by the display screen at the fourth moment between the time when the output frequency of the Vsync signal is increased and the second moment, or stops receiving the third Vsync signal.
[0153] If the image display driver increases the output frequency of the Vsync signal before the electronic device responds to the user's interaction operation and at the same time stops responding to the Vsync signal output by the display screen at the increased frequency, when the subsequent electronic device starts to respond to the user's interaction operation, the image display driver needs to start responding to the Vsync signal again. In this way, it can be ensured that after the image display driver receives the display data of the second image obtained by drawing (or drawing + rendering, or drawing + rendering + compositing) in response to the user's interaction operation of the electronic device, it can timely receive the second Vsync signal output by the display screen and respond to the second Vsync signal to write the display data of the second image to the display screen, realizing fast driving the display screen to refresh and display the second image.
[0154] Exemplarily, when the display screen of an electronic device supports a base frequency of 360 Hz, if during the process of displaying an image at the first Vsync period of 8.3 ms corresponding to the current refresh rate of 120 Hz on the display screen, the image display driver of the electronic device detects that the duration of displaying the first image on the display screen since the first moment exceeds 58 ms, the image display driver determines that the display screen enters a stationary state at this time. Thus, the image display driver issues a control instruction to the display screen to control the display screen to activate a pre-set 360 Hz - TE high-frequency synchronization scheme, thereby increasing the frequency of the Vsync signal output by the display screen from 120 Hz to 360 Hz. Moreover, the image display driver also starts a mechanism to stop responding to the Vsync signal triggered at a frequency of 360 Hz by the display screen while issuing the control instruction to the display screen. In this way, even if the display screen triggers the Vsync signal after frequency increase at the second Vsync period of 2.8 ms corresponding to the 360 Hz frequency, the image display driver will not receive the Vsync signal, or, even if the image display driver receives the Vsync signal, it will not respond to the Vsync signal.
[0155] After that, at the second moment, if the user performs an interaction operation by touching the display screen, the electronic device immediately responds to the interaction operation and the APP at the upper layer of the system draws and generates the display data of the second image corresponding to the interaction operation, and after the SF and GPU respectively perform corresponding processing (SF rendering + GPU composition) on the display data of the second image, it is sent to the image display driver. And the image display driver also resumes responding to the Vsync signal triggered by the display screen when the electronic device responds to the user's interaction operation. Thus, the image display driver can receive the second Vsync signal output by the display screen at the third moment after receiving the display data of the second image sent by the GPU, and in response to the second Vsync signal, write the display data of the second image into the display screen. In this way, the image display driver can quickly drive the display screen to start displaying the second image within a maximum of 2.8 ms after receiving the display data of the second image.
[0156] In some feasible embodiments, the electronic device can also increase the frequency of the Vsync signal output by the display screen after responding to the user's interaction operation, that is, the fourth moment is after the second moment. In this case, the image display driver can directly respond to the user's interaction operation and increase the frequency of the output Vsync signal when the electronic device responds to the user's interaction operation and starts to draw the display data of the second image. In this way, the image display driver receives the second Vsync signal output by the display screen at the second moment after receiving the display data of the second image, and thus writes the display data of the second image into the display screen in response to the second Vsync signal.
[0157] When the image display driver synchronously increases the frequency of the Vsync signal output by the display screen when the electronic device starts to respond to an interaction operation performed after the display screen enters the stationary state, it can be ensured that the display screen does not continuously output the third Vsync signal at the increased frequency before the electronic device responds to the user's interaction operation. In this way, it can not only ensure that the image display driver receives and responds to the second Vsync signal output by the display screen after receiving the display data of the second image, and writes the display data of the second image into the display screen, but also further reduce the power consumption waste caused by the display screen refreshing and outputting the Vsync signal.
[0158] In the embodiment of the present application, considering further reducing the power consumption waste of the device caused by the display screen refreshing and outputting the Vsync signal at a higher frequency, when the image display method provided in the embodiment of the present application is executed by an electronic device, the operation of the image display driver of the electronic device to increase the frequency of the Vsync signal output by the display screen can also be executed after the electronic device responds to the user's interaction operation. At this time, the image display driver can synchronously increase the frequency of the Vsync signal output by the display screen when the electronic device starts to respond to an interaction operation performed after the display screen enters the stationary state.
[0159] In this way, before the display screen of the electronic device obtains the display data of the second image in response to the user's interaction operation, it will not continuously refresh and output the Vsync signal at the increased frequency, but will start to refresh and output the Vsync signal at the increased frequency only when the electronic device obtains the display data of the second image in response to the user's interaction operation. In this way, it can not only ensure that the image display driver receives and responds to the second Vsync signal with an increased frequency output by the display screen after receiving the display data of the second image, and writes the display data of the second image into the display screen, but also further reduce the power consumption waste caused by the display screen refreshing and outputting the Vsync signal at the increased frequency.
[0160] Exemplarily, as Figure 9 shown, when the display screen of the electronic device supports a base frequency of 360 Hz, if during the process of the display screen displaying an image with a single-frame image display duration of 8.3 ms corresponding to the current refresh rate of 120 Hz, the duration of the display screen continuously displaying the first image from the first moment exceeds 58 ms, the image display driver determines that the display screen has entered the stationary state.
[0161] After that, if the user performs an interaction operation by touching the display screen at the second moment (t1), the electronic device responds to the interaction operation, and the APP at the upper layer of the system draws and generates the display data of the second image (Image 1) corresponding to the interaction operation. After the SF and GPU respectively perform corresponding processing (SF rendering + GPU composition) on the display data of the second image, it is sent to the image display driver before the third moment (t6). At the same time, after the APP starts to draw the display data of Image 1 (after the moment t1 shown in the figure), the image display driver also sends a control instruction to the display screen to control the display screen to turn on the preset 360Hz-TE high-frequency synchronization scheme, thereby increasing the frequency of the output Vsync signal from 120Hz to 360Hz. Thus, the display screen starts to trigger the second Vsync signal (Vsync signal a) with the increased frequency according to the second Vsync cycle of 2.8ms corresponding to the 360Hz frequency after the moment t1. After receiving the display data of Image 1 sent by the GPU, the image display driver can respond to the Vsync signal a output by the display screen at the moment t6 and write the display data of Image 1 into the display screen, so as to quickly drive the display screen to start displaying Image 1 within no more than 2.8ms after receiving the display data of Image 1.
[0162] It should be noted that Figure 9 At the moments indicated by the dotted arrows shown above, it is either the moment when the image display driver does not receive the third Vsync signal output by the display screen, or the moment when the image display driver does not respond to the third Vsync signal to write the image display data into the display screen.
[0163] In some feasible embodiments, when the image display driver of the electronic device increases the frequency of the Vsync signal output by the display screen, it can increase the frequency of the Vsync signal by M times. Where M is a positive integer greater than 1.
[0164] Exemplarily, as Figure 6 shown, assume that the display screen with a base frequency of 360Hz initially triggers and feeds back the Vsync signal to the image display driver at a frequency of 120Hz. Then the image display driver can increase the frequency of the Vsync signal output by the display screen to M = 3 times that of 120Hz, that is, 360Hz, after the display screen enters the static state. In this way, the image display driver can respond to the Vsync signal triggered by the display screen at a frequency of 360Hz and write the display data of the second image (Image 1) into the display screen. In this way, it can be realized that within no more than 2.8ms after receiving the display data of Image 1, the image display driver quickly drives the display screen to start image refreshing to display the Image 1.
[0165] Exemplarily, as Figure 10As shown, it is assumed that a display screen with a base frequency of 360 Hz is initially triggered at a frequency of 120 Hz and feeds back a Vsync signal to the image display driver. Then, the image display driver can control the display screen to increase the frequency of the output Vsync signal to M = 2 times that of 120 Hz, that is, 240 Hz. In this way, the image display driver can respond to the Vsync signal triggered by the display screen at this 240 Hz frequency and write the display data of the second image (Image 1) to the display screen. This can achieve that the image display driver can quickly drive the display screen to start displaying Image 1 when it receives the display data of Image 1 for no more than 4.2 ms at most.
[0166] In addition, in some other feasible embodiments, the above-mentioned M may not be a positive integer, but M is still greater than 1. Exemplarily, as Figure 11 As shown, it is assumed that a display screen with a base frequency of 360 Hz is initially triggered at a frequency of 120 Hz and feeds back a Vsync signal to the image display driver. Then, the image display driver can control the display screen to increase the frequency of the output Vsync signal to M = 1.5 times that of 120 Hz, that is, 180 Hz. In this way, the image display driver can respond to the Vsync signal triggered by the display screen at this 180 Hz frequency and write the display data of the second image (Image 1) to the display screen. This can still achieve that the image display driver can quickly drive the display screen to start displaying Image 1 when it receives the display data of Image 1 for no more than 5.6 ms at most.
[0167] It should be noted that at the moments indicated by the dotted arrows in the above Figure 10 and Figure 11 , they are all the moments when the image display driver does not receive the third Vsync signal output by the display screen, or the moments when the image display driver does not respond to the third Vsync signal to write image display data to the display screen.
[0168] In some feasible embodiments, the electronic device can determine whether the second image obtained by the electronic device in response to the user's interaction operation is the first frame image received after the display screen enters the static state by combining improvements at the software level and the hardware level, and when it is determined that the second image is the first frame image, the image display driver writes the display data of the second image to the display screen in response to the Vsync signal after the frequency increase. That is, the electronic device newly adds a hardware module at the system kernel layer, and the hardware module detects whether the second image obtained by the electronic device in response to the user's interaction operation after the display screen of the device enters the static state is the first frame image. Exemplarily, as Figure 12 As shown, a first frame detection module is newly configured in the image display driver of the kernel layer of the electronic device.
[0169] Based on this, before the display screen of the electronic device receives an interaction operation performed by the user and thus does not perform processing such as image drawing in response to the interaction operation, the image display driver of the electronic device can detect the display duration of a timing image composed of multiple consecutive identical images displayed on the display screen through the first-frame detection module configured by itself, and further compare the display duration of the timing image displayed on the display screen with a preset duration threshold. If the image display driver detects that the display duration of the timing image displayed on the display screen is greater than or equal to the preset duration threshold, the image display driver can determine that the display screen has entered a static state at this time. Thus, if the image display driver receives the display data of the second image obtained by the electronic device in response to the user's interaction operation after that, the image display driver determines that the currently received display data of the second image is the display data of the first frame of image received after the display screen enters the static state. After that, the image display driver can receive the Vsync signal with an increased frequency triggered by the display screen at an increased frequency, and in response to the Vsync signal, write the display data of the second image to the display screen to quickly drive the display screen to refresh and display the second image.
[0170] It should be noted that in the embodiment of the present application, the image display driver can continuously detect the display duration of the timing image displayed on the display screen through the first-frame detection module configured by itself before the electronic device starts to respond to the interaction operation of the user. Thus, when the display duration of the timing image displayed on the display screen is greater than or equal to the preset duration threshold of 58 ms, the image display driver can determine that the display screen has entered a static state. In this way, the image display driver can determine the display data of the first frame of image (the second image) obtained by the electronic device in response to the user's interaction operation after this moment as the display data of the first frame of image received after the display screen enters the static state.
[0171] In addition, in the embodiment of the present application, the image display driver can also increase the frequency of the Vsync signal output by the display screen from 120 Hz to 360 Hz when it is determined that the display screen has entered a static state by detecting that the display duration detected by the above first-frame detection module is greater than or equal to 58 ms. Thus, the display screen starts to trigger the Vsync signal with an increased frequency according to the single refresh period of 2.8 ms of the Vsync signal corresponding to the 360 Hz frequency since it enters the static state. Or, the image display driver can also increase the frequency of the Vsync signal to 360 Hz when it receives the display data of the second image sent by the SF / GPU, so that the display screen triggers the Vsync signal with an increased frequency at a single refresh period of 2.8 ms when the image display driver receives the display data of the second image and starts to perform the preparation before sending the image.
[0172] Exemplarily, in combination withFigure 12 The system framework of the illustrated electronic device and Figure 13 The control logic for image display of the illustrated electronic device applying the image display method provided by the embodiments of the present application. Assume that when the display screen (with a base frequency of 360Hz) of the electronic device performs image display according to the Vsync period of 8.3ms corresponding to the 120Hz refresh rate, the electronic device responds to the interaction operation performed by the user, and thus the second image corresponding to the interaction operation is generated by the APP drawing and the display data of the second image is sent to the SF / GPU for corresponding processing. After the SF / GPU completes the rendering / composition processing of the display data of the second image, the display data of the second image is sent to the image display driver. Thus, after receiving the display data of the image sent by the SF / GPU in the upper layer of the electronic device system, the image display driver immediately starts the preparation before sending the image.
[0173] At this time, the image display driver obtains the result previously detected by the first-frame detection module, and when the result is that the display data of the second image currently received by the image display driver is the display data of the first-frame image received after the display screen enters the static state, the image display driver responds to the Vsync signal triggered by the display screen at the increased 360Hz frequency and writes the display data of the second image into the display screen. Thus, it is realized that after receiving the display data of the second image corresponding to the interaction operation of the user, the image display driver can quickly drive the display screen to display the second image within a maximum of 2.8ms.
[0174] In some feasible embodiments, after the electronic device responds to the second Vsync signal at the third moment and the display screen starts to display the second image, the frequency of the Vsync signal output by the display screen can also be reduced. That is, at the fifth moment after the third moment, the electronic device generates the fourth Vsync signal. Among them, the fourth Vsync signal corresponds to the fourth Vsync period, and the fourth Vsync period is greater than the second Vsync period.
[0175] It should be noted that in the embodiments of the present application, the display duration of the third image is greater than the preset interval duration; the third image is the image displayed in the previous frame at the fifth moment, and the preset interval duration is the interval duration between the fifth moment and the sixth moment minus the consumption duration required to reduce the frequency of the output Vsync signal, and the sixth moment is the moment when the third image is written into the display screen.
[0176] After the display screen starts to display the second image, in response to the display duration of the third image being greater than the time interval between the fifth moment and the sixth moment minus the time consumed to reduce the frequency of the output Vsync signal, the electronic device reduces the frequency of the output Vsync signal. In this way, at the fifth moment after the third moment, the electronic device generates a fourth Vsync signal smaller than the second Vsync period. Among them, the third image is the second image itself or a frame of image after the second image. The sixth moment is the moment when the third image is written to the display screen, that is, when the third image is the second image itself, the sixth moment is the third moment when the display screen starts to display the second image in response to the third Vsync signal (at this time, the second image is written to the display screen by the display screen starting to display), and when the third image is a frame of image after the second image, the sixth moment is the moment when the display screen starts to display a frame of image after the second image (at this time, a frame of image after the second image is written to the display screen by the display screen starting to display). The time interval between the fifth moment and the sixth moment is the first display duration corresponding to the above first Vsync period.
[0177] Exemplarily, as Figure 15 shown, taking the third image as the second image itself and the sixth moment as the third moment itself as an example, after the display screen starts to display the second image (Image 1) at the third moment (t6), the electronic device calculates the second display duration of Image 1 in real time. When the second display duration is greater than the time interval of 8.3 ms between the fifth moment (t9) and t6 minus the time consumed to reduce the frequency of the output Vsync signal (the time consumed is the time between the moment shown by the vertical dotted line on the right side of the figure and t6, assumed to be 1 ms), the electronic device reduces the frequency of the output Vsync signal at the moment shown by the vertical dotted line on the right side of the figure. In this way, at the t9 moment, the electronic device generates a fourth Vsync signal (Vsync signal 1) with a fourth Vsync period of 8.3 ms (greater than the second Vsync period of 2.8 ms).
[0178] In the embodiments of the present application, by reducing the frequency of the output Vsync signal, it is possible to avoid waste of device power consumption caused by the display screen outputting the Vsync signals (the second Vsync signal and the third Vsync signal) with increased frequencies for a long time, thereby achieving the purpose of saving device power consumption.
[0179] When the image display method provided by the embodiments of the present application is executed by an electronic device, in the case where the image display driver starts to write the display data of the second image to the display screen in response to the Vsync signal with increased frequency triggered by the display screen, the image display driver can also reduce the frequency of the Vsync signal with increased frequency back to the frequency of the Vsync signal before the increase.
[0180] Exemplarily, as Figure 13As shown, the image display driver can reduce the frequency of the output Vsync signal when it starts writing the display data of the second image to the display screen in response to the second Vsync signal but has not completed writing the display data.
[0181] In this way, after the image display driver quickly refreshes and displays the first-frame image corresponding to the user interaction operation on the display screen at a high frequency, it can avoid the power consumption waste caused by the display screen continuously triggering the Vsync signal at a high frequency, and avoid the problem of long and short frames that may occur when the display screen displays the images after the first-frame image.
[0182] In some feasible embodiments, after the display screen of the electronic device displays the second image, the electronic device can also detect whether the image display driver receives the display data of the Nth frame image after the second image within the display duration of the (N - 1)th frame image after the second image is displayed on the display screen. Here, N is a positive integer greater than 1.
[0183] In this way, when it is detected that the image display driver receives the display data of the Nth frame image after the second image within the display duration of the (N - 1)th frame image after the second image is displayed on the display screen, the image display driver then reduces the frequency of the Vsync signal output by the display screen.
[0184] In the embodiments of the present application, by determining that the display of the (N - 1)th frame image after the second image on the display screen tends to be stable, the frequency of the output Vsync signal is then reduced. This can also avoid the power consumption waste of the device caused by the display screen still outputting the Vsync signal with an increased frequency after the display of the image tends to be stable.
[0185] Moreover, by reducing the frequency of the output Vsync signal after the display of the (N - 1)th frame image after the second image on the display screen tends to be stable, the phenomenon of frequently increasing and decreasing the frequency of the output Vsync signal can also be avoided, thereby further saving the power consumption required for the device to frequently adjust the frequency of the output Vsync signal.
[0186] When the image display method provided by the embodiment of the present application is executed by an electronic device, after the image display driver writes the display data of the second image to the display screen to quickly drive the display screen to immediately display the second image, the image display driver can further adaptively reduce the frequency of the Vsync signal. In this way, the power consumption waste caused by the display screen outputting the Vsync signal at an unnecessarily high frequency for a long time can be avoided, so as to achieve the purpose of saving the device power consumption. Among them, the image display driver can timely reduce the frequency of the Vsync signal after the display screen starts to display the second image and before receiving the display data of the next frame of the second image during the second display duration of the display screen displaying the second image. At this time, after the image display driver receives the display data of the next frame of the second image, it can wait for the Vsync signal triggered by the display screen at the reduced frequency and respond to the Vsync signal to write the display data of the next frame to the display screen to drive the display screen to refresh and display the next frame of the second image.
[0187] Exemplarily, as Figure 14 shown, when the display screen of the electronic device supports a base frequency of 360Hz, if during the process of the display screen displaying an image with the Vsync period of 8.3ms corresponding to the current refresh rate of 120Hz, the duration of the display screen continuously displaying the first image from the first moment exceeds 58ms and thus enters a static state, the image display driver immediately increases the frequency of the Vsync signal output by the display screen from 120Hz to 360Hz (before the moment t1 shown by the left vertical dotted line in the figure), and simultaneously starts to stop monitoring the signal output by the display screen.
[0188] After that, if the user performs an interaction operation by touching the display screen at the second moment (t1), the electronic device immediately responds to the interaction operation, and the APP at the upper layer of the system draws and generates the display data of the second image (Image 1) corresponding to the interaction operation, and after the SF and GPU respectively perform corresponding processing on the display data of the second image (SF rendering + GPU composition), it is sent to the image display driver after the moment t5. At the same time, the image display driver also resumes monitoring the signal of the display screen to respond to the Vsync signal triggered by the display screen after the APP starts to draw the display data of Image 1 (after the moment t1 shown in the figure).
[0189] Thus, after the image display driver receives the display data of Image 1 sent by the GPU, it can respond to the second Vsync signal (Vsync signal a) with an increased frequency output by the display screen at the third moment (t6), write the display data of Image 1 to the display screen, and quickly drive the display screen to start displaying Image 1 within a maximum of 2.8ms after receiving the display data of Image 1.
[0190] After the image display driver writes the display data of Image 1 to the display screen in response to the Vsync signal a to quickly drive the display screen to refresh and display Image 1, it synchronously reduces the frequency of the Vsync signal output by the display screen for refresh from 360 Hz back to 120 Hz (after the moment shown by the vertical dotted line on the right side of the figure - after time t6). Thus, when the image display driver can normally receive the display data of the next frame of image (Image 2) within 8.3 ms when the display screen displays Image 1, in response to the Vsync signal that the display screen resumes refreshing and outputting at a frequency of 120 Hz at time t7, the image display driver writes the display data of this Image 2 to the display screen, thereby driving the display screen to display Image 2 for 8.3 ms starting from time t7 until the image refresh ends at time t8.
[0191] It should be noted that Figure 14 The moment pointed by the dotted arrow shown above is the moment when the image display driver does not receive the Vsync signal a output by the display screen, or the moment when the image display driver does not respond to the Vsync signal a to write the image display data to the display screen.
[0192] In the embodiment of the present application, the method provided in the embodiment of the present application reduces the frequency of the Vsync signal by the image display driver after the display screen displays the second image corresponding to the user interaction operation. In this way, it can avoid the power consumption waste caused by the display screen still outputting the Vsync signal at an unnecessarily high frequency for a long time after the image display driver quickly drives the display screen to refresh and display the first frame of image at a high frequency of a single refresh cycle, thereby achieving the purpose of saving the device power consumption.
[0193] In some feasible embodiments, when the image display method provided in the embodiment of the present application is executed by an electronic device, the process of the image display driver of the electronic device reducing the frequency of the Vsync signal output by the display screen can be that the image display driver detects the duration of the display screen displaying the second image, so that when the duration of the display screen displaying the second image is greater than the preset interval duration, the image display driver reduces the frequency of the Vsync signal. Among them, the preset interval duration is the difference between the duration of a single frame image display corresponding to the current refresh rate of the display screen and the duration consumed for reducing the frequency of the Vsync signal.
[0194] It should be noted that, in the embodiments of the present application, the time consumed to reduce the frequency of the Vsync signal can be an empirical value pre-added to the image display driver for the image display driver to flexibly read. Alternatively, the time consumed can also be a value temporarily determined by the electronic device based on its own real-time system resource occupancy and performance when it is necessary to determine the above preset interval duration. Similarly, the value temporarily determined can also be obtained by the image display driver at any time. It should be understood that, based on different design requirements in actual applications, the time consumed to reduce the frequency of the Vsync signal can of course be different values. For example, the time consumed can specifically be any value among 0.3ms, 0.5ms, 0.8ms, or even 1ms. That is, the method provided by the embodiments of the present application does not limit the specific value of the time consumed to reduce the frequency of the Vsync signal.
[0195] Exemplarily, when the image display driver of the electronic device detects that the display screen enters the static state, it increases the frequency of the Vsync signal output by the display screen from 120Hz to 360Hz, so as to respond to the Vsync signal with the increased frequency triggered by the display screen at 360Hz to send the image, and quickly drive the display screen to immediately display the second image corresponding to the user interaction operation. Then, during the process of the display screen displaying the second image, the image display driver further calculates the second display duration for the display screen to display the second image. Then, the image display driver can compare the second display duration with the preset interval duration (assumed to be 7.3ms, that is, when the time consumed to reduce the frequency of the Vsync signal is 1ms, the preset interval duration = the single-frame image display duration 8.3ms - the time consumed 1ms = 7.3ms).
[0196] Thus, when it is found through comparison that the second display duration is greater than or equal to 7.3ms, the image display driver determines that the display of the second image on the display screen has become stable, and reduces the frequency of the Vsync signal from 360Hz back to 120Hz. After that, the display screen refreshes at 120Hz again to trigger a new Vsync signal.
[0197] In some feasible embodiments, when the image display method provided by the embodiments of the present application is executed by an electronic device, the image display driver can also stop responding to the Vsync signal with the increased frequency triggered by the display screen when the duration for the display screen to display the second image is less than or equal to the preset delay duration, so as to refuse to write the display data of the next frame of the second image to the display screen in advance. Herein, the preset delay duration is the difference between the first Vsync period and the second Vsync period.
[0198] It should be noted that in the embodiments of the present application, if the image display driver reduces the frequency of the Vsync signal when the duration of the second image displayed on the display screen is greater than the preset delay duration, the display screen will still refresh and output the Vsync signal with the increased frequency according to the increased Vsync signal frequency of the image display driver before the frequency of the Vsync signal is reduced. At this time, it is necessary for the image display driver not to respond to the Vsync signal with the increased frequency triggered by the display screen during the second display duration of the second image displayed on the display screen, so as to avoid the second image displayed on the display screen from being interrupted prematurely, resulting in the second image displayed on the display screen becoming a short frame.
[0199] Exemplarily, as Figure 15 shown, when the image display driver of the electronic device enters the static state, the frequency of the Vsync signal output by the display screen is increased from 120 Hz to 360 Hz (before the moment t1 shown by the left vertical dotted line in the figure). Thus, at the moment t6, in response to the Vsync signal with the increased frequency triggered by the display screen at 360 Hz, the image is sent, and after quickly driving the display screen to immediately display the second image (Image 1) corresponding to the user interaction operation, the image display driver further calculates the second display duration of the display screen for displaying Image 1 during the process of the display screen displaying Image 1.
[0200] Then, the image display driver can compare the size of this second display duration with the preset interval duration (the single-frame image display duration 8.3 ms - the duration 1 ms consumed by reducing the frequency of the Vsync signal = 7.3 ms). Thus, when it is found through comparison that the second display duration is greater than or equal to 7.3 ms, the image display driver determines that the display of the second image on the display screen has tended to be stable, and reduces the frequency of the Vsync signal from 360 Hz back to 120 Hz (before the moment t9 shown by the right vertical dotted line in the figure). After that, the display screen refreshes again at 120 Hz to trigger a new Vsync signal.
[0201] And the image display driver does not respond to the Vsync signal a triggered by the display screen still at 360 Hz at the moments t7 and t8 when the display screen is displaying Image 1, especially at the moment t8 after the display data of the next frame image (Image 2) of Image 1 has been received. It is not until the image display driver waits for the Vsync signal refreshed and output by the display screen at the reduced frequency of 120 Hz at the moment t9 that it responds to this Vsync signal and writes the display data of Image 2 into the display screen, thereby driving the display screen to display Image 2 for 8.3 ms starting from the moment t9 until the image refresh ends at the moment t10.
[0202] It should be noted that the above Figure 15At the moments indicated by the dashed arrows shown, it is either the moment when the image display driver has not received the Vsync signal a output by the display screen, or the moment when the image display driver does not respond to the Vsync signal a to write image display data to the display screen.
[0203] In the embodiments of the present application, by not responding to the Vsync signal with an increased frequency triggered by the display screen within the single-frame image display duration for the display of the second image on the display screen by the image display driver, it is possible to avoid the phenomenon that the display screen only briefly displays the second image caused by the image display driver writing the display data of the next frame of the second image to the display screen in advance during the display of the second image on the display screen. That is, the stability of the electronic device for displaying the second image and subsequent images is further improved.
[0204] In some embodiments, the embodiments of the present application provide an electronic device, and this electronic device has the function of implementing the image display method described in each of the above embodiments. This function can be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.
[0205] In some embodiments, the embodiments of the present application provide an electronic device, including: a processor and a memory; the memory is used to store computer program code, and the computer program code includes computer execution instructions. When the electronic device runs, the processor executes the computer execution instructions so that the electronic device executes the image display method described in each of the above embodiments.
[0206] In some embodiments, the embodiments of the present application provide an electronic device, including: a processor; the processor is used to be coupled with the memory, and after reading the instructions in the memory, execute the image display method described in each of the above embodiments according to the instructions.
[0207] In some embodiments, the embodiments of the present application provide a computer-readable storage medium, including computer instructions. When the computer instructions run on an electronic device, the electronic device is enabled to execute the wallpaper display method described above.
[0208] In some embodiments, the embodiments of the present application provide a computer program product. When the computer program product runs on an electronic device, the electronic device is enabled to execute the image display method described in each of the above embodiments.
[0209] In some embodiments, the embodiments of the present application provide a computer program product containing instructions. When it runs on a computer, the computer can be enabled to execute the image display method described in each of the above embodiments.
[0210] In some embodiments, the embodiments of the present application provide a device, which includes a processor for supporting an electronic device to implement the functions of the image display method described in the above various embodiments. In a possible design, the device further includes a memory for storing the necessary program instructions and data of the electronic device.
[0211] Through the description of the above embodiments, those skilled in the art can clearly understand that for the convenience and conciseness of description, only the division of the above functional modules is used as an example. In actual applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
[0212] In several embodiments provided by the present application, it should be understood that the disclosed device and method can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection can be through some interfaces. The indirect coupling or communication connection of the device or unit can be in an electrical, mechanical or other form. The units described as separate components may or may not be physically separated. The components displayed as units can be one physical unit or multiple physical units, that is, they can be located in one place or distributed to multiple different places. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0213] In addition, in each embodiment of the present application, each functional unit may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of a software functional unit. If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a readable storage medium. Based on such an understanding, the technical solution of the embodiments of the present application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, may be embodied in the form of a software product. The software product is stored in a storage medium and includes several instructions for causing a device (which may be a single-chip microcomputer, a chip, etc.) or a processor to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read only memory (ROM), random access memory (RAM), magnetic disks, or optical discs that can store program codes.
[0214] The above content is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be covered by the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims
1. An image display method, characterized in that, Applied to an electronic device, the electronic device includes a display screen, and the method includes: At a first moment, the electronic device generates a first Vsync signal, and in response to the first Vsync signal, the display screen displays a first image, where the first Vsync signal corresponds to a first Vsync period; At a second moment, in response to a user's interaction operation, the electronic device obtains display data of a second image corresponding to the interaction operation; At a third moment, the electronic device generates a second Vsync signal, and in response to the second Vsync signal, the display screen displays a second image, where the second Vsync signal corresponds to a second Vsync period, the second Vsync period is less than the first Vsync period, and the time interval between the second moment and the third moment is less than the first Vsync period.
2. The method according to claim 1, characterized in that, The method further includes: At a fourth moment, the electronic device generates a third Vsync signal, where the third Vsync signal corresponds to a third Vsync period, the second Vsync period is equal to the third Vsync period, and the fourth moment is after the first moment and before the third moment.
3. The method according to claim 2, wherein The method further includes: At the fourth moment, in response to the third Vsync signal, the display screen continues to display the first image.
4. The method according to claim 2 or 3, characterized in that The fourth moment is before the second moment.
5. The method according to any one of claims 2 to 4, characterized in that, The time interval between the fourth moment and the first moment is greater than or equal to 58 ms.
6. The method according to any one of claims 2 to 5, characterized in that The electronic device further includes an image display driver, and the method further includes: In response to the display screen displaying the first image, the image display driver calculates a first display duration of the first image; In response to the first display duration being greater than or equal to 58 ms, the image display driver sends a control instruction to the display screen, and the display screen generates the third Vsync signal.
7. The method according to any one of claims 1 to 6, characterized in that The first Vsync period is 8.3 ms, and the second Vsync period is 2.8 ms.
8. The method according to any one of claims 1 to 7, characterized in that The time interval between the second moment and the third moment is less than 2.8 ms.
9. The method according to any one of claims 1 to 8, characterized in that The method further includes: At a fifth moment, the electronic device generates a fourth Vsync signal, where the fifth moment is after the third moment, and the fourth Vsync period corresponding to the fourth Vsync signal is greater than the second Vsync period.
10. The method according to claim 9, wherein The display duration of a third image is greater than a preset interval duration, the third image is the image displayed in the previous frame at the fifth moment, and the preset interval duration is the time interval between the fifth moment and a sixth moment minus the time cost required to reduce the frequency of the output Vsync signal, and the sixth moment is the moment when the third image is written into the display screen.
11. An electronic device, characterized in that, The electronic device includes: a processor and a memory, the processor is coupled to the memory; the memory is used to store computer program code; the computer program code includes computer instructions, and when the processor executes the above computer instructions, the electronic device executes the method according to any one of claims 1-10.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes computer instructions that, when run on an electronic device, cause the electronic device to execute the method according to any one of claims 1-10.