Display method, electronic equipment and computer readable storage medium

By sending input events directly to the application in electronic devices, the delay feedback problem is solved, and the chirality and user experience of electronic devices are improved, especially in gaming applications, ensuring faster response and lower power consumption .

CN119248217AActive Publication Date: 2025-01-03HONOR DEVICE CO LTD
View PDF 14 Cites 0 Cited by

Patent Information

Application Number
CN202410307355.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-15
Publication Date
2025-01-03
Estimated Expiration
2044-03-15

AI Technical Summary

Technical Problem

When electronic devices handle user operations, the delayed feedback time is too long, which affects the user experience, especially in game applications, resulting in poor chirality.

Method used

Electronic devices can directly send input events generated based on user operations to the application without waiting for vertical synchronization signals, especially for game applications, avoiding the application at the rendering time but the input events are not processed, thereby improving follow-up. sex.

Benefits of technology

By processing input events early, electronic devices can respond faster to user operations, improve user experience, and reduce power consumption, ensuring stable frame rates and screen displays for gaming and non-game applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119248217A_ABST
    Figure CN119248217A_ABST
Patent Text Reader

Abstract

The invention provides a display method, electronic equipment and a computer readable storage medium. In the method, the electronic device can generate the input event based on the operation of the user on the touch screen and then send the input event to the application program without waiting for the synchronization of the vertical synchronization signal. In this way, the electronic device may reduce the latency from the generation of the input event by the input management service to the reception of the input event by the application. According to the embodiment of the invention, the application program can process the input event more quickly to generate the rendering frame, so that the electronic equipment can display the rendering frame on the touch screen more quickly, and the chirality of the electronic equipment is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terminal technology, and in particular to a display method, an electronic device, and a computer-readable storage medium. Background Art

[0002] The electronic device can receive user operations on the touch screen, and in response to the user operations, the electronic device can change the content displayed on the touch screen to give feedback to the user operations. Sometimes, it takes too long for the electronic device to change the displayed content, and the electronic device does not give feedback on the user interface until a long time after the user completes the operation, which affects the user experience. Summary of the invention

[0003] The present application provides a display method, an electronic device, and a computer-readable storage medium. After an electronic device generates an input event based on a user operation, the input event can be directly sent to an application without waiting for a vertical synchronization signal. In this method, the application does not need to wait for a long time for the input event to arrive, but can process the input event as early as possible, which effectively avoids the situation where the application reaches the rendering time but the input event has not been processed, thereby improving the hand tracking performance of the electronic device under the application.

[0004] In a first aspect, the present application provides a display method, which is applied to an electronic device, wherein the electronic device is installed with a first application and a second application, wherein the first application is a game application and the second application is a non-game application, and the method includes: receiving a first operation acting on the first application, and generating a first event based on the first operation; in response to generating the first event, providing the first event to the first application; generating a first layer based on the first event through the first application; displaying a first user interface based on the first layer; receiving a second operation acting on the second application, and generating a second event based on the second operation; in response to a vertical synchronization VSync-app signal, providing a second event to the second application; generating a second layer based on the second event through the second application; and displaying a second user interface based on the second layer.

[0005] The first event and the second event are input events generated based on user operations, and the electronic device can determine how to handle the input event based on the type of application. When the application is a game application, the electronic device can directly provide the input event to the game application after it is generated, and when the application is a non-game application, the electronic device can wait for the VSync-app signal to arrive before providing the input event to the application.

[0006] In combination with the first aspect, in some embodiments, the first application may include a logic thread and a rendering thread, the logic thread is used to generate first rendering data based on the first event, and the rendering thread is used to generate a first layer based on the first rendering data.

[0007] In conjunction with the first aspect, in some embodiments, the electronic device may include a touch screen manager and an input management service, the touch screen manager is used to determine that the first application is an application that does not rely on the VSync-app signal, and the input management service is used to provide the first event to the first application in response to generating the first event. The touch screen manager is also used to determine that the second application is an application that relies on the VSync-app signal, and the input management service is also used to provide the second event to the second application in response to the vertical synchronization VSync-app signal.

[0008] It is understandable that non-gaming applications often need to rely on VSync-app signals to trigger drawing, rendering and generating rendering frames, so electronic devices need to wait for VSync-app signals for synchronization when providing input events to non-gaming applications. For game applications, the timing of generating rendering frames is controlled by their own engines. At this time, it is unnecessary for electronic devices to wait for the arrival of VSync-app signals before sending input events to game applications. Electronic devices can provide the generated input events directly to game applications without waiting for VSync-app signals. In this way, game applications can process input events as early as possible, and are more able to complete the processing of input events when they reach the rendering timing, so that they can generate rendering frames based on the latest input events, thereby improving hand tracking.

[0009] In combination with the first aspect, in some embodiments, the first event is generated between a first VSync-app signal and a second VSync-app signal and provided to the first application, where the first VSync-app signal and the second VSync-app signal are two adjacent vertical synchronization signals.

[0010] It is understandable that since the electronic device does not wait for the arrival of the VSync-app signal when providing input events to the game application, the timing of sending the first event to the first application after it is generated between two adjacent VSync-app signals is also between the two adjacent VSync-app signals.

[0011] In combination with the first aspect, in some embodiments, before providing the first event to the first application, the method further includes: stopping sending the VSync-app signal; before providing the second event to the second application, the method further includes: resending the VSync-app signal.

[0012] In combination with the first aspect, in some embodiments, the first user interface does not include a layer of a non-game application.

[0013] The electronic device will traverse the layers contained in the first user interface. When the first user interface does not contain the layers of non-game applications, the electronic device can directly stop sending VSync-app signals, which can reduce power consumption. When the electronic device determines that the second user interface contains the layers of non-game applications, since non-game applications need to rely on VSync-app signals to trigger drawing, rendering and other processes, the electronic device needs to re-enable the sending of VSync-app signals so that non-game applications can stably output rendering frames. Among them, the first user interface does not contain the layers of non-game applications, which means that the first user interface displayed on the touch screen of the electronic device only contains the user interface of the game application; in contrast, the second user interface contains both the layers of the game application and the layers of the non-game application, which means that the second user interface displayed on the touch screen contains the user interfaces of the game application and the non-game application, wherein the user interface of the game application and the user interface of the non-game application can be displayed in two split-screen user interfaces, or one user interface is displayed globally and the other user interface is displayed on the touch screen at the same time in a window display or the like.

[0014] In combination with the first aspect, in some embodiments, the second user interface further includes a third layer of the first application, wherein the frame rate of the first application is a first frame rate, the frame rate of the second application is a second frame rate, and the first frame rate is greater than the second frame rate.

[0015] by Figure 8 Taking the illustrated embodiment as an example, the frame rate of the gaming application is twice that of the non-gaming application, wherein the gaming application is controlled by its own engine to output rendered frames, while the non-gaming application mainly relies on the VSync-app signal to output rendered frames. The second user interface may be image 1, the third layer may be layer 1, and the second layer may be layer 1'. When the electronic device determines that the second user interface includes layers of non-gaming applications in addition to the layers of gaming applications, the electronic device may control the frame rate of the non-gaming application by controlling the frequency of the VSync-app, so that the frame rate of the non-gaming application is lower than the frame rate of the gaming application. Among them, the electronic device may include a surface synthesizer, which may be used to determine the layers (including the second layer and the third layer) included in the second user interface and adjust the sending frequency of the VSync-app signal to the second frame rate.

[0016] When a game application outputs rendered frames at a higher frame rate, the load on the electronic device is higher, while non-game applications do not need to refresh the display screen according to the high frame rate of the game application. The electronic device can control the frequency of VSync-app to make non-game applications output rendered frames at a lower frame rate, which can ensure that users can use games and non-game applications normally at the same time, and can also reduce the power consumption of the electronic device.

[0017] In combination with the first aspect, in some embodiments, before generating the first event according to the first operation, the method further includes: determining that the sampling rate of the touch screen is a multiple of the refresh rate, and determining that the first application is in the first list.

[0018] Optionally, before generating the first event according to the first operation, the method further includes: determining that the sampling rate of the touch screen is a multiple of the refresh rate, or determining that the first application is in the first list.

[0019] In combination with the first aspect, in some embodiments, before generating the second event according to the second operation, the method further includes: determining that the sampling rate of the touch screen is not a multiple of the refresh rate, and / or determining that the second application is not in the first list.

[0020] Among them, the electronic device can store the identifiers of one or more applications in the first list. Among them, the identifiers of applications that do not rely on the VSync-app signal may be stored in the first list. Not relying on the VSync-app signal here means that the application does not need to rely on VSync-app for synchronization when drawing, rendering, and generating rendering frames. The electronic device can ensure this type of application even if it does not wait for the VSync-app signal when sending input events to this type of application. Therefore, the electronic device can first determine whether the identifier of the application is in the first list, and then determine whether the application needs to rely on the VSync-app signal. Optionally, the identifier of the above application may be the package name of the application.

[0021] When the sampling rate of the touch screen is a multiple of the refresh rate, the number of input events generated by the electronic device between each two adjacent image frames is consistent, that is, the timing of input event generation is more uniform. At this time, the application generates a rendering frame based on the same number of input events each time, and even if the electronic device does not wait for the VSync-app signal when providing input events to the application, the application can output a stable rendering frame. If the sampling rate of the touch screen is not a multiple of the refresh rate, the number of input events generated by the electronic device between each two adjacent image frames may be inconsistent. For example, the electronic device generates 2 input events in one VSync-app cycle and 1 input event in its next VSync-app cycle. In this way, the application generates a rendering frame based on a different number of input events each time. If the synchronization of the VSync-app signal is not waited, the number of input events used by the application to generate each rendering frame is difficult to control, which is more likely to cause uneven display of the screen. Therefore, before determining that the electronic device does not need to wait for the VSync-app signal to send input events to the application, it can first determine whether the sampling rate of the touch screen is a multiple of the refresh rate, so that the application can output a stable rendering frame.

[0022] The electronic device can provide input events to the application without relying on the VSync-app signal only when the sampling rate of the touch screen is a multiple of the refresh rate and / or the identifier of the application is in the first list. In this way, the electronic device can ensure that the application can still output stable rendering frames without relying on the VSync-app signal to provide input events to the application, thereby ensuring that the user interface can be displayed stably and the user's viewing experience is guaranteed.

[0023] In a second aspect, the present application provides a display method, which is applied to an electronic device, wherein the electronic device has a first application installed therein, the method comprising: receiving a first operation acting on the first application, and generating a first event based on the first operation; in response to generating the first event, providing the first event to the first application; generating a first layer based on the first event through the first application; and displaying a first user interface based on the first layer.

[0024] In combination with the second aspect, in some embodiments, the first event is generated between a first VSync-app signal and a second VSync-app signal and provided to the first application, and the first VSync-app signal and the second VSync-app signal are two adjacent vertical synchronization signals.

[0025] In combination with the second aspect, in some embodiments, only the first layer is included in the first user interface, and the method further includes: stopping sending the VSync-app signal.

[0026] In combination with the second aspect, in some embodiments, before generating the first event according to the first operation, the method further includes: determining that the sampling rate of the touch screen is a multiple of the refresh rate, and determining that the first application is in the first list.

[0027] In combination with the second aspect, in some embodiments, the electronic device is also installed with a second application, and the method also includes: receiving a second operation acting on the second application, and generating a second event based on the second operation; providing a second event to the second application in response to a vertical synchronization VSync-app signal; generating a second layer based on the second event through the second application; and displaying a second user interface based on the second layer.

[0028] In combination with the second aspect, in some embodiments, before providing the second event to the second application, the method further includes: resending the VSync-app signal.

[0029] In combination with the second aspect, in some embodiments, the second user interface further includes a third layer of the first application, wherein the frame rate of the first application is a first frame rate, the frame rate of the second application is a second frame rate, and the first frame rate is greater than the second frame rate.

[0030] In combination with the second aspect, in some embodiments, the electronic device includes a surface synthesizer, and the surface synthesizer is used to determine that the second user interface includes a second layer and a third layer; the surface synthesizer is also used to adjust the sending frequency of the VSync-app signal to a second frame rate.

[0031] In combination with the second aspect, in some embodiments, before generating the second event according to the second operation, the method further includes: determining that the sampling rate of the touch screen is not a multiple of the refresh rate, and / or determining that the second application is not in the first list.

[0032] In combination with the second aspect, in some embodiments, the electronic device includes a touch screen manager and an input management service, the touch screen manager is used to determine that the first application is an application that does not rely on the VSync-app signal, and the input management service is used to provide a first event to the first application in response to generating a first event.

[0033] In conjunction with the second aspect, in some embodiments, the input management service is further used to determine that the second application is an application that relies on a VSync-app signal, and to provide a second event to the second application in response to the vertical synchronization VSync-app signal.

[0034] In combination with the second aspect, in some embodiments, the first application includes a logic thread and a rendering thread, the logic thread is used to generate first rendering data based on the first event, and the rendering thread is used to generate a first layer based on the first rendering data.

[0035] In conjunction with the second aspect, in some embodiments, the first application is a game application.

[0036] In conjunction with the second aspect, in some embodiments, the second application is a non-game application.

[0037] In a third aspect, the present application provides an electronic device, comprising a touch screen, a memory, and a processor coupled to the memory; the touch screen is used to receive user operations and display an interface, the memory stores a computer program, and when the processor executes the above-mentioned computer program, the electronic device implements the method described in any one of the above-mentioned first aspect or second aspect.

[0038] In a fourth aspect, the present application provides a computer-readable storage medium, which stores a computer program or computer instructions, and the aforementioned computer program or computer instructions are executed by a processor to implement the method described in any one of the first or second aspects above.

[0039] In a fifth aspect, an embodiment of the present application provides a computer program product. When the computer program product is executed by a processor, the method described in any one of the first aspect or the second aspect above will be implemented.

[0040] In a sixth aspect, an embodiment of the present application provides a chip, comprising a processor and a memory, wherein the memory is used to store computer programs or computer instructions, and the processor is used to execute the computer programs or computer instructions stored in the memory, so that the chip executes the method described in any one of the first aspect or the second aspect above.

[0041] The solutions provided in the third to sixth aspects are used to implement or cooperate with the corresponding methods provided in the first or second aspects, and therefore can achieve the same or corresponding beneficial effects as the corresponding methods in the first or second aspects, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 is a schematic diagram of the structure of an electronic device 100 provided in an embodiment of the present application;

[0043] Figure 2 is a software structure block diagram of the electronic device provided in the embodiment of the present application;

[0044] Figure 3A-3B It is a user interface of some electronic devices in a game scenario provided by the embodiments of the present application;

[0045] Figure 4 It is a schematic diagram of a process of displaying a game screen by an electronic device provided in an embodiment of the present application;

[0046] Figure 5 It is a schematic diagram of a process of displaying a game screen by another electronic device provided in an embodiment of the present application;

[0047] Figure 6 This is a flow chart of an electronic device controlling a VSync-app signal to be turned on or off provided by an embodiment of the present application;

[0048] Figure 7A-7B It is a user interface displayed by some electronic devices provided in the embodiments of the present application;

[0049] Figure 8 It is a flowchart of an electronic device provided by an embodiment of the present application displaying a user interface at different frame rates in multiple windows;

[0050] Fig. 9 is a flow chart of a display method provided by an embodiment of the present application;

[0051] Fig.10 is a structural schematic diagram of a display device provided in an embodiment of the present application;

[0052] Fig.11 A schematic diagram of the structure of a chip provided in an embodiment of the present application. DETAILED DESCRIPTION

[0053] The terms used in the following embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to be used as limitations to the present application. As used in the specification and appended claims of the present application, the singular expressions "one", "a kind of", "said", "above", "the" and "this" are intended to also include plural expressions, unless there is a clear indication to the contrary in the context. It should also be understood that the term "and / or" used in the present application refers to and includes any or all possible combinations of one or more listed items.

[0054] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.

[0055] Here, the hardware structure of the electronic device 100 provided in the embodiment of the present application is first introduced.

[0056] Figure 1 It is a schematic diagram of the structure of the electronic device 100 provided in an embodiment of the present application.

[0057] The following is a detailed description of the embodiment using the electronic device 100 as an example. It should be understood that the electronic device 100 may have more than Figure 1 More or fewer components may be shown, two or more components may be combined, or there may be a different configuration of components. Figure 1 The various components shown in the EMBODIMENTS 2000 may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application specific integrated circuits.

[0058] The electronic device 100 may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a camera 193, a display screen 194, etc. The sensor module 180 may include a pressure sensor 180A, a touch sensor 180B, etc.

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

[0060] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

[0061] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0062] The charging management module 140 is used to receive charging input from a charger, where the charger can be a wireless charger or a wired charger.

[0063] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to power the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, etc.

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

[0065] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.

[0066] The camera 193 is used to capture still images or videos. The electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.

[0067] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0068] The video codec is used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 may play or record videos in multiple coding formats.

[0069] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.

[0070] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.

[0071] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. The program storage area may store an operating system, applications required for at least one function (such as face recognition function, fingerprint recognition function, mobile payment function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as face information template data, fingerprint information template, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0072] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0073] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.

[0074] The speaker 170A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or listen to a hands-free call through the speaker 170A.

[0075] The receiver 170B, also called a "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or voice message, the voice can be received by placing the receiver 170B close to the human ear.

[0076] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals.

[0077] The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be set on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. A capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure based on the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic device 100 can also calculate the position of the touch based on the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions.

[0078] The touch sensor 180B is also called a "touch panel". The touch sensor 180B can be arranged on the display screen 194, and the touch sensor 180B and the display screen 194 form a touch screen, also called a touch screen. The touch sensor 180B is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180B can also be arranged on the surface of the electronic device 100, which is different from the position of the display screen 194.

[0079] The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes the Android system of the layered architecture as an example to exemplify the software structure of the electronic device.

[0080] Figure 2 It is a software structure block diagram of the electronic device provided in the embodiment of the present application.

[0081] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: application layer, application framework layer, native library and kernel layer.

[0082] The application layer can include a series of application packages. Figure 2 As shown, the application layer may include applications such as games and instant messaging.

[0083] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions. The application framework layer may include game scene optimization services, input management services, and so on.

[0084] The game scene optimization service is used to schedule the system resources of electronic devices to optimize the gaming experience.

[0085] The input management service can perform resampling and other processing on the touch events generated by the touch driver, and then distribute the processed input events to the application, so that the application can process the input events based on its own logic to generate a new user interface. In some embodiments, the input management service can receive control information from the touch screen manager, and then determine whether to wait for a vertical synchronization signal when sending an input event to the application based on the control information. For an introduction to the vertical synchronization signal, please refer to the subsequent embodiments, which will not be expanded here.

[0086] The local library may include multiple functional modules, such as graphics processing library, surface synthesizer (surfaceflinger), touch screen manager, etc.

[0087] The graphics processing library is used to implement graphics drawing, image rendering, synthesis, and layer processing.

[0088] The surface synthesizer is used to provide a fusion of two-dimensional (2-Dimensional, 2D) and three-dimensional (3-Dimensional, 3D) layers for multiple applications, thereby generating a user interface to be displayed. The user interface of an application can be called a layer. The user interface to be displayed in the touch screen may include the user interfaces of multiple applications. The surface synthesizer synthesizes the layers, that is, synthesizes the user interfaces of different applications into the same user interface according to certain rules, so as to facilitate subsequent display on the touch screen. In some embodiments, the surface synthesizer can control the opening or closing of the vertical synchronization signal based on the type and number of layers contained in the user interface to be displayed. For the introduction of the vertical synchronization signal, please refer to the subsequent embodiments, which will not be expanded here.

[0089] The touch screen manager can be used to obtain or adjust touch screen parameters and control the touch screen display. In some embodiments, the touch screen manager can determine whether the application needs to rely on a vertical synchronization signal to generate a rendering frame based on the application's identification. For an introduction to the vertical synchronization signal, please refer to the subsequent embodiments and will not be expanded here.

[0090] The kernel layer is the layer between hardware and software. The kernel layer includes at least GPU driver, touch driver, display driver, etc. The kernel layer is used to receive instructions from the software layer to control the hardware of the hardware layer to perform corresponding tasks.

[0091] The GPU driver may be used to drive the GPU to further render the image drawn by the application program, and generate a user interface of the application program (ie, a layer of the application program).

[0092] The touch driver can receive the user's operation on the touch screen and process the touch operation into a touch event (including touch coordinates, timestamp of the touch operation and other information).

[0093] The display driver is used to push the user interface to be displayed to the frame buffer (FB) for storage. The frame buffer is a storage space in the electronic device 100, which can be located in the video memory or the internal memory. The content of the frame buffer corresponds to the interface display on the touch screen, which can be simply understood as the cache corresponding to the content displayed on the touch screen. In other words, modifying the content in the frame buffer is to modify the picture displayed on the touch screen, and then the touch screen can display the user interface to be displayed. The touch screen is composed of a touch sensor 180B and a display screen 194.

[0094] Understandably, Figure 2 The illustrated software architecture does not constitute a specific limitation on the electronic device. Figure 2 More or fewer modules are shown, or some modules are combined, or some modules are split, etc.

[0095] Electronic devices usually change part or all of the content of the user interface based on user operations to achieve human-computer interaction. The shorter the delay time between the electronic device receiving the user operation and changing the displayed content, the stronger the chirality of the electronic device can be said to be. When the chirality of the electronic device is poor, the electronic device will not give feedback on the user interface until a long time after the user completes the operation, which greatly affects the user experience in some scenarios where the chirality of the electronic device is required to be high.

[0096] Here we introduce electronic devices and scenarios with poor chirality.

[0097] Figure 3A-3B This is a user interface of some electronic devices in a gaming scenario provided by an embodiment of the present application.

[0098] like Figure 3AAs shown, the electronic device 100 may display a game interface 301, which may include a wheel control 302 and a character map 303, wherein the wheel control 302 is used to control the movement of the character map 303. At time t1, the electronic device 100 may receive an operation in which the user presses the wheel control 302 to slide rightward for a time A and then releases it. At time t2, in response to the above operation, the electronic device 100 controls the character map 303 to move rightward at a preset speed for a time A to a position such as Figure 3B When the difference between time t1 and time t2 is large, the user will feel that the character map 303 cannot be moved in time according to the user's operation, that is, the hand tracking performance of the electronic device is poor.

[0099] In order to solve this problem, the embodiments of the present application provide a display method, an electronic device, and a computer-readable storage medium. In this method, after receiving the user's operation on the touch screen, the electronic device can directly send the input event generated based on the user's operation to the application without waiting for the vertical synchronization signal. In this way, the application can obtain the input event more quickly and then generate a rendering frame based on the input event, and the electronic device can also display the rendering frame on the touch screen more quickly to provide feedback on the user's operation, thereby improving the hand tracking performance of the electronic device.

[0100] Among them, the game scene is a scene that has high requirements for the hand-tracking of electronic devices. When playing games, users usually need the electronic device to give feedback on the touch screen in a timely manner according to their operations. For the convenience of description and better understanding, the subsequent embodiments of this application take the game scene as an example to introduce the display method provided by this application. Not limited to the game scene, the display method can also be applied to other scenes. This application does not limit the application scene of the above display method in electronic devices.

[0101] When electronic devices display user interfaces, they usually need to coordinate with vertical synchronization (VSync) signals. VSync signals may include VSync-app signals, VSync-sf signals, and HW-VSync signals. The VSync-app signal is used to trigger the input management service to send input events to the application and to notify the application to start drawing and generating a new frame of image. The VSync-sf signal is used to trigger the surface synthesizer to synthesize the user interface to be displayed based on the layers of one or more applications. The HW-VSync signal is used to trigger the display driver to display the user interface to be displayed. The VSync-app signal and the VSync-sf signal may be sent by the electronic device at preset time intervals.

[0102] The following describes in detail the process of displaying a user interface on an electronic device.

[0103] When the touch sensor receives a touch operation, the corresponding hardware interrupt is sent to the kernel layer. The touch driver in the kernel layer sends the original input event to the input management service. The input management service performs resampling and other processing on the original input event, and then sends the processed input event to the game application when the VSync-app signal arrives.

[0104] After receiving the input event, the game application can perform logical updates on the game application based on the input event, which may include updating the physical information in the game application (such as speed, position, collision processing), object state changes, etc. (for example, Figure 3A The position coordinates of the character map 303 after movement are shown). Then the game application can draw and render the user interface to be displayed based on the result of the above-mentioned logic update (hereinafter referred to as rendering data) to generate a rendering frame. Among them, the threads that perform logic updates and generate rendering frames in the game application can be independent of each other. The thread responsible for logic updates is called a logic thread, and the thread responsible for generating rendering frames is called a rendering thread. In addition, the game application does not need to rely on the VSync-app signal to trigger the drawing and rendering of the layer, but the game engine controls the frequency of the rendering thread generating rendering frames (while most non-game applications need to wait for VSync-app to start drawing and rendering a frame of layer). Although the game application does not generate rendering frames in response to the VSync-app signal, the time interval between any two adjacent rendering frames generated by the game application is consistent. Among them, the time interval between the game application generating two adjacent rendering frames can be equal to the time interval between the touch screen refreshing two adjacent frames of the user interface, that is, the frequency of the game application generating rendering frames can be consistent with the refresh rate of the touch screen, so that each rendering frame generated by the game application can be finally displayed. Optionally, the electronic device may include a synchronization signal for triggering the game application to generate a rendering frame, and the timing of sending the synchronization signal each time may be different from the timing of sending the VSync-app signal. After the game application receives the input event, the logic thread is responsible for the logic update first, and then sends the result of the logic update to the rendering thread for drawing, rendering, etc. A rendering frame generated by the application is also a layer of the application. After the application generates the layer, it can send the layer to the surface synthesizer.

[0105] After receiving the VSync-sf signal, the surface synthesizer can synthesize the layers of different applications into the same screen to obtain the user interface to be displayed on the touch screen, that is, the user interface to be displayed (or the image to be displayed). After Surfaceflinger generates the user image to be displayed, it can send the image to be displayed to the display driver.

[0106] The display driver can send the image to be displayed after receiving the HW-VSync, and then the touch screen can display the image to be displayed.

[0107] by Figure 3A-3B Taking the embodiment shown as an example, after the electronic device receives the user's operation of pressing the wheel control 302 and sliding it to the right, the input management service will generate a press and right slide input event based on the above operation. Then, the input management event will send the generated input event to the game application after receiving the VSync-app signal. The game application can perform logic updates based on the above press and right slide input events. For example, the game application determines that after the above operation, the character map 303 should be changed from Figure 3A Move the position shown to Figure 3B The game application then completes the rendering of a frame of the user interface, which is referred to as a rendering frame. The character texture 303 in the rendering frame is located at Figure 3B Then the game application can send the generated rendering frame to the surfaceflinger. After receiving the VSync-sf signal, the surfaceflinger synthesizes the layers to generate a frame to be displayed. After receiving the HW-VSync signal, the display driver sends the frame to be displayed. Finally, the touch screen displays the frame to be displayed. Figure 3B The user interface shown.

[0108] Among them, the time interval between two adjacent VSync-app signals sent by the electronic device, the time interval between two adjacent VSync-sf signals sent by it, and the time interval between two adjacent HW-VSync signals sent by it may be the same or different. In addition, the timing of each time when the electronic device sends a VSync-app signal, a VSync-sf signal, and a HW-VSync signal may be the same or different. In some embodiments, the timing of the electronic device sending a VSync-app signal, a VSync-sf signal, and a HW-VSync signal may be offset, and the embodiments of the present application are not limited to this. For ease of description and better understanding, the subsequent embodiments of the present application introduce the display method provided by the embodiments of the present application with the time when the electronic device sends a VSync-app signal, a VSync-sf signal, and a HW-VSync signal each time being consistent. The display method when the electronic device sends a VSync-app signal, a VSync-sf signal, and a HW-VSync signal in other ways can refer to the method in which the electronic device sends a VSync-app signal, a VSync-sf signal, and a HW-VSync signal at the same time each time, and the embodiments of the present application will not be repeated.

[0109] Here we introduce the scenario of electronic devices displaying game screens.

[0110] Figure 4 It is a flowchart of an electronic device displaying a game screen according to an embodiment of the present application.

[0111] like Figure 4 As shown, the electronic device sends the first VSync-app signal ( Figure 4 The input management service generates input event 1 ( Figure 4 denoted by event 1).

[0112] After the electronic device sends the second VSync-app signal, the input management service can send input event 1 to the game application in response to the VSync-app signal. The logic thread of the game application can generate rendering data 1 based on event 1, and then the rendering thread obtains the rendering data 1 of the logic thread and generates layer 1 based on the rendering data 1. Between the second VSync-app signal and the third VSync-app signal, the input management service also generates input event 2.

[0113] In response to the third VSync-app signal, the input management service may send input event 2 to the game application. The logic thread of the game application may process input event 2 and generate rendering data 2. The rendering thread then generates layer 2 based on rendering data 2. The surface compositor may respond to the VSync-sf signal ( Figure 4 (not shown) composites image 1 based on layer 1. Between the third VSync-app signal and the fourth VSync-app signal, the input management service also generates input event 3.

[0114] In response to the fourth VSync-app signal, the input management service can send input event 3 to the game application. The method for the game application to process input event 3 can refer to the above-mentioned method for processing input event 1 and input event 2, which will not be repeated here. The surface compositor can respond to the VSync-sf signal ( Figure 4 The display driver can synthesize image 2 based on layer 2 based on the HW-VSync signal ( Figure 4 (not shown) the synthesized image 1 is sent for display, and then the touch screen displays the image 1.

[0115] It should be noted that the game application will generate rendering frames based on its own logic even if it does not receive any input events. Figure 4 Only the process of displaying the user interface of the electronic device after the user operation causes the user interface of the game application to be redrawn is shown. Figure 4The frequency of input events generated by the input management service is only an example. The input management service can generate more than 1000 VSync events between each two adjacent VSync-apps. Figure 4 More or fewer input events are shown, and the number of input events generated in two adjacent VSync-app cycles may be the same or different, which is not limited in the embodiments of the present application.

[0116] Since the generation of rendering data by the logic thread and the generation of rendering frames by the rendering thread in the game application are independent of each other, the rendering thread will not wait for the logic thread to process the input event before rendering, but will render based on its preset cycle. When the logic thread cannot process the input event before the rendering thread starts to generate the rendering frame of the current cycle, the rendering thread can only synchronize the above input event in the next frame layer, which will lead to the problem of poor hand tracking of electronic devices.

[0117] by Figure 4 For example, if the logic thread of the game application is still in the process of generating rendering data 1, and the rendering thread has reached the time to start generating a new rendering frame, the rendering thread cannot generate layer 1 based on the latest rendering data (i.e., rendering data 1), so layer 1 cannot feedback the screen changes caused by input event 1. In this case, the rendering thread can only process rendering data 1 when generating subsequent rendering frames (layer 2), so the user interface displayed by the electronic device cannot make timely feedback based on user operations, which means that the electronic device has poor hand tracking.

[0118] For most non-gaming applications, they need to rely on VSync-app signals to trigger drawing and rendering to generate rendering frames. Therefore, the input management service needs to wait for the VSync-app signal for synchronization when sending input events to the application. For gaming applications, such applications do not rely on the VSync-app signal to trigger the generation of rendering frames. At this time, it is unnecessary for the input management service to wait for the VSync-app signal to arrive before sending input events to the gaming application. In order to improve the hand tracking performance of electronic devices, electronic devices can reduce the delay between the input management service generating input events and the gaming application receiving input events. The earlier the gaming application receives the input event, the sooner the game application's logic thread can process the input event, so that the rendering thread can receive the rendering data earlier and generate rendering frames based on the rendering data.

[0119] In some embodiments, the input management service in the electronic device can send the input event to the gaming application immediately after the input event is generated without having to wait for the VSync-app signal.

[0120] Figure 5 It is a flowchart of another electronic device displaying a game screen provided in an embodiment of the present application.

[0121] like Figure 5 As shown, after the input management service generates an input event, it no longer waits for the VSync-app signal, but sends it directly to the game application. Between VSync-app1 and VSync-2, the input management service generates input event 1. After the input management service generates input event 1, it sends it to the game application immediately without waiting for the arrival of VSync-app2. In this way, the game application can receive input events faster, and then the logic thread can generate rendering data 1 based on input event 1. The rendering thread can receive rendering data faster, and then generate layer 1 based on the rendering data. After receiving layer 1, the surface synthesizer can synthesize the image 1 to be displayed (including layer 1 generated by the game application) after receiving the next VSync-sf signal, and then the display driver sends the frame to be displayed, and the touch screen finally displays it.

[0122] Similarly, after the input management service generates other input events, they can also be directly sent to the game application. The method for the electronic device to process other input events can refer to the method for processing input event 1 above, which will not be repeated here.

[0123] It should be noted that Figure 5 This is just one of the cases where a game application generates a rendered frame. The game application may generate a rendered frame based on input events in each VSync-app cycle earlier than Figure 5 The timing shown may also be later than Figure 5 The timing shown is not limited in the embodiments of the present application.

[0124] It can be seen that since the input management event no longer needs to wait for the VSync-app signal when sending the input event, the game application can receive the input event earlier, thus reducing the delay of the input event from the input management service to the game application, thereby avoiding the inability of the rendering thread to generate rendering frames based on new input events due to the inability of the logical thread to process the input event in time. Under this method, the logical thread of the game application can process the input event earlier, and then hand it over to the rendering thread to generate rendering frames. The image frame corresponding to each input event can be displayed on the touch screen more quickly. In this way, the user can see the feedback made by the electronic device based on the user's operation on the touch screen more quickly, thereby improving the user's gaming experience.

[0125] For gaming applications, they can generate rendering frames at a certain frequency based on their own engines, so even if the gaming application does not rely on the VSync-app signal, it can still output rendering frames more stably. However, some other applications need to rely on the VSync-app signal for synchronization when generating rendering frames. In some embodiments, in order to ensure that the application can generate more stable rendering frames, the electronic device can determine whether to turn on or off the VSync-app signal based on the type of application.

[0126] Figure 6 This is a flowchart of an electronic device controlling a VSync-app signal to be turned on or off provided in an embodiment of the present application.

[0127] like Figure 6 As shown, the method for an electronic device to control the VSync-app signal to be turned on or off may include the following steps:

[0128] S601, application A starts.

[0129] S602: Application A sends message A to the input management service, where message A indicates that application A has been started.

[0130] S603: The input management service sends the identifier of application A to the touch screen manager.

[0131] After application A is started, it may send message A to the input management service, wherein the input management service may send the identifier of application A to the touch screen manager based on message A. The identifier of application A may be the package name of application A. Optionally, application A may be a game application.

[0132] Optionally, the electronic device may add the identifiers of all game applications stored in the electronic device to the enabled list, or the electronic device may only store the identifiers of some game applications stored in the electronic device to the enabled list. The identifiers of the application programs stored in the enabled list may be added in response to user operations, or may be added by the electronic device based on preset rules, which is not limited in the embodiments of the present application.

[0133] The enabled list is not limited to game applications, and may also include identifiers of other types of applications. For example, the enabled list may also include identifiers of other applications that do not need to rely on VSync-app signals to trigger drawing and rendering of user interfaces, and this embodiment of the application does not limit this.

[0134] S604: The touch screen manager determines, based on the identifier of application A, that application A is in the enabled list.

[0135] The touch screen manager may query whether there is an identifier of application A in the enabled list. When the identifier of the application exists in the enabled list, it indicates that the application does not need to rely on the VSync-app signal for synchronization.

[0136] When the identification of the application does not exist in the enable list, the touch screen manager can determine that the application needs to rely on the VSync-app signal. The application's reliance on the VSync-app signal means that the application needs to rely on the VSync-app signal to trigger drawing and rendering of the user interface.

[0137] For ease of description and better understanding, in the subsequent embodiments, applications that are identified as being in the enabled list will be referred to as in-list applications, and applications that are not identified as being in the enabled list will be referred to as non-list applications. In-list applications can generate rendering frames according to a preset period without relying on the VSync-app signal, while non-list applications need to wait for the VSync-app signal to arrive before starting to draw and render to generate rendering frames. When the electronic device determines that an application does not need to rely on the VSync-app signal, it may not send the VSync-app signal to the application, or it may still send the VSync-app signal to the application, and the embodiments of the present application are not limited to this.

[0138] S605: The touch screen manager queries the surface synthesizer for a touch screen refresh rate.

[0139] S606: The touch screen manager queries the touch screen driver for the touch screen sampling rate.

[0140] S607: The touch screen manager determines that the refresh rate of the touch screen is a multiple of the sampling rate.

[0141] When the sampling rate of the touch screen is not a multiple of the refresh rate, the number of input events generated by the input management service in the time interval between every two adjacent VSync-app signals may be different. For example, the input management service generates 1 input event between the Kth VSync-app signal and the K+1th VSync-app signal, and generates 2 input events between the K+1th VSync-app signal and the K+2th VSync-app signal, where K is an arbitrary positive integer. In this way, if the application does not rely on the VSync-app signal, the input events it relies on each time it generates a rendering frame may be uncontrollable, which may easily cause jitter in the display screen and affect the user's viewing experience. Among them, the refresh rate is used to indicate the number of user interfaces displayed per second on the touch screen of the electronic device.

[0142] In some embodiments, after the touch screen manager determines that the identification of the application is in the enable list, it is also necessary to further determine whether the input management service needs to rely on the VSync-app signal to send input events to application A under the current touch screen state based on the sampling rate and refresh rate of the touch screen. Only when the identification of the application exists in the application solution list and the sampling rate of the touch screen is a multiple of the refresh rate, the touch screen manager determines that the input management service can send input events to application A without relying on the VSync-app signal, thereby improving the hand tracking performance of the electronic device when running application A. This can prevent the electronic device from blindly improving the hand tracking performance, but ignoring the stability of the display screen, resulting in a reduced user experience.

[0143] S608: The touch screen manager sends control information A to the input management service, where the control information A indicates that the application A does not need to rely on the VSync-app signal.

[0144] S609: The input management service determines, based on the control information A, that there is no need to wait for a VSync-app signal when sending an input event to the application A.

[0145] S610: The input management service sends control information B to the surface compositor, where the control information B is used to instruct to turn off the VSync-app signal.

[0146] After receiving the control information A sent by the touch screen manager, the input management service can determine that it is no longer necessary to wait for the VSync-app signal when subsequently sending input events to the application.

[0147] Since it takes a certain amount of resources for an electronic device to periodically send a VSync-app signal, in some embodiments, the input management service may send control information B to the surface synthesizer, and the surface synthesizer may determine whether to turn off the VSync-app signal based on the layers included in the user interface to be displayed after receiving the control information B. Optionally, the control information B may also be sent by other modules in the electronic device, such as a touch screen manager, and the embodiments of the present application are not limited to this.

[0148] S611. The surface synthesizer traverses the layers of the user interface to be displayed.

[0149] S612: The surface compositor determines, in the user interface to be displayed, only the layers of the applications included in the enabled list.

[0150] S613. The surface synthesizer turns off the VSync-app signal.

[0151] After receiving the control signal B, the surface compositor can traverse the layers included in the user interface to be displayed. When the surface compositor determines that only the layers of the application programs in the enable list are included, the VSync-app signal can be turned off (or the VSync-app signal is kept turned off) to save resources. The reason why the layers of the user interface to be displayed include the layers of multiple applications is that the user interfaces of multiple applications are compositely displayed on the touch screen. For example, the composite display may include but is not limited to: split-screen display, windowed display, etc.

[0152] In some embodiments, in addition to the layers of the applications in the enable list, the user interface to be displayed may also include the layers of applications outside the enable list. The surface compositor may keep the VSync-app signal turned on. When the input management service sends an input event to an application in the enable list (e.g., application A), it does not need to wait for the VSync-app signal, but when sending an input event to an application outside the enable list, it still needs to wait for the VSync-app signal.

[0153] When the user interfaces of multiple applications are displayed on the touch screen, the electronic device consumes a large amount of power, and different applications require different frame rates. Take application A and application B as examples, where application A is an application in the list (such as a game application) and application B is a non-list application (such as an instant messaging application). When the user interface to be displayed on the touch screen contains layers of application A and application B, in order to ensure the user's gaming experience, application A may be displayed at a higher frame rate. Accordingly, the electronic device will also increase the refresh rate of the touch screen to ensure that each frame layer generated by application A can be displayed. At this time, if application B also generates layers at a higher frame rate, it is unnecessary for the user, and this will also unnecessarily increase the power consumption of the electronic device. In some embodiments, the surface synthesizer can adjust the frequency of the VSync-app signal. For example, the surface synthesizer can reduce the frequency of the VSync-app signal to make it lower than the frame rate of application A, so that application A still displays the user interface at a higher frame rate because it does not rely on the VSync-app signal, while application B relies on VSync-app to display the user interface at a lower frame rate, thereby reducing the power consumption of the electronic device while ensuring the user experience. The frame rate is used to indicate the number of user interfaces displayed by the application per second, that is, the number of rendering frames generated per second. The frame rate of the application may be different from the refresh rate of the electronic device, and the frame rates of different applications may be the same or different.

[0154] In some embodiments, steps S611-S613 may be executed in a loop. That is, the surface compositor traverses the layers included in the user interface to be displayed when synthesizing each frame of the user interface. Furthermore, the surface compositor may control the VSync-app signal to be turned on or off when the layers included in the user interface to be displayed change.

[0155] In some embodiments, the touch screen manager may also determine in step S604 that the identifier of the application is not in the enable list, and / or in step S607, the touch screen manager determines that the refresh rate of the touch screen is not a multiple of the sampling rate, then the touch screen manager may send control information C to the input management service, and the control information C indicates that the above application needs to rely on the VSync-app signal. The touch screen manager may determine that it is necessary to rely on the VSync-app signal when sending input events to the application. Then, the touch screen manager sends control information D to the surface compositor, and the control information D is used to instruct the surface compositor to turn on the VSync-app signal. Then, the surface compositor may traverse the layers of the user interface to be displayed, and if it only contains the layers of the application that is not in the enable list, it may change the VSync-app signal from the off state to the on state (or keep the VSync-app signal on); if there are also layers of the application in the enable list in the layers of the user interface to be displayed, the surface compositor may adjust the frequency of the VSync-app signal on the basis of turning on the VSync-app signal. In this way, the input management service does not need to wait for the VSync-app signal when sending input events to applications in the list, while sending input events to non-list applications is still triggered by VSync-app.

[0156] In some embodiments, steps S605 to S607 are optional, that is, the touch screen manager can determine whether to wait for the VSync-app signal when the input management service sends an input event to application A based only on whether the identification of application A is in the enabled list.

[0157] In some embodiments, step S604 is optional, that is, the touch screen manager can determine whether to wait for the VSync-app signal when the input management service sends an input event to application A based only on whether the sampling rate of the touch screen is a multiple of the refresh rate.

[0158] When the user interface displayed on the touch screen includes both user interfaces of applications in the list and user interfaces of applications outside the list, the electronic device may adjust the frequency of the VSync-app signal to save power consumption.

[0159] The following introduces some scenarios of electronic devices displaying user interfaces provided by embodiments of the present application.

[0160] Figure 7A-7B It is a user interface displayed by some electronic devices provided in the embodiments of the present application.

[0161] like Fig. 7A As shown, the electronic device displays a user interface 701 of a game application, where the game application is an application in the list. Since the user interface displayed by the electronic device only includes the user interface 701 of the game application, the electronic device can turn off (or keep off) the VSync-app signal to improve the hand tracking of the game application, thereby improving the user's gaming experience.

[0162] like Figure 7B As shown, the electronic device 100 displays a user interface 701 of a game application and a user interface 702 of an instant messaging application, wherein the instant messaging application is a non-list application, which means that its frame rate is consistent with the frequency of the VSync-app signal. The entire user interface (including user interface 701 and user interface 702) displayed on the touch screen is synthesized after the surface synthesizer receives the corresponding layer of the user interface 701 sent by the game application and the corresponding layer of the user interface 702 sent by the instant messaging application. The electronic device can turn on (or keep on) VSync-app and adjust the frequency of the VSync-app signal to control the power of the instant messaging application.

[0163] For example, in order to ensure the user's gaming experience, the game application refreshes the screen at frame rate A, where frame rate A is relatively high (for example, it can be 90Hz, 120Hz, etc.). The electronic device can adjust VSync-sf and HW-VSync to keep them consistent with frame rate A to ensure that each layer generated by the game application can be displayed. The frame rate of the instant messaging application is called frame rate B. Since the user's requirements for the refresh rate of the instant messaging application are not high, and the instant messaging application relies on the VSync-app signal to output the rendered frame, the frequency of the VSync-app signal determines the frame rate B of the instant messaging application. The electronic device can set the VSync-app signal to be lower than frame rate A, so that the frame rate B of the instant messaging application is lower than frame rate A. The electronic device can not only ensure that the game application is displayed at a higher frame rate to ensure the user's experience of watching the game screen, but also reduce the power consumption of the electronic device while ensuring that the frame rate of the instant messaging application can meet the user's usage needs, thereby improving the user's usage experience in a multi-application composite scenario.

[0164] Figure 8 It is a flowchart of an electronic device provided in an embodiment of the present application displaying a user interface at different frame rates in multiple windows.

[0165] For ease of description, the frame rate of the listed applications is twice that of the non-listed applications. For example, if the frame rate of the listed applications is 120Hz and the frame rate of the non-listed applications is 60Hz, then the time interval between two adjacent rendering frames generated by the listed applications is twice the time interval between two adjacent rendering frames generated by the non-listed applications. Among them, the listed applications do not rely on the VSync-app signal when generating rendering frames, while the non-listed applications start generating rendering frames only after receiving the VSync-app signal.

[0166] Between the first VSync-sf signal and the second VSync-sf signal, the applications in the list generate layer 1, and the applications outside the list generate layer 1'. After receiving layer 1 and layer 1', the surface compositor can synthesize a frame of user interface to be displayed when the second VSync-sf signal arrives: image 1, which contains both the rendering frame generated by the applications in the list (layer 1) and the rendering frame generated by the applications outside the list (layer 1').

[0167] Between the second VSync-sf signal and the third VSync-sf signal, the application in the list generates layer 2. At this time, since the non-list application is still waiting for VSync-app2, the non-list application does not generate a new rendering frame.

[0168] Between the third VSync-sf signal and the fourth VSync-sf signal, the in-list application generates layer 3, and the non-list application generates layer 2' in response to the second VSync-app signal. The surface compositor synthesizes the second frame user interface in response to the third VSync-sf signal: image 2, which is composed of layer 2 and layer 1'. The display driver can receive the HW-VSync signal ( Figure 8 (not shown) then sends the user interface including layer 1+layer 1' synthesized by the surface synthesizer for display, and then the touch screen can display the user interface.

[0169] After the fourth VSync-sf signal, the applications in the list generate layer 4, and the non-list applications are still waiting for VSync-app3. The surface compositor can synthesize the user interface to be displayed: image 3, which includes layer 3 and layer 2'. The display driver can respond to the HW-VSync signal to send the user interface (including layer 2 and layer 1') synthesized by the surface compositor to display, and then display the user interface on the touch screen.

[0170] It is not limited to that the frame rate of the applications in the list is higher than the frame rate of the applications outside the list. The frame rate of the applications in the list may also be lower than the frame rate of the applications outside the list. This embodiment of the present application does not impose any limitation on this.

[0171] In some embodiments, Figure 8The applications in the list shown may be game applications, and the non-list applications may be applications other than game applications (such as instant messaging applications). The electronic device can maintain a high frame rate when displaying the user interface of the game application, while applications other than the game application often do not require a high frame rate, so the electronic device can display the user interface of the non-game application at a lower frame rate than the game application. In this way, the electronic device can not only ensure the user's gaming experience, but also avoid the non-game application unnecessarily refreshing the user interface at the frame rate of the game application in the multi-window composite scenario, resulting in excessive power consumption of the electronic device.

[0172] The display method provided by the embodiment of the present application is introduced below.

[0173] Fig. 9 is a flow chart of a display method provided by an embodiment of the present application. Fig. 9 As shown, the method may include but is not limited to the following steps:

[0174] S901: Receive a first operation acting on a first application, and generate a first event according to the first operation.

[0175] The first application may be a game application. The electronic device may receive a first operation acting on a user interface of the first application, where the first operation may include but is not limited to: pressing, releasing, and sliding operations. Furthermore, the input management service in the electronic device may generate a first event based on the first operation.

[0176] S902: In response to generating a first event, provide the first event to a first application.

[0177] The input management service in the electronic device may directly send the first event to the first application in response to the generation of the first event. After generating the first event, the input management service does not wait for the VSync-app signal but directly provides it to the first application. The first application may be a game application in the electronic device.

[0178] In some embodiments, the touch screen manager is used to determine whether the first application is an application that relies on the VSync-app signal. Here, an application that relies on the VSync-app signal means that the application needs to rely on the synchronization mechanism of the VSync-app to output the rendering frame. Since the game application is controlled by its own engine to output the rendering frame, the game application is an application that does not rely on the VSync-app signal.

[0179] by Figure 5 Taking the illustrated embodiment as an example, the first event may be, for example, input event 1. After the input management service generates event 1, it directly sends it to the game application. Figure 5The first VSync-app signal (ie, VSync-app1 signal) may be referred to as a first VSync-app signal, the second VSync-app signal (ie, VSync-app2 signal) may be referred to as a second VSync-app signal, a first event is generated between the first VSync-app signal and the second VSync-app signal and provided to a first application, and the first VSync-app signal and the second VSync-app signal are two adjacent vertical synchronization signals emitted by an electronic device.

[0180] S903: Generate a first layer based on the first event by using the first application.

[0181] S904: Display a first user interface according to the first layer.

[0182] The first application in the electronic device can generate a first layer based on the first event. Figure 5 Taking the illustrated embodiment as an example, the first layer may be layer 1. The first application may include a logic thread and a rendering thread. After the first application obtains the first event, the logic thread first generates first rendering data based on the first event. Here, the first rendering data may be rendering data 1. Then, the rendering thread may generate a first layer based on the first rendering data. The first layer may be, for example, layer 1. Then, the surface synthesizer in the electronic device may generate a first user interface based on the first layer. The display driver sends the first user interface to the display, and finally the touch screen displays the first user interface. The first user interface may be, for example, image 1.

[0183] It is understandable that after the electronic device generates the first event, it can directly provide the first event to the first application without waiting for the VSync-app signal. This can reduce the delay between the generation of the input event and the application receiving the input event. The application receives the input event faster and can process the input event earlier, which can also avoid the situation where the rendering time has arrived but the rendering data corresponding to the latest input event has not been generated. This method can effectively improve the hand tracking performance of the electronic device. In addition, when the first application is a game application, it does not need to rely on the VSync-app signal to generate a rendering frame, and the input management service does not need to wait for the VSync-app signal to arrive before sending the input event to the first application. In this way, it can ensure that the first application still generates rendering frames according to its cycle, and improve the hand tracking performance of the electronic device when running the first application.

[0184] In some embodiments, the first user interface only includes the first layer, and the method further includes: stopping sending the VSync-app signal. The surface synthesizer in the electronic device can determine the layers included in the first application interface before synthesizing the first application interface. When the surface synthesizer determines that only the first layer of the first application is included, it indicates that there is no layer of the application program that relies on the VSync-app signal in the first application interface, so that the electronic device can stop sending (or keep closed) the VSync-app signal to reduce the power consumption of the electronic device.

[0185] In some embodiments, before generating the first event according to the first operation, the method further includes: determining that the sampling rate of the touch screen is a multiple of the refresh rate, and determining that the first application is in the first list. Only when the sampling rate of the touch screen is a multiple of the refresh rate, the number of input events generated by the electronic device between refreshing each two frames of the user interface is the same, so that the application can be guaranteed to generate rendering frames based on the same number of input events each time, avoiding the problem of incoherence in the display screen. The first list can be an enable list, wherein the first list is not limited to a list on a data structure, but is used to represent a list of identifiers storing one or more applications, which can be a list, a linked list, etc., and the embodiment of the present application does not limit the data structure type of the first list. The first application in the first list means that the identifier of the first application is in the first list. The application corresponding to the identifier contained in the first list can be set by the user or preset by the electronic device, and the embodiment of the present application does not limit this. Optionally, the identifier of the application can be the package name of the application.

[0186] In some embodiments, the electronic device is also installed with a second application, and the method also includes: receiving a second operation acting on the second application, and generating a second event based on the second operation; providing a second event to the second application in response to a vertical synchronization VSync-app signal; generating a second layer based on the second event through the second application; and displaying a second user interface based on the second layer.

[0187] Among them, the second application can be an application outside the first list. The second application needs to rely on the VSync-app signal to trigger the drawing and rendering process, so the input management service still needs to wait for the VSync-app signal when sending an input event to the second application. Then the second application can generate a second layer based on the second event, the surface synthesizer synthesizes the second user interface based on the second layer, the display driver sends the second user interface to the display, and then the touch screen displays the second user interface. Among them, the touch screen manager in the electronic device is used to determine that the second application is an application that relies on the VSync-app signal.

[0188] In some embodiments, before providing the second event to the second application, the method further includes: resending the VSync-app signal. Since the first application does not need to rely on the VSync-app signal, while the second application needs to rely on the VSync-app signal to trigger the drawing and rendering process, when the electronic device runs the second application, the VSync-app signal needs to be reopened to ensure that the second application can stably output image frames.

[0189] In some embodiments, the second user interface further includes a third layer of the first application, wherein the frame rate of the first application is a first frame rate, the frame rate of the second application is a second frame rate, and the first frame rate is greater than the second frame rate.

[0190] by Figure 7B Taking the scenario shown as an example, the second user interface may be a user interface (including user interface 701 and user interface 702) displayed in a touch screen. The third layer may be a layer corresponding to user interface 701, and the second layer may be a layer corresponding to user interface 702. The electronic device may display the user interface of the first application at a first frame rate and display the user interface of the second application at a second frame rate. In order to ensure the user's gaming experience, the first frame rate is usually high, and the frame rate of the gaming application is not affected by the VSync-app signal. The electronic device may control the frame rate of the second application by adjusting the frequency of the VSync-app signal so that the second frame rate is less than the first frame rate. This can avoid the second application from unnecessarily outputting rendering frames at the first frame rate, resulting in excessive power consumption of the electronic device. The above-mentioned adjustment of the frequency of the VSync-app signal may be performed by a surface synthesizer in the electronic device. When the surface synthesizer determines that the second user interface contains not only the third layer of the gaming application but also the second layer of the non-gaming application, the sending frequency of the VSync-app signal may be adjusted to the second frame rate.

[0191] In some embodiments, before generating the second event according to the second operation, the method further includes: determining that the sampling rate of the touch screen is not a multiple of the refresh rate, and / or determining that the second application is not in the first list. In the case where the sampling rate of the touch screen is not a multiple of the refresh rate, when the input management service sends input events to the application without relying on the VSync-app signal, it may cause the application to generate rendering frames based on a different number of input events each time, making the user interface that is ultimately displayed not smooth enough. Therefore, the electronic device can turn on (or keep on) the VSync-app signal when it is determined that the sampling rate of the touch screen is not a multiple of the refresh rate, and / or that the second application is not in the first list.

[0192] The following describes the apparatus for executing the above method provided in the embodiment of the present application. Fig.10 As shown, Fig.101 is a schematic diagram of a display device provided in an embodiment of the present application. The display device may be an electronic device in an embodiment of the present application, or a chip or chip system in an electronic device.

[0193] like Fig.10 As shown, the display device 1000 may include an operation acquisition module 1001 , a processing module 1002 , a display module 1003 and a storage module 1004 .

[0194] The storage module 1004 may store a first application, and the processing module 1002 is used to periodically send a VSync-app signal. The operation acquisition module 1001 is used to receive a first operation acting on the first application. The processing module 1002 is used to generate a first event according to the first operation, and provide the first event to the first application in response to the generation of the first event. The processing module 1002 is also used to generate a first layer based on the first event through the first application; the display module 1003 is used to display a first user interface according to the first layer.

[0195] In some embodiments, when only the first layer is included in the first user interface, the processing module 1002 is further configured to stop sending the VSync-app signal.

[0196] In some embodiments, before generating the first event according to the first operation, the processing module 1002 is further configured to determine that the sampling rate of the touch screen is a multiple of the refresh rate, and determine that the first application is in the first list.

[0197] In some embodiments, the storage module 1004 also stores a second application. The operation acquisition module 1001 is also used to receive a second operation acting on the second application. The processing module 1002 is also used to generate a second event according to the second operation, and provide the second event to the second application in response to the vertical synchronization VSync-app signal; the processing module 1002 is also used to generate a second layer based on the second event through the second application. The display module 1003 is also used to display a second user interface according to the second layer.

[0198] In some embodiments, before providing the second event to the second application, the processing module 1002 is further configured to resend the VSync-app signal.

[0199] In some embodiments, before generating the second event according to the second operation, the processing module 1002 is further configured to determine that the sampling rate of the touch screen is not a multiple of the refresh rate, and / or determine that the second application is not in the first list.

[0200] In some embodiments, the first application is a gaming application and the second application is a non-gaming application.

[0201] In some embodiments, the processing module 1002 and the storage module 1004 are connected via a line. The storage module 1004 may include one or more memories, and the memory may be a device in one or more devices or circuits for storing programs or data. The storage module 1004 may exist independently and be connected to the processing module 1002 via a communication bus. The storage module 1004 may also be integrated with the processing module 1002.

[0202] The storage module 1004 can store computer-executable instructions of the method in the electronic device so that the processing module 1002 executes the method in the above embodiment. The storage module 1004 can be a register, a cache or a random access memory (RAM), etc. The storage module 1004 can be integrated with the processing module 1002. The storage module 1004 can be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, and the storage module 1004 can be independent of the processing module 1002.

[0203] Fig.11 This is a schematic diagram of the structure of a chip provided in an embodiment of the present application. Fig.11 As shown, the chip 1100 includes one or more (including two) processors 1101 , a communication line 1102 and a communication interface 1103 . Optionally, the chip 1100 also includes a memory 1104 .

[0204] In some implementations, the memory 1104 stores the following elements: executable modules or data structures, or a subset thereof, or an extended set thereof.

[0205] The method described in the above embodiment of the present application can be applied to the processor 1101, or implemented by the processor 1101. The processor 1101 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor 1101 or an instruction in the form of software. The above-mentioned processor 1101 can be a general-purpose processor (for example, a microprocessor or a conventional processor), a digital signal processor, an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates, transistor logic devices or discrete hardware components. The processor 1101 can implement or execute the disclosed methods, steps and logic block diagrams in the embodiments of the present application.

[0206] The steps of the method disclosed in the embodiment of the present application can be directly embodied as being executed by a hardware decoding processor, or being executed by a combination of hardware and software modules in the decoding processor. Among them, the software module can be located in a mature storage medium in the field such as a random access memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable read only memory (EEPROM). The storage medium is located in the memory 1104, and the processor 1101 reads the information in the memory 1104 and completes the steps of the above method in combination with its hardware.

[0207] The processor 1101 , the memory 1104 , and the communication interface 1103 may communicate with each other via the communication line 1102 .

[0208] In the above embodiments, the instructions stored in the memory for execution by the processor may be implemented in the form of a computer program product, wherein the computer program product may be pre-written in the memory, or may be downloaded and installed in the memory in the form of software.

[0209] The present application embodiment also provides a computer program product, which includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a server, a data center, etc. that includes one or more available media integrated. For example, the available medium can include a magnetic medium (e.g., a floppy disk, a hard disk or a tape), an optical medium (e.g., a digital versatile disc (digital versatiledisc, DVD)), or a semiconductor medium (e.g., a solid state drive (solid state disk, SSD)), etc.

[0210] The embodiments of the present application also provide a computer-readable storage medium. The computer-readable storage medium stores a computer program or instruction. The above method is implemented when the computer program or instruction is executed by the processor. The method described in the above embodiment can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. If implemented in software, the function can be stored as one or more instructions or codes on a computer-readable medium or transmitted on a computer-readable medium. Computer-readable media can include computer storage media and communication media, and can also include any medium that can transfer a computer program from one place to another. The storage medium can be any target medium that can be accessed by a computer.

[0211] As a possible design, the computer-readable medium may include a compact disc read-only memory (CD-ROM), RAM, ROM, EEPROM or other optical disc storage; the computer-readable medium may include a magnetic disk storage or other magnetic disk storage device. Moreover, any connecting line may also be appropriately referred to as a computer-readable medium. For example, if the software is transmitted from a website, server or other remote source using a coaxial cable, fiber optic cable, twisted pair, DSL or wireless technology (such as infrared, radio and microwave), the coaxial cable, fiber optic cable, twisted pair, DSL or wireless technology such as infrared, radio and microwave are included in the definition of the medium. Disks and optical discs as used herein include compact discs (CDs), laser discs, optical discs, DVDs, floppy disks and Blu-ray discs, where disks generally reproduce data magnetically, while optical discs reproduce data optically using lasers. Combinations of the above should also be included in the scope of computer-readable media.

[0212] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

[0213] As used in the above embodiments, the term "when..." may be interpreted to mean "if..." or "after..." or "in response to determining..." or "in response to detecting...", depending on the context. Similarly, the phrases "upon determining..." or "if (the stated condition or event) is detected" may be interpreted to mean "if determining..." or "in response to determining..." or "upon detecting (the stated condition or event)" or "in response to detecting (the stated condition or event)", depending on the context.

[0214] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more available media integration. The available medium can be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk), etc.

[0215] Those skilled in the art can understand that to implement all or part of the processes in the above-mentioned embodiments, the processes can be completed by computer programs to instruct related hardware, and the programs can be stored in computer-readable storage media. When the programs are executed, they can include the processes of the above-mentioned method embodiments. The aforementioned storage media include: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.

Claims

1. A display method, characterized in that: The method is applied to an electronic device, the electronic device having a first application and a second application installed therein, wherein the first application is a game application and the second application is a non-game application, and the method comprises: receiving a first operation acting on the first application, and generating a first event according to the first operation; In response to generating the first event, providing the first event to the first application; generating, by the first application, a first layer based on the first event; displaying a first user interface according to the first layer; receiving a second operation acting on the second application, and generating a second event according to the second operation; In response to a vertical synchronization VSync-app signal, providing the second event to the second application; generating, by the second application, a second layer based on the second event; A second user interface is displayed according to the second layer.

2. The method according to claim 1, characterized in that The first event is generated between a first VSync-app signal and a second VSync-app signal and provided to the first application, wherein the first VSync-app signal and the second VSync-app signal are two adjacent vertical synchronization signals.

3. The method according to claim 1, characterized in that Before providing the first event to the first application, the method further includes: Stop sending the VSync-app signal; Before providing the second event to the second application, the method further includes: The VSync-app signal is resent.

4. The method according to any one of claims 1 to 3, characterized in that The first user interface does not include a layer of non-game applications.

5. The method according to claim 1 or 2, characterized in that: The second user interface also includes a third layer of the first application, wherein the frame rate of the first application is a first frame rate, the frame rate of the second application is a second frame rate, and the first frame rate is greater than the second frame rate.

6. The method according to any one of claims 1 to 5, characterized in that Before generating a first event according to the first operation, the method further includes: Determine the touchscreen's sampling rate as a multiple of the refresh rate, and, It is determined that the first application is in a first list.

7. The method according to claim 6, characterized in that Before generating a second event according to the second operation, the method further includes: Make sure the touchscreen sampling rate is not a multiple of the refresh rate, and / or, It is determined that the second application is not in the first list.

8. The method according to any one of claims 1 to 7, characterized in that The electronic device includes a touch screen manager and an input management service, the touch screen manager is used to determine that the first application is an application that does not rely on a VSync-app signal, and the input management service is used to provide the first event to the first application in response to generating the first event.

9. The method according to claim 8, characterized in that The touch screen manager is further used to determine that the second application is an application that relies on a VSync-app signal, and the input management service is further used to provide the second event to the second application in response to the vertical synchronization VSync-app signal.

10. The method according to claim 5, characterized in that The electronic device comprises a surface synthesizer, and the surface synthesizer is used to determine that the second user interface comprises the second layer and the third layer; The surface synthesizer is further used to adjust the sending frequency of the VSync-app signal to the second frame rate.

11. The method according to any one of claims 1 to 10, characterized in that The first application includes a logic thread and a rendering thread, the logic thread is used to generate first rendering data based on the first event, and the rendering thread is used to generate the first layer based on the first rendering data.

12. A display method, characterized in that: The method is applied to an electronic device, the electronic device having a first application installed therein, and the method comprises: Receiving a first operation acting on a first application, and generating a first event according to the first operation; In response to generating the first event, providing the first event to the first application; generating, by the first application, a first layer based on the first event; A first user interface is displayed according to the first layer.

13. The method according to claim 12, characterized in that The first event is generated between a first VSync-app signal and a second VSync-app signal and provided to the first application, wherein the first VSync-app signal and the second VSync-app signal are two adjacent vertical synchronization signals.

14. The method according to claim 12, characterized in that The first user interface only includes the first layer, and the method further includes: Stop sending VSync-app signals.

15. The method according to any one of claims 12 to 14, characterized in that: Before generating a first event according to the first operation, the method further includes: Determine the touchscreen's sampling rate as a multiple of the refresh rate, and, It is determined that the first application is in a first list.

16. The method according to any one of claims 12 to 15, characterized in that: The electronic device is also installed with a second application, and the method further includes: receiving a second operation acting on the second application, and generating a second event according to the second operation; In response to a vertical synchronization VSync-app signal, providing the second event to the second application; generating, by the second application, a second layer based on the second event; A second user interface is displayed according to the second layer.

17. The method according to claim 16, characterized in that Before providing the second event to the second application, the method further includes: Resend the VSync-app signal.

18. The method according to claim 16 or 17, characterized in that The second user interface also includes a third layer of the first application, wherein the frame rate of the first application is a first frame rate, the frame rate of the second application is a second frame rate, and the first frame rate is greater than the second frame rate.

19. The method according to claim 18, characterized in that The electronic device comprises a surface synthesizer, and the surface synthesizer is used to determine that the second user interface comprises the second layer and the third layer; The surface synthesizer is further used to adjust the sending frequency of the VSync-app signal to the second frame rate.

20. The method according to any one of claims 15 to 19, characterized in that Before generating a second event according to the second operation, the method further includes: Make sure the touchscreen sampling rate is not a multiple of the refresh rate, and / or, It is determined that the second application is not in the first list.

21. The method according to any one of claims 16 to 20, characterized in that The electronic device includes a touch screen manager and an input management service, the touch screen manager is used to determine that the first application is an application that does not rely on a VSync-app signal, and the input management service is used to provide the first event to the first application in response to generating the first event.

22. The method according to claim 21, characterized in that The touch screen manager is further used to determine that the second application is an application that relies on a VSync-app signal, and the input management service is further used to provide the second event to the second application in response to the vertical synchronization VSync-app signal.

23. The method according to any one of claims 12 to 22, characterized in that The first application includes a logic thread and a rendering thread, the logic thread is used to generate first rendering data based on the first event, and the rendering thread is used to generate the first layer based on the first rendering data.

24. The method according to any one of claims 12 to 23, characterized in that The first application is a game application.

25. The method according to any one of claims 12 to 24, characterized in that The second application is a non-game application.

26. An electronic device, characterized in that: The electronic device includes: a touch screen, a memory, and a processor coupled to the memory; the touch screen is used to receive user operations and display an interface, the memory stores a computer program, and when the processor executes the computer program, the electronic device implements the method as described in any one of claims 1-11 or 12-25.

27. A computer-readable storage medium comprising computer instructions, characterized in that: When the computer instructions are executed on an electronic device, the electronic device is caused to execute the method as described in any one of claims 1-11 or 12-25.

Citation Information

Patent Citations

  • Method for prolonging battery life of terminal device and terminal device

    CN105867576A

  • Event report method and device

    CN106775531A

  • Touch delay detection method and device, electronic equipment and storage medium

    CN111367434A

  • Screen control method, mobile terminal and computer readable storage medium

    CN112083996A

  • GLES image rendering method and device, storage medium and computer equipment

    CN112200712A