The invention discloses an android container rendering optimization method based on cross-domain hard real-time Fen synchronization, which comprises the following steps: by taking a swan-mong
system as a host and an android
system as a container, creating a
hash table, a synchronous thread and a
shared memory corresponding to a GPU core when the host is started, acquiring VSync cycle registration
callback, transmitting
shared memory FD to the container, and finishing
shared memory mapping and alignment by the container. Registering a GPU
queue to complete
callback; when the
Android application is started, a container obtains a
queue and a
physical address of a rendering buffer area, creates a Fen and binds the Fen to the
queue, after the queue is submitted,
metadata is written into a shared memory to inform a host, after the host receives the
metadata, nodes are created and stored in a
hash table, and an overtime
timer is registered; after the GPU completes the command queue, the container calls back an update state and a
verification value to notify the host, and after the host is verified to be valid, the corresponding
hash table is updated, the
timer is reset, and asynchronous screen loading is triggered; and the host executes buffer area synthesis and submission of the display equipment to finish on-screen, so that the stability of the rendering
frame rate is improved, and the reliability of cross-domain synchronization is ensured.