Handwriting Graphics Rendering With Off-Screen Copy and VSync Sync

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing technologies on Android and HarmonyOS platforms struggle to implement advanced handwriting effects such as brush stroke, texture, and color blending due to limitations in combining OpenGL with SurfaceView or TextureView, and off-screen rendering methods suffer from poor hand-following performance.

Innovation Solution

A graphics drawing method that combines off-screen rendering with fast data copying, using vertical synchronization signals to synchronize touch points, and interpolating graphics processing unit (GPU) results onto a canvas, ensuring synchronized rendering and improved performance.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Manufacturing precision

If OpenGL with SurfaceView or TextureView is used to implement advanced handwriting effects, then handwriting effect is improved, but hand-following performance deteriorates due to independent life cycles and rendering time sequences

Engineering Contradiction:
Improvehandwriting effectVSAvoidhand-following performance
Core Design Contradiction:
Manufacturing precisionVSLoss of time

Solution Approach 1:

The patent merges OpenGL rendering with the Android view hierarchy rendering system by using TextureView as a bridge. The OpenGL rendering output is transferred to a texture that can be displayed within the Android view hierarchy, allowing both rendering systems to work together in a unified rendering time sequence, thus improving hand-following performance while maintaining advanced handwriting effects

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The patent introduces a texture as an intermediary between OpenGL rendering and the Android view hierarchy. The OpenGL rendering output is first transferred to a texture, which then serves as the source for display within the Android view hierarchy. This intermediary enables seamless integration and synchronized rendering between the two systems

Inventive Principle:
Principle #24Intermediary (Mediator)

2Adaptability or versatility

If off-screen rendering capability of OpenGL is used to create independent display memory area, then rendering flexibility is improved, but hand-following performance deteriorates due to data copying from GPU to CPU

Engineering Contradiction:
Improverendering flexibilityVSAvoidhand-following performance
Core Design Contradiction:
Adaptability or versatilityVSLoss of time

Solution Approach 1:

The patent replaces the mechanical data copying process from GPU to CPU with a more efficient memory-mapped approach. Instead of copying rendering data through traditional CPU-GPU data transfer mechanisms, the patent uses direct buffer sharing and memory-mapped file techniques to allow the CPU to access GPU rendering results directly, significantly reducing the time loss associated with data transfer

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

Data Source

PatentEP4726643A1Graphics drawing method and apparatus, and electronic device
Publication Date: 2026.04.15 HUAWEI TECH CO LTD
  • EP4726643A1 patent drawingFigure 1
  • EP4726643A1 patent drawingFigure 2
  • EP4726643A1 patent drawingFigure 3

AI summary

Embodiments of this application provide a graphics drawing method and apparatus, and an electronic device. In the foregoing graphics drawing method, the electronic device obtains an input callback instruction in response to a vertical synchronization signal, then obtains touch points, draws a graphic based on the touch points, and draws a graphics drawing result into a default frame buffer object. Then, the electronic device copies the graphics drawing result from the default FBO to an FBO bound to an eglImage, and obtains a callback instruction of a drawing frame in response to the vertical synchronization signal. The electronic device obtains, in response to the callback instruction of the drawing frame, the graphics drawing result from the FBO bound to the eglImage, and fills a created bitmap with the graphics drawing result. Finally, the electronic device draws the filled bitmap on a canvas. In this way, a manner combining off-screen rendering and fast copy may be used to perform rendering in a time sequence of an original control view, to improve handwriting effect and hand-following performance of a handwriting application.