support layer buf updated during redrawing. big change