 Originally written with a male protagonist , with Tom Cruise initially secured for the lead , the script was ultimately rewritten by Brian Helgeland for Jolie . Filming took place on location in Washington , D.C. , the New York City area , and Albany , New York , between March and June 2009 , with reshoots in January 2010 . Action scenes were primarily performed with practical stunts , computer @-@ generated imagery being used mostly for creating digital environments . 
