You draw graphics in a new thread, and unlockAndPost is in the main thread, so the execution order of the above code is lockCanvas -> unlockAndPost -> new Thread().run().
I don’t know what the purpose of your sleep 1000 is. The draw process must be on the main thread, otherwise it is meaningless
You draw graphics in a new thread, and unlockAndPost is in the main thread, so the execution order of the above code is lockCanvas -> unlockAndPost -> new Thread().run().
I don’t know what the purpose of your sleep 1000 is. The draw process must be on the main thread, otherwise it is meaningless