The foam roller increases flexibilty by releasing tension in the muscle but does not actually create a longer muscle. Let me use and analogy... you've got a ball of dough, you roll it out and the dough ball that started out at 3 inches is now 6 inches long but you've still got the same amount of dough. Using the foam roaller and stretching both do this. However, if you want to actually change the true length of the muscle you have to add dough to the system. Stretching stimulates this process over the long term. The short term increases in flexibility are from the first scenario, long term changes come from actual tissue changes in response to stimuli that works over a period of time.

As for warming up, it's more important with stretching but will often make rolling out the muscle feel a little better.

I will usually have clients do both the foam roller and stretch. I have them warm up first, then roll, then stretch.

Hope that helps.