简体   繁体   中英

apply filters to frame buffer just before it is displayed

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM