All of the examples I have seen for drawing into a graphical view look
something like the following, but I can find no explanation for why:
canvas = surfaceHolder.lockCanvas(null);
synchronized (surfaceHolder) {
canvas.drawBitmap(bitmap, 0, 0, null);
}
surfaceHolder.unlockCanvasAndPost(canvas);
Why is the nested synchronized needed in addition to the unlock? What
might happen if the nested synchronized is omitted?
--
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
To unsubscribe, reply using "remove me" as the subject.