Added `attachLayer`, `detachLayer` to Surface.