To turn on Direct2D: Go in to about:config and set mozilla.widget.render-mode to 6, and gfx.font_rendering.directwrite.enabled to true.
To turn off Direct2D, once it is on by default, set mozilla.widget.render-mode to 0.
To check whether you are running with Direct2D, go to about:support [in the address bar] and look at the bottom.