change share logic in every layout

Signed-off-by: Qu Xiaofeng <quxiaofeng.at.polyu@gmail.com>