google / gapid

Graphics API Debugger
https://gapid.dev
Apache License 2.0
2.21k stars 328 forks source link

Can GAPID capture the surface flinger? #3863

Closed dtoartist closed 3 years ago

dtoartist commented 3 years ago

Hi,

I want to capture the GLES calls used by surface flinger. But I don't know how to capture the surface flinger (I tried the tools provided by GPU vendors, but still couldn't capture it). Is it a possible thing?

Thanks

hevrard commented 3 years ago

Hi,

This is not something that GAPID (or the more recent AGI) can do, since Surface Flinger is operating after the app has produced a frame, see Figure 2 here:

https://source.android.com/devices/graphics#data-flow

In other words, tools like GAPID or AGI may monitor graphics API calls made by the app, but cannot insert themselves below Surface Flinger to monitor what it does.

Still, you can try AGI's system profiler to see Surface Flinger activity:

screenshot