Android usage of the flinger term?
Android uses the term fli开发者_如何学Gonger in e.g. the Android Surface Flinger library, which purpose is to combine different surfaces from different apps to the fully composed image that is rendered on the screen.
But what does the term flinger actually mean?
Update
Looking at the Anatomy - Physiology of an Android slides, the term flinger is used both in Surface Flinger and Audio Flinger, as the "device" that combines either the visual surfaces or the audio output from multiple applications into a common stream that is sent to hardware. Thus is seems the flinger term is unrelated to the word finger, despite the similarity.
I asked the same question on the Android platform mailing list and got the follow reply:
By the definition in the dictionary, a flinger is someone that flings. In the case of the SurfaceFlinger, it's flinging visual data to the surface and AudioFlinger is flinging audio data to the appropriate recipient. They're just "cute" words..:)
Looking up to fling gives the following result (among others):
- to throw, cast, or hurl with force or violence: to fling a stone.
So I guess the original term flinger in Surface Flinger is inspired by the waving action performed by the finger/hand when navigating a touch-screen. And then possibly just used because it was a cute word also for Audio Flinger. But that is just my speculation.
Think of a flinger as a paperboy who throws papers at your front porch. Or a factory worker who grabs items off of one conveyer belt and throws them onto another conveyer belt or into boxes or whatever.
In android, there are many things that all write to the display - and many things that all write to one or more of several audio destinations (speaker, headphone jack, ringer etc.) so I guess it makes sense that a flinger would be the object who was throwing sound at a sound target or images at the screen.
Flinger includes the upward, downward, left or right motion event with finger, e.g. movement of a look at a map which bigger than the screen.
精彩评论