add definition in SubLayer.h, fix some bug.