Android的SurfaceFlingerAndroid、SurfaceFlinger

2023-09-04 23:48:56 作者:葬花魂ン

我只想问,如果SurfaceFlinger总是要求任何类型的绘制到屏幕? 例如,显示JPG文件的画面。

I would just like to ask if SurfaceFlinger is always called for any type of drawing into the screen? Example, displaying of JPG file to the screen.

推荐答案

SurfaceFlinger IS的没有的什么吸引你的窗口。它分配为你的窗口,这在你的应用程序中运行的框架,吸引直接而不SurfaceFlinger交互的帧缓冲区。唯一的互动SurfaceFlinger涉及当你画你的窗口是复合材料最终新的帧缓冲区到屏幕上,一旦你完成绘制一个帧。

SurfaceFlinger is not what draws your window. It allocates a frame buffer for your window, which the framework running in your application draws directly to without interacting with SurfaceFlinger. The only interaction SurfaceFlinger is involved with when you draw your window is to composite the final new frame buffer to the screen once you are done drawing a frame.