Display control method, device, electronic equipment and storage medium
By determining the display time interval and screen refresh delay based on the frame rate of the interface image in electronic devices, the problem of frame rate and refresh rate mismatch is solved, resulting in a more stable and smoother display effect.
Patent Information
- Application Number
- CN202411152321.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-21
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2044-08-21
AI Technical Summary
When electronic devices display images, a mismatch between the frame rate and refresh rate can lead to reduced display smoothness and stuttering.
By determining the display time interval and screen refresh delay based on the frame rate of the interface image, and controlling the screen refresh rate in conjunction with the screen refresh rate, a mismatch between the frame rate and the expected frame rate can be avoided.
It improves the smoothness of the displayed image, ensures that the frame rate is consistent with the expected frame rate, reduces screen tearing and jitter, and enhances the stability of the display.
Smart Images

Figure CN119132260B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of electronic technology, specifically relating to a display control method, device, electronic device, and storage medium. Background Technology
[0002] With the rapid development of electronic device technology, the display applications in electronic devices (such as cameras, videos, and games) are becoming increasingly diverse. Currently, when displaying images, electronic devices display the image according to its corresponding frame rate.
[0003] In related technologies, electronic devices synchronize frame rate and refresh rate according to Vsync (Vertical Synchronization) signals. Specifically, upon receiving the current Vsync signal, the electronic device triggers the synthesis and display of one frame of image; upon receiving the next Vsync signal, it triggers the synthesis and display of the next frame of image. Typically, when controlling image synthesis and display via Vsync signals, software techniques (frame repetition technology, buffer management, frame rate conversion algorithms, etc.) cause the actual displayed frame rate to fall between the frame rate and refresh rate. This mismatch between the actual frame rate and the expected frame rate corresponding to the image results in stuttering during image display, leading to low smoothness when the electronic device displays the screen. Summary of the Invention
[0004] The purpose of this application is to provide a display control method, device, electronic device, and storage medium that can avoid the problem of mismatch between the actual frame rate and the expected frame rate corresponding to the image, thereby improving the smoothness of the displayed image, maintaining a stable and smooth frame rate, and enabling timely display.
[0005] In a first aspect, embodiments of this application provide a display control method, which includes: when generating a first interface image of a first application, determining a display time interval between the first interface image and a second interface image based on the frame rate corresponding to the first interface image, wherein the second interface image is an interface image displayed before the first interface image and adjacent to the first interface image in the interface image sequence of the first application; determining a screen refresh delay based on the display time interval and the screen refresh rate; determining a target screen refresh time based on the screen refresh delay, and controlling the screen refresh at the target screen refresh time to display the first interface image.
[0006] Secondly, embodiments of this application provide a display control device, which includes a determining module and a processing module, wherein: the determining module is configured to, when generating a first interface image of a first application, determine a display time interval between a first interface image and a second interface image based on the frame rate corresponding to the first interface image, wherein the second interface image is an interface image in the interface image sequence of the first application that is displayed before the first interface image and is adjacent to the first interface image; the determining module is further configured to determine a screen refresh delay based on the display time interval and the screen refresh rate; the processing module is configured to determine a target screen refresh time based on the screen refresh delay, and control the screen refresh at the target screen refresh time to display the first interface image.
[0007] Thirdly, embodiments of this application provide an electronic device including a processor and a memory, wherein the memory stores programs or instructions executable on the processor, and the programs or instructions, when executed by the processor, implement the steps of the method described in the first aspect.
[0008] Fourthly, embodiments of this application provide a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the steps of the method described in the first aspect.
[0009] Fifthly, embodiments of this application provide a chip, the chip including a processor and a communication interface, the communication interface being coupled to the processor, the processor being used to run programs or instructions to implement the method as described in the first aspect.
[0010] In a sixth aspect, embodiments of this application provide a computer program product stored in a storage medium, which is executed by at least one processor to implement the method described in the first aspect.
[0011] In this embodiment, when generating a first interface image for a first application, the electronic device can determine the display time interval between the first interface image and the second interface image based on the frame rate corresponding to the first interface image. The second interface image is the interface image displayed before and adjacent to the first interface image in the interface image sequence of the first application. The electronic device determines the screen refresh delay based on the display time interval and the screen refresh rate; and determines the target screen refresh time based on the screen refresh delay, and controls the screen refresh at the target screen refresh time to display the first interface image. In this solution, since the screen refresh delay is determined based on the expected frame rate corresponding to the first interface image and the screen refresh rate, the electronic device controls the screen refresh based on the screen refresh delay, which ensures that the actual frame rate of the interface image is consistent with the expected frame rate corresponding to the image, thereby keeping the screen refresh synchronized with the switching of the interface image. Thus, by fully utilizing the screen refresh rate and combining it with the screen refresh delay to control the screen refresh, the problem of mismatch between the actual frame rate and the expected frame rate corresponding to the image caused by traditional screen refresh control via vertical synchronization signals is avoided, thereby improving the smoothness of the displayed image. Attached Figure Description
[0012] Figure 1 This is one of the flowcharts of a display control method provided in some embodiments of this application;
[0013] Figure 2 This is one of the schematic diagrams showing the actual frame rate and expected frame rate of the display control method provided in some embodiments of this application;
[0014] Figure 3 These are schematic diagrams illustrating the drawing, compositing, and display process of interface images provided in some embodiments of this application;
[0015] Figure 4 This is a second flowchart of a display control method provided in some embodiments of this application;
[0016] Figure 5 This is a second schematic diagram illustrating the actual frame rate and expected frame rate of the display control method provided in some embodiments of this application;
[0017] Figure 6 This is the third flowchart of a display control method provided in some embodiments of this application;
[0018] Figure 7 This is the third schematic diagram showing the actual frame rate and expected frame rate of the display control method provided in some embodiments of this application;
[0019] Figure 8 This is the fourth flowchart of a display control method provided in some embodiments of this application;
[0020] Figure 9 This is the fifth flowchart of a display control method provided in some embodiments of this application;
[0021] Figure 10 This is the sixth flowchart of a display control method provided in some embodiments of this application;
[0022] Figure 11 These are schematic diagrams of the display control device provided in some embodiments of this application;
[0023] Figure 12 These are schematic diagrams of the structure of electronic devices provided in some embodiments of this application;
[0024] Figure 13 These are schematic diagrams of the hardware structure of electronic devices provided in some embodiments of this application. Detailed Implementation
[0025] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.
[0026] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0027] The terms "at least one," "at least one of," etc., used in the specification and claims of this application refer to any one, any two, or a combination of two or more of the included items. For example, at least one of a, b, and c can mean: "a," "b," "c," "a and b," "a and c," "b and c," and "a, b, and c," where a, b, and c can be single or multiple. Similarly, "at least two" refers to two or more items, and its meaning is similar to that of "at least one."
[0028] With the rapid development of electronic device technology, display applications in electronic devices (such as cameras, videos, and games) are becoming increasingly diverse. Currently, traditional screens require a refresh rate setting, such as 120Hz or 60Hz. The system synchronizes frames according to the Vertical Synchronization (Vsync) frequency, which is consistent with the screen refresh rate. Vsync is a technology in computer image processing used to synchronize the work of display hardware and the GPU to ensure smooth image display. When an image is updated, it needs to wait for the next Vsync signal to trigger the update. If the image is not updated, the screen will repeatedly refresh the data of the previous frame. Therefore, the supported on-screen frame rate is a frequency that can be divided by the Vsync frequency. The on-screen frame rate is the actual display frequency on the screen when a frame is updated. For example, if the Vsync frequency is 60Hz, then the supported on-screen frequencies are 60 / N (where N is an integer greater than 1), that is, Vsync frequencies of 60Hz / 30Hz / 20Hz, etc.
[0029] However, in traditional methods, synchronization is typically performed based on signals of a specific frequency. Since different frames wait for the Vsync signal at different times, a mismatch can easily occur between the actual frame rate and the expected frame rate corresponding to the image, leading to long and short frames and consequently reducing display smoothness. For example, when playing a 24fps video at a 60Hz screen refresh rate, the Vsync frequency is the same as the screen refresh rate (60Hz). The applied frame rate (video frame rate) is 24fps, and the on-screen frame rate is 20Hz (3 refresh frames) or 30Hz (2 refresh frames). Because image updates require waiting for the next Vsync signal to trigger compositing and on-screen updates, if no signal appears, the previous frame's data is repeated. Since different frames wait for the Vsync signal at different times, the intervals between image frames on screen vary, meaning the actual frame rate and the expected frame rate corresponding to the image are inconsistent. This causes frame synchronization to affect display speed, resulting in reduced display smoothness.
[0030] The display control method provided in this application, when generating a first interface image of a first application, determines the display time interval between the first interface image and the second interface image based on the frame rate corresponding to the first interface image, wherein the second interface image is the interface image preceding the first interface image; then, based on the display time interval and the screen refresh rate, a screen refresh delay is determined; thereby, the screen refresh is controlled according to the screen refresh delay to display the first interface image. Therefore, this application fully utilizes the refresh rate levels supported by the screen, allowing the system to specify the time for each frame to be displayed on the screen and control the screen's adaptive refresh rate accordingly, optimizing the problem of mismatch between the actual frame rate and the expected frame rate corresponding to the image, making the display refresh rate consistent with the application frame rate in scenarios such as video or shooting, thereby improving display smoothness; at the same time, it does not need to wait for a signal of a specific frequency to be executed synchronously, allowing the rendering, composition, and display to be executed continuously, optimizing the synchronization time and improving the response speed from rendering to display.
[0031] It should be noted that the display control method provided in this application can be executed by electronic devices such as mobile phones, tablets, laptops, PDAs, and in-vehicle electronic devices. Some embodiments of this application use electronic devices as the executing entity to illustrate the display control method provided in this application.
[0032] The display control method provided in this application will be described in detail below with reference to the accompanying drawings, through specific embodiments and application scenarios.
[0033] This application provides a display control method, such as... Figure 1 As shown, the display control method includes the following steps 301 to 303:
[0034] Step 301: When the electronic device generates the first interface image of the first application, it determines the display time interval between the first interface image and the second interface image based on the frame rate corresponding to the first interface image.
[0035] In some embodiments of this application, the first application described above may correspond to a type of application scenario. For example, the application scenario may include, but is not limited to, one of the following: camera scenario, video scenario, game scenario.
[0036] In some embodiments of this application, the user enters the application scenario by clicking on the first application.
[0037] In some embodiments of this application, the application type of the above-mentioned at least one application includes, but is not limited to, any one of the following: multimedia application, instant messaging application, game application, office application, etc.
[0038] In some embodiments of this application, the first application is an application in a preset application set, which includes at least one application, and different applications correspond to different frame rates.
[0039] For example, frame rates include 24 frames per second, 25 frames per second, 30 frames per second, and 50 frames per second, etc.
[0040] It should be noted that the film industry typically uses 24 frames per second, television broadcasting standards commonly use 25 frames per second, 30 frames per second is a widely used frame rate suitable for various games or videos, and 50 frames per second is suitable for demanding video shooting or games.
[0041] In this way, by setting the appropriate frame rate for each application according to its specific scenarios and needs, the application's screen can present a better display effect. For example, for applications that require high dynamic range (such as games and live sports events), a high frame rate (such as 60fps or higher) can be used to significantly improve the smoothness of the screen and reduce blur and tearing, thereby improving the user's viewing experience. For another example, when users watch movies or documentaries through video playback applications, a standard frame rate (such as 24fps) can be used to create a more realistic cinematic feel.
[0042] In some embodiments of this application, the aforementioned set of preset applications includes at least one application that can be a system-preset application or an application selected by the user.
[0043] In some embodiments of this application, one application in a preset application set may correspond to one frame rate. Further, the frame rate of each application is determined by the electronic device based on the actual display requirements of that application, or is user-defined, or is a frame rate determined by the application.
[0044] For example, taking a preset set of applications including an instant messaging app, a multimedia playback app, and an office app as an example, the frame rate corresponding to the instant messaging app can be 30 frames per second to 60 frames per second, the frame rate corresponding to the multimedia playback app can be 60 frames per second, 120 frames per second, and 240 frames per second, and the frame rate corresponding to the office app can be 30 frames per second to 60 frames per second.
[0045] In this way, by setting an application set and setting a frame rate for each application in the application set, and with each application corresponding to a frame rate, this application can make full use of the screen refresh rate of the corresponding application for different applications, and control the screen refresh by combining the screen refresh delay, thus avoiding the limitations of the display control method when different applications are present, thereby improving the smoothness of the display screen of different applications.
[0046] In some embodiments of this application, the first interface image described above can be any interface image in the first application.
[0047] In some embodiments of this application, the first interface image described above may be composed of at least one interface image element.
[0048] In some embodiments of this application, the second interface image is an interface image displayed before the first interface image and adjacent to the first interface image in the interface image sequence of the first application.
[0049] It should be noted that the application's user interface image refers to the visual interface presented to the user by the application. It is usually a complete view composed of various graphics, text, controls, and other interface elements. This interface image is the interface that the user directly interacts with when operating the application, showing the application's functions, status, and information.
[0050] In some embodiments of this application, after the electronic device starts the first application and enters the application scenario of the first application, it switches to the instant refresh and display mode. In this mode, the display system and screen do not need to display according to the triggering of the Vsync signal, but display the interface image according to the frame rate of the interface image and the refresh rate of the screen.
[0051] It should be noted that the refresh rate mode refers to the mode that displays images without relying on the Vsync signal. The refresh rate mode can also be called the adaptive refresh rate mode.
[0052] In some embodiments of this application, the electronic device can determine the frame rate corresponding to the first interface image, and when generating the first interface image of the first application, calculate the display time interval between the first interface image and the previous frame interface image (i.e., the second interface image) based on the frame rate.
[0053] Understandably, this display time interval can be the display duration of the second interface image.
[0054] For example, assuming the frame rate corresponding to the first interface image determined by the electronic device is 120 frames / second, then when generating the first interface image of the first application, the display time interval between the first interface image and the previous frame interface image is 1 / 120ms based on the frame rate corresponding to the first interface image, which is approximately 8.33ms. That is, the display time interval between the first interface image and the previous frame interface image is approximately 8.33ms.
[0055] For example, taking the first application as a video application, the interface image A of the video application is the rising sun on the lake, and the interface image B of the previous frame of the video application is the lake. Assuming that the frame rate corresponding to the interface image A is 120 frames / second, based on the frame rate corresponding to the interface image A, the display time interval between the interface image A and the previous frame interface image B can be obtained as 1 / 120ms, which is approximately 8.33ms.
[0056] In some embodiments of this application, the aforementioned display time interval may be determined based on the display time of the first interface image and the second interface image.
[0057] In some embodiments of this application, the electronic device can determine the frame rate of the interface image of the first application according to the display requirements of the application scenario corresponding to the first application, and obtain the display time of the corresponding interface image based on the frame rate of the interface image.
[0058] In some embodiments of this application, the above-mentioned display time is the display time corresponding to the first interface image. The display time can be determined according to the frame rate corresponding to the first interface image, wherein the frame rate can be determined according to the application scenario of the first application.
[0059] For example, taking a camera application as the first application, when the electronic device generates an interface image of the camera application, it obtains the display time of the interface image based on the frame rate information corresponding to the interface image. Assuming that the frame rate corresponding to the interface image of the camera application is 50 frames / second, the display time can be calculated to be 1 / 50ms, approximately 20ms.
[0060] For example, taking a video application as the first application, when the electronic device generates the interface image of the video application, it obtains the relevant display time based on the frame rate information corresponding to the interface image. Assuming that the frame rate corresponding to the interface image of the video application is 60 frames / second, the relevant display time can be calculated to be 1 / 60ms, which is approximately 16.67ms.
[0061] For example, taking a game application as the first application, when the electronic device generates the interface image of the game application, it obtains the relevant display time based on the frame rate information corresponding to the interface image. Assuming that the frame rate corresponding to the interface image of the game application is 120 frames / second, the display time can be calculated to be 1 / 120ms, which is approximately 8.33ms.
[0062] In some embodiments of this application, the display time can be a timestamp, that is, the relevant display time obtained by using the frame rate corresponding to the first interface image, wherein the frame rate can be determined according to the application scenario of the first application.
[0063] For example, the system services of an electronic device set the expected timestamp of the corresponding layer according to the needs of the corresponding scenario. For example, in a camera scenario, the camera service configures the preview layer timestamp according to exposure, etc., and in a video scenario, the decoding service configures the video layer timestamp according to the bitstream, etc.
[0064] It should be noted that the timestamp expected to be displayed for the corresponding layer is the point in time when the corresponding layer should be displayed or rendered on the screen. This point in time is the expected timestamp for the corresponding layer. By controlling the timestamp of the layer, the layer can be displayed according to the expected frame rate.
[0065] In some embodiments of this application, the electronic device stores the display time interval between the first interface image and the second interface image in the frame rate information, and transmits it to the display driver by storing the display time interval between the first interface image and the second interface image in the frame rate information. During the transmission process, the display time interval between the first interface image and the second interface image remains unchanged.
[0066] Thus, by storing the display time interval between the first and second interface images in the frame rate information, and then passing the display time interval to the display driver through the frame rate information, the accuracy and completeness of the display time interval information during the transmission process are effectively improved, since the display time interval remains unchanged during the transmission to the display driver.
[0067] Step 302: The electronic device determines the screen refresh delay based on the display time interval and the screen refresh rate.
[0068] In some embodiments of this application, the screen of the electronic device may support one or more refresh rates, that is, the screen of the electronic device has one or more refresh rate levels.
[0069] In some embodiments of this application, the screen refresh rate is one of multiple refresh rate levels supported by the screen.
[0070] In some embodiments of this application, the electronic device can determine the screen refresh rate based on the technical specifications displayed on the screen or the user's needs.
[0071] In some embodiments of this application, the electronic device determines the screen refresh delay by subtracting the time required for one refresh from the display time interval and the screen refresh rate obtained above.
[0072] For example, the screen refresh rate levels of an electronic device may include 60Hz to 75Hz, 100Hz to 165Hz, and 240Hz, etc.
[0073] It should be noted that 60Hz to 75Hz can be used for scenarios with low requirements, such as movies or TV series; 100Hz to 165Hz can be used for scenarios such as competitive games or graphic design; and around 240Hz can be used for scenarios such as highly dynamic images that pursue ultimate performance.
[0074] For example, assuming the screen refresh rate is set to 60Hz according to the screen display specifications and user needs, the time required for one refresh is 1 / 60ms, or approximately 16.67ms, meaning that the screen refreshes once every 16.67ms.
[0075] It is understandable that the refresh rate corresponds to the time, that is, the duration of one refresh using that refresh rate.
[0076] For example, in conjunction with the above example, assuming the frame rate of the first interface image is 30 frames / second and the screen refresh rate is 60Hz, the display time interval between the first interface image and the second interface image is approximately 33.33ms. The time required for one refresh corresponding to the screen refresh rate is approximately 16.67ms. Therefore, subtracting the display time interval from the time required for one refresh corresponding to the screen refresh rate yields a screen refresh latency of approximately 16.67ms.
[0077] For example, taking a game application as the first example, the interface image 1 of the game application is a character running, and the interface image 2 is a character running and shooting. Assuming that the frame rate corresponding to the interface image 1 is 30 frames / second and the screen refresh rate is 60Hz, the display time interval between the interface image 1 and the interface image 2 is approximately 33.33ms. The time required for one refresh corresponding to the screen refresh rate is approximately 16.67ms. Therefore, by subtracting the display time interval from the time required for one refresh corresponding to the screen refresh rate, the screen refresh latency is approximately 16.67ms.
[0078] Step 303: The electronic device determines the target screen refresh time based on the screen refresh delay, and controls the screen refresh at the target screen refresh time to display the first interface image.
[0079] In some embodiments of this application, the electronic device can determine the target screen refresh time based on the screen refresh delay through the display driver, and control the screen refresh at the target screen refresh time to display the first interface image.
[0080] In some embodiments of this application, the screen refresh delay is a time that needs to be added because the display time interval does not match the screen refresh rate, so that the display time interval matches the screen refresh rate. The mismatch between the display time interval and the screen refresh rate means that the actual frame rate does not match the expected frame rate corresponding to the image.
[0081] In some embodiments of this application, the electronic device enters an application scenario by recognizing and clicking on the application, thereby switching to an instant refresh mode. In the instant refresh mode, the electronic device can determine the frame rate and screen refresh rate corresponding to the first interface image according to the display requirements of the application scenario. Then, based on the frame rate corresponding to the first interface image, the display time interval between the first interface image and the second interface image is obtained. Combined with the screen refresh rate, the screen refresh delay is obtained. After generating the first interface image and before displaying the first interface image, the screen refresh delay is added to control the screen refresh and refresh the second interface image to the first interface image to display the first interface image.
[0082] For example, assuming the screen refresh rate is 60Hz and a video is played at 24 frames per second, the display time interval between the first and second interface images is 1 / 24ms, or approximately 41.66ms. The time required for one refresh corresponding to the screen refresh rate is 1 / 60ms, or approximately 16.67ms, meaning a refresh occurs every 16.67ms. Therefore, subtracting the display time interval from the time required for one refresh corresponding to the screen refresh rate yields a screen refresh latency of approximately 24.99ms. To match the display time interval with the screen refresh rate, a screen refresh latency of 24.99ms needs to be added to keep the image display stable and smooth.
[0083] For example, taking a video application as the first example, the video being played in this application has a frame rate of 24 frames per second. Assuming the screen refresh rate is 60Hz, and the interface image A of the video application is a lake surface experiencing rain, and the interface image B of the previous frame of the video application is also a lake surface, then the display time interval between interface image A and interface image B is 1 / 24ms, approximately 41.66ms. The time required for one refresh corresponding to the screen refresh rate is 1 / 60ms, approximately 16.67ms. Subtracting the display time interval from the time required for one refresh corresponding to the screen refresh rate, we can obtain a screen refresh delay of approximately 24.99ms. To make the display time interval match the screen refresh rate, a screen refresh delay of 24.99ms needs to be added to maintain a stable and smooth image display.
[0084] The display control method provided in the embodiments of this application will be described below with reference to the accompanying drawings.
[0085] like Figure 2As shown, assuming the frame rate of the first application is 24fps, after the electronic device draws and synthesizes the Nth frame interface image of the first application, it determines the display time interval between the interface image and the previous frame interface image based on the frame rate of the interface image, and determines the screen refresh delay based on the display time interval and the screen refresh rate. Then, based on the screen refresh delay, it controls the screen refresh to display the interface image, that is, to perform the on-screen display of the interface image. In this way, the actual on-screen frame rate of the image interface is 24fps, so that the actual on-screen frame rate of the image interface is consistent with the expected frame rate.
[0086] It should be noted that the above example only uses the Nth frame interface image as an example for illustration. The display process of the N+1th frame interface image and the N+2th frame interface image is the same as that of the Nth frame interface image, and will not be repeated here.
[0087] In related technologies, electronic devices synchronize frame rate and refresh rate according to the Vsync signal. However, because image updates require waiting for the next Vsync signal to trigger compositing and display, and different frames have different waiting times for Vsync, the intervals between image frames displayed on screen vary, resulting in an inconsistency between the displayed frame rate and the application frame rate. For example, with a screen refresh rate of 60Hz, when playing a video with a frame rate of 24 frames per second, the actual playback frame rate of the video is 20Hz or 30Hz. If the next Vsync signal appears, image compositing and display updates are triggered; if no signal appears, the previous frame data is repeated. Simultaneously, the system needs to perform drawing, compositing, and display according to a specific Vsync signal cycle to update the image on the screen. Currently, the mismatch between display time intervals and screen refresh rates frequently occurs in traditional display devices, leading to long and short frames and consequently reducing the smoothness of the displayed image.
[0088] In this embodiment, when generating a first interface image for a first application, the electronic device can determine the display time interval between the first interface image and the second interface image based on the frame rate corresponding to the first interface image. The second interface image is the interface image displayed before and adjacent to the first interface image in the interface image sequence of the first application. The electronic device determines the screen refresh delay based on the display time interval and the screen refresh rate; and determines the target screen refresh time based on the screen refresh delay, and controls the screen refresh at the target screen refresh time to display the first interface image. In this solution, since the screen refresh delay is determined based on the expected frame rate corresponding to the first interface image and the screen refresh rate, the electronic device controls the screen refresh based on the screen refresh delay, which ensures that the actual frame rate of the interface image is consistent with the expected frame rate corresponding to the image, thereby keeping the screen refresh synchronized with the switching of the interface image. Thus, by fully utilizing the screen refresh rate and combining it with the screen refresh delay to control the screen refresh, the problem of mismatch between the actual frame rate and the expected frame rate corresponding to the image caused by traditional screen refresh control via vertical synchronization signals is avoided, thereby improving the smoothness of the displayed image.
[0089] In some embodiments of this application, the display frame in the electronic device controls the timing of the synthesis according to the frame rate, and continuously performs the synthesis and display of images at the corresponding time points, without needing to wait for Vsync cycles of a specific frequency and can execute as quickly as possible.
[0090] The display control method provided in the embodiments of this application will be described below with reference to the accompanying drawings.
[0091] like Figure 3 As shown, after the electronic device renders the Nth frame of the interface image of the first application according to the frame rate, it does not rely on a specific signal to trigger the synchronous rendering mechanism. Instead, it performs compositing at the corresponding time point. In the compositing stage, the electronic device processes the rendered interface image to generate the complete image to be displayed on the screen. This process is executed immediately after rendering is completed, without waiting for the arrival of the next cycle signal. Then, the composited image is sent to the display driver for screen display. The screen display process is also continuous and is no longer limited by a fixed screen refresh rate or other synchronization signals. This means that the entire process from rendering to the final display of the image on the screen is accelerated, that is, the synchronization time is optimized, thereby improving the response speed from rendering to screen display.
[0092] In some embodiments of this application, such as Figure 4 As shown, in conjunction with the above Figure 1 Step 303 above may include steps 303a and 303b:
[0093] Step 303a: The electronic device acquires the first screen refresh time corresponding to the first interface image.
[0094] Step 303b: The electronic device determines the target screen refresh time based on the first screen refresh time and screen refresh delay corresponding to the first interface image.
[0095] In some embodiments of this application, the first screen refresh time is the starting display time corresponding to the first interface image.
[0096] In some embodiments of this application, the first screen refresh time can be obtained based on a determined screen refresh rate.
[0097] It should be noted that the starting display time is the display time calculated based on the screen refresh rate, rather than the actual starting display time when the first interface image is displayed.
[0098] For example, assuming the screen refresh time corresponding to the first interface image after launching the first application is T ms, and assuming the first interface image is the second interface image after launching the first application, and the screen refresh rate is 60Hz, then the duration of one refresh is 16.67ms, and the first screen refresh time corresponding to the second interface image is T+16.67ms.
[0099] In some embodiments of this application, the electronic device can determine the first screen refresh time, then obtain the screen refresh delay based on the display time interval and the first screen refresh time, and use the first screen refresh time and screen refresh delay corresponding to the first interface image to determine the screen refresh time (i.e. the target screen refresh time) corresponding to the first interface image.
[0100] For example, assuming the screen refresh rate is 60Hz, the frame rate corresponding to the first interface image is 30 frames / second, and the second interface image is the first frame of the first application and the first interface image is the second frame of the first application, the display time interval between the first and second interface images is calculated to be 1 / 30ms, approximately 33.33ms, based on the frame rate corresponding to the first interface image. The first screen refresh time corresponding to the first interface image is calculated to be 16.67ms based on the screen refresh rate. Then, the display time interval is subtracted from the first screen refresh time corresponding to the first interface image to obtain a screen refresh delay of approximately 16.67ms (i.e., 33.33-16.67). Then, based on the first screen refresh time corresponding to the first interface image (i.e., 16.67ms) and the screen refresh delay (16.67ms), the target screen refresh time corresponding to the first interface image can be determined to be 33.33ms (i.e., 16.67+16.67). Thus, by calculating the expected time interval between the first interface image and the previous frame of the interface image (i.e., the second interface image) based on the expected frame rate corresponding to the first interface image, and based on this time interval and the first screen refresh time of the first interface image, the screen refresh time corresponding to the first interface image is delayed from the first screen refresh time to the target screen refresh time, that is, the screen refresh time corresponding to the first interface image is delayed from 16.67ms to 33.33ms, so that the final display frame rate is consistent with the expected frame rate.
[0101] Understandably, since the screen refresh rate is 60Hz, the duration of one refresh is 16.67ms. Since the first interface image starts refreshing from 16.67ms, when refreshing according to the screen refresh rate, the first interface image will start refreshing every 16.67ms. That is, the refresh time of the first interface image determined by the existing method is 16.67ms, which cannot meet the expected frame rate requirement. This application increases the screen refresh delay based on the first screen refresh time determined by the refresh rate, thereby delaying the screen refresh time corresponding to the interface image and meeting the expected frame rate requirement.
[0102] In some embodiments of this application, the electronic device utilizes the screen hardware characteristics and supported refresh rate levels to add a screen refresh delay, controls the screen refresh at the target screen refresh time, thereby displaying the first interface image, and finally, the electronic device automatically exits the instant refresh mode after recognizing that the user has exited the specific scene.
[0103] For example, suppose the electronic device determines that the screen hardware characteristics and supported refresh rate are 60Hz, the frame rate corresponding to the first interface image is 30 frames / second, the first screen refresh time is 16.67ms, and the screen refresh delay is 16.67ms. Based on the first screen refresh and the screen refresh delay, the target screen refresh time is determined to be 33.33ms. In this way, the electronic device can combine the screen hardware characteristics and supported refresh rate, and add the screen refresh delay, to control the screen refresh at the target screen refresh time to display the first interface image, thereby ensuring that the screen refresh rate and the display time interval are consistent.
[0104] In this way, by combining the screen hardware characteristics and supported refresh rate levels, and using screen refresh delay to control screen refresh, the screen refresh rate is kept consistent with the actual time interval, thereby reducing screen tearing and jitter and improving screen smoothness.
[0105] The display control method provided in the embodiments of this application will be described below with reference to the accompanying drawings.
[0106] like Figure 5 As shown, after the electronic device renders and synthesizes the Nth frame interface image of the first application, it determines the display time (i.e., timestamp) between the interface image and the previous frame interface image based on the frame rate corresponding to the interface image. Based on the timestamps of the interface image and the previous frame interface image, it determines the display time interval and transmits the display time interval between the interface image and the previous frame interface image to the display driver. Thus, based on the display time interval and the screen refresh rate, it determines the screen refresh delay. Then, based on the screen refresh delay, it controls the screen refresh to display the interface image, that is, it performs the on-screen display of the interface image. In this way, the actual on-screen frame rate of the image interface is consistent with the expected frame rate, maintaining a stable and smooth image display.
[0107] In some embodiments of this application, such as Figure 6 As shown, in conjunction with the above Figure 1 Step 302 above may include steps 302a and 302b:
[0108] Step 302a: The electronic device determines the first screen refresh time corresponding to the first interface image based on the screen refresh rate.
[0109] Step 302b: The electronic device determines the difference between the first screen refresh time and the display time interval as the screen refresh delay.
[0110] In some embodiments of this application, the electronic device can determine the first screen refresh time corresponding to the first interface image based on the screen refresh rate and the frame number of the second interface image.
[0111] For example, assuming the screen refresh rate is 60Hz, assuming the first interface image is the second image frame of the first application, and the first screen refresh time corresponding to the first image frame of the first application is 0ms, and the time taken by the electronic device to refresh one image frame is 16.67ms, then the first screen refresh time corresponding to the second image frame is approximately 16.67ms (i.e., 0ms plus 16.67ms).
[0112] In some embodiments of this application, the electronic device obtains the screen refresh delay by using the difference between the display time interval between the first interface image and the second interface image and the first screen refresh time obtained by the determined screen refresh rate.
[0113] For example, assuming the frame rate of the corresponding interface image is 30 frames / second, the display time interval between the first interface image and the second interface image is 1 / 30ms, which is approximately 33.33ms. This time interval is stored in the frame information and passed from drawing, compositing and displaying in sequence. During the transmission process, the display time interval remains unchanged.
[0114] For example, assuming the screen supports a refresh rate of 60Hz, the screen refresh rate is determined to be 60Hz. Therefore, the first screen refresh time is 1 / 60ms, which is approximately 16.67ms.
[0115] For example, assuming the screen supports a refresh rate of 60Hz, the screen refresh rate is determined to be 60Hz, corresponding to a frame rate of 30 frames per second for the interface image. Thus, the first screen refresh time is 1 / 60ms, approximately 16.67ms, and the display time interval between the first and second interface images is 1 / 30ms, approximately 33.33ms. Using the difference between the determined first screen refresh time and the display time interval between the first and second interface images, the screen refresh delay is determined to be approximately 16.67ms.
[0116] In this way, the electronic device can determine the screen refresh delay by obtaining the first screen refresh time and the display time interval between the first interface image and the second interface image, and then based on the difference between the first screen refresh time and the display time interval between the first interface image and the second interface image, which can effectively solve the problem of mismatch between the display time interval between the first interface image and the second interface image and the screen refresh rate, that is, the problem of mismatch between frame rate and screen refresh rate, thereby improving the smoothness of screen display.
[0117] The display control method provided in the embodiments of this application will be described below with reference to the accompanying drawings.
[0118] like Figure 7As shown, after the electronic device draws and synthesizes the Nth frame interface image of the first application, it determines the display time interval between the interface image and the previous frame interface image based on the layer frame rate corresponding to the interface image. Then, based on the display time interval and the screen refresh rate, it determines the screen refresh delay. The display driver controls the screen refresh based on the synthesis time and the screen's supported refresh rate, combined with the screen refresh delay, to display the interface image, that is, to perform screen display on the interface image. In this way, the actual screen frame rate of the image interface is consistent with the expected frame rate, maintaining the stability and smoothness of the image display.
[0119] In some embodiments of this application, the screen supports at least two different refresh rates. For example, as shown... Figure 8 As shown, in conjunction with the above Figure 1 Prior to step 302 above, the method of this application further includes steps 304 and 305:
[0120] Step 304: The electronic device calculates the difference between the frame rate currently used by the screen and each of at least two refresh rates.
[0121] Step 305: The electronic device adjusts the screen's current refresh rate to the target refresh rate among at least two refresh rates.
[0122] In some embodiments of this application, the target refresh rate is the refresh rate with the smallest difference between at least two refresh rates and the frame rate currently used by the screen.
[0123] In some embodiments of this application, the screen supports at least two different refresh rates. The electronic device calculates the difference between the frame rate corresponding to the first interface image and each of the at least two refresh rates based on the frame rate corresponding to the first interface image determined above and the at least two refresh rates.
[0124] For example, assuming the frame rate corresponding to the first interface image is 30 frames / second, and the at least two refresh rates are 60Hz and 100Hz respectively, the differences can be obtained as 30 and 70 respectively by calculating the difference between the frame rate corresponding to the first interface image and each of the at least two refresh rates.
[0125] In some embodiments of this application, based on the frame rate corresponding to the first interface image determined in step 304 and the difference between each of the at least two refresh rates, the refresh rate corresponding to the one with the smallest difference between the at least two refresh rates and the frame rate corresponding to the first interface image is determined as the screen refresh rate.
[0126] For example, based on the above calculation of the frame rate corresponding to the first interface image and the difference between each of the at least two refresh rates, the differences are determined to be 30 and 70 respectively. The refresh rate corresponding to the minimum difference between the at least two refresh rates and the frame rate corresponding to the first interface image is taken as the screen refresh rate. At this time, the minimum difference between the at least two refresh rates and the frame rate corresponding to the first interface image is 30, and its corresponding refresh rate is 60Hz, that is, the screen refresh rate is determined to be 60Hz.
[0127] In this way, by selecting the refresh rate that is closest to the frame rate corresponding to the interface image as the actual refresh rate used, the screen display becomes more consistent and smooth, especially in scenarios with highly dynamic content, which can significantly improve the smoothness of the screen display.
[0128] It should be noted that steps 304 and 305 can be executed after step 301, or before step 301, or simultaneously with step 301.
[0129] In some embodiments of this application, step 305 may include step 305a:
[0130] Step 305a: When the electronic device performs a screen refresh, it increases the current refresh rate of the screen by a first value each time the screen refresh is performed, until the current refresh rate of the screen matches the target refresh rate.
[0131] In some embodiments of this application, when an electronic device performs a screen refresh and the currently used refresh rate does not match the target refresh rate, the electronic device will add a first value to the current refresh rate of the screen each time it performs a screen refresh, until the current refresh rate of the screen matches the target refresh rate.
[0132] For example, assuming the current refresh rate used by the screen is 60Hz and the target refresh rate is 75Hz, and the first value is 1, the electronic device will add 1 to 60Hz each time it performs a screen refresh, until the current refresh rate used by the screen increases from 60Hz to 75Hz, so that the refresh rate currently used by the screen 75Hz matches the target refresh rate 75Hz.
[0133] In this way, by gradually increasing the screen refresh rate to the target refresh rate, screen tearing caused by sudden refresh rate changes can be avoided, thereby effectively improving the smoothness of the screen display and meeting the needs of users.
[0134] In some embodiments of this application, prior to step 302 above, the method of this application further includes steps 306 and 307:
[0135] Step 306: When the electronic device launches the first application, it obtains the first frame rate corresponding to the first application.
[0136] Step 307: The electronic device renders the interface image of the first application according to the first frame rate.
[0137] In some embodiments of this application, the first frame rate is the current screen refresh rate of the first application.
[0138] In some embodiments of this application, after launching the first application, the electronic device obtains the current screen refresh rate corresponding to the first application, and then the electronic device renders the interface image of the first application according to the current screen refresh rate.
[0139] For example, assuming the first frame rate corresponding to the first application is 65Hz, when the electronic device launches the first application, it obtains the first frame rate of 65Hz corresponding to the first application. At this time, the electronic device will render the interface image of the first application according to 65Hz.
[0140] It should be noted that steps 306 and 307 can be performed before or after step 301.
[0141] In this way, after launching the first application, the electronic device can obtain the frame rate corresponding to the first application, and after switching applications, it can synchronously switch the frame rate to the frame rate corresponding to the current application. This allows the interface images of different applications to be displayed according to the expected frame rate of the application, ensuring the smoothness of the interface images and thus improving the user experience.
[0142] The above display control method will be explained through two specific examples below.
[0143] For example, such as Figure 9 As shown, the display control method may include the following steps 101 to 107.
[0144] Step 101: The electronic device launches the application and enters the application scenario.
[0145] For example, a user enters an application scene by clicking on the application icon in an electronic device.
[0146] For example, application scenarios include, but are not limited to, camera scenarios, video scenarios, and game scenarios.
[0147] Step 102: Once the electronic device recognizes that the user has entered the application scenario, it will switch to the instant display mode.
[0148] It should be noted that the instant refresh mode is when the display system switches to instant refresh mode and the screen switches to adaptive refresh rate mode.
[0149] Step 103: The system services in the electronic device set the expected display time of the corresponding interface image according to the needs of the corresponding application scenario.
[0150] For example, in a camera scenario, the camera service configures the preview interface image display time based on exposure and other settings; in a video scenario, the decoding service configures the video interface image display time based on the bitrate; and in a game scenario, the game interface image display time is configured based on the frame rate set by the application interface, such as smoothness or resolution.
[0151] Step 104: The display system in the electronic device immediately triggers the drawing, compositing, and screen display operations, and performs them rapidly and continuously without waiting for Vsync cycles at a specific frequency.
[0152] Step 105: The electronic device saves the display time of the corresponding interface image in the frame information and transmits it to the display driver.
[0153] For example, the electronic device saves the display time of the corresponding interface image in step 103 in the frame information and transmits it to the display driver.
[0154] It should be noted that the display time of the corresponding interface image is transmitted to the display driver based on the interface image information, and the display time remains unchanged during the transmission process.
[0155] Step 106: The screen driver in the electronic device performs frame rate stabilization processing based on the display time, taking into account the screen hardware characteristics and supported refresh rate levels, and adding screen refresh delay to keep the frame rate of the displayed image stable and smooth, and to display it in a timely manner.
[0156] Step 107: After the system in the electronic device recognizes that the user has exited the application scenario, it will automatically exit the instant refresh and display mode.
[0157] In this way, by making full use of the screen refresh rate and combining it with the screen refresh latency to control the screen refresh, the problem of mismatch between the actual frame rate and the expected frame rate corresponding to the image is avoided, thereby improving the smoothness of the displayed image.
[0158] For example, such as Figure 10 As shown, the display control method may include the following steps 201 to 207.
[0159] Step 201: The electronic device launches the application and enters the application scenario.
[0160] For example, a user enters an application scene by clicking on the application icon in an electronic device.
[0161] For example, application scenarios include, but are not limited to, camera scenarios, video scenarios, and game scenarios.
[0162] Step 202: Once the electronic device recognizes that the user has entered the application scenario, it will switch to the instant display mode.
[0163] It should be noted that the instant refresh mode is when the display system switches to instant refresh mode and the screen switches to adaptive refresh rate mode.
[0164] Step 203: The system service in the electronic device sets the expected display time of the corresponding interface image according to the requirements of the corresponding application scenario.
[0165] For example: in camera scenarios, the camera service configures the preview interface image display time based on exposure and other settings; in video scenarios, the decoding service configures the video interface image display time based on the bitrate; in game scenarios, the game interface image display time is configured based on the frame rate set by the application interface, such as smoothness or resolution.
[0166] Step 204: The image system in the electronic device immediately triggers rendering. After rendering is completed, the screen refresh delay is added to control the timing of the composite according to the set frame rate information, ensuring that the generated buffer is sent to the display frame for composite and display at the set frame rate.
[0167] Step 205: The display frame in the electronic device uses the frame rate to control the timing of image composition, continuously performing image composition and display at corresponding time points.
[0168] For example, the display frame in the electronic device controls the timing of the synthesis according to the frame rate in step 204, and continuously performs image synthesis and display at the corresponding time point, without needing to wait for Vsync cycle synchronization at a specific frequency and can execute as soon as possible.
[0169] Step 206: The screen driver in the electronic device adds a screen refresh delay based on the time taken to synthesize the interface image and the refresh rate level supported by the screen, to ensure that the time from synthesis to display of each frame is consistent, thus balancing frame rate stability and display speed.
[0170] Step 207: After the system in the electronic device recognizes that the user has exited the application scenario, it will automatically exit the instant display mode.
[0171] It should be noted that the above two examples illustrate how electronic devices can optimize the display process in specific application scenarios. In Example 1, during the display process, there is no need to wait for the Vsync cycle at a specific frequency to synchronize, and the display can be executed quickly. In Example 2, after the drawing is completed, a screen refresh delay is added according to the set frame rate information to control the composition time point and ensure that the generated image is sent to the display frame for subsequent processing at the set frame rate. At the same time, both examples can control the time point of the image being displayed by adding a screen refresh delay, thereby ensuring the consistency between the actual frame rate and the expected frame rate.
[0172] This application makes full use of the screen's supported refresh rate levels and combines screen refresh latency to improve the frame rate jitter and display latency issues caused by the mismatch between frame rate and refresh rate. At the same time, it eliminates the need to wait for specific signals to be executed synchronously, allowing the display drawing, compositing, and screen loading to be executed continuously, thus optimizing the synchronization time and improving the overall smoothness and speed of the screen display.
[0173] It should be noted that the above-described method embodiments, or the various possible implementations of the method embodiments, can be executed individually, or, provided there are no contradictions, they can be combined with each other. The specific implementation can be determined according to actual usage requirements, and this application embodiment does not impose any restrictions on this.
[0174] The display control method provided in this application can be executed by a display control device. This application uses the method of a display control device executing display control as an example to illustrate the display control device provided in this application.
[0175] Figure 11 A schematic diagram of the display control device provided in the embodiments of this application, such as... Figure 11 As shown, the display control device 1100 may include a determining module 1101 and a processing module 1102, wherein: the determining module 1101 is used to determine the display time interval between the first interface image and the second interface image based on the frame rate corresponding to the first interface image when a first interface image of the first application is generated, wherein the second interface image is the interface image displayed before the first interface image and adjacent to the first interface image in the interface image sequence of the first application; the determining module 1101 is also used to determine the screen refresh delay based on the display time interval and the screen refresh rate; the processing module 1102 is used to determine the target screen refresh time based on the screen refresh delay, and control the screen refresh at the target screen refresh time to display the first interface image.
[0176] In some embodiments of this application, the above-mentioned processing module is specifically used to obtain the first screen refresh time corresponding to the first interface image; and to determine the target screen refresh time based on the first screen refresh time corresponding to the first interface image and the screen refresh delay.
[0177] In some embodiments of this application, the aforementioned determining module is specifically used to determine the first screen refresh time corresponding to the first interface image based on the screen refresh rate; and to determine the difference between the first screen refresh time and the display time interval as the screen refresh delay.
[0178] In some embodiments of this application, the above-described processing module is further configured to calculate the difference between the frame rate currently used by the screen and each of the at least two refresh rates; thereby adjusting the current refresh rate of the screen to a target refresh rate among the at least two refresh rates, wherein the target refresh rate is the refresh rate with the smallest difference between the at least two refresh rates and the frame rate currently used by the screen.
[0179] In some embodiments of this application, the above-described processing module is specifically used to increase the current refresh rate of the screen by a first value each time a screen refresh is performed, until the current refresh rate of the screen matches the target refresh rate.
[0180] In some embodiments of this application, the first application mentioned above is an application in a preset application set, which includes at least one application, and different applications correspond to different frame rates.
[0181] In some embodiments of this application, the above-described processing module is further configured to, before determining the display time interval between the first interface image and the second interface image based on the frame rate corresponding to the first interface image, obtain the first frame rate corresponding to the first application when the first application is launched; and render the interface image of the first application according to the first frame rate.
[0182] In this embodiment, when generating a first interface image for a first application, the electronic device can determine the display time interval between the first interface image and the second interface image based on the frame rate corresponding to the first interface image. The second interface image is the interface image displayed before and adjacent to the first interface image in the interface image sequence of the first application. The electronic device determines the screen refresh delay based on the display time interval and the screen refresh rate; and determines the target screen refresh time based on the screen refresh delay, and controls the screen refresh at the target screen refresh time to display the first interface image. In this solution, since the screen refresh delay is determined based on the expected frame rate corresponding to the first interface image and the screen refresh rate, the electronic device controls the screen refresh based on the screen refresh delay, which ensures that the actual frame rate of the interface image is consistent with the expected frame rate corresponding to the image, thereby keeping the screen refresh synchronized with the switching of the interface image. Thus, by fully utilizing the screen refresh rate and combining it with the screen refresh delay to control the screen refresh, the problem of mismatch between the actual frame rate and the expected frame rate corresponding to the image caused by traditional screen refresh control via vertical synchronization signals is avoided, thereby improving the smoothness of the displayed image.
[0183] The display control device in this application embodiment can be an electronic device or a component within an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices besides a terminal. For example, the electronic device can be a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. It can also be a server, network attached storage (NAS), personal computer (PC), television (TV), ATM, or self-service machine, etc. This application embodiment does not specifically limit the scope of the device.
[0184] The display control device in this application embodiment can be a device with an operating system. This operating system can be Android, iOS, or other possible operating systems; this application embodiment does not specifically limit the specific operating system used.
[0185] The display control device provided in this application embodiment can achieve... Figures 1 to 10 The various processes implemented in the method implementation examples will not be described again here to avoid repetition.
[0186] Optionally, such as Figure 12 As shown, this application embodiment also provides an electronic device 1200, including a processor 1201 and a memory 1202. The memory 1202 stores a program or instructions that can run on the processor 1201. When the program or instructions are executed by the processor 1201, they implement the various steps of the above-described display control method embodiment and can achieve the same technical effect. To avoid repetition, they will not be described again here.
[0187] It should be noted that the electronic devices in the embodiments of this application include the mobile electronic devices and non-mobile electronic devices described above.
[0188] Figure 13 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of this application.
[0189] The electronic device 1300 includes, but is not limited to, components such as: radio frequency unit 1301, network module 1302, audio output unit 1303, input unit 1304, sensor 1305, display unit 1306, user input unit 1307, interface unit 1308, memory 1309, and processor 1310.
[0190] Those skilled in the art will understand that the electronic device 1300 may also include a power supply (such as a battery) for supplying power to various components. The power supply may be logically connected to the processor 1310 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. Figure 13 The electronic device structure shown does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements, which will not be elaborated here.
[0191] The processor 1310 is configured to, when generating a first interface image for a first application, determine the display time interval between the first interface image and the second interface image based on the frame rate corresponding to the first interface image, wherein the second interface image is an interface image in the interface image sequence of the first application that is displayed before the first interface image and is adjacent to the first interface image; the processor 1310 is also configured to determine the screen refresh delay based on the display time interval and the screen refresh rate; and is also configured to determine the target screen refresh time based on the screen refresh delay, and control the screen refresh at the target screen refresh time to display the first interface image.
[0192] In some embodiments of this application, the processor 1310 is specifically used to obtain the first screen refresh time corresponding to the first interface image; thereby determining the target screen refresh time based on the first screen refresh time corresponding to the first interface image and the screen refresh delay.
[0193] In some embodiments of this application, the processor 1310 is specifically used to determine the first screen refresh time corresponding to the first interface image based on the screen refresh rate; and to determine the difference between the first screen refresh time and the display time interval as the screen refresh delay.
[0194] In some embodiments of this application, the processor 1310 is further configured to calculate the difference between the frame rate currently used by the screen and each of at least two refresh rates; thereby adjusting the current refresh rate of the screen to a target refresh rate among the at least two refresh rates, wherein the target refresh rate is the refresh rate with the smallest difference between the at least two refresh rates and the frame rate currently used by the screen.
[0195] In some embodiments of this application, the processor 1310 is specifically configured to, when performing a screen refresh, increase the current refresh rate of the screen by a first value each time a screen refresh is performed, until the current refresh rate used by the screen matches the target refresh rate.
[0196] In some embodiments of this application, the first application mentioned above is an application in a preset application set, which includes at least one application, and different applications correspond to different frame rates.
[0197] In some embodiments of this application, the processor 1310 is further configured to, before determining the display time interval between the first interface image and the second interface image based on the frame rate corresponding to the first interface image, obtain the first frame rate corresponding to the first application when the first application is launched; and then render the interface image of the first application according to the first frame rate.
[0198] In this embodiment, when generating a first interface image for a first application, the electronic device can determine the display time interval between the first interface image and the second interface image based on the frame rate corresponding to the first interface image. The second interface image is the interface image displayed before and adjacent to the first interface image in the interface image sequence of the first application. The electronic device determines the screen refresh delay based on the display time interval and the screen refresh rate; and determines the target screen refresh time based on the screen refresh delay, and controls the screen refresh at the target screen refresh time to display the first interface image. In this solution, since the screen refresh delay is determined based on the expected frame rate corresponding to the first interface image and the screen refresh rate, the electronic device controls the screen refresh based on the screen refresh delay, which ensures that the actual frame rate of the interface image is consistent with the expected frame rate corresponding to the image, thereby keeping the screen refresh synchronized with the switching of the interface image. Thus, by fully utilizing the screen refresh rate and combining it with the screen refresh delay to control the screen refresh, the problem of mismatch between the actual frame rate and the expected frame rate corresponding to the image caused by traditional screen refresh control via vertical synchronization signals is avoided, thereby improving the smoothness of the displayed image.
[0199] It should be understood that, in this embodiment, the input unit 1304 may include a graphics processing unit (GPU) 13041 and a microphone 13042. The GPU 13041 processes image data of still images or videos obtained by an image capture device (such as a camera) in video capture mode or image capture mode. The display unit 1306 may include a display panel 13061, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, or the like. The user input unit 1307 includes a touch panel 13071 and at least one of other input devices 13072. The touch panel 13071 is also called a touch screen. The touch panel 13071 may include a touch detection device and a touch controller. Other input devices 13072 may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, power buttons, etc.), trackballs, mice, and joysticks, which will not be described in detail here.
[0200] The memory 1309 can be used to store software programs and various data. The memory 1309 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, application programs or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, the memory 1309 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DRRAM). The memory 1309 in this embodiment includes, but is not limited to, these and any other suitable types of memory.
[0201] Processor 1310 may include one or more processing units; optionally, processor 1310 integrates an application processor and a modem processor, wherein the application processor mainly handles operations involving the operating system, user interface, and applications, and the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into processor 1310.
[0202] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described display control method embodiments and achieve the same technical effects. To avoid repetition, they will not be described again here.
[0203] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.
[0204] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the above-described display control method embodiments and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0205] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.
[0206] This application provides a computer program product, which is stored in a storage medium and executed by at least one processor to implement the various processes of the above-described display control method embodiments, and can achieve the same technical effects. To avoid repetition, it will not be described again here.
[0207] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
[0208] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0209] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
Claims
1. A display control method characterized by comprising: The method comprises: In a case where a first interface image of a first application is generated, a display time interval of the first interface image and a second interface image is determined according to a frame rate corresponding to the first interface image, the second interface image being an interface image adjacent to the first interface image and displayed before the first interface image in a sequence of interface images of the first application; A screen refresh delay is determined according to the display time interval and a refresh rate of a screen; A target screen refresh time is determined based on the screen refresh delay, and the screen is controlled to refresh at the target screen refresh time to display the first interface image; The determination of the screen refresh delay according to the display time interval and the refresh rate of the screen comprises: A first screen refresh time corresponding to the first interface image is determined according to the refresh rate of the screen; A difference between the first screen refresh time and the display time interval is determined as the screen refresh delay.
2. The method of claim 1, wherein, The determination of the target screen refresh time based on the screen refresh delay comprises: The first screen refresh time corresponding to the first interface image is obtained; The target screen refresh time is determined according to the first screen refresh time corresponding to the first interface image and the screen refresh delay.
3. The method of claim 1, wherein the screen supports at least two different refresh rates; and before the determination of the display time interval of the first interface image and the second interface image according to the frame rate corresponding to the first interface image, the method further comprises: A difference between a frame rate currently used by the screen and each of the at least two refresh rates is calculated; The current refresh rate of the screen is adjusted to a target refresh rate of the at least two refresh rates, the target refresh rate being a refresh rate of the at least two refresh rates that has a minimum difference with the frame rate currently used by the screen.
4. The method of claim 3, wherein, The adjustment of the current refresh rate of the screen to the target refresh rate comprises: In a case where the screen is refreshed, the current refresh rate of the screen is increased by a first value each time the screen is refreshed until the current refresh rate of the screen matches the target refresh rate.
5. The method according to any one of claims 1 to 4, characterized in that, The first application is an application in a preset application set, the preset application set including at least one application, and different applications corresponding to different frame rates.
6. The method of claim 5, wherein, Before the determination of the display time interval of the first interface image and the second interface image according to the frame rate corresponding to the first interface image, the method further comprises: In a case where the first application is started, a first frame rate corresponding to the first application is obtained; Interface images of the first application are rendered according to the first frame rate.
7. A display control device characterized by comprising: The device comprises a determination module and a processing module, wherein: The determination module is configured to, in a case where a first interface image of a first application is generated, determine a display time interval of the first interface image and a second interface image according to a frame rate corresponding to the first interface image, the second interface image being an interface image adjacent to the first interface image and displayed before the first interface image in a sequence of interface images of the first application; The determining module is further configured to determine a screen refresh delay according to the display time interval and a refresh rate of the screen. The processing module is configured to determine a target screen refresh time based on the screen refresh delay, and control the screen to refresh at the target screen refresh time to display the first interface image. The determining module is specifically configured to determine a first screen refresh time corresponding to the first interface image according to the refresh rate of the screen, and determine a difference between the first screen refresh time and the display time interval as the screen refresh delay.
8. An electronic device, comprising: A processor and a memory are included, the memory stores programs or instructions executable on the processor, and the programs or instructions are executed by the processor to implement the steps of the display control method according to any one of claims 1-6.
9. A readable storage medium, characterized by, The readable storage medium stores programs or instructions, and the programs or instructions are executed by the processor to implement the steps of the display control method according to any one of claims 1-6.
Citation Information
Patent Citations
Image data transmission method and device, terminal and medium
CN113805831A
Drawing method and electronic equipment
CN118043772A