So, the moment is finally there! I realize I've not posted on here for a while, my main reason being I wanted to be able to actually have something to tell you guys the next time I would talk about Direct2D. And it seems that now I do! After a lot of hard work from myself and many others at Mozilla who have been assisting me in getting Direct2D and particularly DirectWrite stable and functional enough for people to start trying it out, I believe our Direct2D support is now ready for the world to try their hands at!
If you download the latest nightly here you will be the proud owner of an official experimental build that has support for Direct2D. This build will automatically update to our new experimental nightly builds, giving you all the bugfixes we're working on for various problems that are still around.
Does that mean if I download the latest nightly I get Direct2D support?
Well, no. Since we don't want to regress any functionality in our browser for the majority of our users, by default your build will not use DirectWrite. There's a couple of steps you'll need to execute to get it working:
So once I've done this, surely I have this Direct2D support going!
Erm... sorry here folks, but no. There's several reasons why you could still not be having Direct2D support. First of all it's possible you have an extension interfering with Direct2D. Several extensions are known to somewhat disrupt our initialization order, meaning the preferences you've just set are not accessible during initialization of the render mode, which will cause GDI default render-mode.
Then there is another issue, if you're actually on Windows XP and not on Windows Vista or Windows 7, Windows XP actually has no support for Direct2D or DirectWrite, so it will fallback to being just a normal build. I suggest you upgrade :D.
Finally, if you do not have a high-end DirectX 9 graphics card, or a DirectX 10 graphics card, insufficient hardware support will be detected. This will cause the renderer to fallback to using GDI as well, in order to prevent you from suffering a slow browser, or even worse, a crash!
Now, all this reading, by now I must have Direct2D support?!
Right, if you satisfy all the above conditions, you're probably there! We don't have any way to verify at the moment (we're working on something), but one way is to go here. If it runs nice and smooth when you size photos up to fullscreen, it's working!
It is working! Now what?
You should enjoy your new browsing experience, in most cases you should have a noticeably faster and more responsive browser, particularly when using graphically intensive websites (not using flash, which will still be slow). If you find any bugs, please use our traditional reporting method of going to bugzilla and see if they've already been filed. If they haven't, file it, and we'll try to get to it and fix it as soon as possible!
There's a very cool forum thread that tracks the currently known issues, you should have a look there as well.
Well, that's about it!
I apologize to everyone for taking so long to get this ready for putting it out there, and for not providing experimental builds over the last months. The fact is its surprising how much you can do on the web that at least I didn't know about! And in how many interesting ways it can break ;). But I hope you can now all enjoy the latest and greatest of Direct2D builds. And no longer suffer any manual updating of your build! Happy Browsing!
Great great great! It’s amazingly fast, thank you (Cavern Fighter game especially).
I’m switching to D2D browsing as my default at home and will see, if it will work without crashes or so…
Wonderful. I’m running it since yesterday. The best thing: it doesn’t crash anymore on the Sunspider site :)
There are render issues with @font-face and white font on black background but all in all it works amazingly well.
Thanks for all your work, I’m looking forward to seeing it evolve!
Excellent!
However I have a problem: the browser’s GUI seems to draw very slowly. For example just moving the mouse pointer between tabs uses 100% of one CPU core just for the hover effect. Opening and closing tabs feels very sluggish for the same reason. Which is strange given that web pages render at the speed of light.
Is this a known problem or should I file a bug?
Thanks for your work!
I’ve also seen that you’ve worked hard on Layers which should land in mozilla1.9.3a3
If i understand things correctly, it would enable hardware acceleration on Linux for things like YUV/RGB transcoding.
Do you know when we will be able to test it ?
Awesome work!
Can you put together a generic list of GPUs (like nvidia above 8800GT, AMD above 4350 etc) that supports D2D? There is currently a lot of confusion in the forums with D2D support.
@John: It is a known problem to do with silly alpha recovery being run where not needed for UXTheme stuff. There’s a patch up for review in https://bugzilla.mozilla.org/show_bug.cgi?id=548072. After that we should be close to fixing it.
@antistress: The D3D10 backend will have a patch for a basic implementation end of this week. I’m aiming to have an OGL 2.1 backend Fri 19th.
@Mucinch: I wish I had such a list. Currently DX 10+ cards are a good bet. D3D 9 I’m very confused on :)
When OGL 2.1 backend lands, will XP users see an improvement in speed?
Hello.
Great work with D2D and DirectWrite, but I have a problem since the firs time I enabled D2D. About 75% of the time a new tab loads into a completely grey area. The page loads ok behind (the mouse changes when hovering over links etc), but it doesn’t get drawn until I switch to another window/tab and back.
Running latest nightly (20100302) on Vista64, Radeon HD 5870 with Catalyst 10.2.
A small word of warning for people who like to experiment: if you set the mozilla.widget.render-mode preference to 6, to try out D2D, and then go back to running the released Firefox 3.6 (with the same profile), rendering will be completely broken - all windows appear blank.
This is due to a bug in 3.6; I hope it will be fixed in an update soon, but for the time being - beware! Reset the preference before going back to “standard” Firefox, or use separate profiles.
Works great for me so far. Although I was surprised that I had to disable Adblock Plus in order for D2D to kick in.
@ Bas : thanks for the answer.
Can Layers also be used to accelerate SVG for instance ?
And is all the thing handle by Firefox or developers have to complete their code ?
@antistress: Layers will not really accelerate SVG it will only accelerate surface composition. Although in some cases this could be used to accelerate some aspects of SVG (filters for example). But it will not give the performance improvements in rasterization that D2D does. Firefox will handle all of this, it will be completely transparent to web developers.
thanks again (for answers and your work)
@Howdy: A recent dev build of Adblock Plus works with D2D.
@Chris: Thanks. I got it and it works.
I’ve also noticed now that webgl apparently doesn’t work when directwrite is enabled.
I’m really interested in that question and i’ve made some researches over the web to try to understand
With new OpenGL backend for Cairo (without glitz) [1], is Layer still needed to have Cross-Platform Acceleration ? I guess that OpenGL backend for Cairo could be more versatile than Layers (i.e. being able to accelerate videos but also SVG etc.) ?
Or is OpenGL backend for Cairo still incomplete as said here [2] ?
[1] http://lists.cairographics.org/archives/cairo/2009-July/017713.html
[2] http://www.basschouten.com/blog1.php/2009/11/22/direct2d-hardware-rendering-a-browser#c60
@antistress: As far as I know it’s quite far from ready. Atleast the performance is nowhere near that of Direct2D.
This looks very nice indeed. Unfortunately it’s rather useless to me since I’m on OS X.
Any chance anything comparable will be done for OS X users?
When will this land in the browser proper, 4.0?
Hello there!
I have a pretty strange problem: Direct2D is not working with this version (3.7a3), i can clearly see this on the texts look and SVG being slow, but it DOES work with the previous 3.7a1pre. I changed to about:config settings too, but it didn’t help. in 3.7a1 it works by default..
I have Win7, HD4670 (DX10.1), latest Catalyst installed..
Hey Bas
Just checking if you’ve seen bug 549661? (didn’t see your name in the bugmail list when I filed it)
I confirm that D2D in FF 3.7 Alpha 2 is working with DX9 hardware, I’ve tested it on my netbook Acer 751h, which has GMA 500 videocard.
There’s not much of acceleration due to poor GMA 500 performance, but text is smoothed and D2D is definitely on.
Even better, this advertisement picture, only 26KB:
Is the font rendering supposed to be this bold and blocky or its a known problem? I miss the crispness of GDI fonts.
Why not use Quartz on Mac Os X ? It is exactly like Direct2D (just 7 years before).
@Dennis: Hrm, looks fine for me, can you post a screenshot?
@why: It’s not exactly like Direct2D at all ;) But for what it’s worth: we use it.
@Bas :
1°) I’ve made an article (in french) on Layers on my blog
http://libre-ouvert.toile-libre.org/?article13/
2°) I’ve seen that article from Zack Rusin summarized on phoronix website http://www.phoronix.com/scan.php?page=news_item&px=ODA1OA about a new software rasterizer in Gallium3D
Will that benefit to svg rendering through Firefox ?
And could you explain why rasterization can’t be accelerated with Layers whereas video transcoding can ?
Thanks in advance!
This has no anti-aliasing in Direct2D mode:
I just noticed strange horizontal lines appearing during browsing page source, it makes it hardly readable.
You probably know about this but I just wanted to let not be forgotten ;-)
Wow, This is going to be awesome once in the trunk build.
I just had a look at the SVG test page and it did indeed run nice and smooth. It may not always have been two-digit fps rates, but ran surprisingly well.
What confuses me is that I’m using FF 3.6 on Debian with Intel chipset graphics.
Is the Direct2D mode supposed to significantly lower the CPU usage?
I had the Pentium D 3 Ghz used quite heavily during zooming and rotating the images.
What about using OpenVG for SVG rendering accleration.
This hardware accelerated renderer is already managed by Mesa and all smartbook/smartphone devices…
webkit browsers also have hardware support but programming is not easy.
If you want to compare the speed of a web map
with Opera, Webkit und Firefox go to my website.
Cool deal.
What about supporting multiple processors (e.g. quad core)? Is that on the radar?
@Falko: On linux you wouldn’t be able to run Direct2D.. With Direct2D you’ll easily see two-digit FPS, in many cases even three-digit :)
@Totor: OpenVG doesn’t do everything we need to, and is poorly supported in many cases.
@Tom P: It’s on the radar in several ways actually! I can’t talk about it extensively right now, but it is!
Are you going to push this upstream… will the Direct2D backend be in the next version of Cairo ?
@Stu: It could be, although I’m not sure when it will be upstreamed, and if Cairo will accept it.
Found out about the settings via someone posting on Reddit. It looks gorgeous now!
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.3a4pre) Gecko/20100320 Minefield/3.7a4pre (.NET CLR 3.5.30729)
I can’t figure out why no one has done this sooner… I have been hoping to see this for years. Great work!
One caveat, I don’t particularly like how all the fonts are anti-aliased.. is there some way to switch this off why still using D2D for page render?
Well.. Firefox is a multiplataform browser. Is not better to use OpenGL to make hardware support avaiable on Linux, OSX and etc too? And more, D2D support only on Vista or 7? I prefer stay with XP and no hardware assist.
I tried the above, downloaded the nightly build from yesterday (07/03-2010), however when entering the about.config I can not find the ‘gfx.font_rendering.directwrite.enabled’ setting. Iam running Windows Server 2008, any suggestion would be appriciated.
So, are you intentionally leaving Linux users out in the cold?
@Grant&DarkMaster: Read the rest of my blog. We are working on OpenGL for Linux and Mac. However there’s no 2D accelerated graphics API quite as advanced and complete as Direct2D on those platforms.
Both through Layers and potentially in the future cairo-gl we are looking to bring acceleration to all our users as best as we can. But not using an advanced graphics API when we can to deliver better performance to our Windows 7 and Vista users would be silly.
i tried it on mmorpg.com and the text in there is off like
something is wrong tried to adjust cleartype in windows but i think its something else its not far off but a bit off like 15 or 20% too fat looking.aside from that small text issue no problem men this techno is great!test the photo thing its SOOO SMOOTH!
Nvidia users should update to the latest GeForce 257.21 WHQL drivers.
Desktop drivers
http://www.nvidia.com/object/win7-winvista-32bit-257.21-whql-driver.html
http://www.nvidia.com/object/win7-winvista-64bit-257.21-whql-driver.html
Notebook drivers
http://www.nvidia.com/object/notebook-winvista-win7-257.21-whql-driver.html
http://www.nvidia.com/object/notebook-winvista-win7-64bit-257.21-whql-driver.html
Using 257.21 drivers on Nvidia 9600: latest builds are cancelling out my right-click menu unless I restore the “-1″ setting for render mode. :/
enabled it in my nightlies. it does work fast but fonts look significantly different than with GDI - they are more fuzzy and appear to be using Cleartype or something similar regardless of my global setting to disable it in W7x64.
any other reports about this?
thanks,
Leon
Pro: With Direct2D enabled Firefox finally scrolls fast enough to keep up with the Hyperscrolling wheel on my Logitech mouse.
And CPU load is considerably lower for scrolling (zoomed) pages fast.
Con: Firefox 3.7aPRE6, 9600M GT (v257.21): Turning on Direct2D leads to Firefox’ GUI elements *not* using Cleartype anymore. Instead classic gray-scale AA is used.
Text renderings of pages *do* still use Cleartype when it’s turned on in Windows preferences, so it’s only a GUI problem.
Using Backspace in this test field here (yes the one I’m currently typing in) leads to grey vertical lines appearing with certain deleted letter (like “f") in some lines. Seems to be a remain of the cursor vertical line. Also happens on blank lines when the cursor line is moved through them.
@Timur: The vertical lines are a known issue and will soon be resolved.
The lack of cleartype on the UI is because since glass causes the UI window to be transparent, we can’t draw cleartype to it. (Cleartype would require 3 component alpha for transparent surfaces). The fact GDI -does- draw cleartype to transparent surfaces could in a way be considered a GDI bug.
Thanks for the quick response and explanation. Don’t take this as a rant, I’m just giving feedback and describing my perception.
I noticed that IE8 doesn’t use Cleartype for its URL box neither, but it’s using *far* better anti-aliasing/font than FF4. The fonts in FF4’s URL box and tabs look rather bad, as if they were interpolations from a non-native resolution.
The greyscaling doesn’t provide suffient AA while adding some very unpleasant blur. I checked the NVidia settings and set them to override any application’s AA settings, but nothing changed.
Have a look at this nearest neighbor zoom into a tab and URL. The “T” and part of an “m” in the tab and the “b” are so badly blurred that they are completely grey instead of black.
But even worse, the ClearType rendering of web-pages’ fonts look worse/blurred, too. It’s especially pronounced on “exotic” color combinations (like white text on orange ground). Is there any GPU driver setting that would affect this?
Feel free to contact me via email if you’ve got any questions that would spam the blog comments too much.
I tested DirectWrite rendering on Minefield.
Fonts are more blurry than GDI (Cleartype enabled, but tuned to be less blurry than the default rendering).
This is the same strange rendering as IE9 preview : some words or letters are more blurry than others (but not the same on both browsers)
I know that this problem was brought up, but I was wondering if there was a way to fix the GUI edginess when I enable hardware acceleration. The tabs load slower, the text looks horrible, and the buttons on the tool bar look very rough.
while black fonts on white background seem to render fine (bold fonts look kinda weird though), the white fonts on dark backgrounds look like utter crap
Fellows, this is awesome.
My thanks for your efforts with Linux and your comments above explaining such.
My fingers are crossed for all your efforts and I am grateful to your team for everything :)
–
Humble Gentoo User
Nvidia users should update to the latest GeForce 258.96 WHQL drivers.
Notebook driver pages were still not up or were pointing to wrong filenames, so direct download links to the drivers included.
http://www.nvidia.com/object/win7-winvista-32bit-258.96-whql-driver.html
http://www.nvidia.com/object/win7-winvista-64bit-258.96-whql-driver.html
http://www.nvidia.com/object/notebook-win7-winvista-258.96-whql-driver.html
http://www.nvidia.com/object/notebook-win7-winvista-64bit-258.96-whql-driver.html
Well, it worked perfectly for me. Is ironic but the Internet Explorer 9 Test Drive page is a good for testing Hardware Acceleration:
http://ie.microsoft.com/testdrive/Default.html
Firefox 4 Beta 3 performs really well. It seems that the next generation of browsers will use this a lot, glad to see Mozilla going in this direction.
Now gotta play with this…
Microsoft has released an update for Direct2D and DirectWrite, might help with the bugs.