We could clear just the region behind the squares that will be tagged overlays (and have that flag set).
After looking at surfaceflinger [1] though, I decided to go with this approach. SF clears the framebuffer to transparent black because clearing the whole region to black is more resource friendly than arranging to clear only the union of rectangles that have been marked overlays.
We could clear just the region behind the squares that will be tagged overlays (and have that flag set).
After looking at surfaceflinger [1] though, I decided to go with this approach. SF clears the framebuffer to transparent black because clearing the whole region to black is more resource friendly than arranging to clear only the union of rectangles that have been marked overlays.
[1] /android. googlesource. com/platform/ frameworks/ native/ +/master/ services/ surfaceflinger/ SurfaceFlinger. cpp (line 1562)
https:/