What will today's Supreme Court rulings on gay marriage mean for American society? One way to answer that question is to look at what gay marriage meant for Canada, where it just celebrated its tenth anniversary.

In 2003, an Ontario court ruled that blocking same-sex marriage was unconstitutional. A few hours later, Michael Stark and Michael Leshner became the first same-sex couple legally wed in the country. Other provincial courts followed, and in 2005, the federal government made same-sex marriage legal nationwide.

What followed was a substantial shift in public attitudes. The portion of Canadians supporting gay marriage, which had hovered around one-third from 2001 through 2006, increased to 43 percent in 2010 and 57 percent by 2012, according to survey data from the Environics Institute, a Toronto polling group. Only 19 percent of Canadians reported strong disapproval.

It's hard to disentangle the effect of legalizing same-sex marriage from broader cultural shifts that were already underway. But it seems that changing the law's treatment of the issue accelerated the evolution of Canadians' views.

When the federal government legalized gay marriage, "there was no public consensus," said Keith Neuman, the Environics Institute's executive director. "A lot of Canadians said, 'I personally may not think much of this, but if the government and the courts say it's OK, then it's OK.'" Legalizing gay marriage helped legitimize it.

That legitimizing dynamic played out within families. Robin Roberts, one of the first people to get a same-sex marriage in British Columbia, told the Canadian Press that after the wedding, her wife's brother called to say congratulations after not talking to her for 20 years. "This is why we did it -- to help families accept each other," Roberts said.

Increased acceptance of same-sex marriage also coincided with broader acceptance of gays in public life. In 2008, only 55 percent of Canadians surveyed approved of homosexuals being allowed to run for public office, according to the Environics Institute data. By last year, that figure was 67 percent, while the share who strongly disapproved fell to 4 percent from 7 percent.

The premier of Ontario, Kathleen Wynne, is openly gay and married. Perhaps more striking, Naheed Nenshi, the mayor of Calgary -- a city not known as a bastion of progressive values -- was the grand marshal of his city's gay pride parade in 2011, the first Calgary mayor to do so.

Canada's work isn't finished. After same-sex marriage was legalized, the total number of hate crimes reported to police as motivated by sexual orientation increased each year for which data is available: 88 in 2006, rising to 159 in 2008, 188 in 2009 and 218 in 2010. Those increases could reflect better record-keeping or a shift in people's willingness to report attacks. But they also suggest the legitimizing effect of legalizing gay marriage has its limits. "There's a fringe element here," Neuman said, which persists despite the broader cultural change.

Even so, the Canadian experience highlights that by declaring the "equal dignity of same-sex marriages," Justice Anthony Kennedy may have changed more than just the nation's jurisprudence. The Supreme Court stopped short of legalizing gay marriage across the U.S. today, but it certainly helped legitimize it.

(Christopher Flavelle is a member of the Bloomberg View editorial board. Follow him on Twitter.)