I am trying to understand the relationship between android.graphics package
and SurfaceFlinger
.
Based on Android Graphics Documentation there are two ways to draw 2D graphics. One is using VIEW object and the other is by directly drawing to a Canvas. As I read from the documentation, when drawing directly to a Canvas, one can create a thread which manages the SurfaceView
which is linked to the SurfaceFlinger
. I have also noticed in the code that android.graphics
package is just a wrapper to the SKIA library. SKIA functions are called using JNI. So, I can't determine if the calls still go to the SurfaceFlinger.
Does this mean that when using the View object for simple 2D graphic, there is no need for SurfaceFlinger? Or Surfaceflinger is always used when drawing any kind of graphics to the screen? Any inputs?