Stroke drawing method and apparatus, storage medium, and electronic device
By accelerating the reporting strategy of the touch integrated circuit and the image rendering of the application layer without waiting for the vertical synchronization signal, the problem of touch handwriting display delay is solved, and the responsiveness of touch devices is improved, especially at low refresh rates.
Patent Information
- Application Number
- PCT/CN2024/121546
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-08-30
- Filing Date
- 2024-09-26
- Publication Date
- 2026-03-05
AI Technical Summary
In existing technologies, the processing of touch events depends on the timing of the vertical synchronization signal, which results in a long delay in the display of touch handwriting, especially at low display refresh rates, where the responsiveness of touch is poor.
By accelerating the reporting strategy through touch integrated circuits, the reporting point information is directly reported to the system driver layer, and the image is drawn in the application layer without waiting for the vertical synchronization signal. Combined with the system driver layer's priority processing of touch interrupts and non-waiting signal processing of screen composition components, the transmission efficiency of the reporting point information is improved.
It effectively reduces the display latency of touch pen strokes and improves the responsiveness of touch, especially at low display refresh rates, reducing the perceived lag in touch operations.
Smart Images

Figure CN2024121546_05032026_PF_FP_ABST
Abstract
Description
Handwriting drawing methods, devices, storage media and electronic devices
[0001] This application claims priority to Chinese Patent Application No. 202411216346.5, filed on August 30, 2024, entitled “Handwriting drawing method, apparatus, storage medium and electronic device”, the entire contents of which are incorporated herein by reference. Technical Field
[0002] This application relates to the field of electronic equipment technology, specifically to a handwriting drawing method, apparatus, storage medium, and electronic equipment. Background Technology
[0003] Touch operations on screens using styluses or fingers are very common. Currently, the processing flow for these touch operations is usually as follows: after the system driver layer receives the reporting information of the stylus or finger on the screen from the touch integrated circuit (touch IC), the system driver layer sends the reporting information to the application layer. The application layer then waits for the vertical synchronization signal (Vsync signal) to draw and synthesize the handwriting image based on the reporting information and then sends it to the screen for display. Technical issues
[0004] Currently, touch event processing heavily relies on the timing of the vertical sync signal, which is very time-consuming, especially at low display refresh rates, such as 60Hz displays. The interval between vertical sync signals is 16.7ms, and it takes more than 100ms from the time a stylus or finger slides across the screen to the time the handwriting appears on the screen. There is a significant delay, especially when drawing or writing with a stylus. The long delay in displaying touch handwriting results in poor touch responsiveness. Technical solutions
[0005] This application provides a handwriting drawing scheme that can effectively reduce the display delay of touch handwriting and improve the responsiveness of touch.
[0006] The embodiments of this application provide the following technical solutions:
[0007] According to one embodiment of this application, a handwriting drawing method includes: reporting point information detected on the screen to a system driver layer via a touch integrated circuit; dispatching the point information to an application layer via the system driver layer; and performing image drawing without waiting for a vertical synchronization signal based on the point information via the application layer to obtain a handwriting image to be displayed, the handwriting image to be displayed being used for display on the screen.
[0008] In some embodiments of this application, the step of reporting the detected point information of the screen to the system driver layer through the touch integrated circuit includes: determining an accelerated reporting strategy through the touch integrated circuit, and reporting the detected point information of the screen to the system driver layer according to the accelerated reporting strategy.
[0009] In some embodiments of this application, the accelerated reporting strategy includes, but is not limited to, one or more of the following: reducing touch de-jitter detection; increasing touch sampling rate.
[0010] In some embodiments of this application, the step of dispatching the reporting information to the application layer through the system driver layer includes: determining the reporting information closest to the first vertical synchronization signal through the system driver layer, and reporting the reporting information closest to the first vertical synchronization signal to the application layer.
[0011] In some embodiments of this application, before the reporting information is dispatched to the application layer through the system driver layer, the method further includes: setting the touch interrupt as the first processing priority among various interrupt processing priorities through the system driver layer.
[0012] In some embodiments of this application, the step of obtaining a handwriting image to be displayed by performing image drawing without waiting for a vertical synchronization signal based on the reporting information through the application layer includes: obtaining graphic drawing data by performing graphic drawing without waiting for a vertical synchronization signal based on the reporting information through a drawing application, and passing the graphic drawing data to a screen compositing component; and obtaining the handwriting image to be displayed by performing image compositing based on the graphic drawing data without waiting for a vertical synchronization signal through the screen compositing component.
[0013] In some embodiments of this application, the step of obtaining a handwriting image to be displayed by performing image drawing without waiting for a vertical synchronization signal based on the reporting point information through the application layer includes: performing graphic drawing based on the reporting point information through a drawing application to obtain graphic drawing data, and passing the graphic drawing data to a screen compositing component; and performing image compositing based on the graphic drawing data without waiting for a vertical synchronization signal through the screen compositing component to obtain a handwriting image to be displayed.
[0014] In some embodiments of this application, the step of obtaining a handwriting image to be displayed by performing image drawing without waiting for a vertical synchronization signal based on the reporting information through the application layer includes: obtaining graphic drawing data by performing graphic drawing without waiting for a vertical synchronization signal based on the reporting information through a drawing application, and passing the graphic drawing data to a screen compositing component; and obtaining the handwriting image to be displayed by performing image compositing based on the graphic drawing data through the screen compositing component.
[0015] In some embodiments of this application, after obtaining a handwriting image by performing image synthesis based on the drawing data without waiting for a vertical synchronization signal using a screen synthesis component, the method further includes: if a second vertical synchronization signal is detected, transmitting the handwriting image to the screen through the screen synthesis component so that the handwriting image is displayed on the screen.
[0016] According to one embodiment of this application, a handwriting drawing device is provided, the device comprising: a touch integrated circuit, configured to: report point information detected on the screen to a system driver layer; the system driver layer, configured to: dispatch the point information to an application layer; the application layer, configured to: perform image drawing without waiting for a vertical synchronization signal based on the point information to obtain a handwriting image to be displayed, the handwriting image to be displayed being used for display on the screen.
[0017] In some embodiments of this application, the touch integrated circuit is used to: determine an accelerated reporting strategy, and report the detected reporting point information for the screen to the system driver layer according to the accelerated reporting strategy.
[0018] In some embodiments of this application, the accelerated reporting strategy includes, but is not limited to, one or more of the following: reducing touch de-jitter detection; increasing touch sampling rate.
[0019] In some embodiments of this application, the system driver layer is used to: determine the reporting point information closest to the first vertical synchronization signal, and report the reporting point information closest to the first vertical synchronization signal to the application layer.
[0020] In some embodiments of this application, before the reporting information is dispatched to the application layer through the system driver layer, the device further includes a setting module for setting the touch interrupt as the first processing priority among various interrupt processing priorities through the system driver layer.
[0021] In some embodiments of this application, the application layer is configured to: obtain graphic drawing data by performing graphic drawing based on the reporting information without waiting for a vertical synchronization signal through a drawing application, and transmit the graphic drawing data to a screen compositing component; and obtain a handwriting image to be displayed by performing image compositing based on the graphic drawing data without waiting for a vertical synchronization signal through the screen compositing component.
[0022] In some embodiments of this application, the application layer is configured to: obtain graphic drawing data by performing graphic drawing based on the reported point information through a drawing application, and transmit the graphic drawing data to a screen compositing component; and obtain a handwriting image to be displayed by performing image compositing based on the graphic drawing data without waiting for a vertical synchronization signal through the screen compositing component.
[0023] In some embodiments of this application, the application layer is configured to: obtain graphic drawing data by performing graphic drawing without waiting for a vertical synchronization signal based on the reporting information through a drawing application; and transmit the graphic drawing data to a screen compositing component; and perform image compositing based on the graphic drawing data through the screen compositing component to obtain a handwriting image to be displayed.
[0024] In some embodiments of this application, after the handwriting image is obtained by the screen compositing component performing image compositing based on the drawing data without waiting for the vertical synchronization signal, the screen compositing component is configured to: if a second vertical synchronization signal is detected, transmit the handwriting image to the screen through the screen compositing component so that the handwriting image is displayed on the screen.
[0025] According to another embodiment of this application, a storage medium stores a computer program thereon, which, when executed by a computer's processor, causes the computer to perform the methods described in the embodiments of this application.
[0026] According to another embodiment of this application, an electronic device may include: a memory storing a computer program; and a processor reading the computer program stored in the memory to execute the methods described in the embodiments of this application.
[0027] According to another embodiment of this application, a computer program product or computer program includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various optional implementations described in the embodiments of this application. Beneficial effects
[0028] In this embodiment, the touch integrated circuit reports the detected point information to the system driver layer; the system driver layer dispatches the point information to the application layer; the application layer performs image drawing without waiting for the vertical synchronization signal based on the point information to obtain a handwriting image to be displayed, which is then used to display the handwriting image on the screen.
[0029] In this way, the touch integrated circuit reports the point information detected on the screen to the system driver layer. After the system driver layer dispatches the point information to the application layer, the application layer performs image drawing without waiting for the vertical synchronization signal based on the point information, and obtains the handwriting image to be displayed on the screen. Thus, the processing in the application layer does not depend on the timing of the vertical synchronization signal, has low time consumption, can effectively reduce the display delay of touch handwriting, and improve the responsiveness of touch. Attached Figure Description
[0030] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0031] Figure 1 shows a flowchart of a handwriting drawing method according to an embodiment of this application.
[0032] Figure 2 shows a schematic flowchart of a reporting point according to an embodiment of this application.
[0033] Figure 3 shows a flowchart of handwriting drawing according to another embodiment of this application.
[0034] Figure 4 shows a flowchart of handwriting drawing according to another embodiment of this application.
[0035] Figure 5 shows a block diagram of a handwriting drawing apparatus according to an embodiment of this application.
[0036] Figure 6 shows a block diagram of an electronic device according to an embodiment of this application.
[0037] Implementation methods of this application
[0038] The present disclosure will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the embodiments provided herein are merely illustrative of the present disclosure and are not intended to limit the present disclosure. Furthermore, the embodiments provided below are some embodiments for implementing the present disclosure, and not all embodiments for implementing the present disclosure. Unless otherwise specified, the technical solutions described in the embodiments of the present disclosure can be implemented in any combination.
[0039] It should be noted that, in the embodiments of this disclosure, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a method or apparatus that includes a list of elements includes not only the elements expressly described, but also other elements not expressly listed, or elements inherent to implementing the method or apparatus. Without further limitations, an element defined by the phrase "comprising a..." does not exclude the presence of other related elements (e.g., steps in the method or units in the apparatus, such as portions of circuitry, processors, programs, or software, etc.) in the method or apparatus that includes that element.
[0040] For example, the handwriting drawing method provided in this embodiment includes a series of steps, but the handwriting drawing method provided in this embodiment is not limited to the steps described. Similarly, the handwriting drawing device provided in this embodiment includes a series of units, but the device provided in this embodiment is not limited to the units explicitly described, but may also include units that need to be set up for obtaining relevant information or processing based on information.
[0041] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure belongs. The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of this disclosure.
[0042] It is understood that in the specific implementation of this application, relevant data is involved. When the embodiments in this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0043] Figure 1 schematically illustrates a flowchart of a handwriting drawing method according to an embodiment of this application. The subject executing this handwriting drawing method can be any device with processing capabilities, such as a television, computer, mobile phone, smartwatch, and home appliance.
[0044] As shown in Figure 1, the handwriting drawing method may include steps S110 to S130.
[0045] Step S110: The touch integrated circuit reports the detected point information to the system driver layer; Step S120: The system driver layer dispatches the point information to the application layer; Step S130: The application layer performs image drawing without waiting for the vertical synchronization signal based on the point information to obtain a handwriting image to be displayed, which is used to display on the screen.
[0046] When a user swipes on the screen using a stylus or finger, the touch integrated circuit (touch IC) can detect information about the contact point between the stylus or finger and the screen (e.g., the coordinates, size, and pressure of the contact point). This contact point information is also known as the reporting point information. The touch integrated circuit (touch IC) can detect the reporting point information according to a predetermined or dynamic touch sampling rate.
[0047] The touch integrated circuit reports the detected point information to the system driver layer, which then dispatches the received point information to the application layer. Furthermore, in this embodiment, the application layer directly uses the point information to draw an image without waiting for the vertical synchronization signal (Vsync signal), obtaining a handwriting image to be displayed on the screen. This allows for efficient synchronous display of the touch handwriting on the screen. The vertical synchronization signal can be a signal generated after the screen refreshes and displays one frame of image.
[0048] In this way, the touch integrated circuit reports the point information detected on the screen to the system driver layer. After the system driver layer dispatches the point information to the application layer, the application layer performs image drawing without waiting for the vertical synchronization signal based on the point information, and obtains the handwriting image to be displayed on the screen. Thus, the processing in the application layer does not depend on the timing of the vertical synchronization signal, has low time consumption, can effectively reduce the display delay of touch handwriting, and improve the responsiveness of touch.
[0049] The following describes further optional embodiments of the steps performed during handwriting drawing in the embodiment shown in Figure 1.
[0050] In one embodiment, the step of reporting the detected point information of the screen to the system driver layer via the touch integrated circuit includes: determining an accelerated reporting strategy via the touch integrated circuit, and reporting the detected point information of the screen to the system driver layer according to the accelerated reporting strategy.
[0051] In a conventional implementation, the touch integrated circuit reports the detected point information on the screen to the system driver layer according to the conventional reporting process.
[0052] In this embodiment of the application, an accelerated reporting strategy is determined through a touch integrated circuit, and the reported point information detected on the screen is reported to the system driver layer according to the accelerated reporting strategy. Compared with the conventional reporting process, the touch reporting latency can be further reduced, the display latency of touch handwriting can be further reduced, and the responsiveness of touch can be further improved.
[0053] Specifically, in one embodiment, the accelerated reporting strategy may include, but is not limited to, one or more of the following: reducing touch de-jitter detection; increasing touch sampling rate.
[0054] In the standard reporting process, before reporting the reported point information to the system driver layer, the touch integrated circuit usually needs to perform touch debounce detection and collect the reported point information according to the predetermined touch sampling rate.
[0055] Accelerated reporting strategies may include, but are not limited to, reducing touch debounce detection and increasing the touch sampling rate, or one or more of these. By reducing touch debounce detection and / or increasing the touch sampling rate, the touch reporting latency of the touch integrated circuit can be effectively reduced.
[0056] In one approach, determining the accelerated reporting strategy through the touch integrated circuit can be: setting the default strategy as the accelerated reporting strategy. For example, if the default strategy is to reduce touch de-jitter detection and increase the touch sampling rate, then the current accelerated reporting strategy is to reduce touch de-jitter detection and increase the touch sampling rate.
[0057] Alternatively, in other methods, determining the accelerated reporting strategy through the touch integrated circuit can be: determining the current screen usage scenario (e.g., gaming, note-taking, etc.), and querying a preset strategy table to find the specified strategy that matches the screen usage scenario as the accelerated reporting strategy.
[0058] Furthermore, in one embodiment, the step of dispatching the reporting information to the application layer through the system driver layer may include: determining, through the system driver layer, the reporting information closest to the first vertical synchronization signal, and reporting the reporting information closest to the first vertical synchronization signal to the application layer.
[0059] In a conventional implementation, the system driver layer dispatches the received call point information to the application layer according to the conventional dispatch method. Referring to Figure 2, in the conventional dispatch method, within each frame image refresh display cycle (that is, the cycle between the two Vsync signals as shown in Figure 2), the system driver layer may receive at least two call point information. However, when the system driver layer processes the touch (Action_Move) event, there is a judgment of no less than 5ms. This will cause some call point information 210 (white dots as shown in Figure 2) that are within 5ms of the next Vsync signal 220 to not be dispatched to the application layer, resulting in a certain delay in call point reporting, which will have a certain impact on responsiveness.
[0060] In this embodiment of the application, the system driver layer determines the reporting information closest to the first vertical synchronization signal and reports the reporting information closest to the first vertical synchronization signal to the application layer. The first vertical synchronization signal is, for example, each Vsync signal 220 shown in FIG2. Then, the white reporting information 210 shown in FIG2 will be reported to the application layer. This can reduce the reporting delay from the system driver layer to the application layer, and thus further improve the overall responsiveness of touch.
[0061] Furthermore, in one embodiment, before dispatching the reporting information to the application layer through the system driver layer, the method further includes: setting the touch interrupt as the first processing priority among various interrupt processing priorities through the system driver layer.
[0062] The system contains various interrupts, each of which is an event. For example, events performed through the screen, such as fingerprint unlocking, facial recognition, and touch, can all correspond to an interrupt. When the system driver layer detects a touch interrupt, it sets the touch interrupt as the highest priority among all interrupt processing priorities. This allows the system driver layer to process the touch event more efficiently, further improving the reporting efficiency from the system driver layer to the application layer and enhancing touch responsiveness.
[0063] Further, referring to Figure 3, in the conventional method, the application layer obtains the handwriting image to be displayed by drawing an image while waiting for the vertical synchronization signal based on the reported point information. The specific process is shown in Figure 3: Step S310, when the system driver layer detects a touch interrupt (input interrupt), it reports the reported point information to the application, and the application waits for the vertical synchronization signal vsync-a1; then, in step S320, when the application receives the vertical synchronization signal vsync-a1, it starts drawing graphics to obtain graphics drawing data and passes the graphics drawing data to the screen composition component (SF, SurfaceFlinger); then, in step S330, when the SF receives the vertical synchronization signal vsync-a2, it starts image composition to obtain the handwriting image to be displayed; then, in step S340, while waiting for the next vertical synchronization signal vsync-a3, it passes the handwriting image to be displayed to the screen for screen refresh, thereby displaying the handwriting image to be displayed.
[0064] In the embodiments of this application, referring to FIG4, in step S410, the system driver layer determines the reporting information closest to the first vertical synchronization signal and reports the reporting information closest to the first vertical synchronization signal to the application layer, and / or, the system driver layer sets the touch interrupt as the first processing priority among the processing priorities of various interrupts, which can make step S410 shorter than step S310, that is, reduce the reporting delay from the system driver layer to the application layer and improve the reporting efficiency from the system driver layer to the application layer.
[0065] Furthermore, in one embodiment of this application, the step of obtaining a handwriting image to be displayed by performing image drawing without waiting for a vertical synchronization signal based on the reporting point information through the application layer may include: obtaining graphic drawing data by performing graphic drawing based on the reporting point information through a drawing application, and transmitting the graphic drawing data to a screen compositing component; and obtaining a handwriting image to be displayed by performing image compositing based on the graphic drawing data without waiting for a vertical synchronization signal through the screen compositing component.
[0066] For example, as shown in Figure 4, in step S420, after the drawing application waits for the vertical synchronization signal vsync-b1, it performs graphic drawing based on the reporting point information to obtain graphic drawing data, and then passes the graphic drawing data to the screen composition component. Then, the screen composition component directly performs image composition based on the graphic drawing data without waiting for the vertical synchronization signal to obtain the handwriting image to be displayed. Then, after waiting for the vertical synchronization signal vsync-b2, it passes the handwriting image to be displayed to the screen for screen refresh and display of the handwriting image to be displayed.
[0067] Furthermore, the "graphics drawing in the application" and the "image composition of the screen composition component" are completed within one frame (i.e., the time period between the vsync-b1 signal and the vsync-b2 signal). The processing of the screen composition component does not depend on the timing of the vertical synchronization signal, has low time consumption, and can effectively reduce the display latency of touch pen strokes and improve the responsiveness of touch.
[0068] Furthermore, in one embodiment of this application, the step of obtaining the handwriting image to be displayed by performing image drawing without waiting for the vertical synchronization signal based on the reporting information through the application layer may include:
[0069] The drawing application performs graphic drawing based on the reported point information without waiting for the vertical synchronization signal to obtain graphic drawing data, and then transmits the graphic drawing data to the screen compositing component; the screen compositing component performs image compositing based on the graphic drawing data without waiting for the vertical synchronization signal to obtain the handwriting image to be displayed.
[0070] In this embodiment, upon receiving the reporting information, the drawing application directly performs graphic drawing without waiting for the vertical synchronization signal to obtain graphic drawing data, and then transmits the graphic drawing data to the screen compositing component. Furthermore, the screen compositing component also does not wait for the vertical synchronization signal, directly performing image compositing based on the graphic drawing data to obtain the handwriting image to be displayed. This allows "graphic drawing in the application" to be performed in advance and completed within one frame (the time interval between two vsync signals) with "image compositing by the screen compositing component." Furthermore, this makes the processing in the application layer independent of the timing of the vertical synchronization signal, resulting in lower processing time and effectively reducing the display latency of touch handwriting, thus improving touch responsiveness.
[0071] Furthermore, in one embodiment of this application, the step of obtaining a handwriting image to be displayed by performing image drawing without waiting for a vertical synchronization signal based on the reporting information through the application layer may include: obtaining graphic drawing data by performing graphic drawing without waiting for a vertical synchronization signal based on the reporting information through a drawing application, and transmitting the graphic drawing data to a screen compositing component; and obtaining the handwriting image to be displayed by performing image compositing based on the graphic drawing data through the screen compositing component.
[0072] In this embodiment, after receiving the reporting information, the drawing application directly performs graphic drawing to obtain graphic drawing data without waiting for the vertical synchronization signal, and transmits the graphic drawing data to the screen composition component; after waiting for the vertical synchronization signal, the screen composition component performs image composition based on the graphic drawing data to obtain the handwriting image to be displayed, so that the graphic drawing in the application does not depend on the timing of the vertical synchronization signal, and the time consumption is low, which can further effectively reduce the display delay of touch handwriting and improve the responsiveness of touch.
[0073] Furthermore, after obtaining the handwriting image by performing image synthesis based on the drawing data without waiting for the vertical synchronization signal through the screen synthesis component, the method further includes: if a second vertical synchronization signal is detected, then transmitting the handwriting image to the screen through the screen synthesis component so that the handwriting image is displayed on the screen.
[0074] The second vertical synchronization signal is, for example, the vertical synchronization signal vsync-b2 in Figure 4. After the screen compositing component performs image compositing based on the graphics drawing data to obtain the handwriting image to be displayed, it transmits the handwriting image to be displayed to the screen for screen refresh after waiting for the vertical synchronization signal vsync-b2, which can make the handwriting image to be displayed stably displayed on the screen.
[0075] To facilitate better implementation of the handwriting drawing method provided in the embodiments of this application, this application also provides a handwriting drawing device based on the above-described handwriting drawing method. The meanings of the terms used are the same as in the handwriting drawing method described above, and specific implementation details can be found in the descriptions in the method embodiments. Figure 5 shows a block diagram of a handwriting drawing device according to an embodiment of this application.
[0076] As shown in Figure 5, the handwriting drawing device 500 may include: a touch integrated circuit 510 which can be used to: report the reporting information detected on the screen to the system driver layer; the system driver layer 520 which can be used to: dispatch the reporting information to the application layer; and the application layer 530 which can be used to: draw an image without waiting for a vertical synchronization signal based on the reporting information to obtain a handwriting image to be displayed, which is used to display on the screen.
[0077] In some embodiments of this application, the touch integrated circuit is used to: determine an accelerated reporting strategy, and report the detected reporting point information for the screen to the system driver layer according to the accelerated reporting strategy.
[0078] In some embodiments of this application, the accelerated reporting strategy includes, but is not limited to, one or more of the following: reducing touch de-jitter detection; increasing touch sampling rate.
[0079] In some embodiments of this application, the system driver layer is used to: determine the reporting point information closest to the first vertical synchronization signal, and report the reporting point information closest to the first vertical synchronization signal to the application layer.
[0080] In some embodiments of this application, before the reporting information is dispatched to the application layer through the system driver layer, the device further includes a setting module for setting the touch interrupt as the first processing priority among various interrupt processing priorities through the system driver layer.
[0081] In some embodiments of this application, the application layer is configured to: obtain graphic drawing data by performing graphic drawing based on the reporting information without waiting for a vertical synchronization signal through a drawing application, and transmit the graphic drawing data to a screen compositing component; and obtain a handwriting image to be displayed by performing image compositing based on the graphic drawing data without waiting for a vertical synchronization signal through the screen compositing component.
[0082] In some embodiments of this application, the application layer is configured to: obtain graphic drawing data by performing graphic drawing based on the reported point information through a drawing application, and transmit the graphic drawing data to a screen compositing component; and obtain a handwriting image to be displayed by performing image compositing based on the graphic drawing data without waiting for a vertical synchronization signal through the screen compositing component.
[0083] In some embodiments of this application, the application layer is configured to: obtain graphic drawing data by performing graphic drawing without waiting for a vertical synchronization signal based on the reporting information through a drawing application; and transmit the graphic drawing data to a screen compositing component; and perform image compositing based on the graphic drawing data through the screen compositing component to obtain a handwriting image to be displayed.
[0084] In some embodiments of this application, after the handwriting image is obtained by the screen compositing component performing image compositing based on the drawing data without waiting for the vertical synchronization signal, the screen compositing component is configured to: if a second vertical synchronization signal is detected, transmit the handwriting image to the screen through the screen compositing component so that the handwriting image is displayed on the screen.
[0085] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of this application, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0086] Furthermore, this application also provides an electronic device, as shown in FIG6. FIG6 shows a block diagram of an electronic device according to an embodiment of this application, specifically:
[0087] The electronic device may include components such as a processor 601 with one or more processing cores, a memory 602 with one or more computer-readable storage media, a power supply 603, and an input unit 604. Those skilled in the art will understand that the electronic device structure shown in FIG6 does not constitute a limitation on the electronic device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein:
[0088] The processor 601 is the control center of the electronic device. It connects to various parts of the computer device via various interfaces and lines. By running or executing software programs and / or modules stored in the memory 602, and by calling data stored in the memory 602, it performs various functions of the computer device and processes data, thereby providing overall monitoring of the electronic device. Optionally, the processor 601 may include one or more processing cores; preferably, the processor 601 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user page, and application programs, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 601.
[0089] The memory 602 can be used to store software programs and modules. The processor 601 executes various functional applications and data processing by running the software programs and modules stored in the memory 602. The memory 602 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 602 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 602 may also include a memory controller to provide the processor 601 with access to the memory 602.
[0090] The electronic device also includes a power supply 603 that supplies power to the various components. Preferably, the power supply 603 can be logically connected to the processor 601 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 603 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0091] The electronic device may also include an input unit 604, which can be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
[0092] Although not shown, the electronic device may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 601 in the electronic device loads the executable files corresponding to the processes of one or more computer programs into the memory 602 according to the following instructions, and the processor 601 runs the computer programs stored in the memory 602, thereby realizing the various functions in the foregoing embodiments of this application.
[0093] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by a computer program, or by a computer program controlling related hardware. The computer program can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0094] Therefore, embodiments of this application also provide a storage medium storing a computer program that can be loaded by a processor to execute the steps in any of the methods provided in embodiments of this application.
[0095] The storage medium can be a computer-readable storage medium, which may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0096] Since the computer program stored in the storage medium can execute the steps of any of the methods provided in the embodiments of this application, the beneficial effects that the methods provided in the embodiments of this application can achieve can be realized. For details, please refer to the previous embodiments, which will not be repeated here.
[0097] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the embodiments disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein.
[0098] It should be understood that this application is not limited to the embodiments described above and shown in the accompanying drawings, but various modifications and changes can be made without departing from its scope.
Claims
1. A method for drawing handwriting, wherein, include: The touch integrated circuit reports the detected point information on the screen to the system driver layer; The reporting information is dispatched to the application layer through the system driver layer. The application layer performs image drawing without waiting for the vertical synchronization signal based on the reporting information to obtain a handwriting image to be displayed, which is then used to display the handwriting image on the screen.
2. The method according to claim 1, wherein, The step of reporting the detected point information to the system driver layer via the touch integrated circuit includes: By using the touch-sensitive integrated circuit, a strategy for accelerating reporting is determined, and... The reported point information detected on the screen is reported to the system driver layer according to the accelerated reporting strategy.
3. The method according to claim 2, wherein, The accelerated reporting strategy includes, but is not limited to, one or more of the following methods: Reduce touch shake detection; Improve touch sampling rate.
4. The method according to claim 1, wherein, The step of dispatching the reporting information to the application layer through the system driver layer includes: Through the system driver layer, the reporting point information closest to the first vertical synchronization signal is determined, and... The reporting point information closest to the first vertical synchronization signal is reported to the application layer.
5. The method according to claim 1, wherein, Before the dispatching of the reporting information to the application layer through the system driver layer, the method further includes: The system driver layer sets touch interrupts as the first priority among all types of interrupts.
6. The method according to claim 1, wherein, The step of drawing an image without waiting for a vertical synchronization signal based on the reporting information through the application layer to obtain the handwriting image to be displayed includes: The drawing application obtains graphic drawing data by drawing graphics without waiting for the vertical synchronization signal based on the reported point information, and then transmits the graphic drawing data to the screen composition component. The screen compositing component performs image compositing based on the graphic drawing data without waiting for a vertical synchronization signal to obtain the handwriting image to be displayed.
7. The method according to claim 1, wherein, The step of drawing an image without waiting for a vertical synchronization signal based on the reporting information through the application layer to obtain the handwriting image to be displayed includes: The drawing application performs graphic drawing based on the reported information to obtain graphic drawing data, and then transmits the graphic drawing data to the screen composition component. The screen compositing component performs image compositing based on the graphic drawing data without waiting for a vertical synchronization signal to obtain the handwriting image to be displayed.
8. The method according to claim 1, wherein, The step of drawing an image without waiting for a vertical synchronization signal based on the reporting information through the application layer to obtain the handwriting image to be displayed includes: The drawing application obtains graphic drawing data by drawing graphics without waiting for the vertical synchronization signal based on the reported point information, and then transmits the graphic drawing data to the screen composition component. The screen compositing component performs image compositing based on the graphic drawing data to obtain the handwriting image to be displayed.
9. The method according to claim 1, wherein, After obtaining the handwriting image by performing image synthesis based on the drawing data without waiting for the vertical synchronization signal using the screen compositing component, the method further includes: If a second vertical synchronization signal is detected, the handwriting image is transmitted to the screen via the screen compositing component so that the handwriting image is displayed on the screen.
10. The method according to claim 2, wherein, The determination of the accelerated reporting strategy includes: setting the default strategy as the accelerated reporting strategy.
11. The method according to claim 2, wherein, The process of determining the accelerated reporting strategy includes: determining the current screen usage scenario and querying a specified strategy that matches the screen usage scenario from a preset strategy table as the accelerated reporting strategy.
12. The method according to claim 1, wherein, The image rendering without waiting for the vertical synchronization signal includes image rendering in the application and image compositing by the screen compositing component, which is completed within one frame.
13. A handwriting drawing device, wherein, include: Touch integrated circuit, used to: report the detected dots on the screen to the system driver layer; The system driver layer is used to: dispatch the reporting information to the application layer; The application layer is used to: draw an image without waiting for a vertical synchronization signal based on the reporting information to obtain a handwriting image to be displayed, which is then used to display the handwriting image on the screen.
14. The apparatus according to claim 13, wherein, The touch integrated circuit is configured to: determine an accelerated reporting strategy, and report the detected reporting point information for the screen to the system driver layer according to the accelerated reporting strategy.
15. The apparatus according to claim 14, wherein, The accelerated reporting strategy includes, but is not limited to, one or more of the following methods: reducing touch de-jitter detection; increasing touch sampling rate.
16. The apparatus according to claim 13, wherein, The system driver layer is used to: determine the reporting point information closest to the first vertical synchronization signal, and report the reporting point information closest to the first vertical synchronization signal to the application layer.
17. The apparatus according to claim 13, wherein, Before the reporting information is dispatched to the application layer through the system driver layer, the device further includes a setting module for setting the touch interrupt as the first processing priority among various interrupt processing priorities through the system driver layer.
18. The apparatus according to claim 13, wherein, The application layer is used to: obtain graphic drawing data by drawing the graphic based on the reported point information without waiting for the vertical synchronization signal through the drawing application, and to pass the graphic drawing data to the screen compositing component; and to obtain the handwriting image to be displayed by the screen compositing component based on the graphic drawing data without waiting for the vertical synchronization signal.
19. A storage medium, wherein, It stores a computer program that, when executed by the computer's processor, causes the computer to perform the method described in any one of claims 1 to 12.
20. An electronic device, wherein, include: Memory, which stores computer programs; A processor reads a computer program stored in memory to perform the method according to any one of claims 1 to 12.
Citation Information
Patent Citations
Handwriting drawing method and device, storage medium and electronic equipment
CN118963638A
Data processing method and related device
CN115097994A
Screen display method and device, terminal, storage medium and product
CN115202601A
Handwriting display method and device based on Android system and storage medium
CN115280265A
Image processing method and device
CN117492628A