Are you using SurfaceView for your camera app? The preview frame you receive is a copy of the actual frame that is displayed on the screen. I assume you added another view to display callback preview frames.
I'm not a graphic guy, but why don't you try SurfaceTexture . You can use setpreviewtexture () instead of setpreviewwindow (). Thus, the Camera Service will send buffers directly to the application, instead of making a copy, and also placing it in AndroidNativeWindow. It can improve your performance.
Here's how the Panorama app for Android works. You can find the source code here.
source share