Encapsulate the initlization of Copy buffer rect kernel in one inline
function.