apply filters to frame buffer just before it is displayed

589 views Asked by At

I want to apply some sort of image filter to whatever is being displayed on the screen of an android device. The simplest example of the image filter could be a Sepia filter applied to the frame buffer just before it is displayed on the screen. And just to make sure, i want this effect system wide and not just in my app.

1

There are 1 answers

4
fadden On

To make the effect system-wide, you would need to modify SurfaceFlinger to apply the filter.

In Android 5.0 "Lollipop" you can see a prototype implementation of code that modifies the output to improve the contrast for people who are color blind. See the Daltonizer code and how it's hooked into doDisplayComposition() in SurfaceFlinger.cpp. Note this applies the effect during surface composition, and consequently disables Hardware Composer.

There's no way to do this system-wide from an app. If there were, you could wreak all sorts of havoc on the system.