CN-121996333-A - Frame rate control method and electronic equipment
Abstract
The application provides a frame rate control method and electronic equipment, relates to the technical field of computers, and can effectively control the drawing frame rate of an application (such as an application which is not connected with a Vsync signal), reduce the problems of unstable operation of an electronic equipment system and the like, and improve the use experience of a user. In the method, under the condition that the drawing frame rate of a first application is larger than the screen refresh rate of electronic equipment and/or the overall load of the electronic equipment is larger than a preset load, the electronic equipment acquires window shielding information of the first application, wherein the window shielding information is used for indicating the condition that a window corresponding to the first application is shielded by other display contents on a display screen of the electronic equipment. And then, the electronic equipment reduces the drawing frame rate of the first application according to the window shielding information and the whole machine load of the first application.
Inventors
- GAO ZHIGUO
- HUANG DECAI
- WU JIANGZHENG
- HU BIN
Assignees
- 华为技术有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20241106
Claims (16)
- 1. The frame rate control method is characterized by being applied to electronic equipment, wherein the electronic equipment comprises at least one application, the at least one application comprises a first application, and the method comprises the following steps: Acquiring window shielding information of the first application when the drawing frame rate of the first application is larger than the screen refresh rate of the electronic equipment and/or the overall load of the electronic equipment is larger than a preset load, wherein the window shielding information is used for indicating the condition that a window corresponding to the first application is shielded by other display contents on a display screen of the electronic equipment; and reducing the drawing frame rate of the first application according to the window shielding information of the first application and the whole machine load.
- 2. The method of claim 1, wherein the overall load of the electronic device comprises a system-on-chip, SOC, occupancy of the first application and/or a temperature of the electronic device, and wherein the overall load of the electronic device being greater than a preset load comprises at least one of the first application having a SOC occupancy greater than a preset occupancy, the SOC temperature being greater than a first preset temperature, or the electronic device having an overall temperature greater than a second preset temperature.
- 3. The method according to claim 1 or 2, wherein reducing the drawing frame rate of the first application according to the window occlusion information of the first application and the overall load comprises: And according to the window shielding information of the first application and the whole machine load, reducing the drawing frame rate of the first application to a target frame rate.
- 4. A method according to claim 3, wherein said reducing the drawing frame rate of the first application to a target frame rate according to the window occlusion information of the first application and the overall load comprises: According to the whole machine load, obtaining the load grade of the whole machine load of the electronic equipment, wherein different load grades correspond to different load ranges, and the whole machine load in the same load range belongs to the same load grade; Determining a target frame rate of the first application according to the load level and window shielding information of the first application; and reducing the drawing frame rate of the first application to the target frame rate.
- 5. The method of claim 4, wherein the load level comprises a first load level indicating at least one of an SOC occupancy of the first application greater than 90%, an SOC temperature of the first application greater than 90 °, a bulk temperature of the electronic device greater than 37 °, the first application comprising at least one window comprising a first window, and the determining a target frame rate for the first application based on the load level and window occlusion information for the first application comprises: in respect of the first load level, And determining that the first window corresponding to the first application is not blocked according to the window blocking information, and determining that the target frame rate is equal to the screen refresh rate of the electronic equipment.
- 6. The method of claim 5, wherein the determining the target frame rate for the first application based on the load level and window occlusion information for the first application comprises: in respect of the first load level, And determining that the first window corresponding to the first application is blocked by 1/3 according to the window blocking information, and determining that the target frame rate is 1/2 of the screen refresh rate of the electronic equipment.
- 7. The method according to claim 5 or 6, wherein said determining a target frame rate of the first application based on the load level and window occlusion information of the first application comprises: in respect of the first load level, And determining that the first window corresponding to the first application is blocked by 2/3 according to the window blocking information, and determining that the target frame rate is 1/4 of the screen refresh rate of the electronic equipment.
- 8. The method of any of claims 5-7, wherein the determining the target frame rate for the first application based on the load level and window occlusion information for the first application comprises: in respect of the first load level, And determining that all the first windows corresponding to the first application are blocked according to the window blocking information, and determining that the target frame rate is 0.
- 9. The method of claim 4, wherein the load level comprises a second load level indicating at least one of an SOC occupancy of greater than 70% and less than or equal to 90%, an SOC temperature of greater than 80 ° and less than or equal to 90 °, a bulk temperature of greater than 30 ° and less than or equal to 37 ° for the electronic device, the first application comprising at least one window comprising a first window, and the determining a target frame rate for the first application based on the load level and window occlusion information for the first application comprises: For the second load level in question, And determining that the first window corresponding to the first application is blocked by 2/3 according to the window blocking information, wherein the target frame rate is 1/3 of the screen refresh rate of the electronic equipment.
- 10. The method according to any one of claims 1-9, wherein the method further comprises: and under the condition that the drawing frame rate of the first application is larger than the screen refreshing rate of the electronic equipment and/or the overall load of the electronic equipment is larger than a preset load, responding to the fact that the first application is not operated or is checked out, and reducing the drawing frame rate of the first application to be 0.
- 11. The method of any of claims 1-7, wherein the electronic device comprises a loader encapsulation layer for the first application to invoke a graphics processor GPU, the method further comprising: and acquiring the times of calling the loader encapsulation layer by the first application so as to determine the drawing frame rate of the first application.
- 12. The method of claim 4, wherein the reducing the rendering frame rate of the first application to the target frame rate comprises: And in a loader encapsulation layer, adjusting the frequency of the GPU call by the first application according to the target frame rate so as to reduce the drawing frame rate of the first application.
- 13. The method of any of claims 1-12, wherein the SOC comprises a central processing unit, CPU, and a GPU, and wherein the SOC occupancy comprises the CPU occupancy and the GPU occupancy.
- 14. An electronic device comprising a memory, one or more processors, the memory coupled to the processors, wherein the memory has stored therein computer program code comprising computer instructions that, when executed by the processors, cause the electronic device to perform the frame rate control method of any of claims 1-13.
- 15. A computer readable storage medium comprising computer instructions which, when run on an electronic device, cause the electronic device to perform the frame rate control method of any of claims 1-13.
- 16. A computer program product, characterized in that the computer program product, when run on a computer, causes the computer to perform the frame rate control method according to any of claims 1-13.
Description
Frame rate control method and electronic equipment Technical Field The present application relates to the field of computer technologies, and in particular, to a frame rate control method and an electronic device. Background Applications on electronic devices typically choose to run on the electronic device at as high a rendering frame rate as possible in order to ensure a smooth use experience for the user. However, the drawing frame rate of the application is likely to exceed the screen refresh rate, so that the problems of serious heating, high power consumption, unstable system operation and the like of the electronic equipment are caused. Currently, for such problems, a general solution is to let an application access a vertical synchronization (vertical synchronization, vsync) signal of an electronic device, and the electronic device controls the issuing of the Vsync signal, and the application starts graphics rendering after receiving the Vsync signal, so as to ensure that the drawing frame rate of the application does not exceed the screen refresh rate. However, not all applications will access the Vsync signal, and for applications not accessing the Vsync signal, the electronic device cannot control the drawing frame rate thereof by the method, the drawing frame rate of these applications still exceeds the screen refresh rate of the electronic device, and even some applications continuously refresh at a higher drawing frame rate, so that a large amount of system resources of the electronic device are occupied, resulting in a failure of the stability of the system. Disclosure of Invention The application provides a frame rate control method and electronic equipment, which can effectively control the drawing frame rate of an application (such as an application which is not connected with a Vsync signal), reduce the problems of unstable operation of an electronic equipment system and the like, and improve the use experience of a user. In order to achieve the above purpose, the application adopts the following technical scheme: In a first aspect, a frame rate control method is provided and applied to an electronic device, wherein the electronic device comprises at least one application, and the at least one application comprises a first application. In the method, under the condition that the drawing frame rate of a first application is larger than the screen refresh rate of electronic equipment and/or the overall load of the electronic equipment is larger than a preset load, the electronic equipment acquires window shielding information of the first application, wherein the window shielding information is used for indicating the condition that a window corresponding to the first application is shielded by other display contents on a display screen of the electronic equipment. And then, the electronic equipment reduces the drawing frame rate of the first application according to the window shielding information and the whole machine load of the first application. In the method, when the current drawing frame rate is too high or the whole load of the electronic equipment is too high, the drawing frame rate of the application can be reduced according to the condition that an application window displayed on the electronic equipment is blocked by other display contents, the whole load of the electronic equipment and the like. Therefore, when the drawing frame rate is adjusted, the situation that the window of the application is blocked by other display contents is considered, and the situation of the whole machine load is also considered, so that the adjusted drawing frame rate can meet the requirement of a user on the window of the application, and the lower the drawing frame rate of the application, the lower the frequency of calling the GPU by the application is, so that the problems of equipment heating, high power consumption and unstable system operation can be reduced. In which, for example, the drawing frame rate may be reduced to not exceed the screen refresh rate for applications where the drawing frame rate exceeds the screen refresh rate, and the drawing frame rate may be further reduced for applications where the drawing frame rate does not exceed the screen refresh rate. In addition, in the above method, the adjustment of the drawing frame rate of the application may not be affected by the Vsync signal, and for the application not connected to the Vsync signal, the drawing frame rate of the application may be controlled at the stage of the application calling the GPU. In one implementation manner of the first aspect, the complete machine load of the electronic device includes an SOC occupancy rate of the first application and/or a temperature of the electronic device, and the complete machine load of the electronic device being greater than the preset load includes at least one of the SOC occupancy rate of the first application being greater than the preset occupancy rate, the SOC temperature