Window frame rate control method and electronic device

By dynamically adjusting the frame rate of non-focus windows, the problem of lag in the focus window caused by resource consumption in multi-window systems is solved, ensuring the smoothness of the focus window under different load conditions and improving the user experience.

WO2026056384A1PCT designated stage Publication Date: 2026-03-19HUAWEI TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-06-13
Publication Date
2026-03-19

AI Technical Summary

Technical Problem

When multiple windows are open simultaneously on an electronic device, excessive system resource consumption can cause the focused window to lag or experience delays, negatively impacting the user experience.

Method used

The frame rate of non-focus windows is dynamically adjusted based on system load and window visibility to ensure that the frame rate of focus windows remains unchanged or is increased. This is achieved through a combination of hardware and software methods.

Benefits of technology

The operation of the focus window has been improved, lag and delay have been reduced, and the user experience has been enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025100921_19032026_PF_FP_ABST
    Figure CN2025100921_19032026_PF_FP_ABST
Patent Text Reader

Abstract

A window frame rate control method and an electronic device, relating to the technical field of electronic devices, and capable of controlling the window frame rate, ensuring the frame rate of a focus window, and improving the smoothness of a user operation on the focus window. The method comprises: an electronic device acquires a system load size; when the system load size is a first load, the electronic device displays a first window at a first frame rate, and displays a second window at a second frame rate, wherein the first window and the second window are windows displayed on a display screen, the first window is a non-focus window, the second window is a focus window, and the first frame rate is lower than or equal to the second frame rate; then, the system load size increases from the first load to a second load; when the system load size is the second load, the electronic device displays the first window at a third frame rate, and still displays the second window at the second frame rate, wherein the third frame rate is lower than the first frame rate and the second frame rate.
Need to check novelty before this filing date? Find Prior Art

Description

Window frame rate control method and electronic device

[0001] The present application claims priority from the Chinese patent application No. 202411298938.6 filed on September 14, 2024, and entitled "Window frame rate control method and electronic device", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD

[0002] The present application relates to the technical field of electronic devices, and in particular to a window frame rate control method and an electronic device. BACKGROUND

[0003] At present, a user can open multiple windows on an electronic device, and the multiple windows can occupy a large amount of system resources, thereby causing a user to experience lag, delay and other phenomena when operating a focus window, and affecting user experience. SUMMARY

[0004] The present application provides a window frame rate control method and an electronic device, which can control the window frame rate, ensure the frame rate of the focus window, and improve the fluency of user operation of the focus window.

[0005] To achieve the above-mentioned purpose, the present application adopts the following technical solutions:

[0006] In a first aspect, a window frame rate control method is provided, applied to an electronic device with a display screen, and the method comprises: obtaining a system load size; when the system load size is a first load, displaying a first window at a first frame rate and displaying a second window at a second frame rate, the first window and the second window being windows displayed on the display screen, the first window being a non-focus window, the second window being a focus window, the first frame rate being lower than or equal to the second frame rate; the system load size increases from the first load to a second load; when the system load size is the second load, displaying the first window at a third frame rate and displaying the second window at the second frame rate, wherein the third frame rate is lower than the first frame rate and the second frame rate.

[0007] Based on the technical solution, the electronic device can acquire the system load size. When the system load size is a first load, a first window on the display screen can be displayed at a first frame rate, and a second window can be displayed at a second frame rate. The first window is a non-focus window, the second window is a focus window, and the first frame rate is lower than or equal to the second frame rate. That is, when the first load, the frame rate of the non-focus window can be lower than or equal to the frame rate of the second focus window. Subsequently, the system load size increases from the first load to a second load. When the system load size is the second load, the frame rate of the first window on the display screen can be increased from the first frame rate to a third frame rate, and the frame rate of the first window can also be the original second frame rate. That is, the larger the system load, the lower the frame rate of the non-focus window, and the frame rate of the focus window can remain unchanged. In this way, when the system load is heavier, the frame rate of the non-focus window has a greater impact on the frame rate of the focus window, and the frame rate of the non-focus window is controlled to be lower, so that the frame rate of the focus window can be guaranteed when the system load is at different levels, and the smoothness of the user's operation of the focus window is improved.

[0008] In a possible design, the method further includes: when the system load size is the second load, displaying a third window at a fourth frame rate. The third window is a window displayed on the display screen, and the third window is a non-focus window. The fourth frame rate is lower than the third frame rate. In this way, the non-focus window displayed on the display screen can also include a third window. When the system load size is the second load, the third window can be displayed at a frame rate lower than that of the first window. That is, the frame rates of different non-focus windows can be different, and flexible control of the frame rate of the non-focus window can be achieved.

[0009] In a possible design, the method further includes: when the system load size is the first load, displaying the third window at a fifth frame rate. The fifth frame rate is higher than the fourth frame rate and lower than the first frame rate. In this way, when the system load size is the first load, the third window can also be displayed at a frame rate lower than that of the first window. That is, the frame rates of different non-focus windows can be different, and flexible control of the frame rate of the non-focus window can be achieved.

[0010] In a possible design, the visibility of the third window on the display screen is lower than the visibility of the first window on the display screen. In this way, when the system load size is the first load, the frame rates of the first window and the third window increase relative to when the system load size is the second load. Because the visibility of the first window is higher than that of the third window, the increased frame rate of the first window is still higher than that of the third window. That is, under the same load, the frame rate of the non-focus window with higher visibility is higher, and the frame rate of the non-focus window with higher visibility can be guaranteed.

[0011] In a possible design, before the first window is displayed at the third frame rate, the method further includes: obtaining a drawing duration of the second window, the drawing duration being greater than or equal to a first preset duration. In this way, when the drawing duration of the focus window is greater than or equal to the first preset duration, the drawing duration of the focus window is relatively long, which indicates that the system load of the electronic device is likely to be heavy (for example, overloaded), and the probability of the user experiencing phenomena such as freezing or delay when operating the focus window is relatively high. Therefore, the frame rate of the non-focus window is controlled again, for example, the frame rate of the non-focus window is reduced based on the system load, which can timely ensure the frame rate of the focus window and improve the fluency of the user operating the focus window.

[0012] In a possible design, before the first window is displayed at the first frame rate, the method further includes: obtaining a drawing duration of the second window, the drawing duration being less than or equal to a second preset duration. In this way, when the drawing duration of the focus window is less than or equal to the second preset duration, it indicates that the system load of the electronic device is likely to be light (for example, underloaded), and the electronic device has additional capability to draw the non-focus window. At this time, the frame rate of the non-focus window is increased again, which can also ensure the frame rate of the non-focus window.

[0013] For example, the first preset duration and the second preset duration can be set based on a statistical value of the drawing duration of the focus window, and can also be determined based on the frame rate of the focus window. When the frame rate of the focus window is different, the first preset duration and the second preset duration can have different settings. In this way, when the actual drawing duration of the focus window is compared with the set first preset duration and second preset duration, the drawing of the focus window can be more accurately determined, and it can be further determined whether the system load of the electronic device is overloaded or underloaded.

[0014] In a possible design, the second load is higher than a first preset load threshold. In this way, when the second load is higher than the first preset load threshold, it indicates that the system load is likely to be heavy, for example, overloaded, and at this time, the frame rate of the non-focus window is likely to affect the frame rate of the focus window, and therefore the frame rate of the non-focus window is controlled, which can timely ensure the frame rate of the focus window.

[0015] In a possible design, the method further includes: displaying the third window at the first frame rate when the system load is a first load. In this way, when the system load decreases from the second load to the first load, the system load is likely to be small, the frame rate of the non-focus window is less likely to affect the frame rate of the focus window, and the frame rates of different non-focus windows after the frame rates are increased can be the same, which can ensure the frame rates of some non-focus windows.

[0016] In a possible design, the first load is lower than a second preset load threshold. In this way, when the first load is lower than the second preset load threshold, it indicates that the system load of the electronic device is possibly light (e.g., underload), and the frame rates of the non-focus windows of different visibility levels can be the same. In this way, when the system load is light, the frame rates of the non-focus windows are controlled according to the same frame rate, which can ensure the frame rates of the focus windows and the frame rates of some non-focus windows.

[0017] For example, the second preset load threshold can be the same as the first preset load threshold, for example, a threshold corresponding to a case where the system computing power is insufficient or sufficient. Alternatively, the second preset load threshold can be lower than the first preset load threshold, for example, the first preset load threshold can be a threshold corresponding to a case where the system computing power is severely insufficient, and the second preset threshold can be a threshold corresponding to a case where the system computing power is abundant, and the like. The first preset threshold, the second preset threshold, and the like can be set based on an empirical value, an occupation of the system load (e.g., actual use of CPU, GPU, and the like), and the like.

[0018] In a possible design, the second load belongs to a load range corresponding to a first preset load level, or the first load belongs to a load range corresponding to a second preset load level. In this way, when the system load size is in different load levels, the frame rates of the non-focus windows can be different, and when the system load size is in the same load level, the frame rates of the non-focus windows can be the same. In this way, the frame rate of the non-focus window does not need to be set once for a system load size, and the device can be implemented more simply.

[0019] In a possible design, the first window is a window of a first application, and the first application is an application that is not drawn based on a software vertical synchronization (VSYNC) signal. The displaying, at the system load size being the second load, the first window at a third frame rate includes: when the system load size is the second load, controlling the GPU to acquire a first buffer at a frequency corresponding to the third frame rate when a drawing request of the first application is received, where the first buffer is used to draw content of the first window.

[0020] In a possible design, the controlling the GPU to acquire the first buffer at the frequency corresponding to the third frame rate when the drawing request of the first application is received includes: a device driver loader receiving the drawing request of the first application; and in response to the drawing request, the device driver loader loading the GPU to acquire the first buffer at the frequency corresponding to the third frame rate.

[0021] In a possible design, the first window is a window of a second application, and the second application is an application that performs drawing based on a software VSYNC signal; and the displaying the first window at the third frame rate when the system load size is the second load includes: sending a software VSYNC signal to the second application at a frequency corresponding to the third frame rate when the system load size is the second load, where the software VSYNC signal is used to trigger the second application to draw content of the first window.

[0022] In a possible design, the sending the software VSYNC signal to the second application at the frequency corresponding to the third frame rate includes: receiving, by a graphics drawing service, a hardware VSYNC signal generated by the display screen; converting, by the graphics drawing service, the hardware VSYNC signal into a software VSYNC signal at a frequency corresponding to the third frame rate; and sending, by the graphics drawing service, the software VSYNC signal to the second application.

[0023] In a possible design, the visibility of the non-focus window is determined based on at least one of a visible area of the non-focus window, a total area of the non-focus window, or a total area of the display screen.

[0024] In a possible design, the visible area of the non-focus window is positively correlated with the visibility of the non-focus window; or a ratio of the visible area of the non-focus window to the total area of the display screen is positively correlated with the visibility of the non-focus window; or a sum of a product of a first ratio and a first preset weight and a product of a second ratio and a second preset weight is positively correlated with the visibility of the non-focus window, where the first ratio is a ratio of the total area of the non-focus window to the total area of the display screen, and the second ratio is a ratio of the visible area of the non-focus window to the total area of the display screen.

[0025] In a possible design, the system load size is determined based on at least one of an occupancy rate of a CPU, an occupancy rate of a GPU, a clock frequency of the CPU, or a clock frequency of the GPU.

[0026] In a second aspect, an electronic device is provided, which has a function of implementing the method in any design of any aspect described above. The function can be implemented by hardware, or implemented by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the functions described above.

[0027] In a third aspect, an electronic device is provided, which includes a processor, a memory, and a display screen, the memory, the display screen, and the processor being coupled together, the memory being configured to store program code including instructions, the processor being configured to read the instructions from the memory to cause the electronic device to perform the method according to any one of the above aspects. Optionally, the memory can be coupled with the processor or independent of the memory. The display screen can be used for the electronic device to perform display operations.

[0028] In a fourth aspect, a computer-readable storage medium is provided, which includes a computer program, when the computer program is executed on an electronic device, causes the electronic device to perform the method according to any one of the above aspects.

[0029] In a fifth aspect, a computer program product is provided, which includes a computer program or instructions, when the computer program or instructions are executed on a computer, causes the computer to perform the method according to any one of the above aspects.

[0030] In a sixth aspect, a chip system is provided, which includes at least one processor and at least one interface circuit, the at least one interface circuit being configured to perform a transceiving function and send instructions to the at least one processor, when the at least one processor executes the instructions, the at least one processor performs the method according to any one of the above aspects.

[0031] The technical effects of the above aspects can be referred to each other, which will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS

[0032] FIG. 1 is a process diagram of a window frame rate control according to an embodiment of the present application;

[0033] FIG. 2 is a structural diagram of an electronic device according to an embodiment of the present application;

[0034] FIG. 3 is an architecture diagram of a graphics display system according to an embodiment of the present application;

[0035] FIG. 4 is a rendering flow diagram according to an embodiment of the present application;

[0036] FIG. 5 is an architecture diagram of another graphics display system according to an embodiment of the present application;

[0037] FIG. 6 is an interface diagram according to an embodiment of the present application;

[0038] FIG. 7a is another rendering flow diagram according to an embodiment of the present application;

[0039] FIG. 7b is a flow diagram of a window frame rate control method according to an embodiment of the present application;

[0040] FIG. 7c is a flow diagram of another window frame rate control method provided by an embodiment of the present application;

[0041] FIG. 8 is a structural diagram of another electronic device provided by an embodiment of the present application;

[0042] FIG. 9 is a structural diagram of a chip system provided by an embodiment of the present application. DETAILED DESCRIPTION

[0043] In the description of the present application, unless otherwise specified, " / " represents that the objects before and after the " / " are in an "or" relationship, for example, A / B can represent A or B; "and / or" in the present application is only a description of the relationship between the associated objects, which means that there can be three relationships, for example, A and / or B, which can represent: A alone, A and B together, and B alone, where A and B can be singular or plural.

[0044] In the description of the present application, unless otherwise specified, "multiple" means two or more than two. "At least one of the following" or the like means any combination of the items, including any combination of single item or multiple items. For example, at least one of a, b, or c can represent: a, b, c, a and b, a and c, b and c, a and b and c, where a, b, and c can be single or multiple.

[0045] In addition, in order to clearly describe the technical solutions of the embodiments of the present application, in the embodiments of the present application, "first", "second", etc. are used to distinguish the same items or similar items with basically the same function and role. Those skilled in the art can understand that "first", "second", etc. do not limit the quantity and execution order, and "first", "second", etc. also do not necessarily mean different.

[0046] In the embodiments of the present application, frame rate (or frame per second, FPS) can refer to the frequency of continuous appearance of images in frames on the display screen, which can be popularly referred to as the number of frames displayed per second of animation or video, i.e. the number of frames. The higher the frame rate, the more frames displayed per second, and the smoother the picture. For example, Table 1 shows some examples of different frame rates provided by an embodiment of the present application.

[0047] Table 1

[0048] A screen refresh rate can refer to a frequency at which a screen of an electronic device refreshes a picture, in units of hertz (Hz). For example, a 60 Hz refresh rate can refer to a screen refreshing display content 60 times within 1 second, and a 90 Hz refresh rate can refer to a screen refreshing display content 90 times within 1 second. Generally, for an electronic device, a screen refresh rate of the electronic device is fixed.

[0049] Currently, a user can open multiple windows on an electronic device, and the multiple windows can occupy a large amount of system resources, and thus cause a user to experience lag, delay, and the like when operating a focus window, and affect user experience. The focus window can refer to a window that receives a user operation. In one possible solution, as shown in FIG. 1, a graphics rendering service in an electronic device can control a frame rate of a non-focus window to a fixed low frame rate, and does not control a frame rate of a focus window, so as to achieve a purpose of guaranteeing the frame rate of the focus window. For example, Table 2 shows examples of frame rates corresponding to some different types of windows.

[0050] Table 2

[0051] As shown in Table 2, the frame rate of the focus window is not controlled, and can be up to 120 FPS, the frame rate of a non-focus full-occlusion window is controlled to a fixed value of 60 FPS, the frame rate of a non-focus half-occlusion window is controlled to a fixed value of 120 FPS, and the frame rate of a non-focus minimized window is controlled to a fixed value of 0 FPS, that is, the non-focus minimized window is not allowed to be rendered.

[0052] In the scheme, the graphics rendering service controls the frequency of reporting the software vertical synchronization (VSYNC) signal to the application to which the non-focus window belongs, to control the frequency of drawing display content for the non-focus window, and further control the frame rate of the non-focus window, to achieve the purpose of ensuring the frame rate of the focus window. In the electronic device, two types of VSYNC signals are included, one is a hardware VSYNC signal, which is generated by the screen of the electronic device and is used to refresh the display content of the screen. The other is a software VSYNC signal converted from the hardware VSYNC signal, which is used for the application to draw window content. In the scheme, only the frame rate of the non-focus window based on the software VSYNC signal can be controlled to a fixed frame rate, while some self-drawing applications will not be based on the software VSYNC signal when drawing. Therefore, when the windows of these self-drawing applications are non-focus windows, the frame rate of these non-focus windows cannot be controlled, for example, the frame rate of these non-focus windows can reach 2000FPS. The self-drawing application can refer to an application that uses a custom drawing logic (such as an OpenGL ES or a third-party graphics library) to draw. Moreover, as the number of windows displayed on the electronic device increases, the system resources are limited, and the scheme cannot achieve the purpose of ensuring the frame rate of the focus window.

[0053] Therefore, based on this, the embodiment of the present application provides a frame rate control method, which can control the window frame rate and ensure the frame rate of the focus window, and improve the fluency of the user operating the focus window.

[0054] The technical scheme provided by the embodiment of the present application can be applied in the electronic device 100 or in a system including the electronic device 100.

[0055] For example, FIG. 2 shows a structural schematic diagram of an electronic device 100 provided by an embodiment of the present application.

[0056] The electronic device 100 can be a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), a mobile phone, an augmented reality (AR) device, a virtual reality (VR) device, an artificial intelligence (AI) device, a wearable device, a vehicle-mounted device, a smart home device, and / or a smart city device. Optionally, the electronic device 100 can be a stationary device or a portable device. Optionally, an operating system installed on the electronic device 100 can include, but is not limited to Windows, macOS, Linux, Android, or other operating systems. Embodiments of the present application do not make any specific limitation on the specific type of the electronic device or the operating system installed thereon.

[0057] The electronic device 100 can include a processor 110, a memory 120, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna, a wireless communication module 150, an input device 160, a display screen 170, and / or the like.

[0058] The processor 110 can include one or more processing units. For example, the processor 110 can include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, a neural-network processing unit (NPU), and / or the like. Different processing units can be independent devices or integrated in one or more processors.

[0059] The controller can generate operation control signals according to instruction operation codes and timing signals, and complete the control of fetching and executing instructions.

[0060] The processor 110 can also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory can hold instructions or data that the processor 110 has just used or is using repeatedly. If the processor 110 needs to use the instructions or data again, it can call them directly from the memory. This avoids repeated access and reduces the waiting time of the processor 110, thus improving the efficiency of the system.

[0061] In some embodiments, the processor 110 can include one or more interfaces, such as a USB interface 130.

[0062] The charging management module 140 is configured to receive charging input from a charger. The charging management module 140 can also supply power to the electronic device while charging the battery 142 via the power management module 141.

[0063] The power management module 141 is configured to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to supply power to the processor 110, the memory 120, the display 170, and the wireless communication module 150.

[0064] The wireless communication function of the electronic device 100 can be achieved through an antenna, a wireless communication module 150, a modem processor, and a baseband processor, etc.

[0065] The antenna is configured to transmit and receive electromagnetic wave signals.

[0066] The wireless communication module 150 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), star flash, global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (IR), etc. applied to the electronic device 100.

[0067] In some embodiments, the antenna and the wireless communication module 150 of the electronic device 100 are coupled such that the electronic device 100 can communicate with a network and other devices through wireless communication technology. The wireless communication technology can include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, Wi-Fi, GNSS, NFC, FM, and / or IR technology, etc.

[0068] The input device 160 can include a keyboard, a mouse, etc. The keyboard is used to input English letters, numbers, punctuation marks, etc. to the electronic device 100, thereby issuing a command to the electronic device 100, inputting data, etc. The mouse is an indicator for the electronic device 100 to display a system coordinate positioning, and is used to input an instruction to the electronic device 100, etc. The input device 160 can be connected to the electronic device 100 through a wired connection, such as through a GPIO interface, a USB interface, etc. The input device 160 can also be connected to the electronic device 100 through a wireless manner, such as through Bluetooth, infrared, etc. In some embodiments of the present application, the input device 160 can be used to receive an operation performed by a user on an object included in the electronic device 100.

[0069] The electronic device 100 implements a display function through a GPU, a display screen 170, and an application processor, etc. The GPU is a microprocessor for image processing, and is connected to the display screen 170 and the application processor. The GPU is used to perform mathematical and geometric calculations, and is used for graphics rendering. The processor 110 can include one or more GPUs, which execute program instructions to generate or change display information.

[0070] The display screen 170 is used to display images, videos, etc. The display screen 170 includes a display panel. In some embodiments, the electronic device 100 can include 1 or N display screens 170, N being a positive integer greater than 1.

[0071] The memory 120 can be configured to store computer-executable program codes including instructions. The memory 120 can include a program storage area and a data storage area. The program storage area can store operating systems, application programs (such as a sound play function, an image play function, etc.) required by at least one function, etc. The data storage area can store data created during the use of the electronic device 100, etc. In addition, the memory 120 can include a high-speed random access memory, and can further include a non-volatile memory such as at least one of a magnetic disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various function applications and data processing of the electronic device 100 by running the instructions stored in the memory 120 and / or the instructions stored in the memory disposed in the processor.

[0072] It can be understood that the structure shown in FIG. 2 does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 can include more or fewer components than those shown, such as a mobile communication module, a key, etc., or combine some components, or split some components, or different component arrangements. The processing steps or functional characteristics of the components shown can be implemented in hardware, software, or a combination of software and hardware.

[0073] For example, FIG. 3 shows a schematic diagram of an architecture of a graphics display system according to an embodiment of the present application. As shown in FIG. 3, the graphics display system 300 includes applications, a graphics rendering service, a device driver kit (DDK) loader, a GPU, and an image compositor, etc.

[0074] The applications can include applications that access the software VSYNC signal (i.e., applications that perform rendering in response to the software VSYNC signal) and applications that do not access the software VSYNC signal (i.e., applications that do not perform rendering based on the software VSYNC signal). Optionally, the applications that access the software VSYNC signal can or can not be self-rendering applications. For example, the applications that access the software VSYNC signal can include, but are not limited to, various applications such as a gallery, a browser, a file manager, etc. The applications that do not access the software VSYNC signal can include applications such as games, etc.

[0075] The graphics rendering service can provide a buffer to the application that accesses the software VSYNC signal, and the application can draw the content that the application's window needs to display into the buffer. In some embodiments, the graphics display system employs a double buffering mechanism. The double buffering mechanism can refer to the fact that, because the content displayed on the screen needs to be constantly updated, if reading and writing operations are performed in the same buffer, the screen can display multiple frames of content and appear to be out of sync. Therefore, the electronic device provides two buffers for the graphics display system, one of which is used to perform drawing operations, which can be referred to as a back buffer, and the other of which is used to perform display operations, which can be referred to as a front buffer or a frame buffer. Therefore, the application can draw the content that the application's window needs to display into the back buffer. It can be understood that, for an application, there can be one or more windows. For each window, there can be a corresponding back buffer, and the application can draw the content that each window needs to display into the back buffer corresponding to the window, respectively.

[0076] The device driver loader can include a series of functions and interfaces that can be called by the application to drive the GPU. The GPU can be used to execute the drawing instructions of the application that does not access the software VSYNC signal, to draw the content that the corresponding window needs to display into the back buffer corresponding to the window based on the drawing instructions of the application, and to submit the content in the back buffer to the graphics rendering service through the device driver loader.

[0077] The image compositor can be used to perform a composition operation to combine the content in the back buffers corresponding to different windows into the content in the frame buffer, and send the content in the frame buffer to the screen for display.

[0078] The following takes the example of an electronic device screen displaying window 1, window 2, and window 3, wherein window 1 and window 2 are windows of applications that access software VSYNC signals, and window 3 is a window of an application that does not access software VSYNC signals, and introduces the working principle of the graphic display system shown in FIG. 3 in combination with the structure of the graphic display system. As shown in FIG. 4, for window 1 and window 2, when the screen determines that the content on the display screen needs to be refreshed based on the refresh rate, the screen generates a hardware VSYNC signal, and correspondingly, the graphic rendering service acquires the hardware VSYNC signal. Next, the graphic rendering service determines whether to send a software VSYNC signal converted from the hardware VSYNC signal to the application to which the window belongs based on the frame rate corresponding to each of window 1 and window 2. Optionally, window 1 and window 2 can be windows of the same application or windows of different applications.

[0079] For example, when the graphic rendering service determines that the content of a window needs to be rendered based on the frame rate of the window, the graphic rendering service sends a software VSYNC signal to the application to which the window belongs. Conversely, when the graphic rendering service determines that the content of a window does not need to be rendered based on the frame rate of the window, the graphic rendering service does not send a software VSYNC signal to the application to which the window belongs. Subsequently, the application determines whether to render content in the back buffer of the graphic rendering service based on whether the software VSYNC signal is received. For example, if the application receives a software VSYNC signal corresponding to a window, the application renders the content to be displayed by the window into the back buffer corresponding to the window. For example, for window 1, the application to which window 1 belongs can render the content to be displayed by window 1 into back buffer 1. For window 2, the application to which window 2 belongs can render the content to be displayed by window 2 into back buffer 2. If the application does not receive a software VSYNC signal corresponding to a window, the application does not render content into the back buffer corresponding to the window. For example, for window 1, the application to which window 1 belongs does not render content into back buffer 1. For window 2, the application to which window 2 belongs does not render content into back buffer 2.

[0080] For window 3, the application not accessing the software VSYNC signal has its own frame rate, and the application not accessing the software VSYNC signal can load the GPU through the device driver loader to draw the content of window 3 according to its own frame rate. For example, when the application not accessing the software VSYNC signal determines that the content of the current window 3 does not need to be drawn based on its own frame rate, the GPU is not called to draw the content into the back buffer (i.e., back buffer 3) corresponding to window 3. Conversely, when the application not accessing the software VSYNC signal determines that the content of the current window 3 needs to be drawn based on its own frame rate, the GPU is called to draw the content into the back buffer corresponding to window 3, and after the drawing is completed, the GPU can submit the content in back buffer 3 to the graphics drawing service through the device driver loader.

[0081] It can be understood that, since the frame rate of the application not accessing the software VSYNC signal can be different from the frame rate of the application accessing the software VSYNC signal, when the application accessing the software VSYNC signal is drawing based on the software VSYNC signal, the application not accessing the software VSYNC signal can not be drawing, or when the application not accessing the software VSYNC signal is drawing, the application accessing the software VSYNC signal can be drawing based on the software VSYNC signal.

[0082] Finally, the graphics drawing service can send the content in the back buffers (e.g., back buffer 1 to back buffer 3) to the image compositor based on the hardware VSYNC signal, and the image compositor can compose the content into the frame buffer (i.e., frame buffer) and send the content to the screen for display. It can be understood that, since the content of some windows can have been redrawn and the content of some windows can not have been redrawn, the content in some back buffers can be drawn content and the content in some back buffers can still be the content of the previous frame.

[0083] In some embodiments of the present application, as shown in FIG. 5, the graphics rendering service can include at least one of a window priority identification module, a load metric module, and a frame rate control module. The window priority identification module can be used to determine the priority of different windows. The load metric module can be used to detect the system load degree of the electronic device. The frame rate control module can be used to determine the frame rate of the window that accesses the application of the software VSYNC signal based on at least one of the priority of the window and the system load degree. In some embodiments, in combination with the working principle of the graphics display system shown in FIG. 5, when the graphics rendering service sends the software VSYNC signal to the application to which the window belongs, the graphics rendering service can send the software VSYNC signal to the application to which the corresponding window belongs based on the frame rate of the window determined by the frame rate control module, thereby achieving control of the frame rate of the window that accesses the software VSYNC signal.

[0084] The device driver loader can include a self-drawing frame rate control module, wherein the self-drawing frame rate control module can be used to determine the frame rate of the window of the application that does not access the software VSYNC signal based on at least one of the priority of the window and the system load degree. In some embodiments, in combination with the working principle of the graphics display system shown in FIG. 5, when the application that does not access the software VSYNC signal schedules the device driver loader to load the GPU for window content drawing, the device driver loader can control the timing of the GPU obtaining the back buffer based on the window frame rate determined by the self-drawing frame rate control module, thereby achieving control of the frame rate of the window that does not access the software VSYNC signal.

[0085] The technical solutions involved in the following embodiments can be implemented in a device having a structure as shown in FIG. 2 and a graphics display system having an architecture as shown in FIG. 5.

[0086] In some embodiments, the electronic device can display a focus window and a non-focus window. For example, in the embodiments of the present application, the non-focus window displayed on the screen can include at least one of an unobstructed window, a partially obstructed window, a fully obstructed window, a minimized window, etc. The focus window can be an independent single window (such as a video window, a browser window, etc.), or a multi-task center window. The multi-task center window can contain one or more task windows (or task cards) running on the electronic device, and through these task windows, functions similar to the aforementioned independent single window can be enabled. Alternatively, the multi-task center window can be called out by performing a three-finger up swipe operation on the control panel of the electronic device, or by other operations.

[0087] For example, as shown in FIG. 6, the computer displays an interface 600, and the interface 600 displays a plurality of windows, such as a task manager window 601, a video window 602, a browser window 603, and a game window 604. The task manager window 601 is a focus window, the game window 604 is a non-occluded window, the video window 602 is a partially-occluded window, and the browser window 603 is a minimized window. In the example shown in FIG. 6, each window is an independent single window. The multi-task center window can include the task windows corresponding to the video window 602, the browser window 603, and the game window 604, respectively. The task window corresponding to the video window 602 can be used to open the video window 602, the task window corresponding to the browser window 603 can be used to open the browser window 603, and so on.

[0088] The electronic device can dynamically control the frame rate of the non-focus window to ensure the frame rate of the focus window. In this embodiment, the electronic device can control the frame rate of the focus window to be the highest among all the windows, that is, the frame rate of the non-focus window can be less than or equal to the frame rate of the focus window. Alternatively, the electronic device can not limit the frame rate of the focus window, that is, the electronic device does not perform a control operation on the frame rate of the focus window to control the frame rate of the focus window to be the highest among all the windows. Alternatively, the electronic device can also increase the frame rate of the focus window, that is, the electronic device performs a control operation on the frame rate of the focus window to control the frame rate of the focus window to be the highest among all the windows.

[0089] In some implementations, the electronic device can dynamically control the frame rate of the non-focus window according to at least one of the priority of the non-focus window and the system load degree.

[0090] The implementation of determining the priority of the non-focus window is described below.

[0091] In some embodiments, the priority of the non-focus window can be determined based on at least one of the visible area of the non-focus window, the total area of the non-focus window, and the total area of the screen. It can be understood that in the embodiments of the present application, the visible area can refer to the window area that can be seen by the user.

[0092] In this embodiment, as one possible implementation, the priority of the non-focus window can be determined based on a ratio of a total area of the non-focus window to a total area of the screen, and a ratio of a visible area of the non-focus window to the total area of the non-focus window. Optionally, in this implementation, a corresponding weight can be set for the ratio of the total area of the non-focus window to the total area of the screen (may be referred to as a first ratio), and the ratio of the visible area of the non-focus window to the total area of the non-focus window (may be referred to as a second ratio), and the priority of the non-focus window can be determined based on the ratio of the total area of the non-focus window to the total area of the screen and the corresponding weight (may be referred to as a first weight), the ratio of the visible area of the non-focus window to the total area of the non-focus window and the corresponding weight (may be referred to as a second weight), and the like.

[0093] In some examples, the corresponding weight of the ratio of the visible area of the non-focus window to the total area of the non-focus window can be greater than the corresponding weight of the ratio of the total area of the non-focus window to the total area of the screen. Of course, in other examples, the corresponding weight of the ratio of the visible area of the non-focus window to the total area of the non-focus window can also be less than or equal to the corresponding weight of the ratio of the total area of the non-focus window to the total area of the screen, and the specific setting of the weight can be set by the developer according to the actual needs.

[0094] As a specific example, taking the corresponding weight of the ratio of the visible area of the non-focus window to the total area of the non-focus window as 70%, and the corresponding weight of the ratio of the total area of the non-focus window to the total area of the screen as 30% as an example, the priority of the non-focus window can be determined based on formula 1.

[0095] In formula 1, a represents the total area of the non-focus window, b represents the visible area of the non-focus window, and s represents the total area of the screen. The values of a and b are greater than or equal to 0, and the value of s is greater than 0. The priority of the non-focus window can be determined based on the size of the value V (i.e., the size of the sum of the product of the ratio of the total area of the non-focus window to the total area of the screen and the corresponding weight, and the product of the ratio of the visible area of the non-focus window to the total area of the non-focus window and the corresponding weight). The value of V can be greater than or equal to 0 and less than or equal to 1.

[0096] In this example, as one possible implementation, the larger the value of V, the higher the priority of the non-focus window.

[0097] As another possible implementation, the priority of the non-focus window is different when the V value is in different ranges. For example, when the V value is greater than or equal to a first threshold value and less than or equal to a second threshold value, the priority of the non-focus window is priority 1, when the V value is greater than the second threshold value and less than or equal to a third threshold value, the priority of the non-focus window is priority 2, and when the V value is greater than the third threshold value and less than or equal to a fourth threshold value, the priority of the non-focus window is priority 3. The first threshold value to the fourth threshold value increase in turn, such as the first threshold value is 0, the second threshold value is 0.3, the third threshold value is 0.75, and the fourth threshold value is 1. When the first threshold value to the fourth threshold value are the aforementioned examples, the priority division of the non-focus window is relatively consistent with the degree of attention of the user to the non-focus window, and can meet the demand of the user for the frame rate of the non-focus window. Optionally, the specific values of the threshold values can be set by the developer according to the actual demand. The priority 3 is higher than the priority 2, and the priority 2 is higher than the priority 1. In this way, by limiting the priority division of the non-focus window based on the range in which the V value is located, the frame rate control operation can be simplified.

[0098] It can be understood that in this implementation, the priority of the non-focus window is divided into three levels as an example, and in other implementations, the priority of the non-focus window can also be divided into more or fewer levels.

[0099] In this embodiment, as another possible implementation, the priority of the non-focus window can also be determined based on the ratio of the visible area of the non-focus window to the total area of the screen. For example, the larger the ratio of the visible area of the non-focus window to the total area of the screen, the higher the priority of the non-focus window. Alternatively, similar to the previous implementation, different priorities can also be divided for the non-focus window based on different ranges to which the ratio of the visible area of the non-focus window to the total area of the screen belongs.

[0100] In this embodiment, as another possible implementation, the priority of the non-focus window can also be determined based on the visible area of the non-focus window. For example, the larger the visible area of the non-focus window, the higher the priority of the non-focus window. Conversely, the smaller the visible area of the non-focus window, the lower the priority of the non-focus window. Alternatively, similar to the previous implementation, different priorities can also be divided for the non-focus window based on different ranges to which the visible area of the non-focus window belongs.

[0101] In this embodiment, as another possible implementation, the priority of the non-focus window can also be divided based on the type of the non-focus window. For example, the type of the non-focus window can include multiple types such as an unobstructed window, a partially obstructed window, a fully obstructed window, a minimized window, etc. The priorities corresponding to different types of non-focus windows are different. For example, the priorities of the aforementioned types of non-focus windows can decrease in turn.

[0102] The above only exemplifies several implementations of determining the priority of the non-focus window. In actual applications, the priority of the non-focus window can also be determined in other manners, such as based on the service type of the non-focus window. Of course, this manner can also be combined with the above manners.

[0103] The implementation of determining the priority of the non-focus window is introduced above. The implementation of determining the system load degree is introduced below. The system load degree can refer to the busy degree of the system.

[0104] In some embodiments, the system load degree can be determined according to at least one of the CPU occupancy, the CPU clock frequency, the GPU occupancy, or the GPU clock frequency. It can be understood that in the embodiments of the present application, the CPU and the GPU in the electronic device can be integrated in the system on a chip (SOC) or can be independently arranged.

[0105] In this embodiment, as a possible implementation, the higher the CPU or GPU occupancy, the heavier the system load. Alternatively, the higher the CPU or GPU clock frequency, the heavier the system load.

[0106] As another possible implementation, to simplify system operation, the system load degree can be directly divided into a limited number of levels. As a possible division manner, the system load degree can be divided into four levels of severe shortage of computing power, insufficient computing power warning, moderate computing power, and sufficient computing power, for example. For example, the level of the system load degree can be divided based on the range to which the CPU or GPU occupancy belongs. For example, when the CPU or GPU occupancy is greater than a threshold 1 (such as 90%), the system load degree is severe shortage of computing power; when the CPU or GPU occupancy is less than or equal to the threshold 1 but greater than a threshold 2 (such as 75%), the system load degree is insufficient computing power warning; when the CPU or GPU occupancy is less than or equal to the threshold 2 but greater than a threshold 3 (such as 50%), the system load degree is moderate computing power; and when the CPU or GPU occupancy is less than or equal to the threshold 3, the system load degree is sufficient computing power. Optionally, the threshold 1, the threshold 2, and the threshold 3 can be set based on empirical values, actual use of the CPU and the GPU, and the like.

[0107] For example, the system load level can also be divided based on the range to which the ratio of the clock frequency of the CPU at runtime to the maximum clock frequency supported by the CPU belongs. Alternatively, the system load level can also be divided based on the range to which the ratio of the clock frequency of the GPU at runtime to the maximum clock frequency supported by the GPU belongs. Alternatively, the system load level can also be divided based on the range to which the ratio of the clock frequency of the GPU at runtime to the maximum clock frequency supported by the GPU belongs. Optionally, the clock frequencies supported by the CPU or the GPU can include one or more. For example, taking the division of the system load level based on the ratio of the clock frequency of the CPU at runtime to the maximum clock frequency supported by the CPU as an example, it is assumed that the CPU supports clock frequency 1 and clock frequency 2, where clock frequency 1 (such as 1 gigahertz (GHz)) is less than clock frequency 2 (such as 1.5 GHz), that is, clock frequency 2 is the maximum clock frequency supported by the CPU. When the CPU works at clock frequency 1, the clock frequency of the CPU at runtime can be less than or equal to clock frequency 1. For example, when the ratio of the clock frequency of the CPU at runtime to clock frequency 2 is greater than threshold 4 (such as 55%), the system load level is severely insufficient in computing power; when the ratio of the clock frequency of the CPU at runtime to clock frequency 2 is less than or equal to threshold 4 but greater than threshold 5 (such as 40%), the system load level is insufficient in computing power; when the ratio of the clock frequency of the CPU at runtime to clock frequency 2 is less than or equal to threshold 5 but greater than threshold 6 (such as 20%), the system load level is moderate in computing power; and when the ratio of the clock frequency of the CPU at runtime to clock frequency 2 is less than or equal to threshold 6, the system load level is abundant in computing power. Similarly, threshold 4, threshold 5, threshold 6, etc. can also be set based on empirical values, actual usage of the CPU and the GPU, etc.

[0108] When the CPU works at clock frequency 2, the clock frequency of the CPU at runtime can be less than or equal to clock frequency 2. The system load level can also be determined based on the range to which the ratio of the clock frequency of the CPU at runtime to clock frequency 2 belongs. Optionally, in this example, the threshold ranges corresponding to different system load levels can be different from those when the CPU works at clock frequency 1. Similarly, for the implementation of dividing the system load level based on at least one of the clock frequency of the CPU or the GPU at runtime and the maximum clock frequency supported by the CPU or the GPU, reference can be made to the related implementation of the occupancy described above.

[0109] It can be understood that the foregoing division manner is only as one possible example, and in actual application, the system load degree can also be divided into more or less levels. For example, the system load degree can also be divided into two levels of insufficient computing power and sufficient computing power. For example, still taking the division of the levels of the system load degree based on the range to which the CPU or GPU occupancy rate belongs as an example, when the CPU or GPU occupancy rate is greater than or equal to the preset occupancy threshold, the system load degree is insufficient computing power, and otherwise, when the CPU and GPU occupancy rates are both less than the preset occupancy threshold, the system load degree is sufficient computing power.

[0110] Optionally, when determining the system load level, the electronic device can also use a proportion integration differentiation (PID) algorithm to determine.

[0111] In some embodiments, the frame rate of the non-focus window can be dynamically controlled based on the priority of the non-focus window and the system load degree. For example, when the system load is light (for example, when the system load degree is sufficient computing power, or sufficient computing power, moderate computing power, etc. as described above, the system load is light), the frame rates corresponding to non-focus windows of different priority sizes can be the same. In this way, when the system load is light, the frame rate of the non-focus window is controlled according to the same frame rate, which can not only guarantee the frame rate of the focus window, but also guarantee the frame rate of the non-focus window with lower priority. Of course, in other examples, when the system load is light, the frame rates corresponding to non-focus windows of different priority sizes can also be different, for example, the frame rate of each non-focus window can be controlled according to the priority of the non-focus window, for example, the higher the priority of the non-focus window, the higher the frame rate of the non-focus window. In this way, when the system load is light, the frame rate of the non-focus window is controlled according to the priority of the non-focus window, and the frame rate of the non-focus window with higher priority is higher, which can guarantee the frame rate of the non-focus window with high priority. Optionally, when the system load is light, the frame rate of the non-focus window can be less than the frame rate of the focus window. Of course, since the system load is light at this time, the normal drawing of the non-focus window can not affect the frame rate of the focus window, and therefore, the frame rate of the non-focus window can be the same as the frame rate of the focus window.

[0112] For another example, when the system load is heavy (e.g., when the system load degree is the above-mentioned serious shortage of computing power, or computing power shortage warning, computing power shortage, etc., the system load is heavy), the frame rate of the non-focus window corresponding to different priority sizes can be different, such as the higher the priority of the non-focus window, the higher the frame rate of the non-focus window. In this example, the frame rate of the non-focus window is lower than the frame rate of the focus window. In this way, when the system load is heavy, the frame rate of the non-focus window is controlled according to the priority of the non-focus window, and the frame rate of the non-focus window with high priority is higher, which not only ensures the frame rate of the focus window, but also ensures the frame rate of the non-focus window with high priority.

[0113] For another example, the heavier the system load, the lower the frame rate of the non-focus window. In this way, the heavier the system load, the greater the influence of the frame rate of the non-focus window on the frame rate of the focus window, and the lower the control of the frame rate of the non-focus window, so that the system load can ensure the frame rate of the focus window at different levels.

[0114] For example, in combination with the system load degree being divided into serious shortage of computing power, computing power shortage warning, computing power moderate, computing power wide, and the above-mentioned priority of the non-focus window being divided into priority 1 to priority 3, Table 3 shows some value examples of the frame rate of some non-focus windows provided by the embodiments of the present application.

[0115] Table 3

[0116] As shown in Table 3, when the system load computing power is wide, the frame rate of the non-focus window with different priorities can be the same, such as 60FPS. Optionally, when the system load computing power is wide, the frame rate of the non-focus window can also be the same as the frame rate of the focus window. Optionally, when the system load computing power is wide, the frame rate of the non-focus window can also be the same as the screen refresh rate. The heavier the system load, the lower the frame rate of the non-focus window, such as taking the non-focus window with priority 1 as an example, the frame rate of the non-focus window corresponding to the system load level of computing power wide, computing power moderate, computing power shortage warning, and computing power serious shortage is 60FPS, 50FPS, 45FPS, and 30FPS respectively, and the frame rate is continuously reduced. It can be understood that Table 3 is only an example for understanding the embodiments of the present application, and the frame rate of the non-focus window can be different when actually set.

[0117] In combination with the example shown in Table 3 and the architecture shown in Figure 5, taking the non-focus window 2 and the non-focus window 3 displayed on the electronic device as an example, the non-focus window 2 is the window of the application accessing the software VSYNC signal, and the non-focus window 3 is the window of the application not accessing the software VSYNC signal. Introduce the working principle of the graphic display system shown in Figure 5.

[0118] As shown in FIG. 7a, the window priority identification module in the graphics rendering service can identify the priorities of the non-focus windows (e.g., non-focus window 2, non-focus window 3). Optionally, the window priority identification module in the graphics rendering service can identify whether a window is a focus window or a non-focus window based on the window identifier used to represent the "focus", and then determine the priority of the identified non-focus window through the above-mentioned scheme for determining the priority of a non-focus window. Assume that the window priority identification module determines that the priority of the current non-focus window 2 is priority 1, and the priority of the non-focus window 3 is priority 2. And the load measurement module in the graphics rendering service determines the current system load level based on the above-mentioned scheme for determining the system load level, and the determined system load level is an example of severe lack of computing power.

[0119] Then, the frame rate control module in the graphics rendering service can determine the frame rates of the non-focus windows (e.g., non-focus window 1 and non-focus window 2) based on the priorities of the non-focus window 1 and non-focus window 2 determined by the window priority identification module, and the system load level determined by the load measurement module. As shown in Table 3, the frame rate control module determines to control the frame rate of the non-focus window 2 to 30 FPS, and control the frame rate of the non-focus window 3 to 20 FPS.

[0120] Then, for the non-focus window 2, the graphics rendering service can send a software VSYNC signal converted based on the hardware VSYNC signal to the application to which the non-focus window 2 belongs according to the frame rate (e.g., 30 FPS) of the non-focus window 2, that is, the graphics rendering service can send a software VSYNC signal to the application to which the non-focus window 2 belongs at a frequency of 30 software VSYNC signals per second. Further, the application to which the non-focus window 2 belongs receives a software VSYNC signal, and draws a frame of content that the non-focus window 2 needs to display to the back buffer (e.g., back buffer a) corresponding to the non-focus window 2, so that the frame rate of the non-focus window 2 is 30 FPS.

[0121] For the non-focus window 3, the frame rate control module can send the determined frame rate (e.g., 20 FPS) of the non-focus window 3 to the self-drawing frame rate control module in the device driver loader. Subsequently, the self-drawing frame rate control module can control the GPU to obtain the back buffer (e.g., back buffer b) according to the frame rate (e.g., a frequency of 20 times per second) of the non-focus window 3 when the non-focus window 3 is called. Further, the GPU obtains a back buffer to draw a frame of content that the non-focus window 3 needs to display, and after the drawing is completed, the GPU can submit the content in the back buffer b to the graphics rendering service through the device driver loader, so that the frame rate of the non-focus window 3 is 20 FPS.

[0122] In the above example, the electronic device can also display the in-focus window 1. Optionally, the in-focus window 1 can be a window of an application that accesses the software VSYNC signal, or a window of an application that does not access the software VSYNC signal. When the in-focus window 1 is a window of an application that does not access the software VSYNC signal, the in-focus window 1 and the non-in-focus window 3 can be windows of the same application that does not access the software VSYNC signal, or windows of different applications that do not access the software VSYNC signal. It can be understood that, for the sake of simplicity and ease of understanding, the drawing process of the in-focus window 1 is not shown in FIG. 7a, and the drawing process of the in-focus window 1 can refer to the drawing process shown in FIG. 4.

[0123] Finally, the graphics rendering service can also send the content in the back buffer of all windows (such as the in-focus window 1, the non-in-focus window 2, the non-in-focus window 3, etc.) to the image compositor based on the hardware VSYNC signal, and the image compositor can compose the content into the frame buffer and send it to the screen for display. Similarly, subsequently, when the load measurement module in the graphics rendering service determines that the level of system load becomes moderate, and the windows displayed on the electronic device are still the in-focus window 1, the non-in-focus window 2, and the non-in-focus window 3, and the priorities of the non-in-focus window 2 and the non-in-focus window 3 do not change. It is still assumed that the non-in-focus window 2 is a window of an application that accesses the software VSYNC signal, then the frame rate control module in the graphics rendering service controls the frame rate of the non-in-focus window 2 to be 50 FPS. It is assumed that the non-in-focus window 3 is a window of an application that does not access the software VSYNC signal, then the self-drawing frame rate control module in the device driver loader controls the frame rate of the non-in-focus window 3 to be 35 FPS. Similarly.

[0124] Optionally, in the above embodiment, the electronic device can perform the above operation of determining the priority of the non-in-focus window when the windows displayed on the screen change (such as but not limited to the number of windows changing, the size of the window changing, the window moving, the in-focus window changing, etc.), or determine the priority of the non-in-focus window again when determining the degree of system load. The embodiments of the present application do not limit the timing of determining the priority of the non-in-focus window.

[0125] The above embodiment introduces the implementation of controlling the frame rate of the non-in-focus window based on the priority of the non-in-focus window.

[0126] In some embodiments, the electronic device can dynamically control the frame rate of the non-focus window based on the system load degree. As one possible implementation, the heavier the system load, the lower the frame rate of the non-focus window. As another possible implementation, the system load degree can be divided into different levels in a similar manner as described above, such as the multiple levels of severe computational power shortage, computational power shortage warning, moderate computational power, and abundant computational power. When the system load degree is at different levels, the frame rate of the same non-focus window is different. For example, when the level of the system load degree indicates that the system load is heavier, the frame rate of the non-focus window is lower. Conversely, when the level of the system load degree indicates that the system load is lighter, the frame rate of the non-focus window is higher.

[0127] Optionally, in the above two implementations, the frame rate of the non-focus window can be lower than the frame rate of the focus window.

[0128] Optionally, in the above two implementations, the frame rate of the non-focus window can be lower than the frame rate of the focus window.

[0129] In some embodiments, the electronic device can periodically or regularly control the frame rate of the non-focus window based on the above scheme.

[0130] In some embodiments, the electronic device can periodically or regularly control the frame rate of the non-focus window based on the above scheme.

[0131] Optionally, the electronic device can determine the drawing time of the focus window based on the drawing time of each frame of content of the focus window in a time period. For example, the drawing time of the focus window can be the average or median of the drawing time of each frame of content in the time period.

[0132] Optionally, the electronic device can periodically or regularly determine the drawing time of the focus window to determine whether to control the frame rate of the non-focus window based on the above scheme.

[0133] In this embodiment, as a possible implementation, the electronic device can enable frame rate control of the non-focus window when the drawing duration of the focus window is higher than or equal to the first preset duration. When the drawing duration of the focus window is higher than or equal to the first preset duration, the drawing duration of the focus window is longer, which indicates that the system load of the electronic device can be heavy (e.g., overload), and the probability of the user experiencing phenomena such as freezing or delay when operating the focus window is higher. Therefore, when the frame rate of the non-focus window is controlled (e.g., reduced), the frame rate of the focus window can be ensured in time, and the smoothness of the user operating the focus window can be improved. Conversely, when the drawing duration of the focus window is less than the first preset duration, the electronic device can not enable frame rate control of the non-focus window. When the drawing duration of the focus window is less than the first preset duration, it indicates that the system load of the electronic device can be light, and the electronic device can have sufficient capability to draw the focus window in time, and the probability of the user experiencing phenomena such as freezing or delay when operating the focus window is lower. At this time, the electronic device does not control the frame rate of the non-focus window, and the power consumption of the electronic device can be reduced.

[0134] In some embodiments, the electronic device can also enable frame rate control of the non-focus window when the drawing duration of the focus window is lower than or equal to a second preset duration. The second preset duration is less than the first preset duration. When the drawing duration of the focus window is lower than or equal to the second preset duration, it indicates that the system load of the electronic device can be light (e.g., underload), and the electronic device has additional capability to draw the non-focus window. At this time, frame rate control of the non-focus window is enabled again (e.g., the frame rate of the non-focus window is increased), which can also ensure the frame rate of the non-focus window.

[0135] Optionally, the first preset duration and the second preset duration can be determined based on the frame rate of the focus window. When the frame rate of the focus window is different, the first preset duration and the second preset duration can have different settings. In this way, when the actual drawing duration of the focus window is compared with the first preset duration and the second preset duration, the drawing of the focus window can be more accurately determined, and it can be determined whether the system load of the electronic device is overload or underload.

[0136] For example, Table 4 shows some examples of the comparison results when the scheme provided in the embodiments of the present application is used to control the frame rate of the non-focus window and when the frame rate of the non-focus window is not controlled.

[0137] Table 4

[0138] As shown in Table 4, when the task center slides or zooms, the focal point window is the task center, and after the non-focal point window frame rate control scheme provided in the embodiments of the present application is adopted, the average drawing time of the focal point window is lower than the average drawing time when the non-focal point window frame rate control scheme provided in the embodiments of the present application is not adopted, and the frame rate of the focal point window is higher than the frame rate when the non-focal point window frame rate control scheme provided in the embodiments of the present application is not adopted.

[0139] Optionally, the technical scheme provided in the embodiments of the present application is also applicable to a multi-screen cooperation scenario. For example, when a certain non-focal point window presented on the electronic device is projected by another device, the electronic device can also control the frame rate of the non-focal point window based on the above scheme. Alternatively, when a focal point window presented on the electronic device is projected by another device, the electronic device can also control the frame rate of the non-focal point window based on the above scheme to ensure the frame rate of the focal point window. Of course, in the multi-screen cooperation scenario, the electronic device can also adopt a similar scheme to reduce the frame rate of a window that is not focused by the user to achieve the purpose of ensuring the frame rate of a window that is focused by the user. For example, the window that is focused by the user can be a window projected by another device.

[0140] For example, FIG. 7b shows a flowchart of a window frame rate control method provided in the embodiments of the present application. As shown in FIG. 7b, the method includes the following steps:

[0141] S701, the electronic device obtains the system load size.

[0142] Optionally, before obtaining the system load size, the electronic device can display a focal point window and a non-focal point window on the display screen. Optionally, the number of non-focal point windows that can be displayed by the electronic device can be one or more.

[0143] Optionally, in some embodiments, before performing step S701, the electronic device can first perform step S701a and step S701b. Of course, in other embodiments, steps S701a and S701b can be performed after step S701, such as when the frame rate of the window is controlled.

[0144] S701a, the electronic device obtains the drawing time of the focal point window.

[0145] For the drawing time of the focal point window, please refer to the description above.

[0146] S701b, the electronic device determines whether the drawing time of the focal point window is greater than or equal to a first preset time length.

[0147] Wherein, in the case of greater than or equal to, step S701 is performed. Conversely, in the case of less than, step S701a can be returned to perform. Optionally, the electronic device can periodically or regularly perform step S701a.

[0148] S702, the electronic device controls the frame rate of the non-focus window displayed by the display screen based on the system load size.

[0149] Wherein, the frame rate of the non-focus window can be negatively correlated with the system load size, and the frame rate of the non-focus window can be less than the frame rate of the focus window displayed by the display screen. Optionally, in some embodiments, when the system load size is low, the frame rate of the focus window can not be affected, and the frame rate of the non-focus window can also be equal to the frame rate of the focus window.

[0150] In some implementations, when the system load size is a first load, the electronic device displays a first window at a first frame rate and a second window at a second frame rate, the first window and the second window are windows displayed on the display screen, the first window is a non-focus window, and the second window is a focus window, the first frame rate is lower than or equal to the second frame rate. Optionally, the first window can be one of the non-focus windows displayed on the display screen. Then, the system load size decreases from the first load to a second load, and when the system load size is the second load, the electronic device displays the first window at a third frame rate and the second window at the second frame rate, wherein the third frame rate is lower than the first frame rate and the second frame rate.

[0151] In some embodiments, the first window is a window of a first application, and the first application is an application that is not drawn based on a software vertical synchronization (VSYNC) signal. Then, when the system load size is the first load, the electronic device controls the GPU to obtain a first buffer (such as the back buffer described above) corresponding to the frequency of the third frame rate when receiving a drawing request of the first application, the first buffer is used to draw the content of the first window, so that the first window can be displayed at the third frame rate.

[0152] In some embodiments, the electronic device controls the GPU to obtain the first buffer corresponding to the frequency of the third frame rate when receiving the drawing request of the first application, which can be specifically implemented as: the device driver loader receives the drawing request of the first application. In response to the drawing request, the device driver loader loads the GPU to obtain the first buffer corresponding to the frequency of the third frame rate.

[0153] In some embodiments, the first window is a window of a second application, and the second application is an application that performs rendering based on a software VSYNC signal. When the system load size is the first load, the electronic device sends a software VSYNC signal to the second application at a frequency corresponding to the third frame rate, and the software VSYNC signal is used to trigger the second application to render the content of the first window, so that the first window can be displayed at the third frame rate.

[0154] In some embodiments, the electronic device sends a software VSYNC signal to the second application at a frequency corresponding to the third frame rate, which can be implemented as follows: the graphics rendering service receives a hardware VSYNC signal generated by the display screen; the graphics rendering service converts the hardware VSYNC signal into a software VSYNC signal at a frequency corresponding to the third frame rate; and the graphics rendering service sends the software VSYNC signal to the second application.

[0155] In some embodiments, the non-focus window displayed by the electronic device can further include a third window, and the frame rate of the first window can be higher than the frame rate of the third window.

[0156] Optionally, in this embodiment, the visibility of the first window can be higher than the visibility of the third window. Optionally, the visibility of the non-focus window can be determined based on at least one of the visible area of the non-focus window, the total area of the non-focus window, and the total area of the display screen. The specific determination method can refer to the implementation of determining the visibility of the non-focus window described above.

[0157] In this embodiment, as one possible implementation, when the system load size is the second load, the electronic device can also display the third window at a fourth frame rate, and the fourth frame rate is lower than the third frame rate.

[0158] As another possible implementation, when the system load size is the first load, the electronic device can also display the third window at a fifth frame rate, and the fifth frame rate is higher than the fourth frame rate and lower than the first frame rate.

[0159] That is, in the above implementation, when the system load size is the first load or the second load, the frame rates corresponding to non-focus windows with different visibilities can be different. The frame rate of a non-focus window with higher visibility is higher.

[0160] As yet another possible implementation, when the system load size is the first load, the electronic device can also display the third window at the first frame rate. That is, in this implementation, when the system load size is the first load or a lower load, the frame rates corresponding to non-focus windows with different visibilities can be the same.

[0161] In some embodiments, the second load can be higher than the first preset load threshold. The first load can be lower than the second preset load threshold. Optionally, the second preset load threshold can be the same as the first preset load threshold, such as the threshold corresponding to the system insufficient or sufficient computing power as described above (such as the preset occupancy threshold). Alternatively, the second preset load threshold can be lower than the first preset load threshold, such as the first preset load threshold can be the threshold corresponding to the severe insufficient computing power as described above (such as threshold 1), and the second preset threshold can be the threshold corresponding to the wide-ranging computing power as described above (such as threshold 3), etc. The embodiments of the present application do not make specific limitations on the values of the second preset load threshold and the first preset load threshold. Correspondingly, the frame rate of the non-focus window (such as the first frame rate of the first window, the third frame rate, etc., the fourth frame rate of the third window, the fifth frame rate, etc.) can refer to the examples of the frame rate when the system load is different or is of different levels, such as insufficient or sufficient computing power, severe insufficient computing power, wide-ranging computing power, etc. as described above.

[0162] In some embodiments, the second load belongs to the load range corresponding to the first preset load level (such as the severe insufficient computing power level as described above, etc.), such as greater than threshold 1. Or, the first load belongs to the load range corresponding to the second preset load level (such as the wide-ranging computing power level as described above, etc.), such as less than or equal to threshold 3. Of course, the first preset load level and the second preset load level can also be other system load levels divided as described above. That is, when the system load size is in the same preset load level, the electronic device can control the frame rate of the same non-focus window to be the same frame rate.

[0163] In some embodiments, before displaying the first window at the third frame rate, the electronic device can also obtain the drawing duration of the second window, and when the drawing duration is greater than or equal to the first preset duration, the first window is displayed at the third frame rate again. Optionally, the electronic device can obtain the system load size again when the drawing duration is greater than or equal to the first preset duration, and when the system load size is the second load, the first window is displayed at the third frame rate again.

[0164] In some embodiments, before displaying the first window at the first frame rate, the electronic device can also obtain the drawing duration of the second window, and when the drawing duration is less than or equal to the second preset duration, the frame rate of the first window is increased from the third frame rate to the first frame rate. Optionally, the electronic device can obtain the system load size again when the drawing duration is less than or equal to the second preset duration, and when the system load size is the first load, the first window is displayed at the first frame rate.

[0165] For example, FIG. 7c shows a flowchart of another window frame rate control method provided by the embodiments of the present application, which can be applied to an electronic device with a display screen. As shown in FIG. 7c, the method includes the following steps:

[0166] S801, the electronic device acquires a system load size.

[0167] S802, the electronic device displays the first window at a first frame rate and the second window at a second frame rate when the system load size is a first load.

[0168] The first window and the second window are windows displayed on the display screen, the first window is a non-focus window, the second window is a focus window, and the first frame rate is lower than or equal to the second frame rate.

[0169] Subsequently, if the system load size increases from the first load to a second load, the electronic device performs step S803.

[0170] S803, the electronic device displays the first window at a third frame rate and the second window at the second frame rate when the system load size is the second load.

[0171] The third frame rate is lower than the first frame rate and the second frame rate.

[0172] The description of step S801 shown in FIG. 7c can refer to the related description of step S701, and the description of step S802 and step S803 can refer to the related description of step S702.

[0173] The above mainly describes the solutions provided by the embodiments of the present application from the perspective of methods. It can be understood that the electronic device includes hardware structure and / or software modules corresponding to the execution of each function in order to implement the above functions. The units and algorithm steps of each example described in combination with the embodiments disclosed in the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is implemented in hardware or computer-driven hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the technical solutions of the embodiments of the present application.

[0174] The embodiments of the present application can divide the functional modules of the electronic device according to the above method examples, for example, each functional module can be divided according to each function, or two or more functions can be integrated in one processing unit. The integrated unit can be in the form of hardware or in the form of software functional module. It should be noted that the division of units in the embodiments of the present application is illustrative, and is only a logical functional division. There can be another division method when actually implemented.

[0175] As shown in FIG. 8, a structural schematic diagram of an electronic device provided by an embodiment of the present application is shown. The electronic device 800 can be used to implement the method performed by the electronic device in the above various method embodiments. For example, the electronic device 800 can include a processing unit 801 and a display unit 802.

[0176] The processing unit 801 is configured to support the electronic device 800 to perform the processing functions of the electronic device described in any one of FIGS. 1 to 7b, and the display unit 802 is configured to support the electronic device 800 to perform the display functions of the electronic device described in any one of FIGS. 1 to 7b.

[0177] Optionally, the electronic device 800 shown in FIG. 8 can further include a storage unit 803. The storage unit 803 stores programs or instructions. When the processing unit 801 executes the programs or instructions, the electronic device 800 shown in FIG. 8 can perform the methods described in the above method embodiments.

[0178] The technical effects of the electronic device 800 shown in FIG. 8 can refer to the technical effects described in the above method embodiments, which will not be repeated here. The processing unit 801 involved in the electronic device 800 shown in FIG. 8 can be implemented by a processor or a processor-related circuit component, which can be a processor or a processing module. The display unit 802 can be implemented by a display screen-related component.

[0179] An embodiment of the present application further provides a chip system, as shown in FIG. 9, which includes at least one processor 901 and at least one interface circuit 902. The processor 901 and the interface circuit 902 can be interconnected by a line. For example, the interface circuit 902 can be configured to receive signals from other devices. For another example, the interface circuit 902 can be configured to send signals to other devices (such as the processor 901). For example, the interface circuit 902 can read instructions stored in a memory and send the instructions to the processor 901. When the instructions are executed by the processor 901, the electronic device can perform the steps performed by the electronic device in the above embodiments. Of course, the chip system can also include other discrete devices, which are not limited in the embodiments of the present application.

[0180] Optionally, the processor in the chip system can be one or more. The processor can be implemented by hardware or software. When implemented by hardware, the processor can be a logic circuit, an integrated circuit, etc. When implemented by software, the processor can be a general-purpose processor, which is implemented by reading software codes stored in a memory.

[0181] Optionally, the memory in the chip system can also be one or more. The memory can be integrated with the processor, or can be arranged separately from the processor, and the application does not limit. For example, the memory can be a non-transient processor, such as a read-only memory (ROM), which can be integrated on the same chip as the processor, or can be arranged separately on different chips, and the application does not limit the type of memory and the arrangement of the memory and the processor.

[0182] For example, the chip system can be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a digital signal processor (DSP), a micro controller unit (MCU), a programmable logic device (PLD) or other integrated chip.

[0183] It should be understood that each step in the above method embodiments can be completed by the integrated logic circuit of hardware in the processor or the instructions in the form of software. The method steps disclosed in combination with the embodiments of the application can be directly embodied as hardware processor execution, or executed by a combination of hardware and software modules in the processor.

[0184] The embodiments of the application also provide a computer storage medium, which stores computer instructions, and when the computer instructions run on an electronic device, the electronic device executes the method described in the above method embodiments.

[0185] The embodiments of the application provide a computer program product, which includes a computer program or instructions, and when the computer program or instructions run on a computer, the computer executes the method described in the above method embodiments.

[0186] In addition, the embodiments of the application also provide a device, which can be a chip, a component or a module. The device can include a processor and a memory connected to each other. The memory is used to store computer execution instructions. When the device runs, the processor can execute the computer execution instructions stored in the memory, so that the device executes the method in each of the above method embodiments.

[0187] Among them, the electronic device, computer storage medium, computer program product or chip provided by the embodiment are used for executing the corresponding method provided above, so the beneficial effects achieved by them can refer to the beneficial effects of the corresponding method provided above, which will not be repeated here.

[0188] Through the description of the above embodiments, those skilled in the art can understand that, for the convenience and brevity of description, only the above division of functional modules is taken as an example, and in actual application, the above functions can be completed by 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.

[0189] In several embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented by other ways. Each embodiment can be combined or referred to each other in the case of no conflict. The apparatus embodiment described above is only schematic, for example, the division of modules or units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another device, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the shown or discussed each other can be through some interface, indirect coupling or communication connection between the devices or units, which can be electrical, mechanical or other forms.

[0190] The unit described as a separate component can be or can not be physically separated, and the component shown as a unit can be one physical unit or multiple physical units, that is, can be located in one place, or can be distributed to multiple different places. According to actual needs, part or all of the units can be selected to achieve the purpose of the embodiment scheme.

[0191] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of software functional unit.

[0192] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application essentially or say the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The software product is stored in a storage medium, including a plurality of instructions to make a device (which can be a single-chip microcomputer, a chip, etc.) or a processor execute all or part of the steps of the various embodiments of the method of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.

[0193] The above is only a specific embodiment of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed by the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A window frame rate control method, characterized by, The method is applied to an electronic device with a display screen, and comprises: obtaining a system load size; when the system load size is a first load, displaying a first window at a first frame rate and a second window at a second frame rate, the first window and the second window being windows displayed on the display screen, the first window being a non-focus window, the second window being a focus window, the first frame rate being lower than or equal to the second frame rate; the system load size increases from the first load to a second load; when the system load size is the second load, displaying the first window at a third frame rate, the third frame rate being lower than the first frame rate and the second frame rate.

2. The method of claim 1, wherein, The method further comprises: when the system load size is the second load, displaying a third window at a fourth frame rate, the third window being a window displayed on the display screen, the third window being a non-focus window, the fourth frame rate being lower than the third frame rate.

3. The method of claim 2, wherein, The method further comprises: when the system load size is the first load, displaying the third window at a fifth frame rate, the fifth frame rate being higher than the fourth frame rate and lower than or equal to the first frame rate.

4. The method according to claim 2 or 3, characterized in that, The visibility of the third window on the display screen is lower than the visibility of the first window on the display screen.

5. The method of any one of claims 1-4, wherein, before the displaying the first window at the third frame rate, the method further comprises: obtaining a drawing duration of the second window, the drawing duration being greater than or equal to a first preset duration; and / or, before the displaying the first window at the first frame rate, the method further comprises: obtaining a drawing duration of the second window, the drawing duration being less than or equal to a second preset duration.

6. The method of any one of claims 1-5, wherein, when the system load size is the second load, displaying the second window at the second frame rate.

7. The method according to any one of claims 1 to 6, characterized in that, the second load is higher than a first preset load threshold.

8. The method according to any one of claims 3-7, characterized in that, the fifth frame rate is equal to the first frame rate, and the first load is lower than a second preset load threshold.

9. The method according to any one of claims 1-8, characterized in that, the first window is a window of a first application, the first application being an application that does not draw based on a software vertical synchronization (VSYNC) signal; and the displaying the first window at the third frame rate when the system load size is the second load comprises: when the system load size is the second load, controlling a GPU to obtain a first buffer according to a frequency corresponding to the third frame rate when a drawing request of the first application is received, the first buffer being used to draw content of the first window.

10. The method according to any one of claims 1-8, characterized in that, the first window is a window of a second application, the second application being an application that draws based on a software VSYNC signal; and the displaying the first window at the third frame rate when the system load size is the second load comprises: when the system load size is the second load, sending a software VSYNC signal to the second application according to a frequency corresponding to the third frame rate, the software VSYNC signal being used to trigger the second application to draw content of the first window.

11. The method according to any one of claims 4-10, characterized in that, The visibility of the non-focus window is determined based on at least one of a visible area of the non-focus window, a total area of the non-focus window, and a total area of the display screen.

12. The method according to any one of claims 1-11, characterized in that, The system load size is determined based on at least one of an occupancy of a CPU, an occupancy of a GPU, a clock frequency of the CPU, and a clock frequency of the GPU.

13. An electronic device, comprising: The system load size is determined based on at least one of an occupancy of a CPU, an occupancy of a GPU, a clock frequency of the CPU, and a clock frequency of the GPU. The system load size is determined based on at least one of an occupancy of a CPU, an occupancy of a GPU, a clock frequency of the CPU, and a clock frequency of the GPU.

14. A computer-readable storage medium, characterized in that, The system load size is determined based on at least one of an occupancy of a CPU, an occupancy of a GPU, a clock frequency of the CPU, and a clock frequency of the GPU.

15. A computer program product, characterised in that, The system load size is determined based on at least one of an occupancy of a CPU, an occupancy of a GPU, a clock frequency of the CPU, and a clock frequency of the GPU. The system load size is determined based on at least one of an occupancy of a CPU, an occupancy of a GPU, a clock frequency of the CPU, and a clock frequency of the GPU. The system load size is determined based on at least one of an occupancy of a CPU, an occupancy of a GPU, a clock frequency of the CPU, and a clock frequency of the GPU.

Citation Information

Patent Citations

  • Resource control method and device and frame rate control method

    CN118509657A

  • Application window display method and device, electronic equipment and storage medium

    CN119440336A

  • Window frame rate control method and electronic equipment

    CN120216066A

  • Method and Device for Controlling Frame Rate of Electronic Device, Storage Medium, and Electronic Device

    US20200007914A1