Refresh rate adjusting method and electronic equipment
Patent Information
- Application Number
- CN202380089084.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-01-10
- Filing Date
- 2023-11-14
- Publication Date
- 2025-08-12
AI Technical Summary
When existing electronic devices display animated images, some of the animated images may have problems such as jumping and smearing, which affects the user experience. In addition, high refresh rate displays increase the power consumption of the device.
Adopt a refresh rate adjustment method to dynamically adjust the refresh rate of the animation screen based on the specific content of the animation screen, the type of animation and movement parameters, increase the refresh rate of the animation screen to improve the display effect, and reduce the refresh rate when not necessary power consumption. The specific method includes selecting a second refresh rate greater than the first refresh rate and the third refresh rate to display the dynamic effect picture, and dynamically switching the refresh rate to take into account the display effect and power consumption.
It effectively improves the display effect of dynamic effects pictures, reduces the problems of jumping and smearing in dynamic effects pictures, and at the same time reduces the power consumption of electronic devices when unnecessary, improving user experience and device performance.
Smart Images

Figure CN120476378A_ABST
Abstract
Description
Refresh rate adjustment method and electronic device
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on January 10, 2023, with application number 202310033877.X and application name “Refresh rate adjustment method and electronic device”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of electronic technology, and in particular to a refresh rate adjustment method and electronic equipment. Background Art
[0003] With the continuous development of electronic technology, some electronic devices can support higher screen refresh rates, such as 90Hz, 120Hz or 144Hz.
[0004] In order to balance the smoothness of the display screen on the electronic device and the power consumption of the electronic device, the electronic device will lock the refresh rate of some applications at a lower refresh rate, while other applications can be displayed at a higher refresh rate.
[0005] However, this refresh rate adjustment method may cause some animation images to jump or smear when the animation images are triggered.
[0006] Summary of the Invention
[0007] An embodiment of the present application provides a refresh rate adjustment method and an electronic device, which display certain dynamic effect pictures at a second refresh rate that is greater than the first refresh rate and the third refresh rate, that is, the refresh rate of the dynamic effect pictures is increased, thereby improving the display effect of the dynamic effect pictures and improving problems such as jumping and ghosting in these dynamic effect pictures.
[0008] In a first aspect, an embodiment of the present application proposes a refresh rate adjustment method for an electronic device, the method comprising: the electronic device displays a first interface at a first refresh rate; the electronic device receives a first operation input by a user for the first interface; after the first operation leaves the screen of the electronic device, the electronic device displays an animated screen at a second refresh rate in response to the first operation; after the animated screen is displayed, the electronic device displays a second interface at a third refresh rate. The animated screen is a screen displayed when the electronic device switches from the first interface to the second interface; the second refresh rate is greater than the first and third refresh rates.
[0009] Thus, the embodiment of the present application does not use a whitelist approach to adjust the refresh rate of the animated effect screen, but instead adjusts the refresh rate of the animated effect screen based on the specific content of the animated effect screen. For certain animated effect screens, a second refresh rate greater than the first refresh rate and the third refresh rate can be used for display, that is, the refresh rate of the animated effect screen is increased, thereby improving the display effect of the animated effect screen, improving problems such as jumps and ghosting in these animated effect screens, and improving the user experience.
[0010] In one possible implementation, the electronic device includes a target application; the first interface is the electronic device's desktop, and the second interface is the interface after the target application is launched; or the first interface is the interface of the target application, and the second interface is the electronic device's desktop. In this way, the embodiment of the present application can display the animated image at a second refresh rate that is greater than the first refresh rate and the third refresh rate during the launch or exit process of the target application, thereby improving the display effect of the animated image.
[0011] In one possible implementation, the electronic device includes a target application, and the first operation is a sliding operation on the interface of the target application, wherein the sliding operation includes any one of an upward sliding operation, a downward sliding operation, a left sliding operation, and a right sliding operation; the first interface is the interface displayed by the target application before the sliding operation, and the second interface is the interface displayed by the target application after the sliding operation. In this way, the embodiment of the present application can display a dynamic effect screen at a second refresh rate greater than the first refresh rate and the third refresh rate in an interface sliding scenario or a ViewPage switching scenario, and the display effect of the dynamic effect screen can be improved.
[0012] In one possible implementation, the electronic device includes a target application, which is a settings application; a first interface is a main settings interface of the settings application, which includes multiple settings items; a first operation is a click operation on a target setting item in the main settings interface, which is any one of the multiple settings items; and a second interface is a settings interface corresponding to the target setting item. Thus, in a window animation scene of the settings application, the animation is displayed at a second refresh rate that is greater than the first refresh rate and the third refresh rate, thereby improving the display effect of the animation.
[0013] In one possible implementation, the electronic device includes a target application; the first interface is an interface including an input box in the target application; the first operation is a click operation on the input box in the first interface; the second interface is an interface including a touch keyboard; or the first interface is an interface including a touch keyboard; the second interface is an interface including an input box in the target application. Thus, in an input method pop-up scenario or an input method hidden scenario, the animation is displayed at a second refresh rate that is greater than the first and third refresh rates, thereby improving the display effect of the animation.
[0014] In one possible implementation, an electronic device displays an animated effect screen at a second refresh rate in response to a first operation, including: the electronic device generates, in response to the first operation, animated effect attribute information corresponding to the animated effect screen, the animated effect attribute information including an animated effect type and an animated effect parameter; when the animated effect type is a bit shift effect, the electronic device calculates the motion parameter corresponding to the animated effect screen based on the animated effect parameter; the electronic device determines a second refresh rate based on the motion parameter; and the electronic device displays the animated effect screen at the second refresh rate; wherein, when the motion parameter meets a preset condition, the second refresh rate is greater than the first refresh rate and the third refresh rate. In this way, for animated effect screens whose animated effect type is a bit shift effect and whose motion parameter meets the preset condition, the refresh rate of the screen can be increased during display, thereby improving the problems of jumps and ghosting in these animated effect screens, thereby improving the user experience; while for animated effect screens whose animated effect type is a transparency effect, a color effect, or a rotation effect, and whose animated effect type is a bit shift effect but whose motion parameter does not meet the preset condition, the refresh rate of the screen is not increased during display, thereby reducing the power consumption of these animated effect screens when displayed at an unnecessary high refresh rate, thereby reducing the power consumption of the electronic device. Therefore, the second refresh rate of the motion effect picture is reasonably set according to the motion effect attribute information to balance the display effect of the motion effect picture and the power consumption of the electronic device.
[0015] In one possible implementation, when the animation type is a position movement effect, the animation parameters include the starting position of the animation, the ending position of the animation, the animation curve, and the duration of the animation; the electronic device calculates the movement parameters corresponding to the animation screen based on the animation parameters, including: the electronic device calculates the movement distance corresponding to the animation screen based on the distance between the ending position of the animation and the starting position of the animation; when the movement distance is greater than a first preset distance, the electronic device calculates the movement speed corresponding to the animation screen based on at least one of the starting position of the animation, the ending position of the animation, the animation curve, and the duration of the animation. In this way, the movement parameters corresponding to the animation screen are also the movement speed corresponding to the animation screen, and the movement distance and movement speed can be easily calculated based on the animation parameters in the animation attribute information.
[0016] In one possible implementation, the electronic device determines the second refresh rate based on the movement parameter, including: the electronic device obtains the corresponding second refresh rate based on the speed interval in which the movement speed is located; wherein the electronic device includes multiple speed intervals and a second refresh rate corresponding to each speed interval, and the second refresh rate is positively correlated with the speed values within the speed interval. Thus, when the movement speed is greater, the corresponding second refresh rate is greater; when the movement speed is smaller, the corresponding second refresh rate is smaller.
[0017] In one possible implementation, when the moving speed is within a preset speed range, the moving parameter meets the preset condition; the preset speed range is at least part of the speed range in multiple speed ranges, and the speed value included in the preset speed range is greater than the speed value included in other speed ranges in the multiple speed ranges except the preset speed range.
[0018] In one possible implementation, the motion effect curve is a uniform motion effect curve, where the motion speed corresponding to the motion effect screen at different times remains consistent, and the second refresh rate corresponding to the motion effect screen at different times remains consistent; or the motion effect curve is a non-uniform motion effect curve, where the motion speed corresponding to the motion effect screen at different times varies, and the second refresh rate corresponding to the motion effect screen at different times varies. In this way, the electronic device can select the corresponding motion effect curve as needed to reasonably set the second refresh rate for the motion effect screen display.
[0019] In one possible implementation, the non-uniform motion effect curve includes at least a first-stage curve and a second-stage curve, the first-stage curve is the motion effect curve between the start moment of the motion effect and the first target moment, and the second-stage curve is the motion effect curve after the first target moment; the slope of the non-uniform motion effect curve represents the moving speed of the motion effect screen. The second refresh rate corresponding to the first-stage curve is less than or equal to the first refresh rate, and the second refresh rate corresponding to the second-stage curve is greater than the first refresh rate. The electronic device displays the motion effect screen before the first target moment at a second refresh rate that is less than or equal to the first refresh rate. In this way, when the display of the motion effect screen is triggered, the motion effect screen is displayed at a low refresh rate in the time period between the start moment of the motion effect and the moment when the refresh rate is increased, thereby reducing the power consumption of the electronic device.
[0020] In one possible implementation, the non-uniform motion effect curve includes at least a third-stage curve and a fourth-stage curve. The third-stage curve is the motion effect curve before the second target moment, and the fourth-stage curve is the motion effect curve between the second target moment and the end moment of the motion effect. The slope of the non-uniform motion effect curve represents the moving speed of the motion effect screen. The second refresh rate corresponding to the third-stage curve is greater than the third refresh rate, and the second refresh rate corresponding to the fourth-stage curve is less than or equal to the third refresh rate. The electronic device displays the motion effect screen after the second target moment at a second refresh rate that is less than or equal to the third refresh rate. In this way, when the display of the motion effect screen is triggered, the motion effect screen is displayed at a low refresh rate in the time period after the refresh rate is reduced, thereby reducing the power consumption of the electronic device.
[0021] In one possible implementation, an electronic device includes a focus application, a target manager, a motion effect management module, and an image synthesizer, wherein the target manager includes a window manager or an input method manager. In response to a first operation, the electronic device generates motion effect attribute information corresponding to a motion effect screen, including: the focus application, in response to the first operation, directly calls the motion effect management module or indirectly calls the motion effect management module through the target manager to generate motion effect attribute information corresponding to the motion effect screen, and sends the motion effect attribute information to the image synthesizer.
[0022] In one possible implementation, when the motion effect type is a bit shift effect, the electronic device calculates the motion parameters corresponding to the motion effect screen based on the motion effect parameters, including: when the image synthesizer determines that the motion effect type in the motion effect attribute information is a bit shift effect, the image synthesizer calculates the motion parameters corresponding to the motion effect screen based on the motion effect parameters. The electronic device determines the second refresh rate based on the motion parameters, including: the image synthesizer determines the second refresh rate based on the motion parameters. In this way, the embodiment of the present application executes the refresh rate decision process through the image synthesizer.
[0023] In one possible implementation, the electronic device further includes a refresh rate control module; the method further includes: when the refresh rate interval corresponding to the focus application changes, the refresh rate control module sends the changed refresh rate interval to the image synthesizer; the refresh rate interval is an interval consisting of a minimum refresh rate and a maximum refresh rate, and the second refresh rate determined by the image synthesizer is within the refresh rate interval. In this way, the refresh rate control module can also determine the refresh rate interval corresponding to the focus application based on the current usage conditions of the electronic device, such as whether the focus application is frame-locked, low brightness, temperature, low battery, and other scenarios, thereby reasonably setting whether the dynamic effect screen displays the dynamic effect screen at a high refresh rate.
[0024] In one possible implementation, the electronic device further includes a hardware synthesizer, a display driver, a display driver chip, and a display screen. The electronic device displays a motion effect picture at a second refresh rate, including: the image synthesizer sends a refresh rate switching instruction to the display driver chip through the display driver; the display driver chip adjusts the frequency of the hardware Vsync signal to the second refresh rate according to the refresh rate switching instruction; the image synthesizer synchronizes the hardware Vsync signal to generate a first software Vsync signal and a second software Vsync signal with a frequency of the second refresh rate; the first software Vsync signal is used to trigger the drawing and rendering of the motion effect picture at the second refresh rate, and the second software Vsync signal is used to trigger the synthesis of the drawn and rendered motion effect picture at the second refresh rate; after the image synthesizer synthesizes the motion effect picture, the image synthesizer sends the synthesized motion effect picture to the hardware synthesizer; the hardware synthesizer sends the synthesized motion effect picture to the display driver chip through the display driver; the display driver chip controls the display screen according to the hardware Vsync signal to display the synthesized motion effect picture.
[0025] On the second aspect, the embodiment of the present application also proposes a refresh rate adjustment method, which is applied to an electronic device, the method comprising: the electronic device displays a first interface at a first refresh rate; the electronic device receives a second operation input by the user for the first interface, the second operation being a sliding operation; while the second operation continues to act on the screen of the electronic device, the electronic device responds to the second operation and displays a dynamic effect picture at a second refresh rate; after the second operation leaves the screen of the electronic device, the electronic device displays the second interface at a third refresh rate. The dynamic effect picture is a picture that the electronic device continuously slides and displays based on the sliding operation while the sliding operation continues to act on the screen of the electronic device; the second sliding speed corresponding to the sliding operation is positively correlated with the second refresh rate. That is, when the second sliding speed is greater, the corresponding second refresh rate is greater; when the second sliding speed is smaller, the corresponding second refresh rate is smaller.
[0026] In a third aspect, an embodiment of the present application proposes an electronic device, comprising a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to call the computer program to execute the above-mentioned refresh rate adjustment method.
[0027] In a fourth aspect, an embodiment of the present application proposes a computer-readable storage medium, in which a computer program or instruction is stored. When the computer program or instruction is executed, the above-mentioned refresh rate adjustment method is implemented.
[0028] In a fifth aspect, an embodiment of the present application proposes a computer program product, including a computer program, which enables a computer to execute the above-mentioned refresh rate adjustment method when the computer program is executed.
[0029] The possible implementation methods of the third to fifth aspects have effects similar to those of the first aspect and the possible designs of the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] FIG1 is a schematic diagram of the hardware system structure of an electronic device provided in an embodiment of the present application;
[0031] FIG2 is a schematic diagram of the software system structure of an electronic device provided in an embodiment of the present application;
[0032] FIG3 is a schematic diagram of interface switching in an application startup scenario provided by an embodiment of the present application;
[0033] FIG4 is a schematic diagram of a dynamic effect screen in an application startup scenario provided by an embodiment of the present application;
[0034] FIG5 is a schematic diagram of the refresh rate adjustment during the process of switching from the first interface to the second interface according to an embodiment of the present application;
[0035] FIG6 is a schematic diagram of the interaction of the software system during the application startup process provided by an embodiment of the present application;
[0036] FIG7 is a flow chart of a refresh rate adjustment method during application startup according to an embodiment of the present application;
[0037] FIG8 is a schematic diagram of a dynamic effect curve provided in an embodiment of the present application;
[0038] FIG9 is a schematic diagram of a refresh rate switching timing provided by an embodiment of the present application;
[0039] FIG10 is a schematic diagram of a display processing flow of an electronic device interface provided by an embodiment of the present application;
[0040] FIG11 is a second schematic diagram of a display processing flow of an electronic device interface provided by an embodiment of the present application;
[0041] FIG12 is a third schematic diagram of a display processing flow of an electronic device interface provided by an embodiment of the present application;
[0042] FIG13 is a schematic diagram of interface switching in an application exit scenario provided by an embodiment of the present application;
[0043] FIG14 is a schematic diagram of interface switching in an interface sliding scenario provided by an embodiment of the present application;
[0044] FIG15 is a flow chart of a refresh rate adjustment method for a scenario where the user keeps sliding their hands, provided by an embodiment of the present application;
[0045] FIG16 is a schematic diagram of interface switching in a ViewPage switching scenario provided by an embodiment of the present application;
[0046] FIG17 is a schematic diagram of interface switching in a window animation scenario provided by an embodiment of the present application;
[0047] FIG18 is a flow chart of a refresh rate adjustment method in a window animation scenario according to an embodiment of the present application;
[0048] FIG19 is a schematic diagram of interface switching in an input method pop-up scenario provided by an embodiment of the present application;
[0049] FIG20 is a schematic diagram of an image synthesizer according to an embodiment of the present application collecting relevant information to make a refresh rate decision;
[0050] FIG21 is a schematic diagram of an interface for displaying a dynamic effect image at a low refresh rate provided by an embodiment of the present application;
[0051] FIG22 is a schematic diagram of another interface for displaying a dynamic effect image at a low refresh rate provided by an embodiment of the present application;
[0052] FIG23 is a flow chart of a refresh rate adjustment method provided in an embodiment of the present application;
[0053] FIG24 is a schematic structural diagram of a refresh rate adjustment device provided in an embodiment of the present application;
[0054] FIG25 is a schematic diagram of the structure of a chip provided in an embodiment of the present application. DETAILED DESCRIPTION
[0055] To facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first" and "second" are used to distinguish between identical or similar items with substantially the same functions and effects. For example, the first chip and the second chip are merely used to distinguish different chips and do not limit their order. Those skilled in the art will understand that the words "first" and "second" do not limit the quantity or execution order, and the words "first" and "second" do not necessarily mean that they are different.
[0056] It should be noted that in the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described in this application as "exemplary" or "for example" should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0057] In the embodiments of the present application, "at least one" refers to one or more, and "more" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.
[0058] With the continuous development of electronic technology, users have increasingly higher requirements for the performance of electronic devices. To improve users' visual viewing experience, more and more electronic devices can support higher screen refresh rates, such as 90Hz, 120Hz, or 144Hz. When electronic devices display images at high refresh rates, they can improve the smoothness of the image, thereby improving the user's visual viewing experience.
[0059] However, when applications in an electronic device display images at a high refresh rate, the number of times the electronic device draws, renders, and synthesizes images per unit time (such as 1 second) will increase, resulting in a significant increase in the power consumption of the electronic device.
[0060] In related technologies, a whitelist approach can be used to balance the user's visual experience and power consumption. Some applications can be added to the whitelist, while others are not. When the applications on the whitelist are running, they can display the screen at a high refresh rate (such as 90Hz or 120Hz); while when the applications not on the whitelist are running, they will be fixed at a lower refresh rate (such as 60Hz) for display.
[0061] However, for applications that are not on the whitelist, during their operation, if the user clicks or slides on the currently running interface of the application to trigger the display of animated images, the electronic device will still display the animated images at a lower refresh rate, resulting in jumping, ghosting and other problems in the display of some animated images, affecting the user experience.
[0062] For applications on the whitelist, when the user taps or slides on the currently running interface of the application, the electronic device will still display the animated effect at a higher refresh rate, regardless of the type of animation triggered by the tap or slide. However, in actual use, some animated effects triggered by taps or slides do not significantly improve the user experience when displayed at a higher refresh rate. Therefore, these animated effects triggered by taps or slides are displayed at an unnecessary high refresh rate, resulting in increased power consumption of the electronic device.
[0063] It should be noted that the above-mentioned whitelist can be customized by the manufacturer of the electronic device, and multiple refresh rate setting options will be displayed on the interface of the electronic device, such as a high-level refresh rate option, a medium-level refresh rate option, a standard-level refresh rate option, and a smart refresh rate option. For example, when the electronic device receives a user trigger operation for the high-level refresh rate option, the interfaces of all applications in the electronic device are displayed at a refresh rate of 120Hz; when the electronic device receives a user trigger operation for the medium-level refresh rate option, the interfaces of all applications in the electronic device are displayed at a refresh rate of 90Hz; when the electronic device receives a user trigger operation for the standard-level refresh rate option, the interfaces of all applications in the electronic device are displayed at a refresh rate of 60Hz; when the electronic device receives a user trigger operation for the smart refresh rate option, the applications in the whitelist of the electronic device can be displayed at a high refresh rate, while the applications not in the whitelist are displayed at a lower refresh rate. When the electronic device leaves the factory, the electronic device selects the smart refresh rate option by default.
[0064] Based on this, an embodiment of the present application provides a refresh rate adjustment method, which displays a first interface at a first refresh rate, and after receiving a first operation input by the user for the first interface and the first operation leaves the screen of the electronic device, in response to the first operation, displays a dynamic effect screen at a second refresh rate, and after the dynamic effect screen is displayed, displays the second interface at a third refresh rate. The dynamic effect screen is a screen displayed when the electronic device switches from the first interface to the second interface; the second refresh rate is greater than the first refresh rate and the third refresh rate. In this way, the embodiment of the present application can display certain dynamic effect screens at a second refresh rate greater than the first refresh rate and the third refresh rate, that is, increase the refresh rate of the dynamic effect screen, thereby improving the display effect of the dynamic effect screen, improving problems such as jumping and ghosting in this part of the dynamic effect screen, and improving the user experience.
[0065] Specifically, the embodiment of the present application does not use a whitelist approach to adjust the refresh rate of the dynamic effect screen, but adjusts the refresh rate of the dynamic effect screen according to the specific content of the dynamic effect screen. For dynamic effect screens whose dynamic effect type is a bit shift effect and whose movement parameters meet the preset conditions, the refresh rate when displayed can be increased, thereby improving the problems of jumping and ghosting in these dynamic effect screens, thereby improving the user experience; and for dynamic effect screens whose dynamic effect type is a transparency dynamic effect, a color dynamic effect, or a rotation dynamic effect, and whose dynamic effect type is a bit shift effect but whose movement parameters do not meet the preset conditions, the refresh rate when displayed is not increased, thereby reducing the power consumption of these dynamic effect screens when displayed at an unnecessary high refresh rate, thereby reducing the power consumption of electronic devices.
[0066] In summary, the refresh rate adjustment method of the embodiment of the present application can adjust the refresh rate of the dynamic effect picture through the dynamic effect attribute information corresponding to the dynamic effect picture, so as to take into account the user's visual viewing effect and power consumption.
[0067] It is understandable that the solution of the embodiment of the present application is applicable to the adjustment of the screen refresh rate in the dynamic effect scenario. Among them, the dynamic effect scenario refers to the scenario in which the interface displayed on the display screen of the electronic device changes, that is, the process of the electronic device switching from the first interface to the second interface is the dynamic effect scenario in the embodiment of the present application, and the dynamic effect screen is the screen displayed in the process of the electronic device switching from the first interface to the second interface. In other words, when the interface of the display screen of the electronic device changes, the electronic device may adjust the screen refresh rate.
[0068] Exemplarily, when the electronic device displays the first interface, it uses the first refresh rate (such as 60Hz) for refresh; when the electronic device switches from the first interface to the second interface, the electronic device uses the third refresh rate (such as 60Hz) for refresh. When the electronic device displays the dynamic effect screen in the process of switching from the first interface to the second interface, it can use the second refresh rate for refresh. Specifically, when the dynamic effect type of the dynamic effect screen is a bit movement effect, and the movement parameters corresponding to the dynamic effect screen meet the preset conditions, the second refresh rate is greater than the first refresh rate and the third refresh rate. For example, the second refresh rate can be 90Hz or 120Hz.
[0069] The refresh rate adjustment method provided in the embodiment of the present application can be applied to electronic devices with display functions. The electronic device can also be called a terminal, user equipment (UE), mobile station (MS), mobile terminal (MT), etc. The electronic device can be a mobile phone, a smart TV, a wearable device, a tablet computer (Pad), a computer with wireless transceiver function, a virtual reality (VR) electronic device, an augmented reality (AR) electronic device, a wireless terminal in industrial control, a wireless terminal in self-driving, a wireless terminal in remote medical surgery, a wireless terminal in smart grid, a wireless terminal in transportation safety, a wireless terminal in smart city, a wireless terminal in smart home, etc. The embodiments of the present application do not limit the specific technology and specific device form adopted by the electronic device.
[0070] In order to better understand the embodiments of the present application, the structure of the electronic device according to the embodiments of the present application is introduced below.
[0071] FIG1 shows a schematic diagram of the structure of an electronic device 100. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display 194, and a subscriber identification module (SIM) card interface 195. The sensor module 180 may include a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, and the like.
[0072] It should be understood that the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0073] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors.
[0074] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.
[0075] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the instruction or data again, it can retrieve it from the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.
[0076] The charging management module 140 is configured to receive charging input from a charger. The charger can be either a wireless charger or a wired charger. While charging the battery 142, the charging management module 140 can also power the electronic device through the power management module 141. 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 and powers the processor 110, the internal memory 121, the display 194, the camera 193, and the wireless communication module 160.
[0077] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
[0078] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to the electronic device 100. The wireless communication module 160 can provide solutions for wireless communications including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication technology (NFC), infrared technology (IR), etc. applied to the electronic device 100.
[0079] Electronic device 100 implements display functionality through a GPU, display screen 194, and an application processor. A GPU is a microprocessor for image processing that connects display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or modify display information.
[0080] Display screen 194 is used to display images, videos, and receive sliding operations. Display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-oLed, or a quantum dot light-emitting diode (QLED). In some embodiments, electronic device 100 may include one or more display screens 194.
[0081] The electronic device 100 can implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.
[0082] The ISP processes data fed back by camera 193. For example, when taking a photo, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, which is then passed to the ISP for processing and transformed into a visible image. The ISP can also perform algorithmic optimization on image noise, brightness, and skin tone. It can also optimize parameters such as exposure and color temperature of the captured scene. In some embodiments, the ISP can be located within camera 193.
[0083] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, and then passes the electrical signal to the ISP for conversion into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include one or more cameras 193.
[0084] The digital signal processor is used to process digital signals. In addition to processing digital image signals, it can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
[0085] Video codecs are used to compress or decompress digital video. Electronic device 100 may support one or more video codecs. This allows electronic device 100 to play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, and MPEG4.
[0086] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 via the external memory interface 120 to implement data storage functions. For example, files such as music and videos can be stored on the external memory card.
[0087] The internal memory 121 can be used to store computer executable program codes, and the executable program codes include instructions. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the electronic device 100 by running instructions stored in the internal memory 121 and / or instructions stored in a memory provided in the processor.
[0088] The electronic device 100 can implement audio functions such as music playback and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0089] A touch sensor, also known as a "touch-sensitive device," can be provided on the display screen 194. The touch sensor and the display screen 194 form a touch screen, also known as a "touch screen." The touch sensor is used to detect touch operations applied thereto or in the vicinity thereof. The touch sensor can transmit the detected touch operations to an application processor to determine the type of touch event. Visual output related to the touch operations can be provided via the display screen 194. In other embodiments, the touch sensor can also be provided on the surface of the electronic device 100, at a location different from that of the display screen 194.
[0090] The buttons 190 include a power button, a volume button, etc. The electronic device 100 can receive button inputs and generate key signal inputs related to the user settings and function controls of the electronic device 100. The motor 191 can generate vibration prompts. The motor 191 can be used for incoming call vibration prompts, or for touch vibration feedback. The indicator 192 can be an indicator light, which can be used to indicate the charging status, power changes, messages, missed calls, notifications, etc. The SIM card interface 195 is used to connect the SIM card. The SIM card can be connected to and separated from the electronic device 100 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195.
[0091] The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture, etc. In the embodiment of the present application, the Android system with a layered architecture is used as an example to exemplify the software structure of the electronic device 100 .
[0092] FIG2 is a block diagram of the software structure of the electronic device 100 according to an embodiment of the present application.
[0093] A layered architecture divides software into several layers, each with distinct roles and responsibilities. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into five layers: from top to bottom: the application layer, the application framework layer, the Android runtime and system libraries, the hardware abstraction layer, and the kernel layer.
[0094] The application layer includes a series of application packages. As shown in Figure 2, an application package may include applications such as Memo, Settings, Camera, and Desktop Launcher. The Desktop Launcher is used to manage the system desktop, such as starting or stopping the system desktop. The Desktop Launcher is also called a desktop application.
[0095] The application framework layer provides an application programming interface (API) and programming framework for applications in the application layer. The application framework layer includes some predefined functions.
[0096] As shown in Figure 2, the application framework layer may include a view system, a motion effect management module, a window manager, an input method manager, a hardware rendering thread, a refresh rate control module, and an activity manager.
[0097] The view system includes visual controls, such as those for displaying text and images. The view system is used to build applications. A display interface can consist of one or more views. For example, a display interface containing a text notification icon might include a view for displaying text and a view for displaying images.
[0098] The view system can include a ViewRootImpl object (root view object). The ViewRootImpl object is neither a subclass of view nor a superclass of view. It can be understood as the manager of the view tree. The ViewRootImpl object is used to read the original input event in the BatchQueue (batch queue) and traverse the view tree corresponding to the focused application based on the information of the original input event (such as the reported point location) to determine the view control triggered by the original input event.
[0099] The view system also includes a choreographer, a class in the operating system responsible for obtaining vertical synchronization (Vsync) signals and controlling the user interface (UI) thread to complete image drawing. A class is a data structure that defines the state and behavior of an object.
[0100] When the application needs to refresh the interface or view, the choreographer will request the first software Vsync signal from SurfaceFlinger (image synthesizer) to seek the right time to perform the drawing operation.
[0101] The Animator Manager is used to manage Animator instances. The focus application, window manager, or input method manager can call the Animator Manager to generate animation attribute information corresponding to the animation screen.
[0102] Among them, the animation attribute information can also be called Animator data. The animation attribute information includes view object, animation type and animation parameters. The animation parameters can include animation start information, animation end information, Interpotator (interpolator) and animation duration.
[0103] The view object refers to the view that executes the animation screen, which includes the coordinates of the top, bottom, left, and right corners; the animation type can include position movement effect, transparency effect, color effect, and rotation effect.
[0104] When the animation effect type is positional movement effect, the animation effect start information is the starting position of the animation effect, and the animation effect end information is the ending position of the animation effect; when the animation effect type is transparency animation, the animation effect start information is the transparency of the animation effect screen at the beginning, and the animation effect end information is the transparency of the animation effect screen at the end; when the animation effect type is color animation, the animation effect start information is the color of the animation effect screen at the beginning, and the animation effect end information is the color of the animation effect screen at the end; when the animation effect type is rotation effect, the animation effect start information is the rotation angle of the animation effect screen at the beginning, and the animation effect end information is the rotation angle of the animation effect screen at the end.
[0105] An interpolator, also known as an animation curve, represents the state change curve from the start to the end of the animation. For example, if the animation type is a position shift, the slope of the curve represents the speed of the corresponding movement of the animation.
[0106] The window manager service (WMS) manages windowed applications. It can obtain the display size, determine whether a status bar is present, lock the screen, take screenshots, and more. In some embodiments, when a window animation scene is triggered, the WMS can invoke the animation management module to generate animation attribute information corresponding to the animation scene and send this information to the image synthesizer.
[0107] The input method manager service (IMS) provides input method management services, manages multiple input methods in the electronic device 100, and interacts with other system services, such as triggering the disabling, enabling, or switching of an input method. In some embodiments, when an input method is triggered to pop up or hide an animation, the input method manager can call the animation management module to generate animation attribute information corresponding to the animation screen and send the animation attribute information to the image synthesizer.
[0108] The hardware rendering thread (HardwareRender) is the entrance to the entire hardware accelerated rendering. After the image is drawn, the focus application calls the hardware rendering thread to send rendering instructions to the rendering proxy object (RenderProxy).
[0109] The refresh rate control module is used to determine the refresh rate interval corresponding to the focus application based on the current usage conditions of the electronic device, such as whether the focus application is frame locked (that is, whether the refresh rate of the focus application is fixed at a low refresh rate), low brightness, temperature, low battery and other scenarios. The refresh rate interval is an interval consisting of the minimum refresh rate and the maximum refresh rate. When the refresh rate interval corresponding to the focus application changes, the refresh rate control module sends the changed refresh rate interval to the image synthesizer, so that the image synthesizer selects a suitable second refresh rate based on the refresh rate interval sent by the refresh rate control module. For example, if the minimum refresh rate in the refresh rate interval corresponding to the focus application is 60Hz and the maximum refresh rate is 90Hz, then the second refresh rate corresponding to the dynamic effect screen is between 60Hz and 90Hz, and there will be no situation where the second refresh rate is less than 60Hz or greater than 90Hz.
[0110] The Activity Manager (AMS) manages the lifecycle of each application and the navigation back function. It is responsible for creating the Android main thread and maintaining the lifecycle of each application.
[0111] The Android runtime includes the core library and the virtual machine. The Android runtime is responsible for scheduling and management of the Android system.
[0112] The core library consists of two parts: one is the function that needs to be called by the Java language, and the other is the Android core library.
[0113] The application layer and application framework layer run in a virtual machine. The virtual machine executes Java files in the application layer and application framework layer as binary files. The virtual machine manages object lifecycles, stack management, thread management, security and exception management, and garbage collection.
[0114] The system library can include multiple functional modules, such as image compositor (SurfaceFlinger), rendering proxy objects, and input processing modules.
[0115] The image synthesizer may include an image synthesis module, which may also be configured to send a refresh rate switching instruction to the display driver chip via the display driver, and synchronize the hardware Vsync signal of the display driver chip to generate a first software Vsync signal and a second software Vsync signal having a second refresh rate. Whenever the second software Vsync signal arrives, the image synthesis module may sequentially retrieve a rendered image frame from a second cache queue corresponding to the image synthesizer, and then perform image synthesis via the image synthesis module.
[0116] In an embodiment of the present application, a refresh rate decision module can also be added to the image synthesizer. The refresh rate decision module is used to receive motion effect attribute information corresponding to the motion effect picture, and when it is determined that the motion effect type in the motion effect attribute information is a position movement effect, the module calculates the movement parameters corresponding to the motion effect picture according to the motion effect parameters in the motion effect attribute information, and determines the second refresh rate of the motion effect picture according to the movement parameters.
[0117] The rendering proxy object is used to call the GPU to render the drawn image after receiving the rendering instruction sent by the hardware rendering thread.
[0118] The input processing module can implement mouse, keyboard and touch input processing, etc. Among them, the input processing module can include an input event reading thread (InputReader), an input event dispatching process (InputDispatcher), an input event sending thread (InputPublisher) and an input event receiving thread (InputConsumer).
[0119] InputReader is used to read raw input events; InputDispatcher is used to determine the focus application based on the information of the raw input event (including: operation type and report point location, etc.) and the current focus, and distribute the raw input event to the InputPublisher corresponding to the focus application; the InputConsumer corresponding to the focus application receives the raw input events in the InputPublisher through the socket and stores the raw input events in the BatchQueue.
[0120] The Hardware Abstraction Layer (HAL) can include multiple library modules, such as the hardware compositor (HWComposer, HWC) and camera library modules. The Android system can load the corresponding library modules for the device hardware, enabling the application framework layer to access the device hardware. Device hardware can include displays, cameras, and other components in electronic devices.
[0121] The kernel layer is the layer between hardware and software. The kernel layer includes at least the touch panel (TP) driver, display driver, and camera driver.
[0122] The hardware may include a touch panel, a display screen, a display driver integrated circuit (DDIC), a camera device, a sensor device, etc.
[0123] The following describes the workflow of electronic device software and hardware by way of example, in conjunction with a scenario where an interface switch occurs in an electronic device.
[0124] When the touch sensor in the touch panel receives a touch operation, the kernel layer processes the touch operation into a raw input event (including information such as touch coordinates, touch force, and the timestamp of the touch operation). The raw input event is stored in the kernel layer. The InputReader in the input processing module reads the raw input event from the kernel layer. The InputDispatcher in the input processing module determines the focused application based on the raw input event information (including the operation type and reported location) and the current focus, and distributes the raw input event to the InputPublisher corresponding to the focused application. The InputConsumer corresponding to the focused application receives the raw input event from the InputPublisher via a socket and stores it in a BatchQueue. The ViewRootImpl object reads the raw input event from the BatchQueue and, based on the input event information (such as the reported location), traverses the view tree corresponding to the focused application to determine the view control triggered by the input event. The focused application calls the ViewRootImpl object to obtain the view control corresponding to the raw input event. The focus can be the touch point in a touch operation or the click location in a mouse click operation. The focused application is the application running in the foreground of the electronic device or the application corresponding to the touch location in a touch operation.
[0125] Assuming that the touch operation is a click operation, and the control corresponding to the click operation is the memo application icon, taking the scenario of starting the memo application as an example, the memo application draws the dynamic effect picture, and calls the hardware rendering thread to send rendering instructions to the rendering proxy object. The rendering proxy object calls the GPU to render the drawn dynamic effect picture according to the rendering instructions. The image synthesis module in the image synthesizer synthesizes the drawn and rendered dynamic effect picture. The synthesized image is sent to the display driver chip through the hardware synthesizer and the display driver. The display driver chip controls the display screen to display the dynamic effect picture during the startup process of the memo application.
[0126] To facilitate understanding, some descriptions of concepts related to the embodiments of the present application are given as examples for reference.
[0127] 1. Frame: This refers to the smallest unit of a single image in an interface display. A frame can be thought of as a still image. Displaying multiple frames in rapid succession can create the illusion of motion. Frame rate refers to the number of frames that refresh an image in one second. It can also be understood as the number of times per second the image processor in an electronic device refreshes the image. A higher frame rate results in smoother and more realistic animation. The more frames per second, the smoother the displayed motion.
[0128] It should be noted that before the interface displays a frame, it usually needs to go through processes such as drawing, rendering, and synthesis.
[0129] 2. Frame drawing: refers to the image drawing of the interface display. The display interface can be composed of one or more views. Each view can be drawn by the visual control of the view system. Each view is composed of subviews. A subview corresponds to a small widget in the view. For example, a subview corresponds to a symbol in the image view.
[0130] 3. Frame rendering: This is to shade the drawn view or add 3D effects, etc. For example, 3D effects can be lighting effects, shadow effects, and texture effects.
[0131] 4. Frame synthesis: It is the process of synthesizing multiple or more rendered views into a display interface.
[0132] It should be noted that in order to improve display smoothness and reduce display freezes and other phenomena, electronic devices generally display based on the Vsync signal to synchronize processes such as image drawing, rendering, synthesis, and screen refresh display. Those skilled in the art will understand that the Vsync signal is a periodic signal, and the Vsync signal period can be set according to the refresh rate of the display. For example, when the refresh rate of the display is 60Hz, the Vsync signal period can be 16.6ms, that is, the electronic device generates a control signal every 16.6ms to trigger the Vsync signal period.
[0133] In addition, it should be noted that the Vsync signal can be divided into a software Vsync signal and a hardware Vsync signal. The software Vsync signal includes a first software Vsync signal (i.e., a Vsync-APP signal) and a second software Vsync signal (i.e., a Vsync-SF signal). The first software Vsync signal is used to trigger the drawing and rendering process, the second software Vsync signal is used to trigger the synthesis process, and the hardware Vsync signal is used to trigger the screen display refresh process.
[0134] Normally, the first software Vsync signal, the second software Vsync signal, and the hardware Vsync signal maintain periodic synchronization. Taking the change between 90Hz and 60Hz as an example, if the hardware Vsync signal switches from 90Hz to 60Hz, the first software Vsync signal and the second software Vsync signal change synchronously, switching from 90Hz to 60Hz.
[0135] In some scenarios, the animation scene can be an application startup scene, an application exit scene, an interface sliding scene, a ViewPage (view page turning) switching scene, a window animation scene, an input method pop-up scene, and an input method hiding scene, etc.
[0136] The following uses a mobile phone as an example to illustrate the dynamic effect scenes of the embodiments of the present application. It should be understood that the scenes described in the following embodiments are only some examples of the embodiments of the present application and do not constitute a limitation of the present application. Other dynamic effect scenes applicable to screen refresh rate switching should also fall within the scope of protection of the embodiments of the present application.
[0137] For example, the target application is a memo application, and the animation scene is the startup scene of the memo application. For example, as shown in (a) of FIG3 , icons of multiple installed applications are displayed on the desktop 301 of the electronic device, such as icons of application programs such as file management, email, weather, calculator, clock, recorder, memo, and settings.
[0138] The user can perform a touch operation on the memo application icon displayed on the desktop 301. The touch operation can be referred to as a first operation. For example, the first operation at this time can be a click operation. The electronic device receives the user's touch operation on the memo application icon displayed on the desktop 301. After the touch operation leaves the screen of the electronic device (also referred to as a display screen), the electronic device can respond to the touch operation to display an interface 302 as shown in (b) of Figure 3. Among them, interface 302 is the interface after the memo application is started, such as the note list interface in the memo application. Interface 302 includes a note search box, four established note contents and their creation time, etc. The four established note contents are note content 1, note content 2, note content 3, and note content 4.
[0139] In the memo app launch scenario, to provide a better user experience, the electronic device displays an animated screen during the app launch phase. The animated screen during the memo app launch process is the screen displayed when the user touches the memo app icon and releases their finger from the electronic device's screen, switching from desktop 301 to interface 302. In the memo app launch scenario, the electronic device's desktop 301 can be referred to as the first interface, and the interface 302 after the memo app is launched can be referred to as the second interface.
[0140] It should be noted that the display of the dynamic effect screen has a fixed duration, such as 400ms or 500ms. The continuous display of multiple frames of dynamic effect screens within a fixed duration is a dynamic effect scene. Taking the startup scene of the above-mentioned memo application as an example, the continuously displayed multiple frames of dynamic effect screens are actually the process of the image in the interface 302 changing from small to large. Specifically, when the user clicks the memo application icon on the desktop 301, the startup dynamic effect starts, and the image displayed in the interface 302 begins to be displayed; when the image displayed in the interface 302 fills the entire display screen, the startup dynamic effect ends.
[0141] For example, take the example of an electronic device continuously displaying six frames of dynamic effect pictures during the startup of the memo application. When the user clicks the memo application icon displayed on the desktop 301 and the user's finger leaves the screen of the electronic device, the electronic device begins to sequentially display the first frame of dynamic effect picture as shown in (a) of Figure 4, the second frame of dynamic effect picture as shown in (b) of Figure 4, the third frame of dynamic effect picture as shown in (c) of Figure 4, the fourth frame of dynamic effect picture as shown in (d) of Figure 4, the fifth frame of dynamic effect picture as shown in (e) of Figure 4 and the sixth frame of dynamic effect picture as shown in (f) of Figure 4. Moreover, from the first frame of dynamic effect picture to the sixth frame of dynamic effect picture, the image in the interface 302 displayed therein is from small to large.
[0142] In the memo application startup scenario, taking desktop 301 as the first interface and interface 302 as the second interface as an example, as shown in Figure 5, the electronic device can display the first interface at a first refresh rate (e.g., 60Hz); after the electronic device receives a user touch operation on the memo application icon displayed on the first interface and detects that the touch operation on the memo application icon leaves the screen of the electronic device, the electronic device can increase the refresh rate from the first refresh rate to the second refresh rate and display the dynamic effect screen at the second refresh rate (e.g., 90Hz); after the memo application is launched, the electronic device reduces the refresh rate from the second refresh rate to the third refresh rate and displays the second interface at the third refresh rate (e.g., 60Hz).
[0143] It should be noted that in the application startup scenario, the animated screen during the startup process can be the animated screen displayed when the user first launches the application, or it can be the animated screen displayed when the user does not launch the application for the first time. The first time means that the application is neither running in the foreground nor in the background. The non-first time means that the application is running in the background. In this case, the application startup process can also be understood as the process of the application switching from the background to the foreground.
[0144] For ease of understanding, the interaction process between various modules involved in the software system during the application startup process provided by the embodiment of the present application is described below in conjunction with Figure 6.
[0145] For example, Figure 6 is a schematic diagram of the interaction of the software system during the application startup process provided by an embodiment of the present application. Referring to Figure 6, taking the example of a user clicking an application icon displayed on the desktop to start the application, the execution process may include the following steps:
[0146] S601: When the touch sensor in the touch panel receives a touch operation, the touch driver processes the touch operation into a raw input event and reports it to the InputReader.
[0147] Taking the launch of the memo application as an example, the user can touch the memo application icon displayed on the desktop. The touch sensor in the touch panel can receive the touch operation, and the touch driver processes the touch operation into a raw input event and reports it to the InputReader.
[0148] In the embodiment of the present application, the original input event may be a click event, a sliding event, etc. The click event may refer to a click by the user's finger or a click by a stylus pen, and the embodiment of the present application does not limit this.
[0149] S602: InputReader reads the original input event and sends the original input event to InputDispatcher.
[0150] S603: InputDispatcher determines that the focused application is the desktop launcher based on the information of the original input event and the current focus, and distributes the original input event to the InputPublisher corresponding to the desktop launcher.
[0151] S604: The InputPublisher corresponding to the desktop launcher sends the original input event to the InputConsumer corresponding to the desktop launcher.
[0152] In some embodiments, each application is registered with an InputPublisher and an InputConsumer. Therefore, after the InputDispatcher determines the focus application, the InputDispatcher can distribute the original input event to the InputPublisher corresponding to the focus application, and the InputPublisher corresponding to the focus application can then send the original input event to the InputConsumer corresponding to the focus application through the socket.
[0153] S605: The InputConsumer corresponding to the desktop launcher stores the original input event in the Batch Queue.
[0154] S606, the ViewRootImpl object reads the original input event in the BatchQueue, and traverses the view tree corresponding to the desktop launcher according to the information of the original input event to determine the view control triggered by the original input event.
[0155] In some embodiments, the InputConsumer corresponding to the focus application will store the original input event in the Batch Queue. The ViewRootImpl object running in the application process can read the original input event stored in the Batch Queue, and traverse the view tree corresponding to the desktop launcher according to the information of the original input event to determine the view control triggered by the original input event.
[0156] S607: The desktop launcher calls the ViewRootImpl object to obtain the view control triggered by the original input event.
[0157] S608, when the view control is used to trigger the display of the dynamic effect picture, the desktop launcher calls the dynamic effect management module to generate dynamic effect attribute information corresponding to the dynamic effect picture, and sends the dynamic effect attribute information to the image synthesizer.
[0158] The animation attribute information includes the view object, the animation type, and the animation parameters. The animation parameters may include the animation start information, the animation end information, the animation curve, and the duration of the animation.
[0159] S609, when the image synthesizer determines that the motion effect type in the motion effect attribute information is a bit movement effect, the image synthesizer calculates the movement parameters corresponding to the motion effect picture based on the motion effect parameters, and determines the second refresh rate based on the movement parameters, and generates a first software Vsync signal and a second software Vsync signal with a frequency of the second refresh rate, and sends the first software Vsync signal to the choreographer.
[0160] In some embodiments, after receiving the motion effect attribute information, the image synthesizer extracts the motion effect type in the motion effect attribute information and determines whether the motion effect type in the motion effect attribute information is a bit movement effect. When the image synthesizer determines that the motion effect type is a bit movement effect, the image synthesizer calculates the movement parameters corresponding to the motion effect picture based on the motion effect parameters, and determines the second refresh rate based on the movement parameters.
[0161] Next, the image synthesizer sends a refresh rate switching instruction to the display driver chip through the display driver. The refresh rate switching instruction is used to adjust the frequency of the hardware Vsync signal to the second refresh rate. Upon receiving the refresh rate switching instruction, the display driver chip adjusts the frequency of the hardware Vsync signal to the second refresh rate according to the refresh rate switching instruction.
[0162] The image synthesizer synchronizes the hardware Vsync signal to generate a first software Vsync signal and a second software Vsync signal with a frequency of the second refresh rate; the first software Vsync signal is used to trigger the drawing and rendering of the motion effect picture at the second refresh rate, and the second software Vsync signal is used to trigger the synthesis of the drawn and rendered motion effect picture at the second refresh rate.
[0163] For example, when the first refresh rate corresponding to the first interface is 60Hz and the second refresh rate corresponding to the dynamic effect screen is 90Hz, after receiving the refresh rate switching instruction, the display driver chip can adjust the period of the hardware Vsync signal from 16.6ms to 11.1ms.
[0164] After generating the first software Vsync signal and the second software Vsync signal, the image synthesizer may send the first software Vsync signal to the choreographer.
[0165] S610 , the choreographer sends a first software Vsync signal to the ViewRootImpl object.
[0166] S611: The desktop launcher calls the ViewRootImpl object to obtain a first software Vsync signal.
[0167] S612: The desktop launcher draws a dynamic effect picture based on the first software Vsync signal, and after the dynamic effect picture is drawn, calls the hardware rendering thread to send a rendering instruction.
[0168] Drawing an animated screen mainly involves the following processes: measurement, layout, and drawing. The measurement process determines the width and height of the view control. The width of the view control can be obtained through the getMeasuredWidth method, and the height of the view control can be obtained through the getMeasuredHeight method. The layout process determines the position of the view control within the parent layout (that is, its upper, lower, left, and right coordinates within the parent layout). The drawing process is used to draw the view control on the screen.
[0169] S613: The hardware rendering thread sends the rendering instruction to the rendering proxy object.
[0170] S614, the rendering proxy object calls the GPU to render the drawn image according to the rendering instruction, and stores the rendered dynamic effect picture in the Buffer Queue (which may be called the first buffer queue).
[0171] S615, Buffer Queue stores the rendered dynamic effect image in BLASTBufferQueue (which may be called a second buffer queue).
[0172] S616, when the image synthesizer needs to synthesize the dynamic effect picture, the image synthesizer reads the rendered dynamic effect picture from the BLASTBufferQueue.
[0173] S617: The image synthesizer synthesizes the rendered motion effect picture based on the second software Vsync signal, and sends the synthesized motion effect picture to the hardware synthesizer.
[0174] S618: The hardware synthesizer sends the synthesized dynamic effect image to the display driver.
[0175] S619, the display driver sends the synthesized motion effect picture to the display driver chip, and the display driver chip controls the display screen based on the hardware Vsync signal to display the synthesized motion effect picture.
[0176] It can be understood that the implementation method corresponding to Figure 6 shows the entire process of the electronic device displaying the dynamic effect screen during the application startup process after the user clicks the application icon on the desktop. In order to more clearly understand the embodiment of the present application, the interaction process between the various modules involved in the refresh rate adjustment method during the application startup process provided by the embodiment of the present application is described in detail in combination with Figure 7.
[0177] For example, Figure 7 is a flow chart of a refresh rate adjustment method during application startup provided by an embodiment of the present application. Referring to Figure 7 , the electronic device may include: a desktop launcher, an image synthesizer, a hardware synthesizer, a display driver, and a display driver chip. The refresh rate adjustment method may specifically include the following steps:
[0178] S701: A desktop launcher receives a first operation input by a user on a first interface.
[0179] In some embodiments, when the electronic device displays a first interface at a first refresh rate, if a user inputs a first operation on the first interface displayed on the electronic device, the desktop launcher may receive the first operation input by the user on the first interface. The first operation may trigger a display event of an animated effect screen.
[0180] It can be understood that the process of the desktop launcher receiving the first operation input for the first interface can refer to the execution process of S601 to S607 above. When the desktop launcher determines that the view control is used to trigger the display of the dynamic effect screen based on the view control triggered by the original input event, the desktop launcher receives the display event of the dynamic effect screen triggered by the first operation.
[0181] S702 , in response to the first operation, the desktop launcher directly calls the motion effect management module to generate motion effect attribute information corresponding to the motion effect screen; the motion effect attribute information includes a motion effect type and motion effect parameters.
[0182] S703: The desktop launcher sends the motion effect attribute information to the image synthesizer.
[0183] In some embodiments, when the desktop launcher receives a first operation inputted to the first interface, the desktop launcher directly calls the motion effect management module in response to the first operation to generate motion effect attribute information corresponding to the motion effect screen, and then sends the motion effect attribute information corresponding to the motion effect screen to the image synthesizer. Specifically, the motion effect attribute information corresponding to the motion effect screen is sent to the refresh rate decision module in the image synthesizer.
[0184] The animation attribute information includes the view object, the animation type, and the animation parameters. The animation parameters may include the animation start information, the animation end information, the animation curve, and the duration of the animation.
[0185] The view object refers to the view that executes the animation, including the coordinates of the top, bottom, left, and right corners. Animation types can include position shifting, transparency, color, rotation, and more.
[0186] For example, transfrom.rotation.X, transfrom.rotation.Y, transfrom.rotation.Z, and transfrom.rotation all represent rotation effects; transfrom.translation.X, transfrom.translation.Y, transfrom.translation.Z, transfrom.translation, transfrom, bounds, and position all represent position movement effects.
[0187] The animation start information refers to the status information when the animation screen starts, the animation end information refers to the status information when the animation screen ends, the animation curve is used to represent the state change curve from the start moment of the animation to the end moment of the animation, and the animation duration refers to the duration of the animation screen.
[0188] Taking the position movement effect as an example, the start information of the animation effect is the starting position of the animation effect, the end information of the animation effect is the end position of the animation effect, and the slope of the animation effect curve represents the movement speed corresponding to the animation effect screen.
[0189] S704: When the image synthesizer determines that the motion effect type in the motion effect attribute information is a position movement effect, the image synthesizer calculates movement parameters corresponding to the motion effect picture according to the motion effect parameters.
[0190] In some embodiments, the refresh rate decision module in the image synthesizer can extract the motion effect type from the motion effect attribute information, and determine whether the motion effect type in the motion effect attribute information is a bit movement effect. When the refresh rate decision module in the image synthesizer determines that the motion effect type is a bit movement effect, the refresh rate decision module in the image synthesizer then calculates the movement parameters corresponding to the motion effect picture based on the motion effect parameters.
[0191] In one possible implementation, the movement parameter corresponding to the animated effect is movement speed. Therefore, the refresh rate decision module in the image synthesizer can calculate the movement parameter corresponding to the animated effect in the following manner: calculating the movement distance corresponding to the animated effect based on the distance between the animation effect end position and the animation effect start position; and when the movement distance is greater than a first preset distance, calculating the movement speed corresponding to the animated effect based on at least one of the animation effect start position, the animation effect end position, the animation effect curve, and the animation effect duration.
[0192] The starting position of the animation effect in the animation effect parameters indicates the position information of the view control at the moment the animation effect starts, and the ending position of the animation effect in the animation effect parameters indicates the position information of the view control at the moment the animation effect ends. Therefore, the refresh rate decision module can calculate the moving distance corresponding to the animation effect screen based on the distance between the ending position of the animation effect and the starting position of the animation effect.
[0193] Then, the refresh rate decision module compares the moving distance corresponding to the animation picture with the first preset distance. When the moving distance corresponding to the animation picture is greater than the first preset distance, the refresh rate decision module calculates the moving speed corresponding to the animation picture based on at least one of the animation starting position, the animation ending position, the animation curve and the duration of the animation.
[0194] When the moving distance corresponding to the animated picture is less than or equal to the first preset distance, it means that the moving distance of the animated picture is very small. Therefore, in this scenario, there is no need to increase the refresh rate to display the animated picture.
[0195] It should be noted that the first preset distance can be set according to an empirical value, for example, the first preset distance can be 160 pixels or 200 pixels, etc.
[0196] As shown in Figure 8, five different motion effect curves are given. The horizontal axis of the motion effect curve represents time (t), and the vertical axis of the motion effect curve represents displacement (s). The slope of the motion effect curve represents the moving speed of the motion effect picture.
[0197] As shown in (a) of FIG8 , the motion effect curve is a uniform motion effect curve, and the slope of the motion effect curve at different times is consistent, so that the movement speed corresponding to the motion effect screen at different times remains consistent.
[0198] As shown in Figure 8(b), this is a non-uniform motion effect curve. The slope of the motion effect curve is inconsistent at different times, resulting in inconsistent movement speeds corresponding to the motion effect images at different times. The non-uniform motion effect curve shown in Figure 8(b) has a corresponding movement speed that first gradually decreases and then gradually increases.
[0199] As shown in Figure 8(c), this is a non-uniform motion effect curve. The slope of the motion effect curve is inconsistent at different times, resulting in inconsistent movement speeds corresponding to the motion effect images at different times. The non-uniform motion effect curve shown in Figure 8(c) has a continuously increasing movement speed.
[0200] As shown in Figure 8(d), this is a non-uniform motion effect curve. The slope of the motion effect curve is inconsistent at different times, resulting in inconsistent movement speeds corresponding to the motion effect images at different times. The non-uniform motion effect curve shown in Figure 8(d) has a corresponding movement speed that first gradually increases and then gradually decreases.
[0201] As shown in Figure 8(e), this is a non-uniform motion effect curve. The slope of the motion effect curve is inconsistent at different times, resulting in inconsistent movement speeds corresponding to the motion effect images at different times. The non-uniform motion effect curve shown in Figure 8(e) has a continuously decreasing movement speed.
[0202] If the motion effect curve in the motion effect parameters is the uniform speed motion effect curve shown in (a) of Figure 8, the refresh rate decision module can calculate the corresponding movement speed of the motion effect screen based on the motion effect start position, the motion effect end position, and the motion effect duration. Specifically, the refresh rate decision module first calculates the corresponding movement distance of the motion effect screen based on the distance between the motion effect end position and the motion effect start position, and then divides the corresponding movement distance of the motion effect screen by the motion effect duration to calculate the corresponding movement speed of the motion effect screen.
[0203] If the motion effect curve in the motion effect parameters is any non-uniform motion effect curve shown in (b), (c), (d) and (e) in Figure 8, the refresh rate decision module can calculate the movement speed corresponding to the motion effect screen based on the starting position of the motion effect, the ending position of the motion effect, the motion effect curve and the duration of the motion effect.
[0204] It should be noted that Figure 8 only shows several possible animation curves. Of course, the animation curves in the embodiments of the present application include but are not limited to the animation curves shown in Figure 8. In the application startup scenario, when the desktop launcher calls the animation management module to generate the animation attribute information corresponding to the animation screen, the desktop launcher will send some relevant parameters to the animation management module, thereby generating the corresponding animation curve based on these relevant parameters. In the application startup scenario, the animation curve can be any of the animation curves shown in Figure 8, or any animation curve other than the animation curve shown in Figure 8.
[0205] In another possible implementation, the movement parameters corresponding to the animated effect screen may also include movement distance and movement speed. Therefore, the refresh rate decision module in the image synthesizer may calculate the movement parameters corresponding to the animated effect screen in the following manner: calculating the movement distance corresponding to the animated effect screen based on the distance between the animation effect end position and the animation effect start position; and calculating the movement speed corresponding to the animated effect screen based on at least one of the animation effect start position, the animation effect end position, the animation effect curve, and the animation effect duration.
[0206] S705: The image synthesizer determines a second refresh rate according to the movement parameter.
[0207] In some embodiments, the electronic device includes multiple speed intervals and a second refresh rate corresponding to each speed interval, and the second refresh rate is positively correlated with the speed value included in the speed interval.
[0208] Exemplarily, the electronic device may include five speed intervals and corresponding second refresh rates. The first speed interval is (0, V1), that is, an interval greater than 0 and less than the first speed V1, and the second refresh rate corresponding to the first speed interval is FPS1; the second speed interval is [V1, V2), that is, an interval greater than or equal to the first speed V1 and less than the second speed V2, and the second refresh rate corresponding to the second speed interval is FPS2; the third speed interval is [V2, V3), that is, an interval greater than or equal to the second speed V2 and less than the third speed V3, and the second refresh rate corresponding to the third speed interval is FPS3; the fourth speed interval is [V3, V4), that is, an interval greater than or equal to the third speed V3 and less than the fourth speed V4, and the second refresh rate corresponding to the fourth speed interval is FPS4; the fifth speed interval is [V4, ∞), that is, an interval greater than or equal to the fourth speed V4, and the second refresh rate corresponding to the fifth speed interval is FPS5.
[0209] The fourth speed V4 is greater than the third speed V3, the third speed V3 is greater than the second speed V2, and the second speed V2 is greater than the first speed V1. Furthermore, FPS5 is greater than FPS4, FPS4 is greater than FPS3, FPS3 is greater than FPS2, and FPS2 is greater than FPS1. For example, FPS1 is 30 Hz, FPS2 is 60 Hz, FPS3 is 90 Hz, FPS4 is 120 Hz, and FPS5 is 144 Hz.
[0210] Taking the movement parameter corresponding to the dynamic effect picture as the movement speed as an example, after the refresh rate decision module in the image synthesizer calculates the movement speed corresponding to the dynamic effect picture, the refresh rate decision module can obtain the corresponding second refresh rate according to the speed range in which the movement speed is located.
[0211] For example, when the moving speed corresponding to the dynamic effect picture is within the third speed interval [V2, V3), the refresh rate decision module can determine that the corresponding second refresh rate is FPS3.
[0212] In another possible implementation, the movement parameters corresponding to the animated image may also include movement distance and movement speed. In this case, the image synthesizer first determines whether the movement distance corresponding to the animated image is greater than a first preset distance. If the movement distance corresponding to the animated image is greater than the first preset distance, the image synthesizer then obtains the corresponding second refresh rate based on the speed range in which the movement speed falls.
[0213] In an embodiment of the present application, when the moving speed is within a preset speed range, the moving parameter meets the preset conditions; the preset speed range is at least part of the speed range in multiple speed ranges, and the speed value included in the preset speed range is greater than the speed value included in other speed ranges in the multiple speed ranges except the preset speed range.
[0214] Taking an electronic device including the above-mentioned five speed intervals as an example, the preset speed intervals include the third speed interval [V2, V3), the fourth speed interval [V3, V4) and the fifth speed interval [V4, ∞). It can be seen that the speed values included in the third speed interval, the fourth speed interval and the fifth speed interval are all greater than the speed values included in the first speed interval (0, V1) and the second speed interval [V1, V2). When the moving speed is within any one of the third speed interval, the fourth speed interval and the fifth speed interval, it is determined that the moving parameters corresponding to the dynamic effect picture meet the preset conditions, and the second refresh rate corresponding to the preset speed interval is greater than the first refresh rate and the third refresh rate, that is, the dynamic effect picture is displayed at a second refresh rate greater than the first refresh rate and the third refresh rate, thereby improving the display effect of the dynamic effect picture and improving the problems of jumping and ghosting in the dynamic effect picture.
[0215] In the embodiment of the present application, since the refresh rate decision module obtains the corresponding second refresh rate based on the speed range of the moving speed, when the motion effect curve in the motion effect parameters is different, the second refresh rate corresponding to the motion effect picture will also be different.
[0216] If the motion effect curve in the motion effect parameters is the uniform motion effect curve shown in (a) of FIG8 , the movement speed corresponding to the motion effect screen at different times remains consistent. Therefore, the speed range of the movement speed corresponding to the motion effect screen at different times also remains consistent, thereby making the second refresh rate corresponding to the motion effect screen at different times consistent. In other words, if the motion effect curve in the motion effect parameters is a uniform motion effect curve, the electronic device displays the motion effect screen at a constant second refresh rate.
[0217] If the motion effect curve in the motion effect parameters is any of the non-uniform motion effect curves shown in Figure 8 (b), Figure 8 (c), Figure 8 (d), and Figure 8 (e), the movement speeds corresponding to the motion effect images at different times are inconsistent. Therefore, the speed ranges of the movement speeds corresponding to the motion effect images at different times may be inconsistent, causing the second refresh rates corresponding to the motion effect images at different times to change. In other words, if the motion effect curve in the motion effect parameters is a non-uniform motion effect curve, the electronic device displays the motion effect images at a varying second refresh rate.
[0218] For example, if the animation curve in the animation parameters is the non-uniform animation curve shown in (d) in Figure 8. In the stage between the start time of the animation and the first target time t1, the movement speed corresponding to the animation screen is within the second speed interval [V1, V2), then the animation screen in the stage between the start time of the animation and the first target time t1 is displayed with FPS2; in the stage between the first target time t1 and the second target time t2, the movement speed corresponding to the animation screen is within the third speed interval [V2, V3), then the animation screen in the stage between the first target time t1 and the second target time t2 is displayed with FPS3; in the stage between the second target time t2 and the end time of the animation, the movement speed corresponding to the animation screen is within the second speed interval [V1, V2), then the animation screen in the stage between the second target time t2 and the end time of the animation is displayed with FPS2. If FPS2 is 60Hz and FPS3 is 90Hz, the electronic device displays the animation picture in the stage between the start time of the animation and the first target time t1 at 60Hz, displays the animation picture in the stage between the first target time t1 and the second target time t2 at 90Hz, and displays the animation picture in the stage between the second target time t2 and the end time of the animation at 60Hz.
[0219] In the embodiment of the present application, when the display of the dynamic effect screen is triggered, the timing at which the electronic device increases the refresh rate and decreases the refresh rate is different from the timing at which the electronic device increases the refresh rate and decreases the refresh rate when the display of the dynamic effect screen is triggered in the related art.
[0220] As shown in (a) of Figure 9, in the related art, for applications on the whitelist, when a user triggers the display of an animated effect screen by clicking or sliding, the refresh rate will be increased (such as increased to 90Hz) at the beginning of the animation to display the animated effect screen. At the end of the animation screen, the refresh rate will not be reduced (such as it will still be displayed at a refresh rate of 90Hz), but will be reduced (such as reduced to 60Hz) 1s to 3s after the animation screen is displayed (i.e., after the animation ends). However, this will increase the power consumption of electronic devices.
[0221] As shown in (b) of Figure 9, in a possible implementation of the present application, when the display of the dynamic effect screen is triggered, the refresh rate will not be increased to display the dynamic effect screen at the start time of the dynamic effect, that is, in the time period between the start time of the dynamic effect and the time when the refresh rate is increased, the dynamic effect screen is still displayed at a lower refresh rate (such as 60Hz); the refresh rate is increased (such as increased to 90Hz) to display the dynamic effect screen at the time when the refresh rate is increased; and, the refresh rate is reduced in advance (such as reduced to 60Hz) at the time when the refresh rate is reduced before the end time of the dynamic effect, and the dynamic effect screen between the time when the refresh rate is reduced and the time when the dynamic effect ends is displayed at a low refresh rate; after the dynamic effect screen is displayed (that is, after the end time of the dynamic effect), the second interface is still displayed at the reduced refresh rate.
[0222] Comparing (b) in FIG9 with (a) in FIG9 , it can be seen that the embodiment of the present application can display the dynamic effect picture without increasing the refresh rate in the time period between the start moment of the dynamic effect and the time when the refresh rate is increased, and the refresh rate is reduced in advance at the time when the refresh rate is reduced before the end moment of the dynamic effect, so that the refresh rate can be looped as soon as possible. Therefore, the embodiment of the present application can display the dynamic effect picture at a high refresh rate in the stage between the time when the refresh rate is increased and the time when the refresh rate is reduced to improve the display effect of the dynamic effect picture, and display at a low refresh rate in the time period between the start moment of the dynamic effect and the time when the refresh rate is increased, and in the time period after the refresh rate is reduced, thereby reducing the power consumption of the electronic device.
[0223] It should be noted that the embodiment of the present application can also display the motion effect screen without increasing the refresh rate in the time period between the start time of the motion effect and the time when the refresh rate is increased, and reduce the refresh rate only when the motion effect ends; the embodiment of the present application can also increase the refresh rate to display the motion effect screen at the start time of the motion effect, and reduce the refresh rate in advance at the time when the refresh rate is reduced before the end time of the motion effect.
[0224] In one possible implementation, the non-uniform motion effect curve includes at least a first-stage curve and a second-stage curve. The first-stage curve is the motion effect curve between the start time of the motion effect and the first target time, and the second-stage curve is the motion effect curve after the first target time. The slope of the non-uniform motion effect curve represents the movement speed of the motion effect image. In addition, the second refresh rate corresponding to the first-stage curve is less than or equal to the first refresh rate, and the second refresh rate corresponding to the second-stage curve is greater than the first refresh rate. The electronic device displays the motion effect image before the first target time at the second refresh rate that is less than or equal to the first refresh rate.
[0225] For example, the non-uniform motion effect curve shown in (c) in FIG8 includes a first-stage curve between the start time of the motion effect and the first target time t1, and a second-stage curve between the first target time t1 and the end time of the motion effect. Assuming that the second refresh rate corresponding to the first-stage curve calculated according to the slope corresponding to the first-stage curve is less than or equal to the first refresh rate, the electronic device displays the motion effect picture before the first target time t1 at a second refresh rate less than or equal to the first refresh rate; assuming that the second refresh rate corresponding to the second-stage curve calculated according to the slope corresponding to the second-stage curve is greater than the first refresh rate, the electronic device displays the motion effect picture after the first target time t1 at a second refresh rate greater than the first refresh rate. In other words, the electronic device increases the refresh rate to display the motion effect picture at the first target time t1, and does not increase the refresh rate at the start time of the motion effect.
[0226] For example, when the motion effect curve in the motion effect parameters is the non-uniform motion effect curve shown in (c) in Figure 8, and the first refresh rate is 60Hz, the electronic device displays the motion effect picture before the first target time t1 at a second refresh rate of 60Hz, and displays the motion effect picture after the first target time t1 at a second refresh rate of 90Hz.
[0227] In another possible implementation, the non-uniform motion effect curve includes at least a third-stage curve and a fourth-stage curve. The third-stage curve is the motion effect curve before the second target moment, and the fourth-stage curve is the motion effect curve between the second target moment and the end moment of the motion effect. The slope of the non-uniform motion effect curve represents the moving speed of the motion effect screen. In addition, the second refresh rate corresponding to the third-stage curve is greater than the third refresh rate, and the second refresh rate corresponding to the fourth-stage curve is less than or equal to the third refresh rate. The electronic device displays the motion effect screen after the second target moment at a second refresh rate that is less than or equal to the third refresh rate. The third refresh rate refers to the refresh rate when the second interface is displayed.
[0228] For example, the non-uniform motion effect curve shown in (e) in FIG8 includes a third-stage curve between the start time of the motion effect and the second target time t2, and a fourth-stage curve between the second target time t2 and the end time of the motion effect. Assuming that the second refresh rate corresponding to the third-stage curve calculated according to the slope corresponding to the third-stage curve is greater than the third refresh rate, the electronic device displays the motion effect picture before the second target time t2 at a second refresh rate greater than the third refresh rate; assuming that the second refresh rate corresponding to the fourth-stage curve calculated according to the slope corresponding to the fourth-stage curve is less than or equal to the third refresh rate, the electronic device displays the motion effect picture after the second target time t2 at a second refresh rate less than or equal to the third refresh rate. In other words, the electronic device reduces the refresh rate in advance at the second target time t2 to display the motion effect picture, and does not reduce the refresh rate at the end time of the motion effect.
[0229] For example, when the motion effect curve in the motion effect parameters is the non-uniform motion effect curve shown in (e) in Figure 8, and the third refresh rate is 60Hz, the electronic device displays the motion effect picture before the second target time t2 at the second refresh rate of 90Hz, and displays the motion effect picture after the second target time t2 at the second refresh rate of 60Hz.
[0230] It should be noted that the embodiment of the present application can be used in scenarios such as application startup scenarios, application exit scenarios, and ViewPage switching scenarios. The animation curve in the animation parameters created by the embodiment of the present application can be a non-uniform animation curve as shown in (e) in Figure 8, or a non-uniform animation curve as shown in (d) in Figure 8, so as to reduce the refresh rate in advance before the end of the animation to display the animation picture.
[0231] S706: The image synthesizer sends a refresh rate switching instruction to the display driver.
[0232] S707: The display driver sends a refresh rate switching instruction to the display driver chip.
[0233] In some embodiments, after determining the second refresh rate, the image synthesizer sends a refresh rate switching instruction to the display driver, which then sends the refresh rate switching instruction to the display driver chip. The refresh rate switching instruction may include the second refresh rate.
[0234] S708: The display driver chip adjusts the frequency of the hardware Vsync signal to the second refresh rate according to the refresh rate switching instruction.
[0235] S709 , the image synthesizer synchronizes the hardware Vsync signal to generate a first software Vsync signal and a second software Vsync signal with a second refresh rate.
[0236] In some embodiments, after receiving the refresh rate switching instruction, the display driver chip adjusts the frequency of the hardware Vsync signal according to the refresh rate switching instruction, so that the adjusted frequency of the hardware Vsync signal is the second refresh rate.
[0237] The image synthesizer can synchronize the hardware Vsync signal to generate a first software Vsync signal and a second software Vsync signal with a second refresh rate. That is, the frequencies of the first software Vsync signal, the second software Vsync signal, and the hardware Vsync signal are consistent.
[0238] Among them, the first software Vsync signal is used to trigger the drawing and rendering of the dynamic effect picture at the second refresh rate; the second software Vsync signal is used to trigger the synthesis of the drawn and rendered dynamic effect picture at the second refresh rate.
[0239] S710: The image synthesizer sends a first software Vsync signal to the desktop launcher.
[0240] In an embodiment of the present application, after the image compositor generates the first software Vsync signal and the second software Vsync signal, the image compositor may send the first software Vsync signal to the choreographer. The choreographer then sends the first software Vsync signal to the ViewRootImpl object. The desktop launcher then calls the ViewRootImpl object to obtain the first software Vsync signal. Therefore, according to the above process, the image compositor sends the first software Vsync signal to the desktop launcher.
[0241] S711, the desktop launcher draws and renders the dynamic effect picture based on the Vsync signal of the first software.
[0242] S712: The desktop launcher sends the rendered dynamic effect image to the image synthesizer.
[0243] After receiving the first software Vsync signal, the desktop launcher can draw the animation screen based on the first software Vsync signal. After the animation screen is drawn, it calls the hardware rendering thread to send a rendering instruction. The hardware rendering thread then sends the rendering instruction to the rendering proxy object. The rendering proxy object calls the GPU to render the drawn image according to the rendering instruction. Therefore, according to the above process, the desktop launcher draws and renders the animation screen based on the first software Vsync signal.
[0244] After the rendering proxy object calls the GPU to render the drawn image according to the rendering instructions, the rendering proxy object stores the rendered animation screen in the Buffer Queue. The Buffer Queue then stores the rendered animation screen in the BLASTBufferQueue. Whenever the image compositor needs to synthesize the animation screen, the image compositor can read the rendered animation screen from the BLASTBufferQueue. Therefore, according to the above process, the desktop launcher sends the rendered animation screen to the image compositor.
[0245] S713: The image synthesizer synthesizes the rendered dynamic effect image based on the second software Vsync signal.
[0246] Whenever the image synthesizer needs to synthesize a motion effect picture, the image synthesis module in the image synthesizer can read the rendered motion effect picture from the BLASTBufferQueue based on the second software Vsync signal and synthesize the rendered motion effect picture.
[0247] S714: The image synthesizer sends the synthesized dynamic effect image to the hardware synthesizer.
[0248] S715: The hardware synthesizer sends the synthesized dynamic effect image to the display driver.
[0249] S716: The display driver sends the synthesized dynamic effect image to the display driver chip.
[0250] S717, the display driver chip controls the display screen according to the hardware Vsync signal to display the synthesized dynamic effect picture.
[0251] After synthesizing the rendered motion effect picture, the image synthesizer sends the synthesized motion effect picture to the display driver chip through the hardware synthesizer and display driver in turn. The display driver chip controls the display screen based on the hardware Vsync signal to display the synthesized motion effect picture, so that the motion effect picture can be displayed on the display screen of the electronic device at the second refresh rate.
[0252] In summary, it can be seen that the embodiment of the present application can accurately identify the dynamic effect screen after the user inputs the first operation on the first interface. For the dynamic effect screen whose dynamic effect type is a bit movement effect and the movement speed is within the preset speed range, it is displayed at a second refresh rate that is greater than the first refresh rate and the third refresh rate, that is, the refresh rate of the dynamic effect screen is increased, thereby improving the display effect of the dynamic effect screen, improving the problems of jumping and dragging in this part of the dynamic effect screen, and improving the user experience; and for the dynamic effect screen whose dynamic effect type is a transparency dynamic effect, a color dynamic effect or a rotation dynamic effect, and the dynamic effect screen whose dynamic effect type is a bit movement effect but the movement speed is not within the preset speed range, the refresh rate when it is displayed is not increased, thereby reducing the power consumption of this part of the dynamic effect screen when it is displayed at an unnecessary high refresh rate, thereby reducing the power consumption of the electronic device.
[0253] The following describes the display processing flow of the electronic device interface in combination with the drawing, rendering, synthesis and display process of the image frame.
[0254] For example, Figure 10 is a schematic diagram of a display processing flow of an electronic device interface provided by an embodiment of the present application. In chronological order, the content displayed by the electronic device corresponds to frame 1, frame 2, and frame 3 in sequence.
[0255] Specifically, taking the display of frame 1 as an example, the application of the electronic device draws and renders frame 1 through the view system of the application framework layer. After the drawing and rendering of frame 1 is completed, the application of the electronic device sends the drawn and rendered frame 1 to the image synthesizer. The image synthesizer synthesizes the drawn and rendered frame 1. After the synthesis of frame 1 is completed, the electronic device can display the content corresponding to frame 1 on the display screen by calling the kernel layer display driver. It should be noted that frames 2 and 3 are also synthesized and displayed in a similar process to frame 1, which will not be repeated here. In Figure 10, each frame lags by 2 Vsync signal cycles from drawing to display, that is, the display of the electronic device has a lag.
[0256] For example, Figure 11 is a schematic diagram of an electronic device interface display processing flow provided by an embodiment of the present application. In chronological order, the content displayed by the electronic device corresponds to frame 0, frame 1, frame 2, frame 3, frame 4, frame 5 and frame 6.
[0257] Specifically, taking the display of frame 2 as an example, the electronic device's application renders frame 2 through the view system of the application framework layer. After frame 2 is rendered, the electronic device's application sends the rendered frame 2 to the image synthesizer. The image synthesizer synthesizes the rendered frame 2. After Frame 2 is synthesized, the electronic device can start the display driver by calling the kernel layer to display the content corresponding to Frame 2. Frames 3, 4, 5, and 6 are synthesized and displayed similarly to Frame 2, and will not be further described here.
[0258] Among them, when frame 3 is drawn and rendered, the image synthesizer in the electronic device decides to adjust the refresh rate from the first refresh rate to the second refresh rate based on the motion effect attribute information, for example, from 60Hz to 90Hz; when frame 4 is drawn and rendered, the screen refresh rate is switched, and the Vsync signal cycle corresponding to frame 4 is shortened to complete the switching of the screen refresh rate.
[0259] It should be noted that when the screen refresh rate of the display is 90Hz, the Vsync signal period can be 11.1ms, that is, the electronic device generates a control signal every 11.1ms to trigger the Vsync signal period. When the refresh rate of the display is 60Hz, the Vsync signal period can be 16.6ms, that is, the electronic device generates a control signal every 16.6ms to trigger the Vsync signal period.
[0260] For example, Figure 12 is a schematic diagram of a display processing flow for an electronic device interface provided in an embodiment of the present application. In chronological order, the content displayed by the electronic device corresponds to frame X, frame X+1, frame X+2, frame X+3, frame X+4, frame X+5, and frame X+6, where X is a positive integer.
[0261] Specifically, taking the display of frame X+2 as an example, the application of the electronic device draws and renders frame X+2 through the view system of the application framework layer. After the drawing and rendering of frame X+2 is completed, the application of the electronic device sends the drawn and rendered frame X+2 to the image synthesizer. The image synthesizer synthesizes the drawn and rendered frame X+2. After the synthesis of frame X+2 is completed, the electronic device can start the display driver by calling the kernel layer to display the content corresponding to frame X+2. Frames X+3, X+4, X+5 and X+6 are also synthesized and displayed in a similar process to frame X+2, and will not be repeated here.
[0262] Among them, when frame X+4 is drawn and rendered, the image synthesizer in the electronic device determines that it is necessary to reduce the refresh rate from the second to the third refresh rate, for example, switching from 90Hz to 60Hz; when frame X+5 is drawn and rendered, the screen refresh rate is switched, and the Vsync signal cycle corresponding to the frame X+5 drawing and rendering becomes longer, completing the switching of the screen refresh rate.
[0263] Therefore, in combination with Figures 11 and 12, it can be seen that the electronic device can display the first interface at a first refresh rate of 60Hz, display the dynamic effect picture at a second refresh rate of 90Hz, and display the second interface at a third refresh rate of 60Hz, thereby realizing the display of the dynamic effect picture at a high refresh rate and improving the display effect of the dynamic effect picture.
[0264] The above takes the dynamic effect scene as an application startup scene as an example. Of course, the dynamic effect scene of the embodiment of the present application can also be an application exit scene, an interface sliding scene, and a ViewPage switching scene.
[0265] Take the target application as the memo application and the dynamic effect scene as the exit scene of the memo application as an example. For example, the electronic device can display the interface 302 of the memo application as shown in (a) in Figure 13. The interface 302 is the note list interface in the memo application. The user can exit the memo application on the interface 302. The exit operation can be called the first operation. For example, the first operation at this time is the user swiping to the right at the left edge of the interface 302 to exit the memo application. The electronic device receives the user's exit operation on the memo application. After the user's finger leaves the screen of the electronic device, the electronic device can respond to the exit operation to display the desktop 301 as shown in (c) in Figure 13.
[0266] In the memo app exit scenario, to provide a better user experience, the electronic device will display an animated screen during the memo app exit phase. The animated screen during the memo app exit process can be the screen displayed when the user swipes right on the left edge of interface 302, switching from interface 302 to desktop 301. In the memo app exit scenario, memo app interface 302 can be referred to as the first interface, and the electronic device desktop 301 can be referred to as the second interface.
[0267] Taking the exit scenario of the above-mentioned memo application as an example, the multiple frames of dynamic effect pictures displayed continuously are actually the process of the image in the interface 302 changing from large to small. For example, in the exit scenario of the memo application, one of the frames of dynamic effect pictures can be the picture shown in (b) in Figure 13. Specifically, when the user slides to the right at the left edge of the interface 302 and the user's finger leaves the screen of the electronic device, the exit dynamic effect begins, and the image displayed in the interface 302 begins to shrink; when the image displayed in the interface 302 completely exits and the desktop 301 is displayed, the exit dynamic effect ends.
[0268] It should be noted that the refresh rate adjustment method during application exit is similar to the implementation method corresponding to Figures 6 and 7 above. For details, please refer to the description corresponding to Figures 6 and 7 above. To avoid repetition, it will not be repeated here.
[0269] Furthermore, in the application exit scenario, the animation curve may be any of the animation curves shown in FIG8 , or any animation curve other than the animation curve shown in FIG8 .
[0270] For example, if the target application is a news browsing application and the dynamic effect scene is an interface sliding scene, as shown in (a) of FIG14 , three news messages are displayed on the first recommendation interface 303 of the electronic device, such as News Summary 1, News Summary 2, and News Summary 3. News Summary 2 corresponds to three pictures, namely Picture Content 1, Picture Content 2, and Picture Content 3, and News Summary 3 corresponds to Video Content 1.
[0271] The user can perform an upward swipe operation on the first recommendation interface 303, which can be referred to as a first operation. The electronic device receives the upward swipe operation on the first recommendation interface 303, and after detecting that the upward swipe operation on the first recommendation interface 303 has left the screen of the electronic device, the electronic device can respond to the upward swipe operation to display the second recommendation interface 304 shown in (c) of Figure 14. The second recommendation interface 304 includes video content 1 corresponding to news headline 3 in the first recommendation interface 303. The second recommendation interface 304 also includes news headline 4, news headline 5, and news headline 6. News headline 4 corresponds to picture content 4, news headline 5 corresponds to picture content 5, and news headline 6 corresponds to video content 2.
[0272] In the sliding scene of a news browsing app, to provide a better user experience, the electronic device will continue to slide pages after the user slides their finger upward and leaves the screen of the electronic device. The animated screen in the sliding scene of a news browsing app is the screen displayed when the user slides up on the first recommendation interface 303 and switches from the first recommendation interface 303 to the second recommendation interface 304. For example, in the sliding scene of a news browsing app, one frame of the animated screen may be the screen shown in (b) of Figure 14.
[0273] In the sliding scenario of a news browsing application, the first recommendation interface 303 can be referred to as the first interface, and the second recommendation interface 304 can be referred to as the second interface. That is, in the interface sliding scenario of the target application, the first interface is the interface displayed by the target application before the sliding operation, and the second interface is the interface displayed by the target application after the sliding operation.
[0274] It should be noted that for the interface sliding scenario within the target application, in addition to reading the original input event, determining the focus application, and distributing the original input event to the focus application, the input processing module can also calculate the first sliding speed at the moment the sliding operation is lifted, such as calculating the first sliding speed at the moment the sliding operation is lifted through the InputConsumer in the input processing module. The first sliding speed can also be sent together with the original input event through the Batch Queue and ViewRootImpl object to the focus application. At this time, the focus application is also the target application. For example, in the sliding scenario of a news browsing application, the focus application is the news browsing application.
[0275] When the focus application determines the view control triggered by the original input event to trigger the display of the animated effect screen, the focus application can call the animation management module to generate animation attribute information corresponding to the animated effect screen. The animation curve in the animation attribute information can be selected according to the first sliding speed.
[0276] Specifically, in an interface sliding scenario within the target application, the focus application (i.e., the target application) can send relevant parameters such as the first sliding speed to the animation management module, thereby generating a corresponding animation curve based on these relevant parameters. Furthermore, in an interface sliding scenario within the target application, the animation curve can be any of the animation curves shown in Figure 8, or any animation curve other than the animation curve shown in Figure 8.
[0277] Taking the uniform motion effect curve as an example, when the first sliding speed is higher, the slope of the selected uniform motion effect curve is larger, and when the first sliding speed is lower, the slope of the selected uniform motion effect curve is smaller. For example, when the first sliding speed is greater than 800 pixels / s, the second refresh rate corresponding to the selected uniform motion effect curve can be 90Hz; when the first sliding speed is less than or equal to 800 pixels / s, the second refresh rate corresponding to the selected uniform motion effect curve can be 60Hz. That is to say, in the high-speed sliding scenario, the motion effect picture is displayed at a high refresh rate; in the low-speed sliding scenario, the refresh rate of the motion effect picture is not increased, and the motion effect picture is still displayed at a low refresh rate.
[0278] After the focus application generates the motion effect attribute information corresponding to the motion effect screen, it also sends the motion effect attribute information to the image synthesizer. The subsequent execution process can refer to the corresponding descriptions of Figures 6 and 7 above. As long as the steps executed by the above desktop launcher are replaced with those executed by the focus application, the rest of the process is basically similar. To avoid repetition, it will not be repeated here.
[0279] Of course, in addition to the above-mentioned upward sliding, the interface sliding scenario of the embodiment of the present application can also be downward sliding, etc. That is, in the interface sliding scenario within the target application, the first operation is a sliding operation on the interface of the target application, and the sliding operation includes an upward sliding operation or a downward sliding operation.
[0280] In other embodiments, when a user performs a sliding operation within the interface of a target application, it may be a sliding scenario in which the user's finger is lifted off the screen of the electronic device after the sliding operation, as shown in Figure 14. In actual use, when a user performs a sliding operation within the interface of a target application, the user's finger may remain on the screen without lifting the finger. In this case, the electronic device also needs to display an animated screen based on the finger's sliding operation, and the focus application in this case is the target application.
[0281] For example, Figure 15 is a flow chart of a refresh rate adjustment method for a scenario where the user keeps sliding their hands, as provided in an embodiment of the present application. Referring to Figure 15 , the electronic device may include a focus application, an input processing module, an image synthesizer, a hardware synthesizer, a display driver, and a display driver chip. The refresh rate adjustment method may specifically include the following steps:
[0282] S1501: The input processing module reads the original input event reported by the touch driver.
[0283] S1502: The input processing module calculates a second sliding speed of the user according to the original input event.
[0284] S1503: The input processing module sends the second sliding speed to the image synthesizer.
[0285] S1504: The image synthesizer determines a second refresh rate according to the second sliding speed.
[0286] In some embodiments, when the touch sensor in the touch panel receives a sliding operation, the touch driver processes the sliding operation into an original input event, and the input processing module reads the original input event reported by the touch driver.
[0287] The input processing module first calculates the sliding distance of the user's sliding based on the original input event. When the sliding distance is greater than a second preset distance, the input processing module further calculates a second sliding speed based on the original input event. When the second sliding speed is greater than the preset speed, the input processing module sends the second sliding speed to the image synthesizer. Alternatively, after calculating the second sliding speed, the input processing module directly sends the second sliding speed to the image synthesizer.
[0288] The electronic device includes multiple speed intervals and a second refresh rate corresponding to each speed interval, and the second refresh rate is positively correlated with the speed value included in the speed interval. The image synthesizer can obtain the corresponding second refresh rate according to the speed interval in which the second sliding speed is located.
[0289] It can be understood that in the scenario where the second refresh rate is determined according to the moving speed corresponding to the dynamic effect screen, and in the scenario where the second refresh rate is determined according to the user's second sliding speed, the correspondence table between the speed intervals and the second refresh rates used by both can be the same correspondence table or different correspondence tables, and the embodiments of the present application do not limit this.
[0290] Furthermore, when the input processing module sends the second sliding speed to the image synthesizer, it can also store the original input event in a Batch Queue. The ViewRootImpl object reads the original input event from the BatchQueue and, based on the original input event information, traverses the view tree corresponding to the focus application to determine the view control triggered by the original input event. The focus application then calls the ViewRootImpl object to retrieve the view control triggered by the original input event. In this scenario, the focus application does not call the animation management module to generate the animation attribute information corresponding to the animation screen.
[0291] S1505: The image synthesizer sends a refresh rate switching instruction to the display driver.
[0292] S1506: The display driver sends a refresh rate switching instruction to the display driver chip.
[0293] S1507: The display driver chip adjusts the frequency of the hardware Vsync signal to the second refresh rate according to the refresh rate switching instruction.
[0294] S1508 , the image synthesizer synchronizes the hardware Vsync signal to generate a first software Vsync signal and a second software Vsync signal having a second refresh rate.
[0295] S1509 , the image synthesizer sends a first software Vsync signal to the focus application.
[0296] In an embodiment of the present application, after the image compositor generates the first software Vsync signal and the second software Vsync signal, the image compositor may send the first software Vsync signal to the choreographer. The choreographer then sends the first software Vsync signal to the ViewRootImpl object. The focus application then calls the ViewRootImpl object to obtain the first software Vsync signal. Therefore, according to the above process, the image compositor sends the first software Vsync signal to the focus application.
[0297] S1510: The focus application draws and renders the dynamic effect picture based on the first software Vsync signal.
[0298] S1511: The focus application sends the rendered dynamic effect image to the image synthesizer.
[0299] After receiving the first software Vsync signal, the focus application can draw the animation screen based on the first software Vsync signal. After the animation screen is drawn, it calls the hardware rendering thread to send a rendering instruction. The hardware rendering thread then sends the rendering instruction to the rendering proxy object. The rendering proxy object calls the GPU to render the drawn image according to the rendering instruction. Therefore, according to the above process, the focus application draws and renders the animation screen based on the first software Vsync signal.
[0300] After the rendering proxy object calls the GPU to render the drawn image according to the rendering instructions, the rendering proxy object stores the rendered animation screen in the Buffer Queue. The Buffer Queue then stores the rendered animation screen in the BLASTBufferQueue. Whenever the image compositor needs to synthesize the animation screen, the image compositor can read the rendered animation screen from the BLASTBufferQueue. Therefore, according to the above process, the focus application sends the rendered animation screen to the image compositor.
[0301] S1512: The image synthesizer synthesizes the rendered dynamic effect image based on the second software Vsync signal.
[0302] S1513, the image synthesizer sends the synthesized dynamic effect picture to the hardware synthesizer.
[0303] S1514: The hardware synthesizer sends the synthesized dynamic effect image to the display driver.
[0304] S1515: The display driver sends the synthesized dynamic effect image to the display driver chip.
[0305] S1516: The display driver chip controls the display screen according to the hardware Vsync signal to display the synthesized dynamic effect image.
[0306] It should be noted that the specific implementation process of S1512 to S1516 can refer to the specific implementation process of S713 to S717 mentioned above, and will not be repeated here to avoid repetition.
[0307] Taking the target application as a news browsing application and the dynamic effect scene as a ViewPage switching scene as an example, the electronic device may display the first recommendation interface 303 as shown in (a) of FIG16 .
[0308] The user can perform a left swipe operation on the first recommendation interface 303, which can be referred to as a first operation. The electronic device receives the user's left swipe operation on the first recommendation interface 303, and after detecting that the left swipe operation on the first recommendation interface 303 has left the screen of the electronic device, the electronic device can respond to the left swipe operation to display a hot list interface 305 as shown in (c) of Figure 16. The hot list interface 305 includes popular news messages, such as news messages on the hot list 1, news messages on the hot list 2, and news messages on the hot list 3, etc., and displays some news messages with high recent click-through rates; in addition, the hot list interface 305 can also include other news messages, such as news summary 7 and its corresponding video content 3, news summary 9 and its corresponding picture content 6, etc.
[0309] In the ViewPage switching scenario of news browsing applications, in order to bring a better user experience, the electronic device will display a dynamic picture after the user slides his finger to the left and the sliding operation leaves the screen of the electronic device. The dynamic picture in the ViewPage switching scenario of news browsing applications can be the picture displayed in the process of switching from the first recommendation interface 303 to the hot list interface 305 after the user slides the first recommendation interface 303 to the left. In the ViewPage switching scenario of news browsing applications, the first recommendation interface 303 can be called the first interface, and the hot list interface 305 can be called the second interface. That is to say, in the ViewPage switching scenario of the target application, the first interface is the interface displayed by the target application before the sliding operation, and the second interface is the interface displayed by the target application after the sliding operation.
[0310] Taking the ViewPage switching scenario of a news browsing application as an example, the continuously displayed multi-frame dynamic effect screen is actually a process in which the image in the hot list interface 305 is gradually displayed on the display screen from left to right, while the image in the first recommendation interface 303 gradually disappears from the display screen from left to right. Specifically, when the user slides to the left on the first recommendation interface 303, the ViewPage switching dynamic effect begins, the image in the hot list interface 305 is gradually displayed on the display screen from left to right, and the image in the first recommendation interface 303 gradually disappears from the display screen from left to right; when all the images in the hot list interface 305 are displayed on the display screen, and all the images in the first recommendation interface 303 disappear from the display screen, the ViewPage switching dynamic effect ends. For example, in the ViewPage switching scenario of a news browsing application, one of the frames of the dynamic effect screen can be the screen shown in (b) in Figure 16, which includes a part of the content of the first recommendation interface 303 and a part of the content of the hot list interface 305.
[0311] It should be noted that the refresh rate adjustment method in the ViewPage switching scenario can be similar to the specific implementation method of the sliding scenario of sliding up or down the interface in the target application. To avoid repetition, it will not be repeated here.
[0312] In addition, in the ViewPage switching scenario within the target application, the focus application (i.e., the target application) can send some relevant parameters to the animation management module, thereby generating a corresponding animation curve based on these relevant parameters. Moreover, in the ViewPage switching scenario within the target application, the animation curve can be any of the animation curves shown in Figure 8, or any animation curve other than the animation curve shown in Figure 8.
[0313] Of course, in addition to the above-mentioned left sliding, the ViewPage switching scenario of the embodiment of the present application can also be right sliding, etc. That is to say, in the interface sliding scenario within the target application, the first operation is a sliding operation on the interface of the target application, and the sliding operation can also include a left sliding operation or a right sliding operation.
[0314] The above methods are each about a user inputting a first operation on a first interface displayed by an electronic device, thereby triggering the display of an animated screen. In other embodiments, the display triggering event may also include: while the electronic device is displaying the first interface, the electronic device receives a notification message pushed by an application, thereby triggering the display of an animated screen.
[0315] That is to say, when the electronic device displays the first interface, the user may not input the first operation on the first interface, but when the application receives a pushed notification message, the notification message may trigger the display event of the animated screen, thereby causing the electronic device to receive the display trigger event.
[0316] In addition, the animation scene of the embodiment of the present application can also be a window animation scene, an input method pop-up scene, an input method hidden scene, etc.
[0317] For example, if the target application is a settings application and the animation scene is a window animation scene, the electronic device may display a main settings interface 401 as shown in FIG17(a), which includes a settings item search box and multiple settings items, such as a WLAN settings item, a mobile data settings item, a Bluetooth settings item, a display and brightness settings item, and a sound and vibration settings item.
[0318] The user can perform a touch operation on the Bluetooth setting item. The touch operation at this time can be called the first operation. For example, the first operation at this time can be a click operation on the Bluetooth setting item in the main setting interface 401. The electronic device receives the user's touch operation on the Bluetooth setting item in the main setting interface 401. After the user's finger leaves the screen of the electronic device, the electronic device can respond to the touch operation to display the Bluetooth setting interface 402 as shown in (c) in Figure 17.
[0319] In the window animation scene of the settings application, the corresponding animation screen is the screen displayed when the user clicks the Bluetooth settings item in the main settings interface 401 and switches from the main settings interface 401 to the Bluetooth settings interface 402. In the window animation scene of the settings application, the main settings interface 401 of the settings application can be called the first interface, and the Bluetooth settings interface 402 corresponding to the Bluetooth settings item can be called the second interface.
[0320] Taking the window animation scene of the setting application as an example, the multi-frame animation screen displayed continuously is actually the process in which the image in the Bluetooth setting interface 402 is gradually displayed on the display screen from left to right, while the image in the main setting interface 401 gradually disappears from the display screen from left to right. Specifically, when the user clicks on the Bluetooth setting item in the main setting interface 401 and the user's finger leaves the screen of the electronic device, the window animation begins, the image in the Bluetooth setting interface 402 is gradually displayed on the display screen from left to right, and the image in the main setting interface 401 gradually disappears from the display screen from left to right. When all the images in the Bluetooth setting interface 402 are displayed on the display screen and all the images in the main setting interface 401 disappear from the display screen, the window animation ends. For example, in the window animation scene of the setting application, one of the frames of the animation screen can be the screen shown in (b) in Figure 17, which includes a part of the content of the main setting interface 401 and a part of the content of the Bluetooth setting interface 402.
[0321] In addition, in the window animation scene, the window manager can send some relevant parameters to the animation management module, so as to generate a corresponding animation curve based on these relevant parameters. Moreover, in the window animation scene, the animation curve can be any of the animation curves shown in Figure 8, or any animation curve other than the animation curve shown in Figure 8.
[0322] Of course, a click operation on another setting item among the multiple setting items in the main setting interface 401 can also be referred to as a first operation. In other words, the first operation is a click operation on a target setting item in the main setting interface 401. The target setting item can be any setting item among the multiple setting items included in the main setting interface 401. Accordingly, the second interface is the setting interface corresponding to the target setting item.
[0323] For ease of understanding, the interaction process between the various modules involved in the refresh rate adjustment method in the window animation scenario provided by an embodiment of the present application is described in detail below in conjunction with Figure 18.
[0324] For example, Figure 18 is a flow chart of the refresh rate adjustment method in the window animation scenario provided by an embodiment of the present application. Referring to Figure 18, the electronic device may include a focus application, a window manager, an image synthesizer, a hardware synthesizer, a display driver, and a display driver chip. In the window animation scenario of the setting application, the focus application at this time is also the target application, and the target application can be the setting application. The refresh rate adjustment method may specifically include the following steps:
[0325] S1801: The focus application receives a first operation input by a user on a first interface.
[0326] In some embodiments, when the electronic device displays a first interface at a first refresh rate, if a user inputs a first operation on the first interface displayed on the electronic device, the focus application may receive the first operation input by the user on the first interface. The first operation may trigger a display event of an animated effect screen.
[0327] It is understandable that the process of the focus application receiving the first operation inputted on the first interface may refer to the execution process of S601 to S607 described above.
[0328] S1802: After the first operation leaves the screen of the electronic device, the focus application starts a window manager in response to the first operation.
[0329] S1803: The window manager calls the motion effect management module to generate motion effect attribute information corresponding to the motion effect screen; the motion effect attribute information includes motion effect type and motion effect parameters.
[0330] S1804: The window manager sends the motion effect attribute information to the image synthesizer.
[0331] In the window animation scenario, the focus application responds to the first operation input by the user to start the window manager, and then the window manager calls the animation management module to generate animation attribute information corresponding to the animation picture. Then, the window manager sends the animation attribute information to the image synthesizer.
[0332] The animation attribute information includes the view object, the animation type, and the animation parameters. The animation parameters may include the animation start information, the animation end information, the animation curve, and the duration of the animation.
[0333] S1805: When the image synthesizer determines that the motion effect type in the motion effect attribute information is a position movement effect, the image synthesizer calculates movement parameters corresponding to the motion effect picture according to the motion effect parameters.
[0334] S1806: The image synthesizer determines a second refresh rate according to the movement parameter.
[0335] S1807: The image synthesizer sends a refresh rate switching instruction to the display driver.
[0336] S1808: The display driver sends a refresh rate switching instruction to the display driver chip.
[0337] S1809: The display driver chip adjusts the frequency of the hardware Vsync signal to the second refresh rate according to the refresh rate switching instruction.
[0338] S1810 , the image synthesizer synchronizes the hardware Vsync signal to generate a first software Vsync signal and a second software Vsync signal having a second refresh rate.
[0339] It should be noted that the specific implementation process of S1805 to S1810 can refer to the specific implementation process of S704 to S709 mentioned above, and will not be repeated here to avoid repetition.
[0340] S1811: The image synthesizer sends a first software Vsync signal to the focus application.
[0341] After generating the first and second software Vsync signals, the image compositor can send the first software Vsync signal to the choreographer. The choreographer then sends the first software Vsync signal to the ViewRootImpl object. The focus application then calls the ViewRootImpl object to obtain the first software Vsync signal. Thus, according to the above process, the image compositor sends the first software Vsync signal to the focus application.
[0342] S1812: The focus application sends attribute information of the dynamic effect picture to the image synthesizer by calling the window manager based on the first software Vsync signal.
[0343] S1813, the image synthesizer adjusts the image corresponding to the dynamic effect picture based on the second software Vsync signal and according to the attribute information of the dynamic effect picture to obtain a synthesized dynamic effect picture.
[0344] In the window animation scene, the focus application does not render the animation screen in real time according to the first software Vsync signal. The animation screen exists in the form of an image. Based on the first software Vsync signal, the focus application sends the attribute information of the animation screen, such as position and size, to the image synthesizer by calling the window manager. The image synthesizer triggers the synthesis process based on the second software Vsync signal, and adjusts the position and size of the image corresponding to the animation screen according to the attribute information of the animation screen, thereby obtaining the synthesized animation screen.
[0345] S1814: The image synthesizer sends the synthesized dynamic effect image to the hardware synthesizer.
[0346] S1815: The hardware synthesizer sends the synthesized dynamic effect image to the display driver.
[0347] S1816: The display driver sends the synthesized dynamic effect image to the display driver chip.
[0348] S1817, the display driver chip controls the display screen according to the hardware Vsync signal to display the synthesized dynamic effect picture.
[0349] It should be noted that the specific implementation process of S1814 to S1817 can refer to the specific implementation process of S714 to S717 mentioned above, and will not be repeated here to avoid repetition.
[0350] Taking the target application as an instant messaging application and the dynamic effect scene as an input method pop-up scene as an example, the electronic device can display the first chat interface 403 as shown in (a) of Figure 19, which includes the historical chat records between the user and contact 1 and also includes an input box.
[0351] When the user needs to send a new chat message to contact 1, the user can perform a touch operation on the input box in the first chat interface 403. The touch operation can be referred to as a first operation. For example, the first operation at this time can be a click operation on the input box in the first chat interface 403. The electronic device receives the user's touch operation on the input box in the first chat interface 403, and after detecting that the touch operation on the input box leaves the screen of the electronic device, the electronic device responds to the touch operation to display the second chat interface 404 as shown in (c) in Figure 19. The second chat interface 404 includes the previous historical chat records between the user and contact 1, and a pop-up touch keyboard 4041.
[0352] In the pop-up input method scenario of an instant messaging application, to provide a better user experience, the electronic device will display an animated screen during the touch keyboard pop-up process. The corresponding animated screen is the screen displayed when the user clicks the input box in the first chat interface 403 and the user's finger leaves the screen of the electronic device, and then switches from the first chat interface 403 to the second chat interface 404. In the pop-up input method scenario of an instant messaging application, the first chat interface 403 can be referred to as the first interface, and the second chat interface 404 can be referred to as the second interface.
[0353] Taking the above-mentioned input method pop-up scene of the instant messaging application as an example, the continuously displayed multi-frame dynamic effect screen is actually the process of the touch keyboard 4041 gradually appearing on the screen from bottom to top. Specifically, when the user clicks the input box and the user's finger leaves the screen of the electronic device, the input method pop-up dynamic effect begins, and the touch keyboard 4041 gradually appears on the screen from bottom to top. When the touch keyboard 4041 is fully displayed on the screen, the input method pop-up dynamic effect ends. For example, in the input method pop-up scene of the instant messaging application, one of the frames of the dynamic effect screen can be the screen shown in (b) of Figure 19, which displays a partial area of the touch keyboard 4041 on the screen.
[0354] Of course, the input method pop-up scenario is not limited to instant messaging applications. It is applicable to any scenario that includes an input box and can pop up a touch keyboard by clicking the input box. Therefore, in the input method pop-up scenario, the first interface is the interface of the target application that includes the input box, the first operation is a click operation on the input box in the first interface, and the second interface is the interface that includes the touch keyboard.
[0355] The refresh rate adjustment method for an input method pop-up scenario can be applied to an electronic device, which may include a focus application, an input method manager, an image synthesizer, a hardware synthesizer, a display driver, and a display driver chip. In the input method pop-up scenario, the focus application is also the target application.
[0356] In the input method pop-up scenario, after the focus application receives the first operation input by the user for the first interface and the first operation leaves the screen of the electronic device, the focus application responds to the first operation and starts the input method manager. The input method manager calls the motion effect management module to generate motion effect attribute information corresponding to the motion effect picture, and the input method manager sends the motion effect attribute information to the image synthesizer.
[0357] In the input method pop-up scenario, the subsequent calculation of the second refresh rate and the display process of the dynamic effect screen can refer to the specific implementation process of S1805 to S1817 above. To avoid repetition, they will not be repeated here.
[0358] In addition, in the input method pop-up scenario, the input method manager can send some relevant parameters to the animation management module, thereby generating a corresponding animation curve based on these relevant parameters. Moreover, in the input method pop-up scenario, the animation curve can be any of the animation curves shown in Figure 8, or any animation curve other than the animation curve shown in Figure 8.
[0359] The above is an example of an input method pop-up scene. Of course, the dynamic effect scene of the embodiment of the present application can also be an input method hidden scene. In the input method hidden scene, the first interface is an interface including a touch keyboard, and the second interface is an interface including an input box in the target application.
[0360] Correspondingly, in the input method hidden scenario, the input method manager can also send some relevant parameters to the animation management module, thereby generating a corresponding animation curve based on these relevant parameters. Moreover, in the input method hidden scenario, the animation curve can be any of the animation curves shown in Figure 8, or any animation curve other than the animation curve shown in Figure 8.
[0361] For example, FIG20 is a schematic diagram of an image synthesizer provided in an embodiment of the present application collecting relevant information to make refresh rate decisions.
[0362] As shown in Figure 20, in the application launch scenario, application exit scenario, interface sliding scenario (the finger leaves the screen after the sliding operation), and ViewPage switching scenario, the focus application can send the animation attribute information corresponding to the animation screen to the image synthesizer, so that the image synthesizer calculates the second refresh rate based on the animation attribute information. For example, in the application launch scenario and application exit scenario, the focus application can be the desktop launcher.
[0363] In the window animation scenario, the window manager can send the animation attribute information corresponding to the animation screen to the image synthesizer, so that the image synthesizer calculates the second refresh rate based on the animation attribute information; in the input method pop-up scenario and the input method hidden scenario, the input method manager can send the animation attribute information corresponding to the animation screen to the image synthesizer, so that the image synthesizer calculates the second refresh rate based on the animation attribute information.
[0364] In a scenario where the interface slides and the finger does not leave the screen, the input processing module sends the second sliding speed of the user to the image synthesizer, and the image synthesizer determines the second refresh rate according to the second sliding speed.
[0365] It should be noted that the image synthesizer has a data interface, which is called by the image synthesizer to obtain the motion attribute information sent by the focus application, the motion attribute information sent by the window manager, the motion attribute information sent by the input method manager, and the second sliding speed sent by the input processing module.
[0366] In summary, it can be seen that the embodiment of the present application can determine the second refresh rate of the dynamic effect screen by the image synthesizer. In addition, the electronic device in the embodiment of the present application also includes a refresh rate control module, and the refresh rate control module and the image synthesizer can also jointly determine the second refresh rate of the dynamic effect screen.
[0367] The refresh rate control module is used to determine the refresh rate interval corresponding to the focus application based on the current usage conditions of the electronic device, such as whether the focus application is frame-locked, low brightness, temperature, low battery and other scenarios. The refresh rate interval is an interval consisting of the minimum refresh rate and the maximum refresh rate. When the refresh rate interval corresponding to the focus application changes, the refresh rate control module sends the changed refresh rate interval to the image synthesizer, so that the image synthesizer selects an appropriate second refresh rate based on the refresh rate interval sent by the refresh rate control module. The refresh rate interval is an interval consisting of the minimum refresh rate and the maximum refresh rate. The second refresh rate determined by the image synthesizer is within the refresh rate interval.
[0368] For example, when an electronic device is in a low-battery state and enters power-saving mode, the maximum refresh rate in the refresh rate range corresponding to the focus application can be set to 60Hz to reduce power consumption. In this case, if the animation type is a moving animation and the movement parameters meet the preset conditions, the second animation screen will still be displayed at a second refresh rate less than or equal to 60Hz.
[0369] The above, in combination with Figures 3 to 20, illustrates the scenarios in which the refresh rate may be increased to display dynamic effect images provided by the embodiments of the present application. For the following scenarios, the embodiments of the present application still do not increase the refresh rate to display dynamic effect images.
[0370] As shown in the interface of (a) in Figure 21, when the user wants to turn on the Bluetooth switch, the user can perform a touch operation on the Bluetooth switch 501, such as a click operation. After the user clicks the Bluetooth switch 501 and the user's finger leaves the screen of the electronic device, the electronic device begins to display the dynamic effect picture of the Bluetooth switch 501 from the off state to the start state. After the dynamic effect picture is displayed, the electronic device can display the interface as shown in (b) in Figure 21. In the embodiment of the present application, when displaying the dynamic effect picture of the Bluetooth switch 501 from the off state to the start state, the electronic device still displays it at a low refresh rate (such as 60Hz) instead of increasing the refresh rate to display the dynamic effect picture.
[0371] As shown in the interface in (a) of Figure 22, when the user wants to adjust the display brightness of the electronic device, the user can touch the brightness adjustment switch 502, such as sliding it to the right. In the process of the user sliding the brightness adjustment switch 502 to the right, the electronic device can display a dynamic effect picture. After the user's finger leaves the screen of the electronic device, the electronic device can display the interface shown in (b) of Figure 22 according to the position of the brightness adjustment switch 502 touched before the user leaves. In the process of the user's finger always touching the screen of the electronic device and continuously sliding the brightness adjustment switch 502, the dynamic effect picture displayed by the electronic device is the dynamic effect picture in the process of the brightness adjustment switch 502 being adjusted from the state shown in (a) of Figure 22 to the state shown in (b) of Figure 22. At this time, the electronic device still displays the dynamic effect picture at a low refresh rate (such as 60Hz) instead of increasing the refresh rate to display the dynamic effect picture.
[0372] In addition, for the WLAN switch, mobile data switch, Bluetooth switch, and flashlight switch in the status bar, after the user clicks the corresponding switch and takes his finger off the screen of the electronic device, the switch can be controlled from on to off, or from off to on, and the corresponding dynamic effect picture is still displayed at a low refresh rate (such as less than or equal to 60Hz).
[0373] For the first operation input by the user on the first interface, when the first operation does not trigger the dynamic effect screen, that is, the interface displayed by the electronic device before and after the first operation is input remains static, in this case, the refresh rate will not be increased.
[0374] For example, FIG23 is a flow chart of a refresh rate adjustment method provided in an embodiment of the present application. The refresh rate adjustment method can be applied to an electronic device that can support a first refresh rate, a second refresh rate, and a third refresh rate. The refresh rate adjustment method can specifically include the following steps:
[0375] S2301: The electronic device displays a first interface at a first refresh rate.
[0376] In some embodiments, as shown in FIG3(a), the first interface may be the desktop 301, and the first refresh rate in this case is the preset refresh rate of the desktop. As shown in FIG13(a), the first interface may be the interface 302, and the first refresh rate in this case is the preset refresh rate of the memo application. As shown in FIG14(a), the first interface may be the first recommendation interface 303, and the first refresh rate in this case is the preset refresh rate of the news browsing application.
[0377] S2302: The electronic device receives a first operation input by a user on a first interface.
[0378] This step can refer to the specific implementation process of S701 or S1801 above, and will not be repeated here.
[0379] S2303, after the first operation leaves the screen of the electronic device, the electronic device displays the dynamic effect picture at the second refresh rate in response to the first operation.
[0380] This step can refer to the specific implementation process of S702 to S717 above, or the specific implementation process of S1802 to S1817, which will not be repeated here.
[0381] S2304, after the dynamic effect screen is displayed, the electronic device displays the second interface at a third refresh rate; the second refresh rate is greater than the first refresh rate and the third refresh rate.
[0382] In some embodiments, as shown in FIG3(b), the second interface may be interface 302, and the third refresh rate in this case is the preset refresh rate of the memo application. As shown in FIG13(c), the second interface may be desktop 301, and the third refresh rate in this case is the preset refresh rate of the desktop. As shown in FIG14(c), the second interface may be second recommendation interface 304, and the third refresh rate in this case is the preset refresh rate of the news browsing application.
[0383] Therefore, for the animated effect screen whose animation type is a bit movement effect and whose movement parameters meet the preset conditions, it is displayed at a second refresh rate that is greater than the first refresh rate and the third refresh rate, that is, the refresh rate of the animated effect screen is increased, thereby improving the display effect of the animated effect screen, improving the jumping and ghosting problems of this part of the animated effect screen, and improving the user experience; and for the animated effect screen whose animation type is a transparency animation, color animation or rotation animation, and the animated effect screen whose animation type is a bit movement effect but whose movement parameters do not meet the preset conditions, the refresh rate during its display is not increased, thereby reducing the power consumption of this part of the animated effect screen when displayed at an unnecessarily high refresh rate, thereby reducing the power consumption of the electronic device.
[0384] The refresh rate adjustment method provided in the embodiment of the present application is described above in conjunction with Figures 3 to 23. The device for executing the above method provided in the embodiment of the present application is described below. As shown in Figure 24, Figure 24 is a schematic structural diagram of a refresh rate adjustment device provided in the embodiment of the present application. The refresh rate adjustment device can be an electronic device in the embodiment of the present application, or a chip or chip system within an electronic device.
[0385] As shown in Figure 24, the refresh rate adjustment device 2400 includes a display unit 2401 and a processing unit 2402. The display unit 2401 is used to support the refresh rate adjustment device 2400 in performing the above display steps; the processing unit 2402 is used to support the refresh rate adjustment device 2400 in performing the above processing steps.
[0386] In one possible implementation, the refresh rate adjustment device 2400 further includes a storage unit 2403. The storage unit 2403 is connected to the processing unit 2402 via a circuit. The storage unit 2403 may include one or more memories, which may be devices in one or more devices or circuits for storing programs or data. The storage unit 2403 may exist independently and be connected to the processing unit 2402 via a communication bus. Alternatively, the storage unit 2403 may be integrated with the processing unit 2402.
[0387] The storage unit 2403 can store computer-executable instructions for the method in the electronic device, so that the processing unit 2402 executes the method in the above embodiment. The storage unit 2403 can be a register, a cache, or a random access memory (RAM), etc. The storage unit 2403 can be integrated with the processing unit 2402. The storage unit 2403 can be a read-only memory (ROM) or other type of static storage device that can store static information and instructions. The storage unit 2403 can be independent of the processing unit 2402.
[0388] FIG25 is a schematic diagram of the structure of a chip provided in an embodiment of the present application. As shown in FIG25 , the chip 2500 includes one or more (including two) processors 2501, a communication circuit 2502, and a communication interface 2503. Optionally, the chip 2500 also includes a memory 2504.
[0389] In some embodiments, the memory 2504 stores the following elements: executable modules or data structures, or a subset thereof, or an extended set thereof.
[0390] The method described in the above embodiment of the present application can be applied to the processor 2501, or implemented by the processor 2501. The processor 2501 may be an integrated circuit chip with signal processing capabilities. During implementation, the steps of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 2501. The above-mentioned processor 2501 can be a general-purpose processor (for example, a microprocessor or a conventional processor), a digital signal processor, an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates, transistor logic devices or discrete hardware components. The processor 2501 can implement or execute the disclosed methods, steps and logic block diagrams in the embodiments of the present application.
[0391] The steps of the method disclosed in the embodiments of the present application can be directly embodied as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. Among them, the software module can be located in a mature storage medium in the field such as random access memory, read-only memory, programmable read-only memory, or electrically erasable programmable read only memory (EEPROM). The storage medium is located in memory 2504, and processor 2501 reads the information in memory 2504 and completes the steps of the above method in combination with its hardware.
[0392] The processor 2501 , the memory 2504 , and the communication interface 2503 can communicate with each other via the communication line 2502 .
[0393] In the above embodiment, the instructions stored in the memory for execution by the processor may be implemented in the form of a computer program product, wherein the computer program product may be pre-written in the memory or downloaded and installed in the memory in the form of software.
[0394] The present application also provides a computer program product comprising one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a server or data center that includes one or more available media integrated therein. For example, available media may include magnetic media (e.g., floppy disk, hard disk or tape), optical media (e.g., digital versatile disc (DVD)), or semiconductor media (e.g., solid state disk (SSD)).
[0395] An embodiment of the present application provides an electronic device, which includes a processor and a memory, the memory being used to store a computer program, and the processor being used to execute the computer program to execute the device collaborative control method executed by the above-mentioned first electronic device or the second electronic device.
[0396] The present application also provides a computer-readable storage medium. The methods described in the above embodiments can be implemented in whole or in part via software, hardware, firmware, or any combination thereof. Computer-readable media can include computer storage media and communication media, and can also include any medium that can transfer a computer program from one location to another. The storage medium can be any target medium that can be accessed by a computer.
[0397] As one possible design, computer-readable media may include compact disc read-only memory (CD-ROM), RAM, ROM, EEPROM or other optical disc storage; computer-readable media may include magnetic disk storage or other magnetic disk storage devices. Moreover, any connecting line may also be appropriately referred to as a computer-readable medium. For example, if the software is transmitted from a website, server or other remote source using a coaxial cable, fiber optic cable, twisted pair, DSL or wireless technologies such as infrared, radio and microwave, the coaxial cable, fiber optic cable, twisted pair, DSL or wireless technologies such as infrared, radio and microwave are included in the definition of medium. Disk and disc as used herein include compact disc (CD), laser disc, optical disc, DVD, floppy disk and Blu-ray disc, where disks usually reproduce data magnetically, while discs reproduce data optically using lasers.
[0398] The present application embodiment is described with reference to the flow chart and / or block diagram according to the method, device (system) and computer program product of the embodiment of the present application.It should be understood that each flow process and / or box in the flow chart and / or block diagram and the combination of the flow process and / or box in the flow chart and / or block diagram can be realized by computer program instructions.These computer program instructions can be provided to the processing unit of general-purpose computer, special-purpose computer, embedded processing machine or other programmable data processing equipment to produce a machine, so that the instruction executed by the processing unit of computer or other programmable data processing equipment produces the device for realizing the function specified in one flow chart flow chart or multiple flow charts and / or one block or multiple blocks of block diagram.
[0399] The above specific implementation methods further illustrate the purpose, technical solutions and beneficial effects of this application in detail. It should be understood that the above are only specific implementation methods of this application and are not intended to limit the scope of protection of this application. Any modifications, equivalent replacements, improvements, etc. made on the basis of the technical solutions of this application should be included in the scope of protection of this application.
Claims
1. A refresh rate adjustment method, characterized in that: Applied to electronic equipment, the method includes: The electronic device displays a first interface at a first refresh rate; The electronic device receives a first operation input by a user on the first interface; After the first operation leaves the screen of the electronic device, the electronic device displays a motion effect picture at a second refresh rate in response to the first operation; After the dynamic effect screen is displayed, the electronic device displays the second interface at a third refresh rate; Among them, the dynamic effect picture is the picture displayed when the electronic device switches from the first interface to the second interface; the second refresh rate is greater than the first refresh rate and the third refresh rate.
2. The method according to claim 1, characterized in that The electronic device includes a target application; the first interface is the desktop of the electronic device, and the second interface is the interface after the target application is started; or, the first interface is the interface of the target application, and the second interface is the desktop of the electronic device.
3. The method according to claim 1, characterized in that The electronic device includes a target application, the first operation is a sliding operation on an interface of the target application, and the sliding operation includes any one of an upward sliding operation, a downward sliding operation, a left sliding operation, and a right sliding operation; The first interface is an interface displayed by the target application before the sliding operation, and the second interface is an interface displayed by the target application after the sliding operation.
4. The method according to claim 1, wherein The electronic device includes a target application, and the target application is a setting application; The first interface is a main setting interface of the setting application, and the main setting interface includes multiple setting items; the first operation is a click operation on a target setting item in the main setting interface, and the target setting item is any setting item among the multiple setting items; The second interface is a setting interface corresponding to the target setting item.
5. The method according to claim 1, wherein The electronic device includes a target application; The first interface is an interface including an input box in the target application, and the first operation is a click operation on the input box in the first interface; the second interface is an interface including a touch keyboard; Alternatively, the first interface is an interface including a touch keyboard; and the second interface is an interface including an input box in the target application.
6. The method according to claim 1, characterized in that The electronic device displays a motion effect picture at a second refresh rate in response to the first operation, including: The electronic device generates, in response to the first operation, motion effect attribute information corresponding to the motion effect picture; the motion effect attribute information includes a motion effect type and motion effect parameters; When the motion effect type is a position movement effect, the electronic device calculates a movement parameter corresponding to the motion effect picture according to the motion effect parameter; The electronic device determines a second refresh rate according to the movement parameter; The electronic device displays the motion effect picture at the second refresh rate; When the movement parameter meets a preset condition, the second refresh rate is greater than the first refresh rate and the third refresh rate.
7. The method according to claim 6, characterized in that When the animation type is the position shifting effect, the animation parameters include the animation start position, the animation end position, the animation curve, and the duration of the animation; The electronic device calculates the movement parameter corresponding to the motion effect picture according to the motion effect parameter, including: The electronic device calculates the movement distance corresponding to the motion effect picture according to the distance between the end position of the motion effect and the start position of the motion effect; When the moving distance is greater than a first preset distance, the electronic device calculates a moving speed corresponding to the motion effect picture according to at least one of the motion effect starting position, the motion effect ending position, the motion effect curve, and the motion effect duration.
8. The method according to claim 7, characterized in that The electronic device determines a second refresh rate according to the movement parameter, including: The electronic device acquires a corresponding second refresh rate according to the speed interval in which the moving speed is located; The electronic device includes a plurality of speed intervals and a second refresh rate corresponding to each speed interval, and the second refresh rate is positively correlated with the speed value included in the speed interval.
9. The method according to claim 8, characterized in that When the moving speed is within a preset speed range, the moving parameter meets the preset condition; the preset speed range is at least part of the speed ranges in the multiple speed ranges, and the speed value included in the preset speed range is greater than the speed value included in other speed ranges in the multiple speed ranges except the preset speed range.
10. The method according to claim 8, characterized in that The motion effect curve is a uniform speed motion effect curve, the movement speed corresponding to the motion effect screen at different times remains consistent, and the second refresh rate corresponding to the motion effect screen at different times remains consistent; Alternatively, the motion effect curve is a non-uniform motion effect curve, the moving speeds corresponding to the motion effect pictures at different times are inconsistent, and the second refresh rates corresponding to the motion effect pictures at different times change.
11. The method according to claim 10, characterized in that The non-uniform motion effect curve includes at least a first-stage curve and a second-stage curve, wherein the first-stage curve is the motion effect curve between the start time of the motion effect and the first target time, and the second-stage curve is the motion effect curve after the first target time; the slope of the non-uniform motion effect curve represents the moving speed of the motion effect picture; The second refresh rate corresponding to the first stage curve is less than or equal to the first refresh rate, and the second refresh rate corresponding to the second stage curve is greater than the first refresh rate. The electronic device displays the motion effect picture before the first target moment at a second refresh rate less than or equal to the first refresh rate.
12. The method according to claim 10, characterized in that The non-uniform motion effect curve includes at least a third-stage curve and a fourth-stage curve, wherein the third-stage curve is the motion effect curve before the second target moment, and the fourth-stage curve is the motion effect curve between the second target moment and the end moment of the motion effect; the slope of the non-uniform motion effect curve represents the moving speed of the motion effect screen; The second refresh rate corresponding to the third stage curve is greater than the third refresh rate, the second refresh rate corresponding to the fourth stage curve is less than or equal to the third refresh rate, and the electronic device displays the motion effect picture after the second target moment at a second refresh rate less than or equal to the third refresh rate.
13. The method according to claim 6, characterized in that The electronic device includes a focus application, a target manager, a motion effect management module, and an image synthesizer, wherein the target manager includes a window manager or an input method manager; and the electronic device generates motion effect attribute information corresponding to the motion effect screen in response to the first operation, including: In response to the first operation, the focus application directly calls the motion effect management module or indirectly calls the motion effect management module through the target manager to generate motion effect attribute information corresponding to the motion effect screen, and The attribute information is sent to the image synthesizer.
14. The method according to claim 13, characterized in that When the motion effect type is a position movement effect, the electronic device calculates the movement parameter corresponding to the motion effect picture according to the motion effect parameter, including: When the image synthesizer determines that the motion effect type in the motion effect attribute information is a position movement effect, the image synthesizer calculates the movement parameters corresponding to the motion effect picture according to the motion effect parameters; The electronic device determines a second refresh rate according to the movement parameter, including: The image synthesizer determines a second refresh rate according to the movement parameter.
15. The method according to claim 14, characterized in that The electronic device further includes a refresh rate control module; and the method further includes: When the refresh rate interval corresponding to the focus application changes, the refresh rate control module sends the changed refresh rate interval to the image synthesizer; the refresh rate interval is an interval consisting of a minimum refresh rate and a maximum refresh rate, and the second refresh rate determined by the image synthesizer is within the refresh rate interval.
16. The method according to claim 14, characterized in that The electronic device further includes a hardware synthesizer, a display driver, a display driver chip, and a display screen; the electronic device displays the motion effect picture at the second refresh rate, including: The image synthesizer sends a refresh rate switching instruction to the display driver chip through the display driver; The display driver chip adjusts the frequency of the hardware Vsync signal to the second refresh rate according to the refresh rate switching instruction; The image synthesizer synchronizes the hardware Vsync signal to generate a first software Vsync signal and a second software Vsync signal having a frequency of the second refresh rate; the first software Vsync signal is used to trigger the rendering of the motion effect picture at the second refresh rate, and the second software Vsync signal is used to trigger the synthesis of the rendered motion effect picture at the second refresh rate; After the image synthesizer synthesizes the motion effect picture, the image synthesizer sends the synthesized motion effect picture to the hardware synthesizer; The hardware synthesizer sends the synthesized motion effect picture to the display driver chip through the display driver; The display driver chip controls the display screen according to the hardware Vsync signal to display the synthesized motion effect picture.
17. An electronic device, characterized in that: The system comprises a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to call the computer program to execute the refresh rate adjustment method according to any one of claims 1 to 16.
18. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program or instruction, and when the computer program or instruction is executed, the refresh rate adjustment method according to any one of claims 1 to 16 is implemented.
19. A computer program product, characterized in that The invention comprises a computer program, which, when being executed, enables a computer to execute the refresh rate adjustment method according to any one of claims 1 to 16.