Refresh rate switching method and device and electronic equipment
By generating and switching cached image frames with refresh rate matching in electronic devices, the problem of drawing and display out of synchronization in list sliding is solved, the smoothness of visual effects and power consumption is optimized, and the battery life of electronic devices is improved.
Patent Information
- Application Number
- CN202310508829.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-06
- Publication Date
- 2024-11-08
AI Technical Summary
In electronic devices, the drawing and display are not synchronized due to refresh rate switching during list sliding animation, resulting in stuttering in user visual effects, and the power consumption caused by high refresh rate increases, affecting battery life.
By obtaining the refresh rate to be switched, generating cached image frames and carrying the target refresh rate therein, switching the current refresh rate to match the refresh rate of cached image frames, ensuring the synchronous drawing and display, avoiding lag, and dynamically adjusting the refresh according to the sliding speed to save power consumption.
It realizes the best solution to draw and display during list sliding, avoid lag, and reduce power consumption without affecting visual effects, achieving the best performance and battery life.
Smart Images

Figure CN118918866A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the technical field of smart terminals, and in particular to a refresh rate switching method, device and electronic device. Background Art
[0002] With the popularity of high refresh rates in electronic devices, manufacturers need to consider that high refresh rates will bring greater power consumption and reduce battery life while providing users with a smoother visual experience. According to the general design principles of user experience (UX), in order to give users better visual effects, the refresh rate corresponding to animations that involve most of the screen area and move quickly is usually set to a high refresh rate, such as 120Hz; for animations that involve a small screen area and move slowly, the corresponding refresh rate can be set to a lower refresh rate, such as 60Hz or 30Hz, without any impact on user visual perception. Therefore, matching the speed of the animation with the corresponding refresh rate is the optimal solution between ensuring smoother vision and saving power consumption. During the list sliding process, dynamically switching the refresh rate according to the sliding speed can save power consumption without affecting the user's visual effect. However, switching the refresh rate according to the animation speed during the list sliding animation will cause the problem of "drawing and display are not synchronized", resulting in a freeze in the user's visual effect. Summary of the invention
[0003] The embodiments of the present application provide a refresh rate switching method, device and electronic device. The embodiments of the present application also provide a computer-readable storage medium to achieve drawing and display synchronization when switching the screen refresh rate of the electronic device, without any lag, and to achieve the optimal solution for power consumption and performance.
[0004] In a first aspect, an embodiment of the present application provides a refresh rate switching method, comprising: an electronic device obtains a first refresh rate to be switched; wherein the refresh rate currently used by the electronic device is a second refresh rate, and the second refresh rate is different from the first refresh rate; according to the first refresh rate, a cached image frame is generated, and the first refresh rate is carried in the cached image frame; the second refresh rate is switched to the first refresh rate carried in the cached image frame, and the cached image frame is displayed.
[0005] In the above refresh rate switching method, after the electronic device obtains the first refresh rate to be switched, it generates a cached image frame according to the first refresh rate, and carries the first refresh rate in the cached image frame. Finally, the electronic device switches the second refresh rate currently in use to the first refresh rate carried in the cached image frame, and displays the cached image frame, so that the refresh rate switching and the display can be synchronized, ensuring the synchronization of drawing and display without jamming, and achieving the optimal solution for power consumption and performance.
[0006] In one possible implementation, the electronic device obtains the first refresh rate to be switched, including: in response to a user operation on the current display interface of the electronic device, sliding and displaying the current display interface; and determining the first refresh rate to be switched of the electronic device according to the sliding speed of the current display interface of the electronic device.
[0007] In one possible implementation, determining the first refresh rate to be switched by the electronic device according to the sliding speed of the current display interface of the electronic device includes: determining the first refresh rate to be switched by the electronic device according to the speed range to which the sliding speed belongs.
[0008] In one possible implementation, generating a cached image frame according to the first refresh rate and carrying the first refresh rate in the cached image frame includes: determining a period of a vertical synchronization signal corresponding to the first refresh rate; sampling on a sliding curve model according to the period of the vertical synchronization signal corresponding to the first refresh rate to obtain a moving distance of the cached image frame on the screen of the electronic device; generating a cached image frame according to the moving distance, and carrying the first refresh rate in the cached image frame.
[0009] In one possible implementation, sampling on a sliding curve model according to the period of a vertical synchronization signal corresponding to the first refresh rate to obtain a moving distance of the cached image frame on the screen of the electronic device includes: in response to a first vertical synchronization signal at a first moment, sampling on a sliding curve model according to the period of a vertical synchronization signal corresponding to the first refresh rate to obtain a moving distance of the cached image frame on the screen of the electronic device; generating a cached image frame according to the moving distance and carrying the first refresh rate in the cached image frame includes: in response to the first vertical synchronization signal at the first moment, drawing a layer of the cached image frame according to the moving distance, rendering the layer, and carrying the first refresh rate in the rendered layer; in response to a second vertical synchronization signal at a second moment, synthesizing the rendered layer to obtain the cached image frame; wherein the second moment is after the first moment, the period of the first vertical synchronization signal is the same as that of the second vertical synchronization signal, and the first time interval between the second moment and the first moment is the same as the period of the first vertical synchronization signal, and the period of the first vertical synchronization signal and the second vertical synchronization signal is determined according to the second refresh rate.
[0010] In one possible implementation, switching the second refresh rate to the first refresh rate carried in the cached image frame and displaying the cached image frame includes: in response to a third vertical synchronization signal at a third moment, switching the second refresh rate to the first refresh rate carried in the cached image frame and displaying the cached image frame; wherein the third moment is after the second moment, the second time interval between the third moment and the second moment is the same as the first time interval, and the period of the third vertical synchronization signal is determined according to the first refresh rate.
[0011] In a second aspect, an embodiment of the present application provides a refresh rate switching device, which is included in an electronic device, and has the function of implementing the electronic device behavior in the first aspect and the possible implementation of the first aspect. The function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules or units corresponding to the above functions. For example: an acquisition module, a generation module, a switching module, and a display module.
[0012] In a third aspect, an embodiment of the present application provides an electronic device, comprising: one or more processors; a memory; multiple applications; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions, which, when executed by the electronic device, enable the electronic device to execute the method provided in the first aspect.
[0013] It should be understood that the second and third aspects of the embodiments of the present application are consistent with the technical solutions of the first aspect of the embodiments of the present application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation methods are similar and will not be repeated here.
[0014] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer-readable storage medium is run on a computer, the computer executes the method provided in the first aspect.
[0015] In a fifth aspect, an embodiment of the present application provides a computer program, which, when executed by a computer, is used to execute the method provided in the first aspect.
[0016] In one possible design, the program in the fifth aspect may be stored in whole or in part on a storage medium packaged together with the processor, or may be stored in whole or in part on a memory not packaged together with the processor. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 A schematic diagram of the structure of an electronic device provided by an embodiment of the present application;
[0018] Figure 2 A schematic diagram of a vertical synchronization signal provided by an embodiment of the present application;
[0019] Figure 3 A schematic diagram of a software processing flow of an electronic device 100 displaying an image in response to a touch operation provided by conventional technology;
[0020] Figure 4 A schematic diagram of the principles of the electronic device 100 for performing layer drawing, rendering, synthesis and image frame display provided by conventional technology;
[0021] Figure 5 A schematic diagram showing asynchrony provided for the prior art;
[0022] Figure 6 A schematic diagram of the related art providing a diagram of the occurrence of asynchrony and jamming;
[0023] Figure 7 A flowchart of a refresh rate switching method provided by an embodiment of the present application;
[0024] Figure 8 A flowchart of a refresh rate switching method provided in another embodiment of the present application;
[0025] Fig. 9 A schematic diagram of display synchronization provided for one embodiment of the present application;
[0026] Fig.10 A schematic diagram of switching refresh rate in an electronic device provided by the prior art;
[0027] Fig.11 A flowchart of a refresh rate switching method provided by an embodiment of the present application;
[0028] Fig.12 A schematic diagram of the structure of an electronic device provided in another embodiment of the present application;
[0029] Fig.13 A schematic diagram of the structure of an electronic device provided in yet another embodiment of the present application. DETAILED DESCRIPTION
[0030] The terms used in the implementation section of this application are only used to explain the specific embodiments of this application and are not intended to limit this application.
[0031] In order to facilitate those skilled in the art to understand the solutions in the embodiments of the present application, some concepts and terms involved in the embodiments of the present application are explained below.
[0032] An embodiment of the present application provides a refresh rate switching method, which can specify the refresh rate used when drawing the current cached image frame, and bind the above refresh rate to the cached image frame. The LCD displays according to the refresh rate bound to the cached image frame, thereby achieving drawing and display matching to prevent freezes caused by mismatch between drawing and display.
[0033] The refresh rate switching method provided in the embodiment of the present application can be applied to electronic devices, wherein the above-mentioned electronic devices can be smart phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR) / virtual reality (VR) devices, laptop computers, ultra-mobile personal computers (UMPC), netbooks or personal digital assistants (PDA) and other devices; the embodiment of the present application does not impose any restrictions on the specific type of electronic devices.
[0034] For example, Figure 1 A schematic diagram of the structure of an electronic device provided by an embodiment of the present application is shown as follows: Figure 1 As shown, the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 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 screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0035] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0036] 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 processor (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), etc. Different processing units may be independent devices or integrated into one or more processors.
[0037] 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.
[0038] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0039] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0040] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (DCL). In some embodiments, the processor 110 may include multiple groups of I2C buses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces. For example: the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 communicates with the touch sensor 180K through the I2C bus interface, thereby realizing the touch function of the electronic device 100.
[0041] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to achieve communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 via the I2S interface to achieve the function of answering a call through a Bluetooth headset.
[0042] The PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface to realize the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
[0043] The UART interface is a universal serial data bus for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is generally used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 through the UART interface to implement the function of playing music through a Bluetooth headset.
[0044] The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the shooting function of the electronic device 100. The processor 110 and the display screen 194 communicate via the DSI interface to implement the display function of the electronic device 100.
[0045] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
[0046] The USB interface 130 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transfer data between the electronic device 100 and a peripheral device. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices, etc.
[0047] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0048] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. While the charging management module 140 is charging the battery 142, it may also power the electronic device 100 through the power management module 141.
[0049] The power management module 141 is used 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 supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.
[0050] 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.
[0051] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0052] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
[0053] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.
[0054] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0055] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-CDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology, etc. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).
[0056] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
[0057] The display screen 194 is used to display images, videos, etc. The 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 or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
[0058] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
[0059] ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.
[0060] 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 optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted 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 1 or N cameras 193, where N is a positive integer greater than 1.
[0061] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
[0062] Video codecs are used to compress or decompress digital videos. The electronic device 100 may support one or more video codecs. Thus, the electronic device 100 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0063] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.
[0064] 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 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.
[0065] The internal memory 121 can be used to store computer executable program codes, which 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.
[0066] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0067] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.
[0068] The speaker 170A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or listen to a hands-free call through the speaker 170A.
[0069] The receiver 170B, also called a "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or voice message, the voice can be received by placing the receiver 170B close to the human ear.
[0070] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to microphone 170C to input the sound signal into microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify the sound source, realize directional recording function, etc.
[0071] The earphone interface 170D is used to connect a wired earphone and can be a USB interface 130 or a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.
[0072] The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be set on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 100 detects the touch operation intensity according to the pressure sensor 180A. The electronic device 100 can also calculate the touch position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.
[0073] The gyro sensor 180B can be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., x, y, and z axes) can be determined by the gyro sensor 180B. The gyro sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyro sensor 180B detects the angle of the electronic device 100 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the electronic device 100 through reverse movement to achieve anti-shake. The gyro sensor 180B can also be used for navigation and somatosensory game scenes.
[0074] The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.
[0075] The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip leather case. In some embodiments, when the electronic device 100 is a flip phone, the electronic device 100 can detect the opening and closing of the flip cover according to the magnetic sensor 180D. Then, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, the flip cover can be automatically unlocked.
[0076] The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in all directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device and is applied to applications such as horizontal and vertical screen switching and pedometers.
[0077] The distance sensor 180F is used to measure the distance. The electronic device 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.
[0078] The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light outward through the light emitting diode. The electronic device 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that there is no object near the electronic device 100. The electronic device 100 can use the proximity light sensor 180G to detect that the user holds the electronic device 100 close to the ear to talk, so as to automatically turn off the screen to save power. The proximity light sensor 180G can also be used in leather case mode and pocket mode to automatically unlock and lock the screen.
[0079] The ambient light sensor 180L is used to sense the ambient light brightness. The electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touches.
[0080] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.
[0081] The temperature sensor 180J is used to detect temperature. In some embodiments, the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device 100 reduces the performance of a processor located near the temperature sensor 180J to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to avoid abnormal shutdown of the electronic device 100 due to low temperature. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 performs a boost on the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
[0082] The touch sensor 180K is also called a "touch control device". The touch sensor 180K can be set on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also called a "touch control screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194.
[0083] The bone conduction sensor 180M can obtain a vibration signal. In some embodiments, the bone conduction sensor 180M can obtain a vibration signal of a vibrating bone block of the vocal part of the human body. The bone conduction sensor 180M can also contact the human pulse to receive a blood pressure beat signal. In some embodiments, the bone conduction sensor 180M can also be set in an earphone and combined into a bone conduction earphone. The audio module 170 can parse out a voice signal based on the vibration signal of the vibrating bone block of the vocal part obtained by the bone conduction sensor 180M to realize a voice function. The application processor can parse the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 180M to realize a heart rate detection function.
[0084] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The electronic device 100 may receive key input and generate key signal input related to user settings and function control of the electronic device 100.
[0085] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.
[0086] Indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.
[0087] The SIM card interface 195 is used to connect a 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. The electronic device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the electronic device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
[0088] For ease of understanding, the vertical synchronization signal (VSYNC) described in conventional technology, such as vertical synchronization signal 1, vertical synchronization signal 2 and vertical synchronization signal 3, is first introduced here.
[0089] Vertical synchronization signal 1: such as VSYNC_APP. The vertical synchronization signal 1 can be used to trigger the drawing of one or more layers and render the drawn layers. In other words, the vertical synchronization signal 1 can be used to trigger the user interface (UI) thread to draw one or more layers, and the Render thread renders the one or more layers drawn by the UI thread.
[0090] Vertical synchronization signal 2: such as VSYNC_SF. The vertical synchronization signal 2 can be used to trigger the layer synthesis of one or more rendered layers to obtain an image frame. In other words, the vertical synchronization signal 2 can be used to trigger the synthesis thread to perform layer synthesis on one or more layers rendered by the Render thread to obtain an image frame.
[0091] Vertical synchronization signal 3: such as HW_VSYNC. The vertical synchronization signal 3 can be used to trigger hardware to refresh the display image frame. The vertical synchronization signal 3 is a hardware signal triggered by the display screen driver of the electronic device 100.
[0092] In the embodiment of the present application, the signal period T3 of the vertical synchronization signal 3 (such as HW_VSYNC) is determined according to the refresh rate of the display screen of the electronic device 100. Specifically, the signal period T3 of the vertical synchronization signal 3 is the reciprocal of the refresh rate of the display screen of the electronic device 100 (such as a liquid crystal display (LCD) or an organic light-emitting diode (OLED)). Among them, the refresh rate of the electronic device 100 can be the same as the frame rate of the electronic device 100. The high frame rate of the electronic device 100 is the high refresh rate.
[0093] For example, the refresh rate of the display screen of the electronic device 100 can be any value such as 60 Hz, 70 Hz, 75 Hz, 80 Hz, 90 Hz or 120 Hz. Taking the refresh rate of 60 Hz as an example, the signal period of the vertical synchronization signal 3 is 1 / 60=0.01667 seconds (s)=16.667 milliseconds (ms). Taking the refresh rate of 90 Hz as an example, the signal period of the vertical synchronization signal 3 is 1 / 90=0.01111 seconds (s)=11.11 milliseconds (ms). It should be noted that the electronic device 100 may support multiple different refresh rates. The refresh rate of the electronic device 100 can be switched between the above different refresh rates. The refresh rate described in the embodiment of the present application is the refresh rate currently used by the electronic device 100. That is, the signal period of the vertical synchronization signal 3 is the reciprocal of the refresh rate currently used by the electronic device 100.
[0094] It should be noted that the vertical synchronization signal 3 in the embodiment of the present application is a periodic discrete signal. Figure 2 As shown, there is a vertical synchronization signal 3 triggered by the hardware driver every signal cycle. Vertical synchronization signal 1 and vertical synchronization signal 2 are generated based on vertical synchronization signal 3, that is, vertical synchronization signal 3 can be the signal source of vertical synchronization signal 1 and vertical synchronization signal 2. Or, vertical synchronization signal 1 and vertical synchronization signal 2 are synchronized with vertical synchronization signal 3. Therefore, the signal cycle of vertical synchronization signal 1 and vertical synchronization signal 2 is the same as the signal cycle of vertical synchronization signal 3, and the phase is consistent. For example, Figure 2 As shown, the signal period T1 of the vertical synchronization signal 1, the signal period T2 of the vertical synchronization signal 2, and the signal period T3 of the vertical synchronization signal 3 are the same. Figure 2 As shown, the phases of vertical synchronization signal 1, vertical synchronization signal 2, and vertical synchronization signal 3 are consistent. It is understandable that in actual implementation, there may be a certain phase error between vertical synchronization signal 1, vertical synchronization signal 2, and vertical synchronization signal 3 due to various factors (such as processing performance). It should be noted that when understanding the method of the embodiment of the present application, the above phase error is ignored. Figure 2 A schematic diagram of a vertical synchronization signal provided for one embodiment of the present application.
[0095] In summary, the vertical synchronization signal 1, vertical synchronization signal 2 and vertical synchronization signal 3 are all periodic discrete signals. Figure 2 As shown, there is a vertical synchronization signal 1 every signal cycle, a vertical synchronization signal 2 every signal cycle, and a vertical synchronization signal 3 every signal cycle. The signal cycles of the vertical synchronization signal 1, vertical synchronization signal 2, and vertical synchronization signal 3 can all be referred to as synchronization cycles T Z , T1=T2=T3=T Z In the embodiment of the present application, the synchronization period may be the inverse of the refresh rate of the electronic device 100 .
[0096] It should be noted that the name of the vertical synchronization signal may be different in different systems or architectures. For example, in some systems or architectures, the name of the vertical synchronization signal (i.e., vertical synchronization signal 1) used to trigger the drawing of one or more layers may not be VSYNC_APP. However, no matter what the name of the vertical synchronization signal is, as long as it is a synchronization signal with similar functions and conforms to the technical ideas of the method provided in the embodiment of the present application, it should be covered within the scope of protection of the present application.
[0097] For ease of understanding, the following Figure 3 Taking the case where the display screen of the electronic device 100 is a touch screen and the user's operation on the display screen is a touch operation as an example, the software processing flow of the electronic device 100 is introduced from "the user's finger inputs a touch operation on the touch screen" to "the touch screen displays an image corresponding to the touch operation". Figure 3 A schematic diagram of a software processing flow for the electronic device 100 to display an image in response to a touch operation provided by conventional technology.
[0098] like Figure 3 As shown, the electronic device 100 may include: a touch panel (TP) / TP driver 10, an Input framework (i.e., Input Framework) 20, a UI framework (i.e., UI Framework) 30, a Display framework (i.e., Display Framework) 40 and a hardware display module 50.
[0099] like Figure 3 As shown, the software processing flow of the electronic device 100 may include the following steps (1) to (5).
[0100] Step (1): After the TP in the TP IC / TP driver 10 collects the touch operation of the user's finger on the TP of the electronic device 100, the TP driver reports the corresponding touch event to the event hub.
[0101] Step (2): The Input Reader thread of the Input framework 20 can read the touch event from the Event Hub, and then send the touch event to the Input Dispatcher thread; the Input Dispatcher thread uploads the touch event to the UI thread in the UI framework 30.
[0102] Step (3): The UI thread (such as Do Frame) in the UI framework 30 draws one or more layers corresponding to the touch event; the rendering (Render) thread (such as Draw Frame) performs layer rendering on the one or more layers.
[0103] Step (4): The surface synthesis (Surface Flinger, SF) thread in the Display framework 40 performs layer synthesis on the drawn one or more layers (that is, the one or more layers after rendering) to obtain an image frame.
[0104] Step (5): The liquid crystal display (LCD) panel of the hardware display module 50 is driven to receive the synthesized image frame, and the synthesized image frame is displayed by the LCD. After the LCD displays the image frame, the image displayed by the LCD can be perceived by human eyes.
[0105] Generally speaking, in response to a user's touch operation on the TP or a UI event, the UI framework can call the UI thread to draw one or more layers corresponding to the touch event after the vertical synchronization signal 1 arrives, and then call the Render thread to render the one or more layers; then, the hardware composer (HWC) can call the synthesis thread to perform layer synthesis on the rendered one or more layers to obtain an image frame after the vertical synchronization signal 2 arrives; finally, the hardware display module can refresh and display the above image frame on the LCD after the vertical synchronization signal 3 arrives. Among them, the above UI event can be triggered by the user's touch operation on the TP. Alternatively, the UI event can be automatically triggered by the electronic device 100. For example, when the foreground application of the electronic device 100 automatically switches the screen, the above UI event can be triggered. The foreground application is the application corresponding to the interface currently displayed on the display screen of the electronic device 100.
[0106] Among them, TP can periodically detect the user's touch operation. After TP detects the touch operation, it can wake up the above-mentioned vertical synchronization signal 1 and vertical synchronization signal 2 to trigger the UI framework to draw and render layers based on vertical synchronization signal 1, and the hardware synthesis HWC to perform layer synthesis based on vertical synchronization signal 2. Among them, the detection period of TP detecting touch operation is the same as the signal period T3 of vertical synchronization signal 3 (such as HW_VSYNC).
[0107] It should be noted that the UI framework periodically draws and renders layers based on vertical synchronization signal 1; the hardware synthesis HWC periodically synthesizes layers based on vertical synchronization signal 2; and the LCD periodically refreshes image frames based on vertical synchronization signal 3.
[0108] Exemplarily, in the embodiment of the present application, taking the vertical synchronization signal 1 being the VSYNC_APP signal, the vertical synchronization signal 2 being the VSYNC_SF signal, and the vertical synchronization signal 3 being the HW_VSYNC signal as an example, the process of the electronic device 100 performing drawing, rendering, synthesis, and image frame display in conventional technology is introduced.
[0109] Figure 4 The schematic diagram of the principle of the electronic device 100 performing layer drawing, rendering, synthesis and image frame display provided by conventional technology. Figure 4 As shown, the UI thread of the electronic device 100 responds to the VSYNC_APP signal at time t1, executes "Draw 1" to draw layer 1, and then the Render thread executes "Render 1" to render the layer 1; the synthesis thread of the electronic device 100 responds to the VSYNC_SF signal at time t2, executes "Image frame synthesis 1" to perform layer synthesis on the above-mentioned layer 1 to obtain image frame 1; the LCD of the electronic device 100 responds to the HW_VSYNC signal at time t3, executes "Image frame display 1" to refresh and display the above-mentioned image frame 1.
[0110] For example, Figure 4 As shown, the UI thread of the electronic device 100 responds to the VSYNC_APP signal at time t2, executes "Draw 2" to draw layer 2, and then the Render thread executes "Render 2" to render the layer 2; the synthesis thread of the electronic device 100 responds to the VSYNC_SF signal at time t3, executes "Image frame synthesis 2" to perform layer synthesis on the above-mentioned layer 2 to obtain image frame 2; the LCD of the electronic device 100 responds to the HW_VSYNC signal at time t4, executes "Image frame display 2" to refresh and display the above-mentioned image frame 2.
[0111] It can be seen that in conventional technology, the electronic device 100 usually displays images in three stages: drawing and rendering, synthesis, and display. It takes a time interval of three frames for a frame of image to be drawn and displayed on the LCD screen. Therefore, in the scenario where the list slides to switch the refresh rate, there will be a problem of drawing and display being out of sync. Among them, the list sliding scenario can be: when the user browses the current display interface of the electronic device 100 (for example: the interface of a shopping or news website), after the finger slides on the display screen 194 once, the current display interface of the electronic device 100 slides upward, and due to the effect of inertia, the sliding speed of the current display interface changes from fast to slow. In the list sliding scenario, if the refresh rate switches, the problem of drawing and display being out of sync may occur.
[0112] Combine the following Figure 5 , the above-mentioned problem of drawing and display being out of sync is explained in detail. Figure 5 A schematic diagram showing asynchronism is provided for the prior art.
[0113] See also Figure 5 , the UI thread of the electronic device 100 responds to the VSYNC_APP signal at time t1, draws layer 1, and then the Render thread renders layer 1; the synthesis thread of the electronic device 100 responds to the VSYNC_SF signal at time t2, and performs layer synthesis on the above layer 1 to obtain image frame 1; the LCD of the electronic device 100 responds to the HW_VSYNC signal at time t3 to refresh and display the above image frame 1. For image frame 1, from drawing, rendering, synthesis to display, the refresh rate used by the electronic device 100 is 120Hz, so the periods of the VSYNC_APP signal, VSYNC_SF signal and HW_VSYNC signal are the same, that is, T1=T2=T3=8.3ms, which means that the period of the vertical synchronization signal of image frame 1 is the same from drawing, rendering, synthesis to display, and the drawing and display are synchronized.
[0114] Continue to see Figure 5, the UI thread of the electronic device 100 responds to the VSYNC_APP signal at time t2, draws layer No. 2, and then the Render thread renders layer No. 2; the synthesis thread of the electronic device 100 responds to the VSYNC_SF signal at time t3, performs layer synthesis on the above-mentioned layer No. 2 to obtain image frame No. 2; the LCD of the electronic device 100 responds to the HW_VSYNC signal at time t4, and refreshes and displays the above-mentioned image frame No. 2. For image frame No. 2, during the drawing, rendering and synthesis stages, the refresh rate used by the electronic device 100 is 120 Hz, therefore, the periods of the VSYNC_APP signal and the VSYNC_SF signal are the same, i.e., T2=T3=8.3 ms. Since at time t3, the electronic device 100 issues a command to switch the refresh rate from 120 Hz to 60 Hz, at time t4, the LCD switch is completed and VSYNC_APP and VSYNC_SF are adjusted. Therefore, starting from time t4, the periods of the VSYNC_APP, VSYNC_SF and HW_VSYNC signals change from 8.3 ms to 16.6 ms. This results in that the synthesized image frame No. 2 is drawn in response to the vertical synchronization signal with a period of 8.3 ms, and the underlying LCD needs to display in response to the vertical synchronization signal with a period of 16.6 ms, resulting in the problem of asynchronous drawing and display.
[0115] Image frame 3 also has the problem of asynchronous display. The UI thread of the electronic device 100 responds to the VSYNC_APP signal at time t3 to draw layer 3, and then the Render thread renders layer 3; the synthesis thread of the electronic device 100 responds to the VSYNC_SF signal at time t4 to synthesize the above layer 3 to obtain image frame 3; the LCD of the electronic device 100 responds to the HW_VSYNC signal at time t5 to refresh and display the above image frame 3. For image frame 3, during the drawing and rendering stage, the refresh rate used by the electronic device 100 is 120Hz, so the period of the VSYNC_APP signal is 8.3ms. At time t3, the electronic device 100 issues a command to switch the refresh rate from 120Hz to 60Hz. At time t4, the LCD switch is completed and VSYNC_APP and VSYNC_SF are adjusted. Therefore, starting from time t4, the period of VSYNC_APP, VSYNC_SF and HW_VSYNC signals changes from 8.3ms to 16.6ms. This results in that the rendered image frame 3 is drawn in response to a vertical synchronization signal with a period of 8.3ms, and in the synthesis and LCD display stage, it is synthesized and displayed in response to a vertical synchronization signal with a period of 16.6ms, resulting in a problem of asynchronous drawing and display.
[0116] See also Figure 6, normalize the time domain of the complete list sliding animation process to the range of 0 to 1. If there is a refresh rate switching process of 120Hz->60Hz according to the sliding speed during the list sliding process, assuming that when the refresh rate is 120Hz (8.3ms), the step of each frame of animation is 0.05, then when the refresh rate is 60Hz (16.6ms), the step of each frame of animation will become 0.1. Therefore, when a frame of animation drawn in the cache in response to a vertical synchronization signal with a period of 8.3ms is displayed on the LCD in response to a vertical synchronization signal with a period of 16.6ms, it can be clearly seen that the frame jumps, which is a freeze point for the user's vision. Figure 6 A schematic diagram of the prior art showing the occurrence of asynchrony and freeze.
[0117] Currently, Android maintains a high refresh rate during the list sliding process, and considers whether to reduce the refresh rate after the sliding is completed. The refresh rate is not switched during the entire list sliding process. However, maintaining a high refresh rate during the entire list sliding process will increase the power consumption of the electronic device 100 and reduce the battery life of the entire device.
[0118] In summary, to achieve optimal performance and power consumption during list sliding, that is, to dynamically switch the refresh rate according to the sliding speed during list sliding, the problem of asynchronous drawing and display must be solved. Simply put, the cached image frame drawn at 120Hz is displayed on the LCD at 120Hz.
[0119] For ease of understanding, the following embodiments of the present application will be described in detail with Figure 1 Taking the electronic device 100 of the structure shown as an example, the refresh rate switching method provided in the embodiment of the present application is specifically described in combination with the accompanying drawings and application scenarios.
[0120] Figure 7 A flow chart of a refresh rate switching method provided in one embodiment of the present application, such as Figure 7 As shown, the refresh rate switching method may include:
[0121] Step 701: The electronic device 100 obtains a first refresh rate to be switched, wherein the refresh rate currently used by the electronic device 100 is a second refresh rate, and the second refresh rate is different from the first refresh rate.
[0122] Specifically, the electronic device 100 can determine whether to switch the refresh rate according to the current scene of the electronic device 100, and after determining the switch refresh rate, determine the first refresh rate to be switched by the electronic device 100 according to the current scene. For example, assuming that the electronic device 100 detects that it is currently in a list sliding scene, the electronic device 100 can determine whether to switch the refresh rate according to the sliding speed of the current display interface, and after determining the switch refresh rate, determine the first refresh rate to be switched by the electronic device 100 according to the sliding speed of the current display interface. Of course, the above is only an example and does not constitute a limitation on the embodiments of the present application. In other scenarios, such as: in the application exit scenario, the electronic device 100 can also obtain the first refresh rate to be switched in the above manner.
[0123] In step 702, the electronic device 100 generates a cached image frame according to the first refresh rate, and carries the first refresh rate in the cached image frame.
[0124] In step 703, the electronic device 100 switches the second refresh rate to the first refresh rate carried in the cached image frame, and displays the cached image frame.
[0125] In the above refresh rate switching method, after the electronic device 100 obtains the first refresh rate to be switched, it generates a cached image frame according to the first refresh rate, and carries the first refresh rate in the cached image frame. Finally, the electronic device 100 switches the second refresh rate currently used to the first refresh rate carried in the cached image frame, and displays the cached image frame, so that the refresh rate switching and the display can be synchronized, ensuring the synchronization of drawing and display without jamming, and achieving the optimal solution for power consumption and performance.
[0126] Figure 8 A flow chart of a refresh rate switching method provided in another embodiment of the present application is shown in FIG. Figure 8 As shown, the refresh rate switching method may include:
[0127] Step 801: In response to a user operation on a current display interface of the electronic device 100, the electronic device 100 slides to display the current display interface.
[0128] Specifically, the user's operation on the current display interface of the electronic device 100 can be a sliding operation of the user on the current display interface, and of course it can also be other types of operations. This embodiment does not limit the specific form of the above operation, as long as the sliding of the current display interface can be achieved.
[0129] After the electronic device 100 detects the user's operation on the current display interface of the electronic device 100, in response to the above operation, the current display interface can be slid and displayed through the sliding component OverScoller.
[0130] Step 802 : The electronic device 100 determines a first refresh rate to be switched by the electronic device 100 according to a sliding speed of a current display interface of the electronic device 100 .
[0131] Specifically, determining the first refresh rate of the electronic device 100 to be switched according to the sliding speed of the current display interface of the electronic device 100 may be: determining the first refresh rate of the electronic device 100 to be switched according to the speed range to which the sliding speed belongs.
[0132] Specifically, after the electronic device 100 slides and displays the current display interface through the sliding component OverScoller, the sliding speed of the current display interface can be detected through OverScoller, and then the electronic device 100 can determine the first refresh rate to be switched by the electronic device 100 according to the speed range to which the sliding speed belongs. For example, when the sliding speed belongs to the speed range (25mm / s, +∞), the first refresh rate to be switched by the electronic device 100 is determined to be 120Hz; when the sliding speed belongs to the speed range (0, 25mm / s], the first refresh rate to be switched by the electronic device 100 is determined to be 60Hz.
[0133] Of course, this embodiment is not limited to two speed intervals. The number of speed intervals can be set according to actual needs during specific implementation. For example, when the sliding speed belongs to the speed interval (25 mm / s, +∞), the first refresh rate of the electronic device 100 to be switched is determined to be 120 Hz; when the sliding speed belongs to the speed interval (15, 25 mm / s], the first refresh rate of the electronic device 100 to be switched is determined to be 90 Hz; when the sliding speed belongs to the speed interval (0, 15 mm / s], the first refresh rate of the electronic device 100 to be switched is determined to be 60 Hz.
[0134] Step 803: The electronic device 100 determines a period of a vertical synchronization signal corresponding to the first refresh rate.
[0135] In step 804 , the electronic device 100 performs sampling on the sliding curve model according to the period of the vertical synchronization signal corresponding to the first refresh rate to obtain the moving distance of the cached image frame on the screen of the electronic device 100 .
[0136] Step 805: The electronic device 100 generates a cached image frame according to the moving distance, and carries the first refresh rate in the cached image frame.
[0137] In step 806, the electronic device 100 switches the second refresh rate to the first refresh rate carried in the cached image frame, and displays the cached image frame.
[0138] Specifically, steps 804 to 806 may include the following process:
[0139] In response to a first vertical synchronization signal at a first moment, sampling is performed on a sliding curve model according to a period of the vertical synchronization signal corresponding to a first refresh rate to obtain a moving distance of the cached image frame on the screen of the electronic device 100; and according to the moving distance, a layer of the cached image frame is drawn, and the layer is rendered, and the rendered layer carries the first refresh rate;
[0140] In response to a second vertical synchronization signal at a second moment, synthesizing the rendered layers to obtain the cached image frame; wherein the second moment is after the first moment, the periods of the first vertical synchronization signal and the second vertical synchronization signal are the same, and the first time interval between the second moment and the first moment is the same as the period of the first vertical synchronization signal, and the periods of the first vertical synchronization signal and the second vertical synchronization signal are determined according to a second refresh rate;
[0141] In response to the third vertical synchronization signal at the third moment, the second refresh rate is switched to the first refresh rate carried in the above-mentioned cached image frame, and the above-mentioned cached image frame is displayed; wherein, the third moment is after the second moment, the second time interval between the third moment and the second moment is the same as the first time interval, and the period of the above-mentioned third vertical synchronization signal is determined according to the first refresh rate.
[0142] The first vertical synchronization signal may be a VSYNC_APP signal, the second vertical synchronization signal may be a VSYNC_SF signal, and the third vertical synchronization signal may be a HW_VSYNC signal.
[0143] Fig. 9 A schematic diagram of display synchronization is provided for an embodiment of the present application. Fig. 9 , steps 804 to 806 are described in detail.
[0144] and Figure 5 The embodiments shown are different. Fig. 9 In the illustrated embodiment, at time t3, the electronic device 100 issues a command to switch the refresh rate from 120 Hz to 60 Hz. However, in this embodiment, the command to switch the refresh rate is not directly issued to the LCD. Instead, it waits until time t5. After the cached image frame generated according to the 60 Hz refresh rate is transmitted to the SF, the SF issues a command to the LCD to switch the refresh rate to 60 Hz. Only then does the LCD execute the refresh rate switch. That is to say, after time t5, the periods of the VSYNC_APP signal, the VSYNC_SF signal and the HW_VSYNC signal become 16.6 ms.
[0145] for Figure 5For the image frame No. 2 mentioned in the embodiment shown, which has the problem of asynchronous drawing and display, the UI thread of the electronic device 100 responds to the VSYNC_APP signal at time t2 to draw layer No. 2, and then the Render thread renders the layer No. 2; the synthesis thread of the electronic device 100 responds to the VSYNC_SF signal at time t3 to perform layer synthesis on the above-mentioned layer No. 2 to obtain image frame No. 2; the LCD of the electronic device 100 responds to the HW_VSYNC signal at time t4 to refresh and display the above-mentioned image frame No. 2. Since in this embodiment, after time t5, the periods of the VSYNC_APP signal, VSYNC_SF signal and HW_VSYNC signal become 16.6ms, the period of the vertical synchronization signal of the image frame No. 2 from drawing, rendering, synthesis to display is the same, which is 8.3ms, and synchronous drawing and display is achieved.
[0146] for Figure 5 For the image frame No. 3 having the problem of asynchronous display, at time t3, the electronic device 100 issues a command to switch the refresh rate from 120 Hz to 60 Hz. Therefore, the UI thread of the electronic device 100 responds to the VSYNC_APP signal at time t3, and samples on the sliding curve model according to the period (16.6 ms) of the vertical synchronization signal corresponding to the 60 Hz refresh rate, so as to obtain the moving distance of the image frame No. 3 on the screen of the electronic device 100; and draws layer No. 3 according to the above moving distance, and Rende The r thread renders layer 3, and the rendered layer 3 carries the first refresh rate; the synthesis thread of the electronic device 100 responds to the VSYNC_SF signal at time t4 to synthesize the rendered layer 3 to obtain image frame 3; at time t5, the image frame 3 generated according to 60Hz is transmitted to SF, and SF sends a command to the LCD to switch the refresh rate to 60Hz. Therefore, in response to the HW_VSYNC signal at time t5, the LCD of the electronic device 100 switches the refresh rate from 120Hz to 60Hz and sends image frame 3 for display. From the above description, it can be seen that the vertical synchronization signal period of image frame 3 is the same from drawing, rendering, synthesis to display, which is 16.6ms, realizing drawing and display synchronization.
[0147] Fig.10 A schematic diagram of switching refresh rate in an electronic device provided by the prior art, such as Fig.10As shown, in the prior art, when switching the refresh rate, the signal for switching the refresh rate is transmitted from the surface flinger (SF) to the hardware composer (HWC), and finally to the LCD. After the LCD completes the switching of the refresh rate, the new HW_VSYNC signal is transmitted back to the SF, and the VSYNC management module in the SF receives the HW_VSYNC signal, and then the VSYNC management module generates VSYNC_APP used by the choreographer and VSYNC_SF used by the SF.
[0148] from Fig.10 It can be seen that in the existing related technology, when switching the refresh rate, the period of the HW_VSYNC signal is adjusted first, and then the periods of VSYNC_APP and VSYNC_SF are adjusted. Figure 4 From the description, we can know that the image display process in the current Android operating system includes three stages: drawing, rendering, synthesis, and display. It takes a time interval of three frames for a frame of image to be drawn and displayed on the LCD screen, so there will be a problem of asynchronous drawing and display. Figure 5 As shown, when the list slides, if the refresh rate switches from 120 Hz to 60 Hz, the drawing rendering and screen display of image frames 2 and 3 will be out of sync.
[0149] Fig.11 A flowchart of a refresh rate switching method provided in one embodiment of the present application. Fig.11 The partial hierarchical architecture of the software system of the electronic device 100 is shown in FIG. Fig.11 The hierarchical architecture of the software system of the electronic device 100 may include a framework layer, a native layer, and a hardware abstraction layer (HAL). The framework layer includes OverScoller and Choreographyer on the rendering side; the native layer includes a frame cutting decision module, a VSYNC management module, and a frame brushing module; and the hardware abstraction layer includes HWC.
[0150] like Fig.11 As shown, the refresh rate switching method may include:
[0151] Step 1101, the electronic device 100 responds to the user's operation on the current display interface of the electronic device 100, slides and displays the current display interface through the sliding component OverScoller, and detects the sliding speed of the current display interface of the electronic device 100 through OverScoller, and determines the first refresh rate to be switched by the electronic device 100 according to the speed range to which the above sliding speed belongs, and OverScoller sends the first refresh rate to be switched to the frame cutting decision module.
[0152] Specifically, the user's operation on the current display interface of the electronic device 100 can be a sliding operation of the user on the current display interface, and of course it can also be other types of operations. This embodiment does not limit the specific form of the above operation, as long as the sliding of the current display interface can be achieved.
[0153] Step 1102: After receiving the first refresh rate to be switched, the frame switching decision module determines to switch the refresh rate according to the first refresh rate to be switched and the second refresh rate currently used by the electronic device 100.
[0154] Step 1103: the frame switching decision module sends the first refresh rate to be switched to the VSYNC management module in the SF.
[0155] Step 1104: The VSYNC management module in the SF sends the first refresh rate to be switched to the Choreographer.
[0156] Step 1105 , Choreographer sends the first refresh rate to OverScoller, and OverScoller performs sampling on the sliding curve model according to the first refresh rate to obtain the movement distance of the cached image frame on the screen of the electronic device 100 .
[0157] Step 1106, Choreographer draws the layer of the cached image frame according to the moving distance, and renders the layer, and Choreographer sends the rendered layer to Surface.
[0158] Step 1107, Surface carries the first refresh rate in the rendered layer, and sends the layer carrying the first refresh rate to the frame refresh module in SF.
[0159] Step 1108, after receiving the layer carrying the first refresh rate, the frame refresh module in the SF obtains the first refresh rate to be switched from the above layer, and synthesizes the above layer to obtain a cached image frame.
[0160] In step 1109, the frame refresh module in the SF sends the acquired first refresh rate to the VSYNC management module. After the VSYNC management module determines that the first refresh rate sent by the frame refresh module is consistent with the first refresh rate sent by the frame cutting decision module, the frame refresh module sends the above-mentioned first refresh rate to the LCD through the HWC to switch the refresh rate, and the frame refresh module sends the above-mentioned cached image frame to the LCD through the HWC for display.
[0161] That is to say, different from the existing related technologies, in this embodiment, after the electronic device 100 determines to switch the refresh rate, it first generates a cached image frame according to the first refresh rate to be switched, and carries the first refresh rate in the cached image frame. After the cached image frame generated according to the first refresh rate is passed to the SF, the SF obtains the first refresh rate from the cached image frame, and then sends the cached image frame and the command to switch the refresh rate to the LCD. The LCD completes the refresh rate switching and displays the cached image frame within one frame, so that the refresh rate switching and display transmission can be carried out simultaneously, ensuring the synchronization of drawing and display without jamming.
[0162] The refresh rate switching method provided in the embodiment of the present application is described below through a specific example.
[0163] Assume that the current display interface of the electronic device 100 is the homepage of a website. After detecting the user's sliding operation on the current display interface, OverScoller slides to display the current display interface. When the current display interface just starts to slide, the refresh rate of the electronic device 100 is 120Hz.
[0164] Step 1: OverScoller detects the sliding speed of the current display interface, determines the first refresh rate to be switched according to the speed interval to which the sliding speed belongs, and OverScoller notifies the frame switching decision module of the first refresh rate.
[0165] Step 2: The frame switching decision module decides to switch the refresh rate according to the first refresh rate, and notifies SF of the first refresh rate.
[0166] Step 3: SF sends the first refresh rate to be switched to Choreographer and OverScoller.
[0167] Step 4: OverScoller performs sampling on the sliding curve model according to the first refresh rate to obtain the movement distance of the cached image frame on the screen of the electronic device 100.
[0168] Step 5: Choreographer draws and renders a layer of the cached image frame according to the moving distance, carries the first refresh rate in the layer, and sends the layer to SF.
[0169] Step 6: After SF receives the layer of the cached image frame, SF takes out the first refresh rate carried in the layer and synthesizes the layer to obtain the cached image frame.
[0170] Step 7, SF sends commands for caching image frames and switching refresh rates to the LCD, and the LCD switches the refresh rate and displays the cached image frames.
[0171] It is to be understood that some or all of the steps or operations in the above embodiments are merely examples, and the embodiments of the present application may also perform other operations or variations of various operations. In addition, the various steps may be performed in different orders presented in the above embodiments, and it is possible that not all of the operations in the above embodiments need to be performed.
[0172] It is understandable that, in order to realize the above functions, the electronic device includes hardware and / or software modules corresponding to the execution of each function. In combination with the algorithm steps of each example described in the embodiments disclosed in this application, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in combination with the embodiments, but such implementation should not be considered to exceed the scope of this application.
[0173] This embodiment can divide the electronic device into functional modules according to the above method embodiment. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one module. The above integrated module can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0174] Fig.12 A schematic diagram of the structure of an electronic device provided in another embodiment of the present application, in which each functional module is divided according to each function, Fig.12 A possible schematic diagram of the composition of the electronic device 1200 involved in the above embodiment is shown. Fig.12 As shown, the electronic device 1200 may include: an acquisition module 1201, a generation module 1202, a switching module 1203 and a display module 1204;
[0175] The acquisition module 1201 is used to acquire a first refresh rate to be switched; wherein the refresh rate currently used by the electronic device 1200 is a second refresh rate, and the second refresh rate is different from the first refresh rate;
[0176] A generating module 1202 is used to draw a cached image frame according to the first refresh rate, and carry the first refresh rate in the cached image frame;
[0177] A switching module 1203, configured to switch the second refresh rate to the first refresh rate carried in the cached image frame;
[0178] The display module 1204 is used to display the cached image frame.
[0179] It should be noted that this application Figure 7 All relevant contents of each step involved in the illustrated embodiment can be referred to the functional description of the corresponding functional module and will not be repeated here.
[0180] The electronic device 1200 provided in this embodiment is used to execute the present application Figure 7 The refresh rate switching method provided in the illustrated embodiment can therefore achieve the same effect as the above method.
[0181] Fig.13 A schematic diagram of the structure of an electronic device provided in another embodiment of the present application, Fig.12 The electronic device shown is different in that Fig.13 In the electronic device 1200 shown, the acquisition module 1201 may include: a sliding display submodule 12011 and a refresh rate determination submodule 12012;
[0182] The sliding display submodule 12011 is used to slide and display the current display interface in response to the user's operation on the current display interface of the electronic device;
[0183] The refresh rate determination submodule 12012 is used to determine the first refresh rate to be switched by the electronic device according to the sliding speed of the current display interface of the electronic device. In this embodiment, the refresh rate determination submodule 12012 is specifically used to determine the first refresh rate to be switched by the electronic device according to the speed range to which the sliding speed belongs.
[0184] Further, the generation module 1202 may include: a period determination submodule 12021, a sampling submodule 12022 and an image frame generation submodule 12023;
[0185] Wherein, the period determination submodule 12021 is used to determine the period of the vertical synchronization signal corresponding to the first refresh rate;
[0186] The sampling submodule 12022 is used to perform sampling on the sliding curve model according to the period of the vertical synchronization signal corresponding to the first refresh rate, so as to obtain the moving distance of the buffered image frame on the screen of the electronic device;
[0187] The image frame generation submodule 12023 is used to generate a cached image frame according to the above-mentioned moving distance, and carry the first refresh rate in the above-mentioned cached image frame.
[0188] Specifically, the sampling submodule 12022 is specifically configured to respond to a first vertical synchronization signal at a first moment and perform sampling on a sliding curve model according to a period of the vertical synchronization signal corresponding to the first refresh rate to obtain a moving distance of the cached image frame on the screen of the electronic device;
[0189] The image frame generation submodule 12023 is specifically used to respond to the first vertical synchronization signal at the first moment, draw the layer of the cached image frame according to the above-mentioned moving distance, and render the layer, and carry the first refresh rate in the rendered layer; respond to the second vertical synchronization signal at the second moment, synthesize the rendered layer to obtain the above-mentioned cached image frame; wherein, the second moment is after the first moment, the period of the first vertical synchronization signal is the same as that of the second vertical synchronization signal, and the first time interval between the second moment and the first moment is the same as the period of the first vertical synchronization signal, and the period of the first vertical synchronization signal and the second vertical synchronization signal is determined according to the second refresh rate.
[0190] In this embodiment, the switching module 1203 is specifically used to switch the second refresh rate to the first refresh rate carried in the cached image frame in response to the third vertical synchronization signal at the third moment, and the display module 1204 displays the above cached image frame; wherein, the third moment is after the second moment, the second time interval between the third moment and the second moment is the same as the first time interval, and the period of the third vertical synchronization signal is determined according to the first refresh rate.
[0191] It should be noted that this application Figure 7 to Figure 11 All relevant contents of each step involved in the illustrated embodiment can be referred to the functional description of the corresponding functional module and will not be repeated here.
[0192] The electronic device 1200 provided in this embodiment is used to execute the present application Figure 7 to Figure 11 The refresh rate switching method provided in the illustrated embodiment can therefore achieve the same effect as the above method.
[0193] It should be understood that the electronic device 1200 may correspond to Figure 1 The electronic device 100 shown in FIG. The functions of the above modules included in the electronic device 1200 can be Figure 1 The processor 110 and the display screen 194 in the electronic device 100 are shown to be implemented.
[0194] In the case of adopting an integrated unit, the electronic device 1200 may include a processing module, a storage module, and a communication module.
[0195] The processing module can be used to control and manage the actions of the electronic device 1200, for example, it can be used to support the electronic device 1200 to execute the steps executed by the above modules. The storage module can be used to support the electronic device 1200 to store program codes and data, etc. The communication module can be used to support the communication between the electronic device 1200 and other devices.
[0196] Among them, the processing module can be a processor or a controller, which can implement or execute various exemplary logic boxes, modules and circuits described in conjunction with the disclosure of this application. The processor can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, and so on. The storage module can be a memory. The communication module can specifically be a device that interacts with other electronic devices, such as a radio frequency circuit, a Bluetooth chip and / or a Wi-Fi chip.
[0197] In one embodiment, when the processing module is a processor and the storage module is a memory, the electronic device 1200 involved in this embodiment can be a Figure 1 Device of the structure shown.
[0198] The present application also provides a computer-readable storage medium, in which a computer program is stored. When the computer-readable storage medium is run on a computer, the computer executes the present application. Figure 7 to Figure 11 The method provided by the illustrated embodiment.
[0199] The present application also provides a computer program product, which includes a computer program, which, when executed on a computer, enables the computer to execute the present application. Figure 7 to Figure 11 The method provided by the illustrated embodiment.
[0200] In the embodiments of the present application, "at least one" refers to one or more, and "more than one" 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. Among them, 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" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can be represented by: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, c can be single or multiple.
[0201] Those of ordinary skill in the art will appreciate that the various units and algorithm steps described in the embodiments disclosed herein can be implemented in a combination of electronic hardware, computer software, and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0202] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0203] In several embodiments provided in the present application, any function can be stored in a computer-readable storage medium if it is implemented in the form of a software functional unit and sold or used as an independent product. Based on this understanding, the technical solution of the present application can be embodied in the form of a software product in essence or in other words, the part that contributes to the prior art or the part of the technical solution. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0204] The above is only a specific implementation of the present application. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. The protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for switching a refresh rate, characterized in that: include: The electronic device obtains a first refresh rate to be switched; wherein the refresh rate currently used by the electronic device is a second refresh rate, and the second refresh rate is different from the first refresh rate; Generate a cached image frame according to the first refresh rate, and carry the first refresh rate in the cached image frame; The second refresh rate is switched to the first refresh rate carried in the cached image frame, and the cached image frame is displayed.
2. The method according to claim 1, characterized in that The electronic device acquiring the first refresh rate to be switched comprises: In response to a user's operation on a current display interface of the electronic device, slidingly displaying the current display interface; A first refresh rate to be switched by the electronic device is determined according to a sliding speed of a current display interface of the electronic device.
3. The method according to claim 2, characterized in that The determining, according to the sliding speed of the current display interface of the electronic device, a first refresh rate to be switched by the electronic device comprises: A first refresh rate to be switched by the electronic device is determined according to the speed interval to which the sliding speed belongs.
4. The method according to claim 2, characterized in that: The step of generating a cached image frame according to the first refresh rate and carrying the first refresh rate in the cached image frame comprises: Determining a period of a vertical synchronization signal corresponding to the first refresh rate; Sampling on a sliding curve model according to a period of a vertical synchronization signal corresponding to the first refresh rate to obtain a moving distance of the cached image frame on the screen of the electronic device; A cached image frame is generated according to the moving distance, and the first refresh rate is carried in the cached image frame.
5. The method according to claim 4, characterized in that The sampling on the sliding curve model according to the period of the vertical synchronization signal corresponding to the first refresh rate to obtain the moving distance of the cached image frame on the screen of the electronic device includes: In response to a first vertical synchronization signal at a first moment, sampling is performed on a sliding curve model according to a period of the vertical synchronization signal corresponding to the first refresh rate to obtain a moving distance of the cached image frame on the screen of the electronic device; The step of generating a cached image frame according to the moving distance and carrying the first refresh rate in the cached image frame comprises: In response to a first vertical synchronization signal at the first moment, drawing a layer of the cached image frame according to the moving distance, rendering the layer, and carrying the first refresh rate in the rendered layer; In response to a second vertical synchronization signal at a second moment, the rendered layers are synthesized to obtain the cached image frame; wherein the second moment is after the first moment, the periods of the first vertical synchronization signal and the second vertical synchronization signal are the same, and the first time interval between the second moment and the first moment is the same as the period of the first vertical synchronization signal, and the periods of the first vertical synchronization signal and the second vertical synchronization signal are determined according to the second refresh rate.
6. The method according to claim 5, characterized in that The step of switching the second refresh rate to the first refresh rate carried in the cached image frame and displaying the cached image frame comprises: In response to the third vertical synchronization signal at the third moment, the second refresh rate is switched to the DD230514I in the cached image frame. The first refresh rate of the band and displays the cached image frame; wherein the third moment is after the second moment, the second time interval between the third moment and the second moment is the same as the first time interval, and the period of the third vertical synchronization signal is determined according to the first refresh rate.
7. A refresh rate switching device, characterized in that: The refresh rate switching device is arranged in an electronic device, and the device comprises: An acquisition module, configured to acquire a first refresh rate to be switched; wherein the refresh rate currently used by the electronic device is a second refresh rate, and the second refresh rate is different from the first refresh rate; A generating module, configured to generate a cached image frame according to the first refresh rate, and carry the first refresh rate in the cached image frame; A switching module, used for switching the second refresh rate to the first refresh rate carried in the cached image frame; A display module is used to display the cached image frame.
8. An electronic device, characterized in that: include: one or more processors; Memory; Multiple applications; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions, which, when executed by the electronic device, enable the electronic device to perform the method as described in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed on a computer, enables the computer to execute the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
System and method for variable frame duration control in an electronic display
CN108885852A
Data processing method and related device
CN114579075A
Data processing method and related device
CN114579076A
Display frame rate adjusting method and device, application processor and electronic equipment
CN115100993A
Data processing method and related device
CN115904184A
