Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
Ask Question
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:
pass the surface from Process A -> Process B(save it) -> Process A -> use it to render something(OK)
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);
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.