Closed #3546: Added bake function to cc.Layer

Added bake function to cc.Layer