Fix RenderThread maybe execute more than 1 render tasks.

Signed-off-by: yushijinhun <yushijinhun@gmail.com>