Method for adjusting display parameter, electronic device, chip and readable storage medium
By adjusting the frequency of the display trigger signal in electronic devices, the rendering and layer composition processes are executed in advance, solving the latency problem when users slide the display interface and improving the smoothness and responsiveness of image display.
Patent Information
- Application Number
- CN202110876250.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-30
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2041-07-30
AI Technical Summary
When users swipe through the display interface, the electronic device experiences a long delay in displaying images, resulting in poor responsiveness.
By receiving user operations, it determines whether the scene of the electronic device is a preset scene, and if the frequency of the display trigger signal at the current moment is not the first preset frequency, it increases the frequency to the second preset frequency, adjusts the display trigger signal to execute the drawing rendering and layer composition process in advance, and ensures that the image is displayed in a timely manner.
It reduces the latency of image delivery, improving the smoothness of the picture and the responsiveness of electronic devices.
Smart Images

Figure CN115686403B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of display technology, and in particular to a method for adjusting display parameters, an electronic device, a chip, and a readable storage medium. Background Technology
[0002] During the display of a single frame of image, electronic devices typically follow a fixed process, sequentially performing rendering, layer compositing, and image display. Generally, electronic devices use periodic vertical synchronization (Vsync) signals as triggers for rendering, layer compositing, and image display. When the trigger signal arrives, the corresponding processing flow is activated. For example, ... Figure 1 As shown, when the Nth Vsync signal arrives, the Nth frame of image data is rendered. When the (N+1)th Vsync signal arrives, the rendered data of the Nth frame is composited. The composited image data of the Nth frame is displayed within the (N+2)th Vsync signal period. Typically, the frequency of the Vsync signal is the same as the display's refresh rate. That is, the higher the display's refresh rate, the shorter the Vsync signal period; the lower the display's refresh rate, the longer the Vsync signal period.
[0003] In some scenarios, electronic devices can adjust the display's refresh rate when a user swipes across the screen. However, the electronic device can only adjust the refresh rate during the frame blanking period within one Vsync signal cycle. For example... Figure 2 As shown, assuming the electronic device receives a user's swipe operation while rendering the Nth frame image, the electronic device needs to wait for a duration of T before displaying the swipe-up image (the N+1th frame image). The duration T includes the time between the moment the user swipes the display interface and the triggering time of the Vsync signal in the N+1th frame, as well as the duration of two complete Vsync signal cycles.
[0004] Using the above method results in a long delay in displaying the image after sliding, leading to poor responsiveness in the electronic device's image display. Summary of the Invention
[0005] This application provides a method for adjusting display parameters, an electronic device, a chip, and a computer-readable storage medium, which improves graphics display efficiency.
[0006] In a first aspect, a method for adjusting display parameters is provided for an electronic device, the electronic device including a touchscreen, the method comprising:
[0007] Receive user input via touchscreen;
[0008] In response to the receiving operation, determine whether the scene of the electronic device is a preset scene;
[0009] If it is a preset scene, determine whether the frequency of the display trigger signal at the current moment is the first preset frequency; the display trigger signal is used to trigger the image display processing flow;
[0010] If the frequency of the display trigger signal at the current moment is not the first preset frequency and the frequency of the display trigger signal at the current moment is less than the first preset frequency, the frequency of the display trigger signal at the current moment is increased to the second preset frequency to obtain the frequency-adjusted display trigger signal;
[0011] Determine whether the first time difference between the current time and the first time is greater than or equal to the first preset time difference threshold, where the first time is the next trigger time indicated by the display trigger signal of the current time;
[0012] If the first time difference is greater than or equal to the first preset time difference threshold, the image display processing flow will be executed according to the adjusted display trigger signal before the first moment.
[0013] In one embodiment, the above image display processing flow includes a drawing and rendering flow, and the display trigger signal includes an application drawing and rendering trigger signal; the application drawing and rendering trigger signal is used to trigger the drawing and rendering flow.
[0014] Increase the frequency of the current display trigger signal to a second preset frequency to obtain a frequency-adjusted display trigger signal, including:
[0015] Increase the frequency of the application rendering trigger signal at the current moment to the second preset frequency to obtain the adjusted application rendering trigger signal;
[0016] Correspondingly, the image display processing flow is executed according to the adjusted display trigger signal, including:
[0017] The rendering process is executed according to the adjusted application rendering trigger signal.
[0018] By increasing the frequency of the application rendering trigger signal to a second preset frequency, an adjusted application rendering trigger signal is obtained. This adjusted frequency is higher than the current frequency, which is equivalent to adding at least one application rendering trigger signal between the current moment and the next trigger moment indicated by the initial application rendering trigger signal. This allows the rendering process to be executed earlier, ensuring that the image of the current frame can be displayed by the hardware in a timely manner, reducing the latency of image display, and improving the smoothness of the screen and the responsiveness of electronic devices.
[0019] In one embodiment, the first preset time difference threshold is the duration of one cycle of the application rendering trigger signal after frequency adjustment.
[0020] In one embodiment, the image display processing flow includes an image compositing process, and the display trigger signal further includes a layer compositing trigger signal; the layer compositing trigger signal is used to trigger the layer compositing process.
[0021] Increase the frequency of the current display trigger signal to a second preset frequency to obtain a frequency-adjusted display trigger signal, including:
[0022] Increase the frequency of the current layer composition trigger signal to the second preset frequency to obtain the adjusted layer composition trigger signal;
[0023] Correspondingly, the image display processing flow is executed according to the adjusted display trigger signal, including:
[0024] The layer compositing process is executed according to the adjusted layer compositing trigger signal.
[0025] By increasing the frequency of the layer compositing trigger signal to a second preset frequency, an adjusted layer compositing trigger signal is obtained. This adjusted trigger signal has a higher frequency than the current trigger signal, effectively adding at least one additional layer compositing trigger signal between the current moment and the next trigger moment indicated by the initial trigger signal. This allows the layer compositing process to be executed earlier, ensuring that the image of the current frame can be displayed by the hardware in a timely manner, reducing image display latency, and improving the smoothness of the image and the responsiveness of electronic devices.
[0026] In one embodiment, the first preset frequency is the highest display refresh rate supported by the electronic device, and the second preset frequency is the highest display refresh rate supported by the electronic device.
[0027] In one embodiment, the first preset frequency is the highest refresh rate of the preset scene, and the second preset frequency is the highest refresh rate of the preset scene.
[0028] In one embodiment, the first preset frequency is the highest refresh rate of the preset scenario, and is not the highest display refresh rate supported by the electronic device, while the second preset frequency is the highest display refresh rate supported by the electronic device.
[0029] In one embodiment, the above-mentioned process of performing image display according to the adjusted display trigger signal before the first moment includes:
[0030] Before the first moment, during the first time period, the image display process is executed according to the adjusted display trigger signal; the first time period is the duration of at least one first preset frequency cycle, or the first time period is the duration of at least one second preset frequency cycle.
[0031] In one embodiment, after the above-described image display processing flow is executed according to the adjusted display trigger signal before the first moment, the method further includes:
[0032] After the first moment, the frequency of the trigger signal will be adjusted to the first preset frequency.
[0033] In one embodiment, when the image display processing flow is a rendering process and the display trigger signal is an application rendering trigger signal, after executing the image display processing flow according to the adjusted display trigger signal, the method further includes:
[0034] Determine whether the frequency of the layer compositing trigger signal at the current moment is the third preset frequency; the layer compositing trigger signal is used to trigger the layer compositing process;
[0035] If the frequency of the current layer synthesis trigger signal is not the third preset frequency, and the frequency of the current layer synthesis trigger signal is less than the third preset frequency, the frequency of the current layer synthesis trigger signal is increased to the fourth preset frequency to obtain the frequency-adjusted layer synthesis trigger signal.
[0036] Determine whether the second time difference between the current time and the second time is greater than or equal to the second preset time difference threshold; the second time is the next trigger time indicated by the layer compositing trigger signal at the current time;
[0037] If the second time difference is greater than or equal to the second time difference threshold, the image compositing process is executed before the second time point according to the adjusted layer compositing trigger signal.
[0038] If the second time difference between the current moment and the next trigger moment indicated by the current layer composition trigger signal is greater than a second preset time difference threshold, the layer composition frequency is then increased to a fourth preset frequency, resulting in an adjusted layer composition trigger signal. This allows the layer composition process to be executed in advance based on the adjusted layer composition trigger signal, thereby effectively improving the efficiency of image delivery and ensuring that the image is delivered to the hardware in a timely manner, thus improving the smoothness of the image. In one possible case, the second preset time difference threshold for triggering the increase in the layer composition frequency can be different from the first preset time difference threshold for triggering the increase in the rendering frequency, increasing the flexibility of increasing the layer composition frequency.
[0039] In one embodiment, the second time difference threshold is the duration of one cycle of the adjusted layer synthesis trigger signal.
[0040] In one embodiment, if the second preset frequency is higher than the fourth preset frequency, the method further includes:
[0041] When the number of layers to be composited stored in the buffer queue exceeds the number of data that the storage queue in the buffer queue can store, the layers to be composited are deleted sequentially from front to back according to the order in which they are stored in the buffer queue, until the number of layers to be composited stored in the buffer queue does not exceed the number of storage queues in the buffer queue.
[0042] In one embodiment, the first preset frequency is the highest display refresh rate supported by the electronic device.
[0043] In one embodiment, the third preset frequency is the highest display refresh rate supported by the electronic device.
[0044] In one embodiment, the above operation includes a sliding operation, and in response to a receiving operation, determining whether the scenario of the electronic device is a preset scenario includes:
[0045] In response to the received swipe operation, determine whether the current scene of the electronic device is a preset scene; preset scenes include list-type scenes.
[0046] In one embodiment, the above operation includes a click operation, and in response to a receive operation, determining whether the scene of the electronic device is a preset scene includes:
[0047] In response to a received click, determine whether the scene of the electronic device is a preset scene; the preset scene is a scene that exists in the scene list.
[0048] In one embodiment, the electronic device includes an application module, a window management module, a scene recognition module, and a frame rate control module;
[0049] The application module receives operations input via the touchscreen and, in response to the operations, sends window data to the window management module;
[0050] The window management module sends the acquired window data to the scene recognition module;
[0051] The scene recognition module obtains a preset list of scene information and compares the received window data with the preset list of scene information to determine the scene of the electronic device.
[0052] The scene recognition module sends a notification message to the frame rate control module, and the notification message carries the identifier corresponding to the scene of the electronic device;
[0053] The frame rate control module compares the scene indicated by the notification message with the pre-stored scene list. When the scene indicated by the notification message is in the pre-stored scene list, the scene indicated by the notification message is determined to be the preset scene.
[0054] The frame rate control module determines whether the frequency of the display trigger signal at the current moment is the first preset frequency. If the frequency of the display trigger signal at the current moment is not the first preset frequency and the frequency of the display trigger signal at the current moment is less than the first preset frequency, the frequency of the display trigger signal at the current moment is increased to the second preset frequency to obtain the frequency-adjusted display trigger signal.
[0055] The frame rate control module determines whether the first time difference between the current time and the first time is greater than or equal to the first preset time difference threshold, and if the first time difference is greater than or equal to the first preset time difference threshold, it sends an adjusted display trigger signal before the first time.
[0056] In one embodiment, the above-mentioned electronic device further includes an application rendering module; the display trigger signal includes an application rendering trigger signal;
[0057] The frame rate control module sends an adjusted application rendering trigger signal to the application rendering module before the first moment.
[0058] When the application rendering module receives the application rendering trigger signal, it executes the rendering process.
[0059] In one embodiment, the frame rate control module sends an adjusted application rendering trigger signal to the application rendering module at the adjusted frequency before the first moment.
[0060] In one embodiment, the above-mentioned electronic device further includes a layer composition module, and the display trigger signal further includes a layer composition trigger signal;
[0061] The frame rate control module sends an adjusted layer compositing trigger signal to the layer compositing module before the first moment.
[0062] When the layer compositing module receives a layer compositing trigger signal, it executes the layer compositing process.
[0063] In one embodiment, the frame rate control module sends an adjusted layer compositing trigger signal to the layer compositing module at the adjusted frequency before the first moment.
[0064] The above-mentioned method for adjusting display parameters involves receiving user input, responding to the input, determining whether the current scene of the electronic device is a preset scene, and if so, determining whether the frequency of the display trigger signal at the current moment is a first preset frequency. If not, and less than the first preset frequency, the frequency of the display trigger signal is increased. Then, it is determined whether the first time difference between the current moment and the first moment is greater than or equal to a first preset time difference threshold. If the first time difference is greater than or equal to the first preset time difference threshold, the image display processing flow is executed according to the adjusted display trigger signal. This is equivalent to adding at least one trigger signal between the moment of the sliding operation and the initial display trigger signal, reducing the image display latency and improving the responsiveness of the electronic device.
[0065] In a second aspect, an electronic device is provided, comprising a processor for coupling with a memory, reading instructions from the memory, and causing the electronic device to execute the method provided in the first aspect according to the instructions.
[0066] Thirdly, a computer-readable storage medium is provided that stores computer instructions, which, when executed on an electronic device, cause the electronic device to perform the method provided in the first aspect.
[0067] Fourthly, a chip is provided, the chip including a processor for coupling with a memory and executing a computer program in the memory to perform the method provided in the first aspect.
[0068] Fifthly, a computer program product containing instructions is provided, which, when run on an electronic device, causes the electronic device to perform the method provided in the first aspect. Attached Figure Description
[0069] Figure 1 This is a schematic diagram of an image display process;
[0070] Figure 2 This is a schematic diagram of an image display process that responds to a sliding operation;
[0071] Figure 3 A schematic diagram of the structure of an electronic device provided in one embodiment of this application;
[0072] Figure 4 A software structure block diagram of an electronic device provided in one embodiment of this application;
[0073] Figure 5 This is a schematic diagram of a Vsync signal provided in one embodiment of this application;
[0074] Figure 6 This is a schematic diagram of an image display process provided in one embodiment of this application;
[0075] Figure 7 A schematic diagram of a sliding operation provided in one embodiment of this application;
[0076] Figure 8 A software structure block diagram of an electronic device provided in another embodiment of this application;
[0077] Figure 9 A schematic diagram of an image display process provided for another embodiment of this application;
[0078] Figure 10 A schematic diagram of an image display process provided for another embodiment of this application;
[0079] Figure 11 A schematic diagram of an image display process provided for another embodiment of this application;
[0080] Figure 12 A schematic diagram of an image display process provided for another embodiment of this application;
[0081] Figure 13 A flowchart illustrating a method for adjusting display parameters according to an embodiment of this application;
[0082] Figure 14 A schematic diagram of the screen refresh rate setting interface provided in one embodiment of this application;
[0083] Figure 15 A schematic diagram of an image display process provided for another embodiment of this application;
[0084] Figure 16 A schematic diagram of an image display process provided for another embodiment of this application;
[0085] Figure 17 A schematic diagram of an image display process provided for another embodiment of this application;
[0086] Figure 18 A flowchart illustrating a method for adjusting display parameters according to another embodiment of this application;
[0087] Figure 19 A flowchart illustrating a method for adjusting display parameters according to another embodiment of this application;
[0088] Figure 20 A flowchart illustrating a method for adjusting display parameters according to another embodiment of this application;
[0089] Figure 21 A flowchart illustrating a method for adjusting display parameters according to another embodiment of this application;
[0090] Figure 22 This is a schematic diagram of the structure of a display parameter adjustment device provided in one embodiment of this application. Detailed Implementation
[0091] The technical solutions of the embodiments of this application will be described below with reference to the accompanying drawings. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B; "and / or" in this text is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of the embodiments of this application, "multiple" refers to two or more than two.
[0092] Hereinafter, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first," "second," or "third" may explicitly or implicitly include one or more of that feature.
[0093] The display parameter adjustment method provided in this application can be applied to electronic devices. Optionally, the electronic device includes a terminal device, which can also be called a terminal, user equipment (UE), mobile station (MS), mobile terminal (MT), etc. The terminal device can be a mobile phone, smart TV, wearable device, tablet computer, computer with wireless transceiver function, virtual reality (VR) terminal device, augmented reality (AR) terminal device, wireless terminal in industrial control, wireless terminal in self-driving, wireless terminal in remote medical surgery, wireless terminal in smart grid, wireless terminal in transportation safety, wireless terminal in smart city, wireless terminal in smart home, etc. The embodiments of this application do not limit the specific technology or device form used in the terminal device.
[0094] For example, Figure 3A schematic diagram of the structure of electronic device 100 is shown. 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, antenna 1, 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, a headphone jack 170D, a sensor module 180, buttons 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, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity 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.
[0095] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0096] Processor 110 may include one or more processing units, such as: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0097] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to the instruction opcode and timing signals to complete the control of fetching and executing instructions.
[0098] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0099] In some embodiments, the processor 110 may include one or more interfaces. Interfaces 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.
[0100] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple I2C buses. The processor 110 can couple to the touch sensor 180K, charger, flash, camera 193, etc., through different I2C bus interfaces. For example, the processor 110 can couple to the touch sensor 180K through the I2C interface, enabling the processor 110 and the touch sensor 180K to communicate through the I2C bus interface, thereby realizing the touch function of the electronic device 100.
[0101] The I2S interface can be used for audio communication. In some embodiments, the processor 110 may include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the I2S interface to enable the function of answering phone calls through a Bluetooth headset.
[0102] 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 the 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, enabling the function of answering phone calls through a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
[0103] The UART interface is a universal serial data bus used for asynchronous communication. This bus can be a bidirectional communication bus. It converts the data to be transmitted between serial and parallel communication. In some embodiments, the UART interface is typically 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 via the UART interface to implement Bluetooth functionality. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the UART interface to enable music playback through Bluetooth headphones.
[0104] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI) and a display serial interface (DSI). In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to enable the electronic device 100 to capture images. The processor 110 and the display screen 194 communicate via the DSI interface to enable the electronic device 100 to display images.
[0105] The GPIO interface can be configured via software. It can be configured as a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 to a camera 193, a display screen 194, a wireless communication module 160, an audio module 170, a 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.
[0106] USB port 130 is a USB standard compliant interface, specifically a Mini USB port, Micro USB port, USB Type-C port, etc. USB port 130 can be used to connect a charger to charge electronic device 100, and can also be used for data transfer between electronic device 100 and peripheral devices. It can also be used to connect headphones for audio playback. This interface can also be used to connect other electronic devices, such as AR devices.
[0107] It is understood that the interface connection relationships between the modules illustrated in the embodiments of this application are merely illustrative and do not constitute a structural limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.
[0108] The charging management module 140 receives charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 receives charging input from the wired charger via a USB interface 130. In some wireless charging embodiments, the charging management module 140 receives wireless charging input via the wireless charging coil of the electronic device 100. While charging the battery 142, the charging management module 140 can also supply power to the electronic device 100 via the power management module 141.
[0109] The power management module 141 connects 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, providing power to the processor 110, internal memory 121, external memory, display screen 194, camera 193, and wireless communication module 160, etc. The power management module 141 can also monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage current, impedance). In some other embodiments, the power management module 141 may also be located within the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be located in the same device.
[0110] The wireless communication function of electronic device 100 can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.
[0111] 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 one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with tuning switches.
[0112] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 150 may be housed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be housed in the same device.
[0113] The modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates 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 processing by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs sound signals through an audio device (not limited to speaker 170A, receiver 170B, etc.) or displays images or videos through the display screen 194. In some embodiments, the modem processor may be a separate device. In other embodiments, the modem processor may be independent of the processor 110 and may be housed in the same device as the mobile communication module 150 or other functional modules.
[0114] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. 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 antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.
[0115] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, enabling electronic device 100 to communicate with networks and other devices via 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-SCDMA), Long Term Evolution (LTE), 5G (the 5th Generation of wireless communication system), BT, GNSS, WLAN, NFC, FM, and / or IR technologies, etc. The GNSS may include the Global Positioning System (GPS), the Global Navigation Satellite System (GLONASS), the BeiDou Navigation Satellite System (BDS), the Quasi-Zenith Satellite System (QZSS), and / or satellite-based augmentation systems (SBAS).
[0116] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0117] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a miniature LED, a microLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, electronic device 100 may include one or N displays 194, where N is a positive integer greater than 1.
[0118] Electronic device 100 can perform shooting functions through ISP, camera 193, video codec, GPU, display 194 and application processor.
[0119] The ISP (Image Signal Processor) is used to process data fed back from the camera 193. For example, when taking a picture, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, and the camera's photosensitive element transmits the electrical signal to the ISP for processing, transforming it into an image visible to the naked eye. The ISP can also perform algorithmic optimization of image noise, brightness, and skin tone. The ISP can also optimize parameters such as exposure and color temperature of the shooting scene. In some embodiments, the ISP can be set in the camera 193.
[0120] Camera 193 is used to capture still images or videos. An object is projected onto a photosensitive element by generating an optical image through the lens. The photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then passed to an ISP for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP for processing. The DSP converts the digital image signal into image signals in standard RGB, YUV, or other formats. In some embodiments, the electronic device 100 may include one or N cameras 193, where N is a positive integer greater than 1.
[0121] Digital signal processors (DSPs) are used to process digital signals. Besides digital image signals, they can also process other digital signals. For example, when electronic device 100 selects a frequency, the DSP can perform Fourier transforms on the frequency energy.
[0122] Video codecs are used to compress or decompress digital video. Electronic device 100 may support one or more video codecs. Thus, electronic device 100 can play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0123] An NPU (Neural Processing Unit) is a computational processor for neural networks (NNs). By borrowing the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it can rapidly process input information and continuously learn on its own. NPUs enable intelligent cognitive applications in electronic devices, such as image recognition, facial recognition, speech recognition, and text understanding.
[0124] The external storage 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 storage interface 120 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.
[0125] Internal memory 121 can be used to store computer executable program code, which includes instructions. Processor 110 executes various functional applications and data processing of electronic device 100 by running the instructions stored in internal memory 121. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of electronic device 100 (such as audio data, phonebook, etc.). Furthermore, internal memory 121 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.
[0126] Electronic device 100 can implement audio functions, such as music playback and recording, through audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor.
[0127] The audio module 170 is used to convert digital audio information into analog audio signals for output, and also to convert analog audio input into digital audio signals. The audio module 170 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 170 may be located in the processor 110, or some functional modules of the audio module 170 may be located in the processor 110.
[0128] The speaker 170A, also known as a "loudspeaker," is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music or make hands-free calls through the speaker 170A.
[0129] The receiver 170B, also known as the "earpiece," is used to convert audio electrical signals into sound signals. When the electronic device 100 answers a telephone call or voice message, the receiver 170B can be brought close to the ear to listen to the voice.
[0130] Microphone 170C, also known as a "microphone" or "voice transducer," is used to convert sound signals into electrical signals. When making a phone call or sending a voice message, the user can speak by bringing their mouth close to microphone 170C, inputting the sound signal into microphone 170C. Electronic device 100 may have at least one microphone 170C. In some embodiments, electronic device 100 may have two microphones 170C, which, in addition to collecting sound signals, can also perform noise reduction. In other embodiments, electronic device 100 may also have three, four, or more microphones 170C, which can collect sound signals, reduce noise, identify the sound source, and perform directional recording, etc.
[0131] The 170D headphone jack is used to connect wired headphones. The 170D headphone jack can be a USB 130 interface or a 3.5mm Open Mobile Terminal Platform (OMTP) standard interface, a CTIA (Cellular Telecommunications Industry Association of the USA) standard interface.
[0132] Pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 180A can be disposed on display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. A capacitive pressure sensor may include at least two parallel plates with conductive material. When force is applied to pressure sensor 180A, the capacitance between the electrodes changes. Electronic device 100 determines the pressure intensity based on the change in capacitance. When a touch operation is applied to display screen 194, electronic device 100 detects the intensity of the touch operation based on pressure sensor 180A. Electronic device 100 can also calculate the touch position based on the detection signal from pressure sensor 180A. In some embodiments, touch operations applied to the same touch position but with different touch operation intensities can correspond to different operation commands. For example, when a touch operation with an intensity less than a first pressure threshold is applied to the SMS application icon, a command to view an SMS is executed. When a touch operation with an intensity greater than or equal to the first pressure threshold is applied to the SMS application icon, a command to create a new SMS is executed.
[0133] The gyroscope sensor 180B can be used to determine the motion attitude of the electronic device 100. In some embodiments, the gyroscope sensor 180B can determine the angular velocity of the electronic device 100 about three axes (i.e., the x, y, and z axes). The gyroscope sensor 180B can be used for image stabilization. For example, when the shutter is pressed, the gyroscope sensor 180B detects the angle of the shake of the electronic device 100, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to counteract the shake of the electronic device 100 by moving in the opposite direction, thus achieving image stabilization. The gyroscope sensor 180B can also be used in navigation and motion-sensing game scenarios.
[0134] The barometric pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates altitude using the air pressure value measured by the barometric pressure sensor 180C to assist in positioning and navigation.
[0135] 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 cover. 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 using the magnetic sensor 180D. Then, based on the detected opening and closing state of the cover or the flip cover, features such as automatic flip unlocking can be set.
[0136] The 180E accelerometer can detect the magnitude of acceleration of electronic device 100 in various directions (typically three axes). When electronic device 100 is stationary, it can detect the magnitude and direction of gravity. It can also be used to identify the posture of electronic devices and applied to applications such as screen orientation switching and pedometers.
[0137] A distance sensor 180F is used to measure distance. Electronic device 100 can measure distance via infrared or laser. In some embodiments, during a shooting scene, electronic device 100 can utilize the distance sensor 180F to measure distance for rapid focusing.
[0138] The proximity sensor 180G may include, for example, a light-emitting diode (LED) and a light detector, such as a photodiode. The LED may be an infrared LED. The electronic device 100 emits infrared light outward through the LED. The electronic device 100 uses the 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 may use the proximity sensor 180G to detect when a user holds the electronic device 100 close to their ear for a call, so as to automatically turn off the screen to save power. The proximity sensor 180G can also be used in holster mode and pocket mode for automatic unlocking and locking of the screen.
[0139] The ambient light sensor 180L is used to sense the brightness of ambient light. The electronic device 100 can adaptively adjust the brightness of the display screen 194 based on the sensed 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 work with the proximity sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touches.
[0140] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can utilize the characteristics of the collected fingerprints to achieve fingerprint unlocking, accessing application locks, taking photos with fingerprints, answering calls with fingerprints, etc.
[0141] Temperature sensor 180J is used to detect temperature. In some embodiments, electronic device 100 uses the temperature detected by temperature sensor 180J to execute a temperature handling strategy. For example, when the temperature reported by temperature sensor 180J exceeds a threshold, electronic device 100 performs thermal protection by reducing the performance of a processor located near temperature sensor 180J to reduce power consumption. In other embodiments, when the temperature is below another threshold, electronic device 100 heats battery 142 to prevent abnormal shutdown of electronic device 100 due to low temperature. In still other embodiments, when the temperature is below yet another threshold, electronic device 100 boosts the output voltage of battery 142 to prevent abnormal shutdown due to low temperature.
[0142] Touch sensor 180K, also known as a "touch panel," can be located on display screen 194. The touch sensor 180K and display screen 194 together form a touchscreen, also known as a "touch screen." Touch sensor 180K detects touch operations applied to or near it. The touch sensor can transmit 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 display screen 194. In other embodiments, touch sensor 180K may also be located on the surface of electronic device 100, in a different position than display screen 194.
[0143] The bone conduction sensor 180M can acquire vibration signals. In some embodiments, the bone conduction sensor 180M can acquire vibration signals from the vibrating bone segments of the human vocal cords. The bone conduction sensor 180M can also contact the human pulse to receive blood pressure signals. In some embodiments, the bone conduction sensor 180M can also be incorporated into headphones to form bone conduction headphones. The audio module 170 can parse the voice signals from the vibrating bone segments of the vocal cords acquired by the bone conduction sensor 180M to realize voice functionality. The application processor can parse heart rate information from the blood pressure signals acquired by the bone conduction sensor 180M to realize heart rate detection functionality.
[0144] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch-sensitive buttons. Electronic device 100 can receive button input and generate key signal inputs related to user settings and function control of electronic device 100.
[0145] Motor 191 can generate vibration alerts. Motor 191 can be used for incoming call vibration alerts or for touch vibration feedback. For example, different vibration feedback effects can correspond to touch operations performed on different applications (such as taking photos, playing audio, etc.). Motor 191 can also correspond to different vibration feedback effects for touch operations performed on different areas of the display screen 194. Different application scenarios (such as time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also be customized.
[0146] Indicator 192 can be an indicator light, used to indicate charging status, power changes, or to indicate messages, missed calls, notifications, etc.
[0147] The SIM card interface 195 is used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 195 to make contact with and separate from the electronic device 100. The electronic device 100 can support one 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, etc. Multiple cards can be inserted into the same SIM card interface 195 simultaneously. The multiple cards can be of the same or different types. The SIM card interface 195 is also compatible with different types of SIM cards. The SIM card interface 195 is also compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to realize functions such as calls and data communication. 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.
[0148] It should be noted that any electronic device mentioned in the embodiments of this application may include more or fewer modules in electronic device 100.
[0149] The software system of electronic device 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This application embodiment uses the layered architecture Android system as an example to exemplify the software structure of electronic device 100.
[0150] Figure 4 This is a software structure block diagram of the electronic device 100 according to an embodiment of this application.
[0151] The layered architecture of the electronic device 100 divides the software into several layers, each with a clear role and division of labor. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer.
[0152] The application layer can include a series of application packages.
[0153] like Figure 4 As shown, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and SMS.
[0154] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.
[0155] like Figure 4 As shown, the application framework layer may include a window manager, content provider, view system, phone manager, resource manager, notification manager, etc.
[0156] The window manager is used to manage windowed applications. It can retrieve screen size, determine the presence of a status bar, lock the screen, and capture screenshots, among other things.
[0157] Content providers store and retrieve data, making that data accessible to applications. This data may include videos, images, audio, made and received phone calls, browsing history and bookmarks, phone books, etc.
[0158] A view system includes visual controls, such as controls for displaying text and controls for displaying images. View systems can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text notification icon could include views for displaying text and views for displaying images.
[0159] The phone manager is used to provide communication functions for electronic device 100. For example, it manages call status (including connection and disconnection).
[0160] The file explorer provides applications with various resources, such as localized strings, icons, images, layout files, video files, and more.
[0161] The notification manager allows applications to display notifications in the status bar. These notifications can be used to deliver informational messages and can disappear automatically after a short pause, requiring no user interaction. For example, the notification manager can be used to notify users of completed downloads or message alerts. The notification manager can also display notifications as icons or scrolling text in the top status bar, such as notifications from background applications, or as dialog boxes on the screen. Examples include displaying text messages in the status bar, emitting sounds, vibrating electronic devices, and flashing indicator lights.
[0162] The Android Runtime consists of core libraries and a virtual machine. The Android runtime is responsible for the scheduling and management of the Android system.
[0163] The core library consists of two parts: one part is the functionalities that need to be called by the Java language, and the other part is the Android core library.
[0164] The application layer and application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.
[0165] System libraries can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), etc.
[0166] The Surface Manager is used to manage the display subsystem and provides the blending of 2D and 3D layers for multiple applications.
[0167] The media library supports playback and recording of various common audio and video formats, as well as still image files. It supports multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG.
[0168] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0169] A 2D graphics engine is a graphics engine for 2D drawing.
[0170] The kernel layer is the layer between hardware and software. The kernel layer includes at least display drivers, camera drivers, audio drivers, sensor drivers, Wi-Fi drivers, etc.
[0171] It should be noted that the electronic device mentioned in the embodiments of this application may include more or fewer modules of the aforementioned electronic device. For example, the electronic device may also include a memory, a timer, etc.
[0172] For ease of understanding, the examples provided are for reference only and are related to the concepts in the embodiments of this application.
[0173] 1. Frame: Refers to a single frame, the smallest unit of visual display. A frame can be understood as a still image; rapidly displaying multiple consecutive frames can create the illusion of motion. Frame rate refers to the number of frames refreshed per second, or the number of times the graphics processor in a terminal device refreshes the screen per second. A higher frame rate results in smoother and more realistic animation. The more frames per second, the smoother the displayed motion.
[0174] It should be noted that before the interface displays a frame, it usually needs to go through processes such as drawing, rendering, and compositing.
[0175] 2. Frame rendering: This refers to the rendering of images on the display interface. The display interface can consist of one or more views, each of which can be drawn by the visual controls of the view system. Each view is composed of subviews, and a subview corresponds to a small component within the view. For example, one subview might correspond to a symbol in the image view.
[0176] 3. Frame rendering: This involves coloring the drawn view or adding 3D effects. For example, 3D effects can include lighting effects, shadow effects, and texture effects.
[0177] 4. Frame Compositing: This is the process of combining multiple rendered views into a display interface.
[0178] The following example illustrates the workflow of the software and hardware of terminal device 100, using scenarios such as application startup or interface switching within an application.
[0179] When the touch sensor 180K receives a touch operation, the kernel layer processes the touch operation into a raw input event (including touch coordinates, touch pressure, and timestamp of the touch operation). This raw input event is stored in the kernel layer. The kernel layer then reports the raw input event to the input system of the application framework layer via the input processing library. The input system of the application framework layer parses the information of the raw input event (including operation type and reported location) and determines the focus application based on the current focus, then sends the parsed information to the focus application. The focus can be a touch point in a touch operation or a click location in a mouse click operation. The focus application is the application running in the foreground of the terminal device or the application corresponding to the touch location in the touch operation. The focus application determines the control corresponding to the raw input event based on the parsed information (e.g., reported location).
[0180] Taking a touch swipe operation as an example, where the corresponding control is a list control in the WeChat application, the WeChat application calls the application rendering module (not shown in the figure) to draw the image. The application rendering module then renders the drawn image. The WeChat application sends the rendered image to the cache queue of the display compositing process. The layer compositing module (not shown in the figure) then composites the rendered image in the display compositing process into the WeChat list interface. The display compositing process drives the LCD / LED screen through the kernel layer, causing the LCD / LED screen to display the corresponding list interface of the WeChat application.
[0181] The application scenarios provided by the embodiments of this application are described below with reference to the accompanying drawings.
[0182] First, the process of sending and displaying the image will be explained.
[0183] When an electronic device responds to a user's tap and swipe of an application list, the application retrieves relevant data for the frame image to be displayed, processes this data according to a fixed procedure, and then sends it to the display screen. This fixed procedure mainly includes a rendering process, a layer compositing process, and a display submission process. In other words, for a given frame image, the electronic device must sequentially execute the rendering process, the layer compositing process, and the display submission process before it can be displayed on the screen. The rendering process can be implemented by the application, hence it is also called the application rendering process. The layer compositing process can be implemented by the layer compositing module (SurfaceFlinger), and the layer compositing process can also be called the SurfaceFlinger layer compositing process. The display submission process is implemented through hardware, hence it is also called the hardware display submission process.
[0184] Specifically, the rendering process involves acquiring data from multiple layers to be displayed, rendering and drawing these layers to generate composite layer data. The layer compositing process involves combining the composite layer data generated in the rendering process and performing hardware compose (HWC) rendering to generate frame image data to be displayed. The hardware display process involves processing the frame image data generated in the layer compositing process using hardware and pushing it to the display screen.
[0185] Electronic devices typically use periodic Vsync signals as trigger signals to initiate various processes. The period frequency of the Vsync signal is related to the refresh rate of the display. For example, when the display refresh rate is 15Hz, the period frequency of the Vsync signal is also 15Hz, and the duration of one Vsync signal period is 66.67ms. That is, the electronic device outputs one Vsync signal every 66.67ms. The following example uses a display refresh rate of 15Hz. Figure 1 The flowchart shown illustrates how to display a single frame of an image. Figure 1As shown, when the Nth Vsync cycle signal arrives, the application layer's application rendering module is triggered to draw and render multiple layers of data to be displayed in the Nth frame image, generating layers to be composited, and storing the generated layers in the SurfaceFlinger's buffer queue. When the (N+1)th Vsync cycle signal arrives, the application framework layer's SurfaceFlinger retrieves the layers to be composited generated in the Nth Vsync cycle from the buffer queue, composites the layers, and then performs hardware blending rendering on the composited layers to generate the frame image data to be displayed. It should be noted that SurfaceFlinger typically retrieves the layers to be composited sequentially from front to back according to the order they are stored in the buffer queue. During the (N+2)th Vsync cycle, the hardware layer's display unit performs hardware display processing on the frame image data to be displayed generated by SurfaceFlinger and pushes it to the display screen.
[0186] The display screen in an electronic device includes pixels arranged in rows and columns. A display controller can control the brightness and color of each pixel, thereby enabling the display screen to show one frame of an image. In one embodiment, taking an organic light-emitting diode (OLED) display screen as an example, each pixel can be composed of three OLEDs. These three OLEDs emit red (R), green (G), and blue (B) colors respectively, and the combination of these three OLEDs can emit RGB color formats. The display controller can control the OLEDs to display the corresponding brightness and color, thus enabling the display screen to show one frame of an image. In one embodiment, the display screen of the electronic device can be located below a touchscreen; this application does not limit the arrangement of the display screen and the touchscreen.
[0187] For example, an OLED display with a resolution of 1080×2400 means that each row of the OLED display contains 1080 pixels and each column contains 2400 pixels. Taking the display controller controlling the pixels in the first row as an example, the display controller can output a horizontal sync signal (HSYNC). HSYNC indicates that the display controller is about to control the OLEDs in the pixels of the first row to operate. After outputting HSYNC, the display controller can wait for the horizontal backporch (HBP) to start controlling the OLEDs in the pixels of the first row to operate. After the display controller controls the last OLED in the pixels of the first row to operate, it can wait for the horizontal frontporch (HFP) to input the horizontal sync signal for the second row. In this way, the display controller can control the OLEDs in the pixels of all rows to operate.
[0188] Among them, such as Figure 5 As shown, for each row of pixels, there exists a horizontal porch (H-Porch). The duration of the H-Porch for each row is equal to "the duration of the line sync signal + the horizontal back shoulder + the horizontal front shoulder", that is, H-Porch = HFP + HBP + HSW. Here, HSW is the duration of the line sync signal, and the horizontal porch can also be called the line porch.
[0189] When the display controller activates the organic light-emitting diodes (OLEDs) in all rows of pixels within a single frame, the display screen can display that frame. After displaying a frame, the display controller waits for the vertical front porch (VFP) and outputs a frame synchronization signal (VSYNC). VSYNC indicates that the display controller is about to start controlling the display screen to display the next frame. After outputting VSYNC, the display controller waits for the vertical back porch (VBP) and outputs HSYNC for the first row of the next frame to control the display screen to display the next frame, as described above.
[0190] For a single frame, there exists a vertical porch (V-Porch). The duration of the V-Porch for each line is equal to the duration of the frame synchronization signal + the vertical back shoulder + the vertical front shoulder, i.e., V-Porch = VFP + VBP + VSW. Here, VSW is the duration of the frame synchronization signal, and the vertical porch can also be called the frame blanking region.
[0191] Electronic devices can adjust display parameters during the VFP (Virtual Front-lighting) period within the frame blanking interval. Typically, the frame blanking interval is very short, about 1 / 1000th of the duration of one Vsync cycle. However, when the image refresh rate is below 24Hz, the human eye can perceive changes in the image. Therefore, when the display refresh rate is below 24Hz (e.g., 15Hz), the display time is usually less than 1000 / 24 = 41.67ms. Correspondingly, the frame blanking interval is usually longer, being the duration of one Vsync cycle minus the display time. For example, the frame blanking interval is 15ms, which is the duration of one 15Hz signal cycle (66.67ms) minus the display time (41.67ms).
[0192] Based on the above description, displaying a single image frame requires a rendering process, a layer composition process, and a hardware display process. Since both the rendering and layer composition processes require a Vsync trigger to execute, therefore, as... Figure 6 As shown, the time required to display one frame of an image includes at least the duration of the trigger rendering cycle (T1), the duration of the layer compositing Vsync cycle (T2), and the duration of display time in the hardware display process (T3), which is the sum of the duration of two complete Vsync cycles and the duration of one display time. The lower the refresh rate of the display screen, the longer it takes to display one frame of an image.
[0193] In one possible scenario, when the image on the screen remains static, electronic devices typically lower the screen's refresh rate (e.g., to 15Hz) to conserve energy. When the image displayed on the screen changes, the electronic device will increase the refresh rate to improve the user experience.
[0194] For example, such as Figure 7 As shown, users browse as follows Figure 7 The interface of the social application shown in (a) above, or the user browsing such as Figure 7 The settings interface shown in (b) above, or the user browsing such as Figure 7 The document interface shown in (c) above, or the user browsing such as Figure 7 The product browsing interface is shown in (d). If the user does not perform any operation for an extended period, and the image displayed on the screen remains unchanged for that period, the electronic device will lower the screen refresh rate to 15Hz. Upon receiving an upward or downward swipe operation from the user, the electronic device will increase the screen refresh rate to 60Hz. At this time, the electronic device responds to the upward or downward swipe operation by executing the rendering process, layer composition process, and hardware display process, displaying the content corresponding to the upward swipe operation, or displaying the content corresponding to the downward swipe operation.
[0195] Continue as Figure 7 As shown, users browse as follows Figure 7 The interface shown in (e) is, or, as the user browses, such as... Figure 7 The e-book browsing interface is shown in (f). If the user does not perform any operation for an extended period, and the image displayed on the screen remains unchanged for that period, the electronic device will reduce the screen refresh rate to 15Hz. When a user swipes left or right, the electronic device will reduce the screen refresh rate to 60Hz. At this time, the electronic device responds to the left or right swipe operation by executing the rendering process, layer composition process, and hardware display process, displaying the content corresponding to the left swipe operation, or displaying the content corresponding to the right swipe operation.
[0196] In related technologies, the Vsync signal that triggers the rendering process is called the application rendering trigger signal (APP-Vsync); the Vsync signal that triggers the layer compositing process is called the layer compositing trigger signal (SurfaceFlinger verticalsynchronization, SF-Vsync); and the Vsync signal that triggers the hardware display process is called the hardware display trigger signal (HW-Vsync). The APP-Vsync and SF-Vsync can have the same period duration as the HW-Vsync, and the period frequency of the HW-Vsync is the same as the refresh rate of the display screen.
[0197] In one possible scenario, the software architecture diagram of an electronic device can be as follows: Figure 8 As shown. The electronic device may include an application rendering module 501, a layer composition module 502, a display screen 503, a window management module (Windows Manager Service) 504, a scene recognition module 505, a frame rate control module 506, and a display driver 507.
[0198] The application rendering module 501 is a functional module within the application, belonging to the application layer. The layer composition module 502, window management module 504, scene recognition module 505, and frame rate control module 506 belong to the application architecture layer. The layer composition module 502 can be a SurfaceFlinger process. The window management module 504 receives window data sent by the application. For example, the window data includes: application package name, activity name, and focus control type (e.g., ListView). The frame rate control module 506 can adjust the period of APP-Vsync and / or SF-Vsync. The scene recognition module 504 can identify the scene information corresponding to the window data in response to receiving window data sent by the window management module 504. The display screen 503 is a functional module in the hardware, belonging to the hardware layer.
[0199] The application rendering module 501, following the APP-Vsync sent by the frame rate control module 506, performs rendering and drawing processing on the layer data to be displayed, generating layer data to be composited. The layer compositing module 502, following the SF-Vsync sent by the frame rate control module 506, composites the layer data to be composited obtained from the application rendering module 501 and performs hardware blending rendering to generate frame image data to be displayed. The layer compositing module 502 can also send the frame image data to be displayed to the display screen 503. Driven by the display driver 507 in the kernel layer, the display screen 503 sends the frame image data to be displayed for display. Specifically, the display driver 507 can drive the display screen 503 to send the frame image to be displayed to the display screen according to the HW-Vsync sent by the frame rate control module 506.
[0200] The following is through Figure 9 This section details the time required to display one frame of image after receiving a user's swipe gesture. It uses an example where the monitor's refresh rate is 15Hz before the swipe gesture, and then the electronic device increases the refresh rate to 120Hz afterward.
[0201] like Figure 9 As shown, when a user's swipe gesture is received, the application's rendering module renders the first frame of the image when the Nth Vsync signal arrives. During the frame blanking period within the Nth Vsync signal, the display refresh rate is increased from 15Hz to 120Hz. Figure 9As shown, the (N+1)th Vsync signal period is the adjusted period. When the (N+1)th Vsync signal arrives, the second frame image is rendered. When the (N+2)th Vsync signal arrives, the second frame image is composited. The second frame image is then displayed within the (N+2)th Vsync period. In other words, the second frame image displayed in response to a sliding operation requires a duration of A+B+C before it can be displayed. If the difference between the sliding operation and the trigger time indicated by the (N+1)th Vsync signal is 50ms, then the display of the second frame image requires a wait of 50 + 8.33 + 8.33 = 66.66ms.
[0202] In one possible scenario, the trigger times of the APP-Vsync indicator and / or SF-Vsync indicator can be advanced to avoid the aforementioned image display issues caused by a low display refresh rate. The following is a breakdown... Figures 10 to 12 The embodiments shown will be described in detail.
[0203] In one embodiment, image display latency can be reduced by advancing the next trigger time indicated by APP-Vsync. The following is an example... Figure 10 To explain in detail. For example... Figure 10 As shown, when a user's swipe gesture is received, the application's rendering module is executing the rendering process for frame 1. The frame rate control module advances the next trigger time indicated by APP-Vsync, for example, to... Figure 10 The application rendering module can execute the rendering process for frame 2 at the next trigger time indicated by APP-Vsync after completing the rendering process for frame 1; alternatively, it can stop rendering frame 1 and execute the rendering process for frame 2 when the next trigger time indicated by APP-Vsync arrives. This embodiment does not impose any limitations on this. That is, by advancing the next trigger time indicated by APP-Vsync, the waiting time required to display the slid-out image (frame 2) is A1+B. Figure 9 In comparison, such as Figure 10 As shown, the duration of A1 is shorter than the duration of A. Furthermore, by advancing the APP-Vsync signal, the duration of one Vsync signal cycle C is saved. In other words, advancing the next trigger time indicated by APP-Vsync effectively reduces the time required to display the image after sliding.
[0204] In one embodiment, image display latency can be reduced by advancing the next trigger time indicated by SF-Vsync. The following is an example... Figure 11 Let me explain in detail. Figure 11As shown, when a user's swipe gesture is received, the layer compositing module is executing the layer compositing process for frame 1. The frame rate control module advances the next trigger time indicated by SF-Vsync, for example, to... Figure 11 The layer compositing module can execute the layer compositing process for frame 2 at the next trigger time indicated by SF-Vsync after completing the layer compositing process for frame 1; alternatively, it can directly stop the layer compositing for frame 1 and execute the layer compositing process for frame 2 when the next trigger time indicated by SF-Vsync arrives. By advancing the next trigger time indicated by SF-Vsync, the slided image (frame 2) can be displayed after the duration of an initial Vsync signal cycle (66.67ms). In other words, advancing the next trigger time indicated by SF-Vsync can effectively reduce the time required to display the slided image.
[0205] In one embodiment, the next trigger time indicated by APP-Vsync and the next trigger time indicated by SF-Vsync can be advanced simultaneously to reduce image display latency. The following describes... Figure 12 To explain in detail. For example... Figure 12 As shown, when a user's swipe gesture is received, the application's rendering module is executing the rendering process for frame 1. The frame rate control module advances the next trigger time indicated by APP-Vsync, for example, to... Figure 12 The time indicated is shown. Simultaneously, the rendering module can stop rendering frame 1 and execute the rendering process for frame 2 when the next trigger time indicated by APP-Vsync arrives. The frame rate control module can simultaneously advance the next trigger time indicated by SF-Vsync; in one possible case, it can be advanced to, for example, [the time indicated by SF-Vsync]. Figure 12 The layer compositing module can execute the layer compositing process for frame 2 when the next trigger time indicated by SF-Vsync arrives. After completing the layer compositing process for frame 2, the display driver can drive the display screen to display the frame image to be displayed according to the HW-Vsync sent by the frame rate control module. That is, the time required to display the slided image (frame 2) is A3+A4. Figure 9 In comparison, it saves the cycle time B occupied by the rendering process and the cycle time C occupied by the layer compositing process. That is to say, by simultaneously advancing the next trigger time indicated by APP-Vsync and the next trigger time indicated by SF-Vsync, the time required to display frame 2 can be further reduced.
[0206] For example, Figure 13 This is a schematic diagram illustrating the information interaction process between various modules in one embodiment.
[0207] like Figure 13 As shown, it includes:
[0208] Step 101: When a swipe operation is received, the window management module of the application framework layer obtains the updated window data on the display screen in response to the swipe operation.
[0209] In response to a user's swipe gesture, the application sends window data to the window management module. This window data includes: package name, window name, list control, the position of the switched window, the display order, size, and position of elements within the window, and the transition animation. The window position refers to its location on the electronic device's display screen. Elements within the window include, but are not limited to, text, images, and boxes. The transition animation represents the effect of the window being displayed after the switch. The window management module can include an Activity Manager Services (AMS) and a Window Manager Services (WMS). AMS manages the application's interface, while WMS manages windows and can also store information about all windows on the terminal device.
[0210] Step 102: The window management module sends the updated window data to the scene recognition module.
[0211] Step 103: In response to the received window data, the scene recognition module determines the updated scene information.
[0212] For example, the configuration file of an electronic device can have a pre-defined list of scene information, which can be stored in the memory of the electronic device. The scene information list can be as shown in Table 1, with different scene categories corresponding to different identifiers (IDentity, ID). It should be noted that this scene information list can also include the IDs corresponding to the instant messaging interface and the IDs corresponding to list controls.
[0213] Table 1
[0214]
[0215]
[0216] The scene recognition module can load the scene information list from memory, determine the application category from the application package name in the received window data, and then determine the scene information identifier corresponding to the application category.
[0217] Step 104: The scene recognition module sends a notification message to the frame rate control module, which carries the identifier corresponding to the current scene information.
[0218] Step 105: In response to receiving the notification message, the frame rate control module determines whether the updated scene indicated by the notification message is the preset scene.
[0219] For example, the frame rate control module can obtain the scene identifier carried by the notification message and compare it with the scene identifier stored in the frame rate control module. If the identifiers match, it means that the current scene is a preset scene, and then step 106 is executed.
[0220] If the scene identifier carried in the notification message is inconsistent with the scene identifier pre-stored in the frame rate control module, then in the current scene, the delay of the screen change will not affect the user experience. Therefore, it is not necessary to increase the Vsync cycle frequency in advance.
[0221] For example, if the scene identifier carried in the notification message indicates a map scene, where the map scene is not a scene pre-existing in the frame rate control module, the display refresh rate is reduced when the map remains unchanged for an extended period. When a swipe operation is received, the corresponding map screen is displayed in response to the swipe operation. The delay of this map screen display is not significant, therefore it is not necessary to increase the Vsync cycle frequency.
[0222] Step 106: If the frame rate control module determines that the updated scenario indicated by the notification message is the preset scenario, the frame rate control module determines whether to adjust the period frequency of APP-Vsync.
[0223] The preset scenario can be any scenario in Table 2 where the low and high refresh rates differ within the same mode. When the frame rate control module obtains the updated scenario from the notification message, it checks Table 2 to determine if different refresh rates exist within the updated scenario. For example, if the frame rate control module obtains a scenario ID of "0" from the notification message, it determines that the updated scenario is an instant messaging scenario. Table 2 shows that instant messaging has different refresh rates within the same mode, therefore the instant messaging scenario is designated as the preset scenario. Simultaneously, the frame rate control module can query the current refresh rate; if the current refresh rate is 15Hz, the frame rate control module determines to increase the refresh rate to 120Hz.
[0224] Table 2
[0225]
[0226]
[0227] In one possible scenario, users can set the mode type for a scene. For example, when a user clicks the mode settings option in an application, the electronic device displays something like... Figure 14The interface shown includes Smart Mode, High-Performance Mode, and Standard Mode. Taking a browser as an example, when the user selects Smart Mode, the browser operates at the same refresh rate as in High-Performance Mode, meaning there are two refresh rates: a low refresh rate of 15Hz and a high refresh rate of 120Hz.
[0228] Furthermore, the frequency of APP-Vsync can be increased based on the difference between the time of the sliding operation and the trigger time of the next rendering cycle. When the difference between the time of the sliding operation and the trigger time of the next rendering cycle is greater than the duration of one cycle of APP-Vsync after increasing the frequency, then APP-Vsync should be increased. For example, as... Figure 15 As shown, if the difference A5 between the moment of the sliding operation and the trigger moment of the next rendering process is greater than the increased cycle duration B of APP-Vsync, then the cycle frequency of APP-Vsync is increased. Figure 16 As shown, if the difference A6 between the moment of the sliding operation and the trigger moment of the next drawing and rendering process is less than the duration B of one cycle of the increased APP-Vsync, then the cycle frequency of APP-Vsync will not be increased.
[0229] It should be noted that the APP-Vsync cycle frequency after the cycle frequency is increased is an integer multiple of the initial Vsync cycle frequency. This ensures that the timing of the next drawing and rendering process indicated by APP-Vsync after the cycle frequency is increased can match the timing of the next layer compositing process and the next hardware display process indicated by Vsync.
[0230] Step 107: The frame rate control module sends the APP-Vsync and attribute identifier to the application rendering module according to the increased cycle frequency.
[0231] Increasing the period frequency of APP-Vsync is equivalent to adding at least one trigger signal to trigger the drawing and rendering process between the sliding moment and the trigger moment indicated by the Vsync signal of the next frame, which is equivalent to advancing the trigger moment of the next drawing and rendering process.
[0232] In one possible scenario, increasing APP-Vsync can achieve the following: Figure 17 As shown. The difference X between the moment of the sliding operation and the next trigger moment indicated by the Vsync signal, and the duration of one cycle of the adjusted Vsync signal is B. The difference between the trigger moment indicated by APP-Vsync and the moment of the sliding operation is determined by Xn*B = Y, where n is the smallest positive integer after X / B. Figure 17As shown, the smallest positive integer after X / B is 2, which is equivalent to two APP-Vsyncs within the initial Vsync cycle duration. Therefore, the trigger time indicated by the first APP-Vsync can be used as the trigger time for the next drawing and rendering process.
[0233] For example, if the increased APP-Vsync cycle frequency is 120Hz, then one cycle duration is 8.33ms. The current Vsync cycle frequency is 15Hz, corresponding to one cycle duration of 66.67ms. If the difference between the moment of the slide operation and the moment of the next rendering cycle indicated by the current Vsync is 20ms, then the current APP-Vsync cycle frequency is increased to 120Hz. The moment of the next rendering cycle indicated by the increased APP-Vsync is 20 - 2 * 8.33 = 3.34ms after the moment of the slide operation.
[0234] For example, the attribute identifiers include New and Replace. When the attribute identifier is New, the application's rendering module continues to execute the rendering process for the current frame. Figure 17 As described above, after the first frame of the image is drawn, the second frame of the image is drawn. When the attribute is marked as Replace, the application's drawing and rendering module stops executing the drawing and rendering process of the current frame and begins executing the drawing and rendering process of the new frame. Figure 17 That is, stop drawing the image of the first frame and directly execute the drawing of the second frame.
[0235] The frame rate control module sends the APP-Vsync and the attribute flag with the value Replace to the application rendering module according to the increased cycle frequency.
[0236] Step 108: The application rendering module executes the rendering process according to the adjusted APP-Vsync.
[0237] When the application's rendering module responds to the property flag that is assigned the value Replace, it stops executing the rendering process of the current frame and starts executing the rendering process of the new frame.
[0238] In one possible scenario, the frame rate control module can also increase the period frequency of SF-Vsync. The implementation process is the same as described above. Figure 13 The embodiments shown are similar and will not be described again here.
[0239] In one possible scenario, the frame rate control module can simultaneously adjust the periods of APP-Vsync and SF-Vsync, as described below. Figure 18 The embodiments shown will be described in detail below.
[0240] like Figure 18 As shown, it includes:
[0241] Step 101: When a swipe operation is received, the window management module of the application framework layer obtains the updated window data on the display screen in response to the swipe operation.
[0242] Step 102: The window management module sends the updated window data to the scene recognition module.
[0243] Step 103: In response to the received window data, the scene recognition module determines the updated scene information.
[0244] Step 104: The scene recognition module sends a notification message to the frame rate control module, which carries the identifier corresponding to the current scene information.
[0245] Step 105: In response to receiving the notification message, the frame rate control module determines whether the updated scene indicated by the notification message is the preset scene.
[0246] Step 109: If the frame rate control module determines that the updated scenario indicated by the notification message is the preset scenario, the frame rate control module determines whether to adjust the period frequency of APP-Vsync and SF-Vsync.
[0247] It should be noted that when adjusting the period frequency of APP-Vsync and SF-Vsync, the frame rate control module can adjust APP-Vsync and SF-Vsync to the same period frequency or to different period frequencies. This application embodiment does not limit this.
[0248] In one possible scenario, the adjusted APP-Vsync cycle frequency is greater than the adjusted SF-Vsync cycle frequency. This can cause the application rendering module to generate the data for the layers to be composed faster than the layer compositing module can process it. Since the application rendering module stores the data for the layers to be composed in a buffer queue, the buffer queue may become full, preventing the layer compositing module from processing the data in the buffer queue in a timely manner. When the buffer queue is full, the application rendering module can delete the data in the buffer queue in reverse order of storage, until the number of data items stored in the buffer queue does not exceed the capacity of the buffer queue. It should be noted that when the layer compositing module performs layer merging processing on the data to be composed, it processes the oldest data item stored in the buffer queue first.
[0249] Step 107: The frame rate control module sends the APP-Vsync and attribute identifier to the application rendering module according to the increased cycle frequency.
[0250] Step 108: The application rendering module executes the rendering process according to the adjusted APP-Vsync.
[0251] Step 110: The frame rate control module sends SF-Vsync and attribute identifiers to the layer compositing module according to the increased cycle frequency.
[0252] Step 111: The layer compositing module executes the layer compositing process according to the adjusted SF-Vsync.
[0253] By highlighting the trigger times of the APP-Vsync and SF-Vsync indicators, the rendering and layer composition processes in the display process are brought forward, reducing the latency of displaying images after scrolling and improving the responsiveness of electronic devices.
[0254] The method for adjusting display parameters involved in this application will be described in detail below through specific embodiments. The following embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.
[0255] Figure 19 This is a flowchart illustrating the method for adjusting display parameters provided in an embodiment of this application. Figure 19 As shown, the method for adjusting display parameters provided in this embodiment includes:
[0256] S201. Receive the operation output by the user through the touch screen, and in response to the received operation, determine whether the scene of the electronic device is a preset scene.
[0257] Optionally, the above operation can be a swipe operation or a click operation, and this application embodiment does not limit it.
[0258] S202. When the scene of the electronic device is a preset scene, determine whether the frequency of the application drawing and rendering trigger signal at the current moment is the first preset frequency.
[0259] The first preset frequency can be a user-defined frequency threshold or the display refresh rate corresponding to the changed scene. In one possible case, the first preset frequency is the highest refresh rate supported by the electronic device's display screen. If the frequency of the application rendering trigger signal at the current moment is not the first preset frequency and is less than the first preset frequency, execute S203.
[0260] S203. Determine whether the first time difference between the current time and the first time is greater than or equal to the first preset time difference threshold.
[0261] The first time point is the next trigger time indicated by the application rendering trigger signal at the current time. If the first time difference is greater than the first preset time difference threshold, then S204 is executed.
[0262] The first preset time difference threshold can be the duration of one cycle of the adjusted application rendering trigger signal, or it can be the duration of one cycle of the highest refresh rate supported by the electronic device. This application embodiment does not limit this.
[0263] S204. Increase the frequency of the application rendering trigger signal at the current moment to the second preset frequency to obtain the adjusted application rendering trigger signal.
[0264] Increase the frequency of the application rendering trigger signal at the current moment to the second preset frequency to obtain the adjusted application rendering trigger signal.
[0265] The second preset frequency can be the same as or different from the first preset frequency; this application embodiment does not impose any restrictions on this. In one possible case, the second preset frequency is the highest display refresh rate supported by the electronic device. It should be noted that the highest display refresh rate supported by the electronic device can be an integer multiple of the second preset frequency, i.e., Fv-app = (1 / n) * F1, where n is a positive integer, Fv-app is the second preset frequency, and F1 is the highest refresh rate supported by the electronic device. Since the highest display refresh rate supported by the electronic device is an integer multiple of the second preset frequency, the application rendering trigger signal using the second preset frequency can be aligned with the hardware display trigger signal using the highest refresh rate of the electronic device.
[0266] When the first time difference between the current moment and the next trigger moment indicated by the current moment's application rendering trigger signal is greater than the first preset time difference threshold, the frequency of the current moment's application rendering trigger signal is increased. This can effectively advance the rendering process based on the adjusted application rendering trigger signal, thereby effectively improving the efficiency of image delivery and ensuring that the image of the current frame is delivered to the hardware in a timely manner, thus improving the smoothness of the screen.
[0267] S205. Before the first moment, execute the drawing and rendering process according to the adjusted application drawing and rendering trigger signal.
[0268] By increasing the frequency of the application rendering trigger signal to a second preset frequency, an adjusted application rendering trigger signal is obtained. This adjusted frequency is higher than the current frequency, which is equivalent to adding at least one application rendering trigger signal between the current moment and the next trigger moment indicated by the initial application rendering trigger signal. This allows the rendering process to be executed earlier, ensuring that the image of the current frame can be displayed by the hardware in a timely manner, reducing the latency of image display, and improving the smoothness of the screen and the responsiveness of electronic devices.
[0269] As shown in Table 2, the same scenario can have two refresh rates. Taking the instant messaging scenario as an example, in standard mode, the refresh rates for instant messaging include 15Hz and 60Hz. In one possible scenario, the first preset frequency can be the highest refresh rate of the preset scenario, i.e., 60Hz, and the second preset frequency can be the highest refresh rate supported by the electronic device, such as 120Hz. After the first moment, the application rendering frequency can be adjusted to the first preset frequency of 60Hz, and after the first moment, an application rendering trigger signal can be sent to the application rendering module at 60Hz.
[0270] Figure 19The illustrated embodiment focuses on the specific process by which increasing the frequency of application rendering trigger signals enables the electronic device to execute the rendering process earlier, thereby improving the smoothness of the screen. In one possible scenario, the electronic device can also increase the frequency of layer composition trigger signals to further improve screen smoothness. The implementation method and beneficial effects of increasing the frequency of layer composition trigger signals by the electronic device are the same as described above. Figure 19 The embodiments shown are similar and will not be described again here.
[0271] Furthermore, in Figure 19 Based on the illustrated embodiment, after increasing the frequency of the application rendering trigger signal, the electronic device can also simultaneously increase the frequency of the layer composition trigger signal. The following describes... Figure 20 The embodiments shown will be described in detail below.
[0272] Figure 20 This is a flowchart illustrating the method for adjusting display parameters provided in an embodiment of this application. Figure 20 As shown, the method for adjusting display parameters provided in this embodiment includes:
[0273] S201. Receive the operation output by the user through the touch screen, and in response to the received operation, determine whether the scene of the electronic device is a preset scene.
[0274] S202. When the scene of the electronic device is a preset scene, determine whether the frequency of the application drawing and rendering trigger signal at the current moment is the first preset frequency.
[0275] The first preset frequency can be a user-defined frequency threshold or the display refresh rate corresponding to the scene after the scene change. In one possible case, the first preset frequency is the highest refresh rate supported by the electronic device's display screen. If the frequency of the application rendering trigger signal at the current moment is not less than the first preset frequency, execute S203.
[0276] S203. Determine whether the first time difference between the current time and the first time is greater than or equal to a first preset time difference threshold. If the first time difference is greater than or equal to the first preset time difference threshold, then execute S204.
[0277] S204. Increase the frequency of the application rendering trigger signal at the current moment to the second preset frequency to obtain the adjusted application rendering trigger signal.
[0278] S205. Before the first moment, execute the drawing and rendering process according to the adjusted application drawing and rendering trigger signal.
[0279] S206. Determine whether the frequency of the layer compositing trigger signal at the current moment is the first preset frequency. If the frequency of the layer compositing trigger signal is not the first preset frequency and is less than the first preset frequency, execute S207.
[0280] S207. Determine whether the first time difference between the current time and the first time is greater than or equal to the first preset time difference threshold.
[0281] If the first time difference is greater than or equal to the first time difference threshold, then execute S208.
[0282] Wherein, the first moment is the next trigger moment indicated by the layer compositing trigger signal at the current moment. The first preset time difference threshold can be the duration of one cycle of the adjusted layer compositing trigger signal, or it can be the duration of one cycle of the highest refresh rate supported by the electronic device. This application embodiment does not limit this.
[0283] S208. Increase the frequency of the layer compositing trigger signal to the second preset frequency to obtain the adjusted layer compositing trigger signal.
[0284] S209. Before the first moment, execute the layer compositing process according to the adjusted layer compositing trigger signal.
[0285] By increasing the layer composition frequency of the layer composition trigger signal, an adjusted layer composition trigger signal is obtained. By increasing the rendering frequency, an adjusted application rendering trigger signal is obtained. Based on the timely execution of the rendering process according to the adjusted application rendering trigger signal, the rendering process is further executed in a timely manner according to the adjusted layer composition trigger signal, which further ensures that the image can be sent to the hardware for display in a timely manner and improves the smoothness of the picture.
[0286] In one possible scenario, the rendering frequency can be increased when it is lower than a first preset frequency, and the layer compositing frequency can be increased when it is lower than a third preset frequency. The first and third preset frequencies are different. Further, the rendering frequency can be increased to a second preset frequency, and the layer compositing frequency can be increased to a fourth preset frequency. The second and fourth preset frequencies are different. The following will demonstrate... Figure 21 The embodiments shown will be described in detail below.
[0287] Figure 21 A flowchart illustrating a method for adjusting display parameters according to another embodiment of this application is shown below. Figure 21 As shown, the method includes:
[0288] S201. Receive the operation output by the user through the touch screen, and in response to the received operation, determine whether the scene of the electronic device is a preset scene.
[0289] S202. When the scene of the electronic device is a preset scene, determine whether the frequency of the application drawing and rendering trigger signal at the current moment is the first preset frequency.
[0290] The first preset frequency can be a user-preset frequency threshold or the display refresh rate corresponding to the scene after the scene change. In one possible case, the first preset frequency is the highest refresh rate supported by the electronic device's display screen. If the rendering frequency of the application rendering trigger signal at the current moment is less than the first preset frequency, execute S203.
[0291] S203. Determine whether the first time difference between the current time and the first time is greater than or equal to a first preset time difference threshold. If the first time difference is greater than or equal to the first preset time difference threshold, then execute S204.
[0292] S204. Increase the frequency of the application rendering trigger signal at the current moment to the second preset frequency to obtain the adjusted application rendering trigger signal.
[0293] S205. Before the first moment, execute the drawing and rendering process according to the adjusted application drawing and rendering trigger signal.
[0294] S210. Determine whether the frequency of the layer compositing trigger signal at the current moment is the third preset frequency. If the frequency of the layer compositing trigger signal is not the third preset frequency and is less than the third preset frequency, execute S211.
[0295] The third preset frequency can be a frequency threshold set by the user, or it can be the display refresh rate corresponding to the scene of the electronic device. This application embodiment does not limit this. In one possible case, the third preset frequency is the highest refresh rate supported by the electronic device's display screen.
[0296] S211. Determine whether the second time difference between the current time and the second time is greater than or equal to the second preset time difference threshold.
[0297] If the third time difference is greater than the third time difference threshold, then execute S212.
[0298] Wherein, the second moment is the next trigger moment indicated by the layer compositing trigger signal at the current moment. The second preset time difference threshold can be the duration of one cycle of the adjusted layer compositing trigger signal, or it can be the duration of one cycle of the highest refresh rate supported by the electronic device. This application embodiment does not impose any limitations on this.
[0299] S212. Increase the frequency of the layer compositing trigger signal to the fourth preset frequency to obtain the adjusted layer compositing trigger signal.
[0300] If the second time difference between the current moment and the next trigger moment indicated by the current layer composition trigger signal is greater than a second preset time difference threshold, the layer composition frequency is then increased to a fourth preset frequency, resulting in an adjusted layer composition trigger signal. This allows the layer composition process to be executed in advance based on the adjusted layer composition trigger signal, thereby effectively improving the efficiency of image delivery and ensuring that the image is delivered to the hardware in a timely manner, thus improving the smoothness of the image. In one possible case, the second preset time difference threshold for triggering the increase in the layer composition frequency can be different from the first preset time difference threshold for triggering the increase in the rendering frequency, increasing the flexibility of increasing the layer composition frequency.
[0301] In one possible scenario, the fourth preset frequency is different from the second preset frequency, allowing the corresponding processes on the image display pipeline to be executed according to different trigger signals, thereby improving the flexibility of executing each process on the image display pipeline.
[0302] It should be noted that the highest display refresh rate supported by the electronic device is an integer multiple of the second preset frequency, i.e., F1 = n * Fv - sf, where n is a positive integer, Fv - sf is the fourth preset frequency, and F1 is the highest refresh rate supported by the electronic device. Since the highest display refresh rate supported by the electronic device is an integer multiple of the fourth preset frequency, the layer synthesis trigger signal using the fourth preset frequency can be aligned with the hardware display trigger signal using the highest refresh rate of the electronic device.
[0303] S213. Before the second time step, execute the layer compositing process according to the adjusted layer compositing trigger signal.
[0304] Figure 22 This is a schematic diagram of a display parameter adjustment device provided in an embodiment of this application. Figure 22 As shown, the display parameter adjustment device provided in this embodiment may include: a receiving module 1101, a first determining module 1102, a second determining module 1103, an adjustment module 1104, and an execution module 1105, wherein:
[0305] The receiving module 1101 is used to receive operations input by the user through the touch screen.
[0306] The first determining module 1102 is used to determine whether the scene of the electronic device is a preset scene in response to the receiving operation.
[0307] The second determining module 1103 is used to determine whether the frequency of the display trigger signal at the current moment is the first preset frequency if it is a preset scene; the display trigger signal is used to trigger the image display processing flow.
[0308] The adjustment module 1104 is used to increase the frequency of the display trigger signal at the current moment to a second preset frequency if the frequency of the display trigger signal at the current moment is not a first preset frequency and the frequency of the display trigger signal at the current moment is less than the first preset frequency, so as to obtain a frequency-adjusted display trigger signal.
[0309] The execution module 1105 is used to determine whether the first time difference between the current time and the first time is greater than or equal to the first preset time difference threshold. The first time is the next trigger time indicated by the display trigger signal of the current time. The image display processing flow is executed according to the adjusted display trigger signal.
[0310] In one embodiment, the image display process includes a drawing and rendering process, and the display trigger signal includes an application drawing and rendering trigger signal; the application drawing and rendering trigger signal is used to trigger the drawing and rendering process.
[0311] The adjustment module 1104 is specifically used to increase the frequency of the application rendering trigger signal at the current moment to a second preset frequency, so as to obtain the adjusted application rendering trigger signal.
[0312] The execution module 1105 is specifically used to execute the drawing and rendering process according to the adjusted application drawing and rendering trigger signal.
[0313] In one embodiment, the first preset time difference threshold is the duration of one cycle of the application rendering trigger signal after frequency adjustment.
[0314] In one embodiment, the image display processing flow includes an image compositing process, and the display trigger signal further includes a layer compositing trigger signal; the layer compositing trigger signal is used to trigger the layer compositing process.
[0315] The adjustment module 1104 is specifically used to increase the frequency of the current layer synthesis trigger signal to a second preset frequency, so as to obtain the adjusted layer synthesis trigger signal.
[0316] The execution module 1105 is specifically used to execute the layer compositing process according to the adjusted layer compositing trigger signal.
[0317] In one embodiment, the first preset frequency is the highest display refresh rate supported by the electronic device.
[0318] In one embodiment, the second preset frequency is the highest display refresh rate supported by the electronic device.
[0319] In one embodiment, the second determining module 1103 is further configured to determine whether the frequency of the layer compositing trigger signal at the current moment is not a third preset frequency; the layer compositing trigger signal is used to trigger the layer compositing process.
[0320] The adjustment module 1104 is also used to increase the frequency of the layer synthesis trigger signal at the current moment to the fourth preset frequency if the frequency of the layer synthesis trigger signal at the current moment is not the third preset frequency and the frequency of the layer synthesis trigger signal at the current moment is less than the third preset frequency, so as to obtain the layer synthesis trigger signal with adjusted frequency.
[0321] The execution module 1105 is also used to determine whether the second time difference between the current time and the second time is greater than or equal to the second preset time difference threshold; the second time is the next trigger time indicated by the layer synthesis trigger signal of the current time; if the second time difference is greater than or equal to the second time difference threshold, the image synthesis process is executed before the second time according to the adjusted layer synthesis trigger signal.
[0322] In one embodiment, the second time difference threshold is the duration of one cycle of the adjusted layer synthesis trigger signal.
[0323] In one embodiment, if the second preset frequency is higher than the fourth preset frequency, the device for adjusting the display parameters further includes a deletion module 1106, wherein:
[0324] The deletion module 1106 is used to delete the data to be composited from front to back in the order in which the data to be composited is stored in the buffer queue when the number of data to be composited stored in the buffer queue exceeds the number of data that can be stored in the storage queue in the buffer queue, until the number of data to be composited stored in the buffer queue does not exceed the number of data in the storage queue in the buffer queue.
[0325] In one embodiment, the first preset frequency is the highest display refresh rate supported by the electronic device.
[0326] In one embodiment, the third preset frequency is the highest display refresh rate supported by the electronic device.
[0327] In one embodiment, the above operation is a sliding operation, and the first determining module 1102 is specifically used to determine whether the current scene of the electronic device is the preset scene in response to the received sliding operation; the preset scene includes list-type scenes.
[0328] In one embodiment, the above operation is a click operation, and the first determining module 1102 is specifically used to determine whether the scene of the electronic device is the preset scene in response to the received click operation; the preset scene is a scene in a pre-existing scene list.
[0329] The display parameter adjustment device provided in this embodiment is used to execute the display parameter adjustment method of the above embodiment. The technical principle and technical effect are similar, and will not be described again here.
[0330] This application provides an electronic device, the structure of which is described below. Figure 3 The electronic device's memory can be used to store at least one program instruction, and the processor is used to execute at least one program instruction to implement the technical solution of the above-described method embodiments. Its implementation principle and technical effects are similar to those of the related embodiments of the above-described method, and will not be repeated here.
[0331] This application provides a chip. The chip includes a processor, which is coupled to a memory and executes a computer program in the memory to perform the technical solutions described in the above embodiments. Its implementation principle and technical effects are similar to those of the related embodiments described above, and will not be repeated here.
[0332] This application provides a computer program product that, when run on an electronic device, causes the electronic device to execute the technical solutions described in the above embodiments. Its implementation principle and technical effects are similar to the related embodiments described above, and will not be repeated here.
[0333] This application provides a computer-readable storage medium storing program instructions. When executed by an electronic device, the program instructions cause the electronic device to perform the technical solutions of the above embodiments. Its implementation principle and technical effects are similar to the related embodiments described above, and will not be repeated here. In summary, the above embodiments are only used to illustrate the technical solutions of this application, and not to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A method for adjusting display parameters, characterized in that, Applied to an electronic device, the electronic device including a touchscreen, the method includes: Receive user input via the touchscreen; In response to receiving the operation, determine whether the scenario of the electronic device is a preset scenario; If it is the preset scenario, determine whether the frequency of the display trigger signal at the current moment is the first preset frequency; the display trigger signal is used to trigger the image display processing flow; If the frequency of the display trigger signal at the current moment is not the first preset frequency and the frequency of the display trigger signal at the current moment is less than the first preset frequency, the frequency of the display trigger signal at the current moment is increased to the second preset frequency to obtain a frequency-adjusted display trigger signal; Determine whether the first time difference between the current time and the first time is greater than or equal to a first preset time difference threshold, wherein the first time is the next trigger time indicated by the display trigger signal of the current time; If the first time difference is greater than or equal to the first preset time difference threshold, then the image display processing flow is executed according to the adjusted display trigger signal before the first moment.
2. The method according to claim 1, characterized in that, The image display processing flow includes a drawing and rendering flow, and the display trigger signal includes an application drawing and rendering trigger signal; the application drawing and rendering trigger signal is used to trigger the drawing and rendering flow. The step of increasing the frequency of the display trigger signal at the current moment to a second preset frequency to obtain a frequency-adjusted display trigger signal includes: Increase the frequency of the application rendering trigger signal at the current moment to the second preset frequency to obtain the adjusted application rendering trigger signal; Correspondingly, the process of executing the image display according to the adjusted display trigger signal includes: The drawing and rendering process is executed according to the adjusted application drawing and rendering trigger signal.
3. The method according to claim 2, characterized in that, The first preset time difference threshold is the duration of one cycle of the application rendering trigger signal after frequency adjustment.
4. The method according to any one of claims 1-3, characterized in that, The image display processing flow includes a layer compositing flow, and the display trigger signal further includes a layer compositing trigger signal; the layer compositing trigger signal is used to trigger the layer compositing flow. The step of increasing the frequency of the display trigger signal at the current moment to a second preset frequency to obtain a frequency-adjusted display trigger signal includes: Increase the frequency of the current layer compositing trigger signal to the second preset frequency to obtain the adjusted layer compositing trigger signal; Correspondingly, the process of executing the image display according to the adjusted display trigger signal includes: The layer compositing process is executed according to the adjusted layer compositing trigger signal.
5. The method according to any one of claims 1-3, characterized in that, The first preset frequency is the highest display refresh rate supported by the electronic device, and the second preset frequency is the highest display refresh rate supported by the electronic device.
6. The method according to any one of claims 1-3, characterized in that, The first preset frequency is the highest refresh rate of the preset scene, and the second preset frequency is the highest refresh rate of the preset scene.
7. The method according to any one of claims 1-3, characterized in that, The first preset frequency is the highest refresh rate of the preset scenario, but is not the highest display refresh rate supported by the electronic device. The second preset frequency is the highest display refresh rate supported by the electronic device.
8. The method according to any one of claims 1-3, characterized in that, The process of executing the image display according to the adjusted display trigger signal before the first moment includes: The image display processing flow is executed according to the adjusted display trigger signal during a first time period before the first moment; the first time period is the duration of at least one cycle of the first preset frequency, or the first time period is the duration of at least one cycle of the second preset frequency.
9. The method according to any one of claims 1-3, characterized in that, After executing the image display processing flow according to the adjusted display trigger signal before the first moment, the method further includes: After the first moment, the frequency of the display trigger signal is adjusted to the first preset frequency.
10. The method according to any one of claims 1-3, characterized in that, When the image display processing flow is a rendering flow, and the display trigger signal is an application rendering trigger signal, after executing the image display processing flow according to the adjusted display trigger signal, the method further includes: Determine whether the frequency of the layer compositing trigger signal at the current moment is a third preset frequency; the layer compositing trigger signal is used to trigger the layer compositing process; If the frequency of the layer synthesis trigger signal at the current moment is not the third preset frequency, and the frequency of the layer synthesis trigger signal at the current moment is less than the third preset frequency, the frequency of the layer synthesis trigger signal at the current moment is increased to the fourth preset frequency to obtain the adjusted layer synthesis trigger signal. Determine whether the second time difference between the current time and the second time is greater than or equal to a second preset time difference threshold; the second time is the next trigger time indicated by the layer synthesis trigger signal at the current time; If the second time difference is greater than or equal to the second preset time difference threshold, then the layer compositing process is executed before the second time point according to the adjusted layer compositing trigger signal.
11. The method according to claim 10, characterized in that, The second preset time difference threshold is the duration of one cycle of the adjusted layer synthesis trigger signal.
12. The method according to claim 10, characterized in that, If the second preset frequency is higher than the fourth preset frequency, the method further includes: When the number of layer data to be composited stored in the buffer queue exceeds the number of data that the storage queue in the buffer queue can store, the layer data to be composited is deleted sequentially from front to back according to the order in which the layer data to be composited is stored in the buffer queue, until the number of layer data to be composited stored in the buffer queue does not exceed the number of storage queues in the buffer queue.
13. The method according to claim 10, characterized in that, The first preset frequency is the highest display refresh rate supported by the electronic device.
14. The method according to claim 10, characterized in that, The third preset frequency is the highest display refresh rate supported by the electronic device.
15. The method according to any one of claims 1-3, characterized in that, The operation includes a swipe operation, and the step of determining whether the scene of the electronic device is a preset scene in response to receiving the operation includes: In response to a received swipe operation, determine whether the current scene of the electronic device is the preset scene; the preset scene includes list-type scenes.
16. The method according to any one of claims 1-3, characterized in that, The operation includes a click operation, and the response to receiving the operation, determining whether the scene of the electronic device is a preset scene, includes: In response to a received click operation, determine whether the scene of the electronic device is the preset scene; the preset scene is a scene that exists in a pre-existing scene list.
17. The method according to any one of claims 1-3, characterized in that, The electronic device includes an application module, a window management module, a scene recognition module, and a frame rate control module; The application module receives operations input via the touchscreen and, in response to the operations, sends window data to the window management module. The window management module sends the acquired window data to the scene recognition module; The scene recognition module obtains a preset scene information list and compares the received window data with the preset scene information list to determine the scene of the electronic device; The scene recognition module sends a notification message to the frame rate control module, and the notification message carries an identifier corresponding to the scene of the electronic device; The frame rate control module compares the scene indicated by the notification message with a pre-stored scene list. When the scene indicated by the notification message is in the pre-stored scene list, the scene indicated by the notification message is determined to be a preset scene. The frame rate control module determines whether the frequency of the display trigger signal at the current moment is a first preset frequency, and if the frequency of the display trigger signal at the current moment is not the first preset frequency and the frequency of the display trigger signal at the current moment is less than the first preset frequency, the frequency of the display trigger signal at the current moment is increased to a second preset frequency to obtain a frequency-adjusted display trigger signal. The frame rate control module determines whether the first time difference between the current time and the first time is greater than or equal to a first preset time difference threshold, and if the first time difference is greater than or equal to the first preset time difference threshold, sends the adjusted display trigger signal before the first time.
18. The method according to claim 17, characterized in that, The electronic device further includes an application rendering module; the display trigger signal includes an application rendering trigger signal. The frame rate control module sends an adjusted application rendering trigger signal to the application rendering module before the first moment. When the application rendering module receives the application rendering trigger signal, it executes the rendering process.
19. The method according to claim 18, characterized in that, The frame rate control module sends the adjusted application rendering trigger signal to the application rendering module at the adjusted frequency before the first moment.
20. The method according to claim 17, characterized in that, The electronic device further includes a layer composition module, and the display trigger signal further includes a layer composition trigger signal; The frame rate control module sends an adjusted layer compositing trigger signal to the layer compositing module before the first moment. When the layer compositing module receives a layer compositing trigger signal, it executes the layer compositing process.
21. The method according to claim 20, characterized in that, The frame rate control module sends the adjusted layer compositing trigger signal to the layer compositing module at the adjusted frequency before the first moment.
22. An electronic device, characterized in that, The electronic device includes a processor configured to be coupled to a memory, and to read instructions from the memory and, according to the instructions, cause the electronic device to perform the method as described in any one of claims 1 to 21.
23. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed on an electronic device, cause the electronic device to perform the method as described in any one of claims 1 to 21.
24. A chip, characterized in that, The chip includes a processor for coupling with a memory and executing a computer program in the memory to perform the method as described in any one of claims 1 to 21.
Citation Information
Patent Citations
Display frequency adjusting method and device, driving circuit and display device
CN110728964A
Image update method and apparatus, and terminal and storage medium
WO2020207251A1