Touch display method and related device
By receiving and processing touch events in the electronic device and generating target Vsync signals to synchronize the touch rhythm, the problem of touch screen response delay in the existing technology is solved, and the touch response timeliness and user experience are improved.
Patent Information
- Application Number
- CN202310487945.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-28
- Publication Date
- 2024-10-29
AI Technical Summary
When the user touches the touch screen of existing electronic devices, the touch response timeliness is low, resulting in poor user experience. This is mainly due to the vertical synchronization (Vsync) of the upper layer drawing and rendering being synchronized with the TE signal of the underlying screen, resulting in delayed response to touch events. .
Receive touch events triggered by the target application through the touch panel, determine the touch rhythm, generate the target Vsync signal for the target application, calculate the offset between the two, and update the touch event in response to the target Vsync signal so that the target application The program can immediately obtain the latest touch event when the target Vsync signal arrives, achieving synchronization of drawing and display.
It improves the timeliness of touch response, reduces display delay, and enhances user experience. By synchronizing the drawing process of the target application with the touch rhythm, the display delay is shortened.
Smart Images

Figure CN118860176A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of electronic equipment technology or display technology, and specifically to a touch display method and related devices. Background Art
[0002] With the widespread popularization of electronic devices (such as mobile phones, tablet computers, etc.), electronic devices can support more and more applications and have more and more powerful functions. Electronic devices are developing in a diversified and personalized direction and have become an indispensable electronic product in users' lives.
[0003] When a user touches the touch screen of an electronic device, in order to ensure that the drawing rhythm of the touch screen is not higher than the display rhythm, the vertical synchronization (Vsync) of the upper-layer drawing and rendering is currently synchronized with the TE signal of the underlying screen. The TE signal is used to indicate the start of image transmission to the display chip, which can easily lead to low timeliness of touch response of the touch screen. Summary of the invention
[0004] The embodiments of the present application provide a touch display method and related devices, which are beneficial to improving the touch response of the touch screen and improving the user experience.
[0005] In a first aspect, an embodiment of the present application provides a touch display method, which is applied to an electronic device, and the method includes:
[0006] receiving a touch event triggered for a target application via the touch panel;
[0007] When the touch event is a preset touch event, determining a touch rhythm reported by the touch panel;
[0008] Generating a target Vsync signal for the target application;
[0009] Determining an offset between the touch rhythm and the target Vsync signal;
[0010] In response to the target Vsync signal, the touch event is updated to the target application according to the offset, and the target application is used to draw and display a corresponding image frame according to the touch signal.
[0011] In a second aspect, an embodiment of the present application provides a touch display device, the device comprising: a receiving unit, a determining unit, a generating unit and an updating unit, wherein:
[0012] The receiving unit is used to receive a touch event triggered by a target application through a touch panel;
[0013] The determining unit is used to determine the touch rhythm reported by the touch panel when the touch event is a preset touch event;
[0014] The generating unit is used to generate a target Vsync signal for the target application;
[0015] The determining unit is further configured to determine an offset between the touch rhythm and the target Vsync signal;
[0016] The update unit is used to update the touch event to the target application according to the offset in response to the target Vsync signal, and the target application is used to draw and display the corresponding image frame according to the touch signal.
[0017] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and the program includes instructions for executing the steps of any method in the first aspect of the embodiment of the present application.
[0018] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for electronic data exchange, wherein the computer program enables a computer to execute part or all of the steps described in any method of the first aspect of the embodiment of the present application.
[0019] In a fifth aspect, an embodiment of the present application provides a computer program product comprising instructions, wherein when the computer program product is run on an electronic device, the electronic device executes some or all of the steps described in any method of the first aspect. The computer program product may be a software installation package.
[0020] It can be seen that in the embodiment of the present application, a touch event triggered for a target application is received through a touch panel; when the touch event is a preset touch event, the touch rhythm reported by the touch panel is determined; a target Vsync signal for the target application is generated; the offset between the touch rhythm and the target Vsync signal is determined; in response to the target Vsync signal, the touch event is updated to the target application according to the offset, and the target application is used to draw and display the corresponding image frame according to the touch signal. In this way, an offset can be made based on the touch rhythm, and then provided to the target application, so that the drawing process of the target application can be synchronized with the touch rhythm, so that the target application can immediately obtain the latest touch event after the target Vsync signal arrives, and realize drawing and display, which is conducive to improving touch response, reducing display delay, and increasing the timeliness of touch response, thereby improving user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0022] Figure 1 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application;
[0023] Figure 2 It is a schematic diagram of the software structure of an electronic device provided in an embodiment of the present application;
[0024] Figure 3 It is a flow chart of a touch display method in a related technology provided by an embodiment of the present application;
[0025] Figure 4 It is a schematic diagram of a flow chart of a touch display method provided in an embodiment of the present application;
[0026] Figure 5 It is a schematic diagram of a flow chart of a touch display method provided in an embodiment of the present application;
[0027] Fig. 6A is a schematic diagram of a touch response scenario provided by an embodiment of the present application;
[0028] Figure 6B is a schematic diagram of a touch response scenario provided by an embodiment of the present application;
[0029] Fig. 7Ais a schematic diagram of a touch response scenario provided by an embodiment of the present application;
[0030] Figure 7B is a schematic diagram of a touch response scenario provided by an embodiment of the present application;
[0031] Figure 8 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application;
[0032] Fig. 9 It is a block diagram of the functional units of a touch display device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0033] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0034] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.
[0035] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0036] The electronic device may be a portable electronic device that also includes other functions such as a personal digital assistant and / or a music player function, such as a mobile phone, a tablet computer, a terminal device, a wearable electronic device with a wireless communication function (such as a smart watch, smart glasses), a vehicle-mounted device, etc. Exemplary embodiments of portable electronic devices include but are not limited to portable electronic devices equipped with an IOS system, an Android system, a Microsoft system, or other operating systems. The above-mentioned portable electronic device may also be other portable electronic devices, such as a laptop computer (Laptop), etc. It should also be understood that in some other embodiments, the above-mentioned electronic device may not be a portable electronic device, but a desktop computer. In some embodiments, the electronic device may also be a communication terminal.
[0037] The software and hardware operating environment of the technical solution disclosed in this application is introduced as follows.
[0038] As shown in the figure, Figure 1 1 shows a schematic diagram of the structure of the electronic device 100. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a compass 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195.
[0039] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0040] The processor 110 may include one or more processing units, for example: the processor 110 may include an application processor AP, a modem processor, a graphics processor GPU, an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processor NPU, etc. Among them, different processing units may be independent components or integrated into one or more processors. In some embodiments, the electronic device 100 may also include one or more processors 110. Among them, the controller may generate an operation control signal according to the instruction opcode and the timing signal to complete the control of fetching and executing instructions. In some other embodiments, a memory may also be provided in the processor 110 for storing instructions and data. Exemplarily, the memory in the processor 110 may be 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. In this way, repeated access is avoided, the waiting time of the processor 110 is reduced, and the efficiency of the electronic device 100 in processing data or executing instructions is improved. The processor may further include an image processor, which may be an image preprocessor (preprocess image signal processor, Pre-ISP), which may be understood as a simplified ISP, and which may also perform some image processing operations, for example, may obtain image statistical information.
[0041] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a SIM card interface and / or a USB interface, etc. Among them, the USB interface 130 is an interface that complies with the USB standard specification, and can specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transmit data between the electronic device 100 and a peripheral device. The USB interface 130 can also be used to connect headphones to play audio through the headphones.
[0042] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0043] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. While the charging management module 140 is charging the battery 142, it may also power the electronic device through the power management module 141.
[0044] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193 and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.
[0045] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, the baseband processor, and the like.
[0046] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0047] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G / 6G applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
[0048] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and filters it, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0049] 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.
[0050] 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), a mini light-emitting diode (miniLED), MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include one or more display screens 194.
[0051] The electronic device 100 can realize the shooting function through the ISP, the camera 193, the video codec, the GPU, the display screen 194 and the application processor.
[0052] The ISP is used to process the data fed back by the camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converts it into an image visible to the naked eye. The ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. The ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP can be set in the camera 193.
[0053] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include one or more cameras 193.
[0054] 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.
[0055] Video codecs are used to compress or decompress digital videos. The electronic device 100 may support one or more video codecs. Thus, the electronic device 100 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0056] 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.
[0057] 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.
[0058] The internal memory 121 can be used to store one or more computer programs, which include instructions. The processor 110 can execute the above instructions stored in the internal memory 121, so that the electronic device 100 executes the method of displaying page elements provided in some embodiments of the present application, as well as various applications and data processing. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system; the program storage area can also store one or more applications (such as a gallery, contacts, etc.). The data storage area can store data (such as photos, contacts, etc.) created during the use of the electronic device 100. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more disk storage components, flash memory components, universal flash storage (UFS), etc. In some embodiments, the processor 110 can execute the method of displaying page elements provided in the embodiments of the present application, as well as other applications and data processing by running instructions stored in the internal memory 121 and / or instructions stored in a memory provided in the processor 110. 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.
[0059] The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
[0060] Among them, the pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be set on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 100 detects the touch operation intensity according to the pressure sensor 180A. The electronic device 100 can also calculate the touch position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.
[0061] The gyro sensor 180B can be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., X, Y, and Z axes) can be determined by the gyro sensor 180B. The gyro sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyro sensor 180B detects the angle of the electronic device 100 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the electronic device 100 through reverse movement to achieve anti-shake. The gyro sensor 180B can also be used for navigation and somatosensory game scenes.
[0062] The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in all directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device and is applied to applications such as horizontal and vertical screen switching and pedometers.
[0063] The ambient light sensor 180L is used to sense the ambient light brightness. The electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touches.
[0064] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.
[0065] The temperature sensor 180J is used to detect temperature. In some embodiments, the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device 100 reduces the performance of a processor located near the temperature sensor 180J to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to avoid abnormal shutdown of the electronic device 100 due to low temperature. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 performs a boost on the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
[0066] The touch sensor 180K is also called a "touch panel". The touch sensor 180K can be set on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194.
[0067] For example, Figure 2 The software structure diagram of the electronic device 100 is shown. The layered architecture divides the software into several layers, each layer has a clear role 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, respectively, the application layer, the application framework layer, the Android runtime (Android runtime) and the system library, and the kernel layer. The application layer can include a series of application packages.
[0068] like Figure 2 As shown, the application layer may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, etc.
[0069] 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.
[0070] like Figure 2 As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.
[0071] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.
[0072] Content providers are used to store and retrieve data and make it accessible to applications. The data can include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
[0073] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.
[0074] The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including connecting, hanging up, etc.).
[0075] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0076] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.
[0077] Android Runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.
[0078] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.
[0079] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
[0080] The system library may include multiple functional modules, such as surface manager, media libraries, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.
[0081] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.
[0082] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0083] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0084] A 2D graphics engine is a drawing engine for 2D drawings.
[0085] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.
[0086] like Figure 3 , which is a flow chart of a touch display method in a related art.
[0087] In the Android system, the electronic device can respond to a touch event (Touch Events) initiated by a user on a touch panel for a target application. The touch event may include a click event (Click Event) and a slide event (MoveEvent). According to the touch event, the electronic device can, for a corresponding frame image, perform the following steps: Figure 3 The bottom-level display screen (hardware display step) and upper-level drawing and rendering steps shown display the image frame corresponding to the touch event on the display screen of the electronic device.
[0088] Among them, the above-mentioned electronic device may include a hardware layer, a kernel layer and an application layer.
[0089] Among them, the local service layer (Native) is used to store some common local services and some link libraries, etc. For example, it may include InputFlinger, Event Hub, SurfaceFlinger, etc.
[0090] The drawing and rendering process can be implemented by the application, so it is also called the application drawing and rendering process. The layer synthesis process can be implemented by the display synthesis process, for example, layer synthesis is implemented by SurfaceFlinger, which is also called the SurfaceFlinger layer synthesis process. The role of SurfaceFlinger is to accept buffer data from multiple sources, synthesize them, and then send them to the display device for display.
[0091] Among them, InputFlinger will collect, process, and distribute various input events (keys, touches, etc.) at the framework layer. In this application, InputFlinger is used for the distribution and management of touch events.
[0092] Among them, Event Hub is a highly scalable, distributed, time-series-based event center that can process streaming events in real time and provide alarms and reminders.
[0093] Among them, DRM is the management architecture in the Linux kernel responsible for interacting with the graphics card.
[0094] Among them, vertical synchronization (Vsync, Vertical Sync) is a rendering option of a video card.
[0095] Among them, SYNC is a multimedia synchronization technology used for synchronous display in video, music and other fields.
[0096] The term "Application" refers to an application of a certain technology, system or product, and may include a target application in the embodiments of the present application, and the target application may include at least one of the following: a database program, a web browser, a development tool, a drawing, an image editing tool, and a communication tool, etc., which are not limited here.
[0097] Among them, hardware synthesis HWC2Hardware Composer HAL (HWC) is used by SurfaceFlinger to synthesize Surface to the screen, and the SDM version can be used.
[0098] As can be seen from the figure, the upper-layer drawing process and the rendered Vsync are synchronized with the TE signal of the underlying display. When the touch panel receives a touch event, there is no correlation between the reporting frequency of the touch event and the drawing process of the display, resulting in low timeliness of touch response (i.e., response to Move events) in many cases of user use, resulting in the phenomenon that user operations do not follow the hand, and the user experience is poor.
[0099] In view of the above problems, the present application proposes a touch display method and related devices, which are described in detail below.
[0100] See also Figure 4 , Figure 4 1 is a flow chart of a touch display method provided in an embodiment of the present application, which is applied to an electronic device. As shown in the figure, the touch display method includes the following operations.
[0101] S401: receiving a touch event triggered by a target application via a touch panel.
[0102] S402: When the touch event is a preset touch event, determine a touch rhythm reported by the touch panel.
[0103] Among them, the above-mentioned touch events (Touch Events) may include click events (Click Event) and slide events (Move Event), and the above-mentioned preset touch events may be slide events (Move Event); when the user triggers a click event in the touch panel of the display screen, the electronic device may immediately respond to the click event, but when a slide event is triggered, the slide event may cause some image frames in the display interface to be updated and changed to give the user a sliding scene experience. The embodiments of the present application are applicable to related scenarios where the touch event is a slide event.
[0104] Among them, Touch events are reported to the application program at a certain period, and the above touch rhythm (Touch-Sync) can be used to indicate the period of the touch panel updating the Move Event. From the hardware perspective, it can refer to the period of the touch panel; from the software perspective, it can also refer to the period of obtaining the touch point report.
[0105] For example, after receiving at least one touch event, the electronic device may store the touch event in a queue, and may trigger a touch event to be reported to the target application at every touch rhythm, and obtain the latest touch event from the queue.
[0106] S403: Generate a target Vsync signal for the target application.
[0107] The target Vsync signal for the target application, i.e., the Vsync-app signal, also corresponds to a rhythm or cycle. The target Vsync signal can be used by the target application to obtain the latest touch event. The drawing of the target application is synchronized with the above touch rhythm (Touch-Sync), so the latest touch event can be obtained immediately after the Vsync-app signal arrives.
[0108] S404: Determine an offset between the touch rhythm and the target Vsync signal.
[0109] S405 . In response to the target Vsync signal, update the touch event to the target application according to the offset, and the target application is used to draw and display a corresponding image frame according to the touch signal.
[0110] Among them, the above-mentioned offset is used to indicate the time difference between the touch rhythm and the target Vsync signal cycle, so that the touch event and the rendering and drawing process can be synchronized, so as to shorten the display delay, so that each buffer drawn by the target application and sent to the screen for display is triggered by the latest touch event.
[0111] The above offset can be set by the user or by the system default, and is not limited here. In this application, the offset can be specified by SurfaceFlinger and can be infinitely close to 0.
[0112] When the electronic device receives the target Vsync signal, it can execute the rendering process, and obtain the latest touch event in the rendering process, so that the target application can capture the latest touch event in time.
[0113] For example, Figure 3 Correspondingly, such as Figure 5 As shown, it is a schematic diagram of a flow chart of a touch display method. Figure 5 In the process, a touch event triggered for a target application can be received through the touch panel and stored in a queue in the event center; InputFlinger (hereinafter referred to as IF) can provide a touch rhythm (Touch-vsync) to SurfaceFlinger (hereinafter referred to as SF), and after receiving the touch rhythm, SF can generate a target Vsync signal (Vsync-app signal) for the target application, and the SF can specify an offset between the touch rhythm (Touch-vsync) and the target Vsync signal (Vsync-app signal); the target application can synchronize the touch rhythm with the rhythm of the target Vsync signal response according to the offset; then the target application can respond to the target Vsync signal, and after the target Vsync signal arrives, obtain the latest touch event from the event center, and complete the drawing according to the image frame corresponding to the touch event and send it to the display screen of the electronic device; in this way, the touch display of a touch event can be completed.
[0114] and Figure 3 Compared with the touch display method shown in FIG. 1 , for example, when the refresh rate of the display screen is 120 Hz, Figure 3In the method, the delay Toffset between the Vsync-app signal and the touch rhythm Touch-sync is unpredictable, so there is a situation where the Touch event arrives just after Vsync-app triggers the drawing behavior of the target application. That is, in this scenario, Toffset is approximately equal to 8.3ms, and the display delay is also approximately equal to 8.3. Figure 5 The touch display method in does not require synchronization of TE signals. The offset between Vsync-app and Touch-sync can be specified to ensure that each buffer drawn by the target application, that is, the image frame sent to the screen for display, is triggered by the latest touch event, thereby shortening the display delay and making it infinitely close to 0ms.
[0115] It should be noted that, from the perspective of screen manufacturing technology, current display screens are divided into organic light-emitting diode (OLED) screens and liquid crystal displays (LCD). On the CMD screen of the OLED screen, if the embodiment of the present application is used, the CMD screen with Multi TE that is combined with LTPO technology can achieve better results and less display delay. In the video mode of the LCD screen, if the embodiment of the present application is used, a good effect can be achieved, because there is no TE signal, and the display rhythm can be determined according to Touch-Vsync. The advantage of the LCD screen is that it can achieve a slight delay in display without particularly affecting the display effect. Therefore, this solution is particularly suitable for the display of LCD screens.
[0116] It can be seen that the touch display method described in the embodiment of the present application receives a touch event triggered for a target application through a touch panel; when the touch event is a preset touch event, determines the touch rhythm reported by the touch panel; generates a target Vsync signal for the target application; determines the offset between the touch rhythm and the target Vsync signal; in response to the target Vsync signal, updates the touch event to the target application according to the offset, and the target application is used to draw and display the corresponding image frame according to the touch signal. In this way, an offset can be made based on the touch rhythm, and then provided to the target application, so that the drawing process of the target application can be synchronized with the touch rhythm, so that the target application can immediately obtain the latest touch event after the target Vsync signal arrives, and realize drawing and display, which is conducive to improving touch response, reducing display delay, and increasing the timeliness of touch response, thereby improving user experience.
[0117] In a possible example, the method for generating a target Vsync signal for the target application may include the following steps: generating the target Vsync signal based on the touch rhythm reported by the touch panel and according to a request cycle of the target application.
[0118] In a possible example, the method for generating a target Vsync signal for the target application may include the following steps: generating the target Vsync signal according to the touch rhythm.
[0119] It can be seen that in this example, it can be adapted to a variety of application scenarios. The target Vsync signal can be generated by the periodic request of the template application, or the target Vsync signal can be directly generated according to the update cycle of the touch signal, that is, the touch rhythm. This is conducive to improving the diversity of scenarios applicable to this solution, and is conducive to improving the practicality of the solution, thereby helping to improve the accuracy of touch display.
[0120] In a possible example, if the target application is a first type of application, the method may further include the following steps: in response to the target Vsync signal, acquiring the touch event, and triggering a rendering event for the touch event.
[0121] In a possible example, the touch event is updated to the target application according to the offset. The method may further include the following steps: according to the offset, the rendering event is updated to the target application, and the rendering of the touch event is completed.
[0122] The first type of application mentioned above may correspond to a situation where the drawing process of the target application is triggered by a target Vsync signal.
[0123] For example, Fig. 6A and Figure 6B As shown in FIG. 1 , each is a schematic diagram of a touch response scenario; wherein Fig. 6A For Figure 3 The touch response scenario of the corresponding touch display method, Figure 6B for Figure 4 or Figure 5 The corresponding touch display method has a touch response scenario. Fig. 6A and Figure 6B In the figure, A, B and C all correspond to buffers. For buffer A, it is used to cache the image frame corresponding to the corresponding touch event. Fig. 6AIn the process, the target application rendering rhythm is synchronized with the target vsync signal. If there is a target vsync signal, the rendering process is executed. When rendering, the Move event needs to be obtained. There is a certain delay between the acquisition of the Move event and the update of the Move event to the APP. That is, the offset time (T offset ); then, from Figure 6B It can be seen that the rendering rhythm (Vsync-app signal and Move event are almost synchronized. Once the user touches the touch panel, a frame of image is rendered immediately, that is, it can trigger a display immediately. The reduction of offset can make the user feel more responsive, thereby optimizing the future touch display method. If the TE cycle of the display is very small, the touch delay can be reduced.
[0124] It can be seen that in this example, when the drawing process of the target application is triggered by the target Vsync signal, the touch rhythm can be offset and then provided to the target application, so that the drawing process of the target application and the touch rhythm can be synchronized, so that the target application can immediately obtain the latest touch event after the target Vsync signal arrives, and realize drawing and display, which is beneficial to improve touch response, reduce display delay, increase the timeliness of touch response, and thus improve user experience.
[0125] In a possible example, if the target application is a second type of application; the above method may also include the following steps: obtaining the touch event in response to the target Vsync signal; determining the touch coordinates corresponding to the touch event; and calling the rendering engine corresponding to the target application.
[0126] In a possible example, the touch event is updated to the target application according to the offset, and the method may include the following steps: according to the offset, rendering the image frame corresponding to the touch event at the touch coordinates by the rendering engine.
[0127] The second type of application may correspond to a case where the drawing process of the target application is not triggered by the target Vsync signal. For example, the second type of application may be a game application, and the rendering or drawing process is implemented by a third-party rendering engine.
[0128] The touch coordinates (POS) mentioned above may refer to the horizontal and vertical coordinates of the touch point obtained by calculating a voltage field generated when two metal conductive layers of the touch panel come into contact at the touch point and then obtaining a voltage value through data conversion.
[0129] For example, Fig. 7A and Figure 7BAs shown in FIG. 1 , each is a schematic diagram of a touch response scenario; wherein Fig. 7A For Figure 3 The touch response scenario of the corresponding touch display method, Figure 7B for Figure 4 or Figure 5 The target application is a second-class application, and the acceptance of the Move event still depends on the Vsync-app signal. Fig. 7A and Figure 7B In the figure, A, B and C all correspond to buffers. For buffer A, it is used to cache the image frame corresponding to the corresponding touch event; and Fig. 7A compared to, Figure 7B After the Vsync-app signal and Touch-vsync touch rhythm are synchronized, the Move event obtained by the target application is also the latest. Even if the rhythm of its drawing buffer is not controlled by the Vsync-app signal, the purpose of reducing display delay can still be achieved.
[0130] Optionally, when the target application is the second type of application mentioned above, if the Touch deliver process does not rely on the Vsync-app signal, the Move event will be distributed immediately once there is a Move event in the queue corresponding to the event center, thereby also reducing display delay.
[0131] It can be seen that in this example, when the drawing process of the target application is not triggered by the target Vsync signal, the electronic device does not have to execute the rendering process when the target Vsync signal comes, but when the target Vsync signal is received, the touch coordinates of the touch event (Move event) still need to be obtained following the event of the target Vsync signal. Therefore, the electronic device can determine the touch coordinates corresponding to the touch event according to the target Vsync signal after offset processing, and then use the rendering engine to render the image frame corresponding to the touch event to achieve drawing and display, which is conducive to improving the practicality of the solution, and is conducive to reducing display delay, thereby improving user experience.
[0132] See also Figure 8 , Figure 8 1 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application. As shown in the figure, the electronic device includes a processor, a memory, a communication interface, and one or more programs, which are applied to the electronic device, wherein the one or more programs are stored in the memory, and the one or more programs are configured to execute the following steps by the processor:
[0133] receiving a touch event triggered for a target application via the touch panel;
[0134] When the touch event is a preset touch event, determining a touch rhythm reported by the touch panel;
[0135] Generating a target Vsync signal for the target application;
[0136] Determining an offset between the touch rhythm and the target Vsync signal;
[0137] In response to the target Vsync signal, the touch event is updated to the target application according to the offset, and the target application is used to draw and display a corresponding image frame according to the touch signal.
[0138] It can be seen that the electronic device described in the embodiment of the present application receives a touch event triggered for a target application through a touch panel; when the touch event is a preset touch event, determines the touch rhythm reported by the touch panel; generates a target Vsync signal for the target application; determines the offset between the touch rhythm and the target Vsync signal; in response to the target Vsync signal, updates the touch event to the target application according to the offset, and the target application is used to draw and display the corresponding image frame according to the touch signal. In this way, an offset can be made based on the touch rhythm, and then provided to the target application, so that the drawing process of the target application can be synchronized with the touch rhythm, so that the target application can immediately obtain the latest touch event after the target Vsync signal arrives, and realize drawing and display, which is conducive to improving touch response, reducing display delay, and increasing the timeliness of touch response, thereby improving user experience.
[0139] In a possible example, in terms of generating a target Vsync signal for the target application, the program includes instructions for performing the following steps:
[0140] Based on the touch rhythm reported by the touch panel and according to the request period of the target application, the target Vsync signal is generated.
[0141] In a possible example, in terms of generating a target Vsync signal for the target application, the program includes instructions for performing the following steps:
[0142] The target Vsync signal is generated according to the touch rhythm.
[0143] In a possible example, if the target application is a first type of application, the program further includes instructions for executing the following steps:
[0144] In response to the target Vsync signal, the touch event is acquired, and a rendering event for the touch event is triggered.
[0145] In a possible example, in terms of updating the touch event to the target application according to the offset, the program includes instructions for performing the following steps:
[0146] According to the offset, the rendering event is updated to the target application, and the rendering for the touch event is completed.
[0147] In a possible example, if the target application is a second type of application, the program further includes instructions for executing the following steps:
[0148] In response to the target Vsync signal, acquiring the touch event;
[0149] Determining touch coordinates corresponding to the touch event;
[0150] The rendering engine corresponding to the target application is called.
[0151] In a possible example, in terms of updating the touch event to the target application according to the offset, the program includes instructions for performing the following steps:
[0152] The image frame corresponding to the touch event is rendered at the touch coordinates by the rendering engine according to the offset.
[0153] In a possible example, the touch rhythm is used to instruct the touch panel to update the touch event cycle.
[0154] The above mainly introduces the scheme of the embodiment of the present application from the perspective of the execution process on the method side. It is understandable that, in order to realize the above functions, the electronic device includes a hardware structure and / or software module corresponding to the execution of each function. It should be easily appreciated by those skilled in the art that, in combination with the units and algorithm steps of each example described in the embodiments provided herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present application.
[0155] The embodiment of the present application can divide the electronic device into functional units according to the above method example. For example, each functional unit can be divided according to each function, or two or more functions can be integrated into one processing unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional units. It should be noted that the division of units in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0156] In the case of dividing each functional module into corresponding functional modules, Fig. 9 A schematic diagram of a touch display device is shown. Fig. 9 As shown, applied to electronic devices, the touch display device 900 may include: a receiving unit 901, a determining unit 902, a generating unit 903 and an updating unit 904, wherein:
[0157] The receiving unit 901 is used to receive a touch event triggered by a target application via a touch panel;
[0158] The determining unit 902 is used to determine the touch rhythm reported by the touch panel when the touch event is a preset touch event;
[0159] The generating unit 903 is used to generate a target Vsync signal for the target application;
[0160] The determining unit 902 is further configured to determine an offset between the touch rhythm and the target Vsync signal;
[0161] The updating unit 904 is used to update the touch event to the target application according to the offset in response to the target Vsync signal, and the target application is used to draw and display the corresponding image frame according to the touch signal.
[0162] It can be seen that the touch display device provided in the embodiment of the present application receives a touch event triggered for a target application through a touch panel; when the touch event is a preset touch event, determines the touch rhythm reported by the touch panel; generates a target Vsync signal for the target application; determines the offset between the touch rhythm and the target Vsync signal; in response to the target Vsync signal, updates the touch event to the target application according to the offset, and the target application is used to draw and display the corresponding image frame according to the touch signal. In this way, an offset can be made based on the touch rhythm, and then provided to the target application, so that the drawing process of the target application can be synchronized with the touch rhythm, so that the target application can immediately obtain the latest touch event after the target Vsync signal arrives, and realize drawing and display, which is conducive to improving touch response, reducing display delay, and increasing the timeliness of touch response, thereby improving user experience.
[0163] In a possible example, in terms of generating the target Vsync signal for the target application, the program generation unit 903 is specifically used to:
[0164] Based on the touch rhythm reported by the touch panel and according to the request period of the target application, the target Vsync signal is generated.
[0165] In a possible example, in terms of generating the target Vsync signal for the target application, the program generation unit 903 is specifically used to:
[0166] The target Vsync signal is generated according to the touch rhythm.
[0167] In a possible example, if the target application is a first type of application, the determination unit 902 is specifically configured to:
[0168] In response to the target Vsync signal, the touch event is acquired, and a rendering event for the touch event is triggered.
[0169] In a possible example, in updating the touch event to the target application according to the offset, the updating unit 904 is specifically configured to:
[0170] According to the offset, the rendering event is updated to the target application, and the rendering for the touch event is completed.
[0171] In a possible example, if the target application is a second type of application, the determination unit 902 is specifically configured to:
[0172] In response to the target Vsync signal, acquiring the touch event;
[0173] Determining touch coordinates corresponding to the touch event;
[0174] The rendering engine corresponding to the target application is called.
[0175] In a possible example, in updating the touch event to the target application according to the offset, the updating unit 904 is specifically configured to:
[0176] The image frame corresponding to the touch event is rendered at the touch coordinates by the rendering engine according to the offset.
[0177] It should be noted that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module and will not be repeated here.
[0178] The electronic device provided in this embodiment is used to execute the above touch display method, and thus can achieve the same effect as the above implementation method.
[0179] In the case of using integrated units, the electronic device may include a processing module, a storage module and a communication module. Among them, the processing module can be used to control and manage the actions of the electronic device, for example, it can be used to support the electronic device to execute the steps performed by the above-mentioned receiving unit 901, determining unit 902, generating unit 903 and updating unit 904. The storage module can be used to support the electronic device to execute stored program codes and data, etc. The communication module can be used to support the communication between the electronic device and other devices.
[0180] Among them, the processing module can be a processor or a controller. It can implement or execute various exemplary logic boxes, modules and circuits described in conjunction with the disclosure of this application. The processor can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc. The storage module can be a memory. The communication module can specifically be a device that interacts with other electronic devices, such as a radio frequency circuit, a Bluetooth chip, a Wi-Fi chip, etc.
[0181] An embodiment of the present application also provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, wherein the computer program enables a computer to execute part or all of the steps of any method described in the above method embodiments, and the above computer includes an electronic device.
[0182] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0183] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0184] In the several embodiments provided in the present application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of the above-mentioned units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.
[0185] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0186] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0187] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a memory, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the above-mentioned methods of each embodiment of the present application. The aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or CD-ROM and other media that can store program codes.
[0188] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable memory, which can include: a flash drive, a read-only memory, a random access memory, a magnetic disk or an optical disk, etc.
[0189] The embodiments of the present application are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of the present application. At the same time, for general technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A touch display method, applied to electronic equipment, It is characterized in that include: receiving a touch event triggered for a target application via the touch panel; When the touch event is a preset touch event, determining a touch rhythm reported by the touch panel; Generating a target Vsync signal for the target application; Determining an offset between the touch rhythm and the target Vsync signal; In response to the target Vsync signal, the touch event is updated to the target application according to the offset, and the target application is used to draw and display a corresponding image frame according to the touch signal.
2. The method according to claim 1, It is characterized in that The generating of a target Vsync signal for the target application comprises: Based on the touch rhythm reported by the touch panel and according to the request period of the target application, the target Vsync signal is generated.
3. The method according to claim 1, It is characterized in that The generating of a target Vsync signal for the target application comprises: The target Vsync signal is generated according to the touch rhythm.
4. The method according to any one of claims 1 to 3, It is characterized in that If the target application is a first type of application; the method further includes: In response to the target Vsync signal, acquiring the touch event, and triggering a rendering event for the touch event; The updating of the touch event to the target application according to the offset includes: According to the offset, the rendering event is updated to the target application, and the rendering for the touch event is completed.
5. The method according to any one of claims 1 to 3, It is characterized in that If the target application is a second type of application, the method further includes: In response to the target Vsync signal, acquiring the touch event; Determining touch coordinates corresponding to the touch event; The rendering engine corresponding to the target application is called.
6. The method according to claim 5, It is characterized in that The updating of the touch event to the target application according to the offset includes: The image frame corresponding to the touch event is rendered at the touch coordinates by the rendering engine according to the offset.
7. The method according to any one of claims 1 to 3, It is characterized in that The touch rhythm is used to instruct the touch panel to update the touch event cycle.
8. A touch display device, It is characterized in that Applied to electronic equipment, the device comprises: a receiving unit, a determining unit, a generating unit and an updating unit, wherein: The receiving unit is used to receive a touch event triggered by a target application through a touch panel; The determining unit is used to determine the touch rhythm reported by the touch panel when the touch event is a preset touch event; The generating unit is used to generate a target Vsync signal for the target application; The determining unit is further configured to determine an offset between the touch rhythm and the target Vsync signal; The update unit is used to update the touch event to the target application according to the offset in response to the target Vsync signal, and the target application is used to draw and display the corresponding image frame according to the touch signal.
9. An electronic device, It is characterized in that The method comprises a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and the programs include instructions for executing the steps in the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, It is characterized in that A computer program for electronic data exchange is stored, wherein the computer program enables a computer to execute the method according to any one of claims 1 to 7.
