OpenGL context between APP and surfaceflinger in Android -


as know far, surfaceflinger providers surfaces app render , composite surfaces final screen. (if mistake, please point out thx).

first question: surface created surfaceflinger global available can used processes. (is memory of surface in gpu memory?)

while googled not possible share opengl context between processes(here mean app process , surfaceflinger process). i'm not sure if gpu memory used surface?

if answer first question yes, there opengl resource sharing surfaceflinger when app render surface? , how these shard things including memory of surface worked?

there difference between android surface , egl surface. closely related not same thing.

egl surfaces, created methods eglcreatewindowsurface(), can associated egl context , used targets rendering. cannot shared between processes.

android surfaces wrappers bufferqueue objects, provide way move graphics buffers around system. buffer app rendering can passed between app , surfaceflinger, none of egl state passed along. surfaceflinger gets finished product.

the system described in detail in graphics architecture document.