when you say outline of one layer, do you mean the non-transparent part of one layer? if so, then ctrl+click that layer to select all the non-transparent parts, and then go to the layer you want a mask on, then click the mask button at the bottom of the layer window, and it should automatically clip out the selection for you.