What a difference a recession makes. Take the stunning turnaround on casino gambling in the Massachusetts House of Representatives. A bill to license two resort-scale casinos and slots at the state’s four racetracks sailed to passage.

I know I’ve said this before, but what a difference a recession makes.

Take last month’s stunning turnaround on casino gambling in the Massachusetts House of Representatives. A bill to license two resort-scale casinos and slots at the state’s four racetracks sailed to passage with 120 votes in favor and only 37 opposed.

Almost exactly two years ago, in March 2008, the same body roundly rejected Gov. Deval Patrick’s desire to do essentially the same thing. Back then, House Speaker Salvatore DiMasi, a strident gambling foe, was determined to put the aloof and controversial governor in his place, and he twisted every arm within reach and employed some questionable tactics besides to hand Patrick an embarrassing 108-46 defeat on a measure to bring three resort casinos to the state. Of course, DiMasi is gone, forced to resign last January ahead of a federal indictment on charges of conspiracy, extortion, mail fraud and wire fraud. The powerful speaker’s chair is now occupied by an unabashed supporter of casinos, Robert DeLeo, whose district includes the state’s only thoroughbred track, Suffolk Downs, and a greyhound track, Wonderland, that no longer runs live meets.

The other difference is the state’s unemployment rate. It has more than doubled in the 24 months since Patrick advanced his ill-fated proposal and has been tracking at just under the national rate at a very politically discomfiting 9.3 percent.

The psychological component of the discussion has changed as well; not surprisingly, to the advantage of the political forces now aligning behind casinos as a way to put people to work and money in Massachusetts’ ravaged treasury. Patrick’s 2008 plan envisioned $200 million in up-front fees and $400 million a year in tax revenue. Under DeLeo the initial windfall has grown to $260 million, the annual tax haul to a giddy $500 million, based on a rate of 25 percent of GGR.

Then there’s the most important number of all. The speaker and his supporters are talking about 16,000 to 18,000 jobs. It’s not clear how they’ve arrived at this. Pennsylvania has 11 casinos and racinos, and there is nothing like 16,000 jobs there, more like 6,000. Iowa’s 17 commercial casinos employ less than 10,000.

Not that it matters. The pressure is on state government to do something in the midst of this painful and protracted downturn. Last year, some $968 million was carried off in the pockets of Bay Staters and delivered to Foxwoods and Mohegan Sun in Connecticut, Twin River and Newport Grand in Rhode Island and Hollywood Slots in Maine - an undesirable state of affairs that could last only as long as Beacon Hill failed to get its political act together.

Of course, this being Massachusetts, things could still go terribly awry. The Senate wants to write its own bill, which may or not include slots at tracks. Senate President Therese Murray is not a fan of them. Neither is Patrick. But both support large-scale gambling as an economic revitalization tool, and Murray has expressed the hope that a bill will be delivered to the governor’s desk before the legislative session ends on July 31.

This could be “devastating” to Rhode Island, says Professor Clyde Barrow of the University of Massachusetts Dartmouth Center for Policy Analysis. Gambling is the third-largest source of public revenue in Rhode Island, and Massachusetts accounts for more than 47 percent of visitors at Twin River and more than 44 percent at Newport Grand, by Barrow’s estimate. At Foxwoods and Mohegan Sun, where slot handle is off a combined $2.45 billion the last three years and total gambling win is down more than 16 percent, Bay Staters make up, respectively, about 35 percent and 18 percent of visitors, according to Barrow.

It’s an “arms-race mentality” out there, in the words of David Swenson, an Iowa State University economist who has studied the industry’s expansion across the Midwest.

And woe to the state that falls behind.