Got ERROR: BufferQueueProducer: [SurfaceView[]#2(BLAST Consumer).... connect: already connected (cur=2 req=2)

Viewed 26

I try to use SurfaceView to render something. And I pass the surface by AIDL, from Process A -> Process B -> Process A. After that I use this surface to render something. It's always successful the first time. But when I tried to reuse this surface, I got this error. For example:

  1. pass the surface from Process A -> Process B(save it) -> Process A -> use it to render something(OK)
  2. pass the surface(save before) from Process B -> Process A -> use it to render something(got error)

Could anyone tell me why?

PS: It works fine if I don't pass the surface to Process B and do everything in Process A.

In process A:

Canvas canvas = surface.lockCanvas(null);
draw something ...
surface.unlockCanvasAndPost(canvas);
0 Answers
Related