SurfaceFlinger Buffer Composition for Lower Stylus Touch Delay

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The touch delay in handwriting functions of electronic devices is significant, leading to a poor user experience due to the long time lag between the user's handwriting trajectory on the display and its corresponding display.

Innovation Solution

The method involves sending a composition instruction to SurfaceFlinger after the first application completes drawing the buffer, allowing for immediate buffer composition without waiting for the next Vsync signal, thereby reducing the time from drawing to presentation.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Loss of time

If the system waits for the next Vsync signal to perform buffer composition, then the display timing is synchronized, but the touch delay increases

Engineering Contradiction:
Improvetouch delayVSAvoiddisplay synchronization
Core Design Contradiction:
Loss of timeVSStability of the object's composition

Solution Approach 1:

The patent applies preliminary action by having the first application send the composition instruction to SurfaceFlinger immediately after drawing the buffer, before the next Vsync signal arrives. This allows SurfaceFlinger to retrieve and compose the buffer in advance, so that when the display needs to update, the buffer is already ready, thereby reducing touch delay while maintaining synchronization.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent uses SurfaceFlinger as an intermediary between the first application and the display. SurfaceFlinger receives the composition instruction, retrieves the buffer from the first storage space, and composes it, acting as a mediator that decouples the drawing process from the display process, allowing for reduced latency without sacrificing synchronization.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Productivity

If the buffer composition is performed immediately after drawing, then the touch delay is reduced, but the display timing may be desynchronized

Engineering Contradiction:
Improvebuffer composition speedVSAvoiddisplay timing synchronization
Core Design Contradiction:
ProductivityVSStability of the object's composition

Solution Approach 1:

The system performs preliminary buffer composition by sending the composition instruction immediately after drawing, allowing SurfaceFlinger to prepare the buffer in advance. This preliminary action enables faster display updates without desynchronization, as the buffer is ready when the display timing signal arrives.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent employs feedback through Vsync signals that provide timing information back to the display driver and SurfaceFlinger. This feedback mechanism ensures that even though buffer composition is performed immediately, the display timing remains synchronized by adjusting based on the actual timing signals received.

Inventive Principle:
Principle #23Feedback

3Duration of action of moving object

If the SurfaceFlinger waits for the next Vsync signal to compose the buffer, then the display synchronization is maintained, but the duration from drawing to presentation increases

Engineering Contradiction:
Improveduration from drawing to presentationVSAvoiddisplay synchronization
Core Design Contradiction:
Duration of action of moving objectVSStability of the object's composition

Solution Approach 1:

The patent applies preliminary action by having SurfaceFlinger compose the buffer as soon as the composition instruction is received, rather than waiting for the next Vsync signal. This preliminary composition reduces the duration from drawing to presentation, as the buffer is prepared in advance and ready for immediate display when timing allows.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS20250383764A1Image presentation method, electronic device, storage medium, and chip
Publication Date: 2025.12.18 HONOR DEVICE CO LTD
  • US20250383764A1 patent drawing
  • US20250383764A1 patent drawing
  • US20250383764A1 patent drawing

AI summary

This application relates to the field of image processing technologies, and provides an image presentation method, an electronic device, a storage medium, and a chip. The method may include: After an upper-layer application completes drawing a buffer, SurfaceFlinger (SF) does not need to wait for a Vsync signal, but immediately composes the buffer drawn by the upper-layer application, and a display driver sends the composed buffer to a display for display after receiving the Vsync signal. To avoid accumulation of the composed buffer, the method may further include: After the upper-layer application completes drawing the buffer, when a composed buffer has not yet been displayed, the SF stops a current composition and disables the Vsync signal sent to the SF. In addition, the SF takes the latest buffers for composition and discards the older buffers when composing buffers.