Direct2D/DirectWrite Accelerated Rendering For Firefox

Discussion about official Mozilla Firefox builds
Locked
User avatar
squall_leonhart
Posts: 885
Joined: March 17th, 2008, 5:32 am
Location: Australia
Contact:

Re: Direct2D & DirectWrite HW Acceleration For Minefield - Info

Post by squall_leonhart »

Memory usage appears to have returned to normal in the latest nightly.
User avatar
sysKin
Posts: 902
Joined: March 17th, 2004, 9:09 pm
Location: Adelaide, Australia

Re: Direct2D & DirectWrite HW Acceleration For Minefield - Info

Post by sysKin »

Is there any way to disable vertical font blur, or otherwise make text more visible?

I have nothing against cleartype but total contrast between background a text is significantly reduced, making it harder to read :(
AdLeester
Posts: 6
Joined: April 20th, 2009, 7:15 am

Re: Direct2D & DirectWrite HW Acceleration For Minefield - Info

Post by AdLeester »

Indeed, I'm using the standard ClearType settings for everything on my system, and now (with both acc options enabled) the fonts looks slightly different, here and there...
For example, the menu fonts are much thinner, some of the fonts on pages are a bit smaller and those that were bold already, are even, erm, more bolder-ish ;)
Does that mean the accelerated-font-blurring take both ClearType and Direct2D blurring into consideration or does it only blur the Direct2D way?
User avatar
squall_leonhart
Posts: 885
Joined: March 17th, 2008, 5:32 am
Location: Australia
Contact:

Re: Direct2D & DirectWrite HW Acceleration For Minefield - Info

Post by squall_leonhart »

I have nothing against cleartype but total contrast between background a text is significantly reduced, making it harder to read :(


Disable "Anisotropic Filtering" in your graphics card controls/settings.
User avatar
sysKin
Posts: 902
Joined: March 17th, 2004, 9:09 pm
Location: Adelaide, Australia

Re: Direct2D & DirectWrite HW Acceleration For Minefield - Info

Post by sysKin »

squall_leonhart wrote:Disable "Anisotropic Filtering" in your graphics card controls/settings.


Hey that helped, thanks!
I did read about anisotropic filtering on first page but somehow concluded this was about nvidia. I just re-read it and it's not.

Still, while it "helped", black letters on white background are still quite thin while white letters on dark background are quite thick. I am not sure if my monitor gamma is wrong (although I do my best to have it correct) or somehow gamma is applied wrong (or twice?) in the process...

Can anyone else see that? Compare thickness of address bar when address is unselected and fully selected.

Shoonay wrote:those that were bold already, are even, erm, more bolder-ish ;)


This is because, unknown to anyone anywhere, a html <b> tag does not actually make things bold. It makes them *bolder*[1] which is, well, more bold than bold. Websites are full of <b> tags which are expected to make things bold and all those websites are in for a surprise.

If you ask me, firefox should now go against the recommendation and redefine <b> to be bold. Dunno if that's going to happen.

[1] resource://gre-resources/html.css line 403
User avatar
Omega X
Posts: 8225
Joined: October 18th, 2007, 2:38 pm
Location: A Parallel Dimension...

Re: Direct2D & DirectWrite HW Acceleration For Minefield - Info

Post by Omega X »

sysKin wrote:
squall_leonhart wrote:Disable "Anisotropic Filtering" in your graphics card controls/settings.


Hey that helped, thanks!
I did read about anisotropic filtering on first page but somehow concluded this was about nvidia. I just re-read it and it's not.

Still, while it "helped", black letters on white background are still quite thin while white letters on dark background are quite thick. I am not sure if my monitor gamma is wrong (although I do my best to have it correct) or somehow gamma is applied wrong (or twice?) in the process...

Can anyone else see that? Compare thickness of address bar when address is unselected and fully selected.


I was told that it was a driver issue. The Steam 2010 Beta uses DirectWrite and also has issues with light text on dark backgrounds being a bit chunky.
User avatar
sysKin
Posts: 902
Joined: March 17th, 2004, 9:09 pm
Location: Adelaide, Australia

Re: Direct2D & DirectWrite HW Acceleration For Minefield - Info

Post by sysKin »

Omega X wrote:I was told that it was a driver issue. The Steam 2010 Beta uses DirectWrite and also has issues with light text on dark backgrounds being a bit chunky.


Oh I've seen that.
I dug a bit deeper and it would seem that gamma correction is indeed involved: This website http://blogs.msdn.com/directx/archive/2 ... write.aspx says:
In order to efficiently support hardware acceleration, Direct2D uses a slightly different approximation to Gamma correction called “alpha correction”. This doesn’t require Direct2D to inspect the render target color pixel when rendering text.

This looks weird because you can't apply gamma correction without knowing brush colour: if your algorithm applies gamma 2.2 on black text then it will automatically apply gamma 0.45 on white text, leading to ugly lack of symmetry between them.
Interestingly, an application can influence this:
http://msdn.microsoft.com/en-us/library ... 85%29.aspx
It's possible to specify own gamma when rendering any directwrite text.

I wonder if it's possible to compensate for this problem by simply specifying own gamma correction depending on font colour.
User avatar
squall_leonhart
Posts: 885
Joined: March 17th, 2008, 5:32 am
Location: Australia
Contact:

Re: Direct2D & DirectWrite HW Acceleration For Minefield - Info

Post by squall_leonhart »

I was told that it was a driver issue. The Steam 2010 Beta uses DirectWrite and also has issues with light text on dark backgrounds being a bit chunky.


From what i saw, Cleartype doesn't seem to effect directwrite much at all, but still, i used the calibration tool to improve the font anyway.
User avatar
Omega X
Posts: 8225
Joined: October 18th, 2007, 2:38 pm
Location: A Parallel Dimension...

Re: Direct2D & DirectWrite HW Acceleration For Minefield - Info

Post by Omega X »

That gamma thing looks interesting. I wonder if Bas knows about this already.
User avatar
sysKin
Posts: 902
Joined: March 17th, 2004, 9:09 pm
Location: Adelaide, Australia

Re: Direct2D & DirectWrite HW Acceleration For Minefield - Info

Post by sysKin »

sysKin wrote:This looks weird because you can't apply gamma correction without knowing brush colour


I think I take this part back: it's not font colour that's unknown, but background colour.
Approximation makes sense then.
User avatar
Omega X
Posts: 8225
Joined: October 18th, 2007, 2:38 pm
Location: A Parallel Dimension...

Re: Direct2D & DirectWrite HW Acceleration For Minefield - Info

Post by Omega X »

http://ie.microsoft.com/testdrive/Perfo ... fault.html
This test from Microsoft shows an interesting stress on D2D. IE9 preview gets 60fps while Minefield gets 30. I wonder if it has something to do with the script that rotates the images.

Edit: One more thing, It has the same issues with fonts as Steam 2010 Beta and Minefield.

Either its a limitation of the system or it really is the drivers.
User avatar
iceccold
Posts: 661
Joined: February 24th, 2010, 10:53 am
Location: Subotica, Serbia
Contact:

Re: Direct2D & DirectWrite HW Acceleration For Minefield - Info

Post by iceccold »

Omega X wrote:http://ie.microsoft.com/testdrive/Performance/01FlyingImages/Default.html
This test from Microsoft shows an interesting stress on D2D. IE9 preview gets 60fps while Minefield gets 30. I wonder if it has something to do with the script that rotates the images.


I tried it on MozillaDeveloperPreview 3.7 alpha 3 and I get around 60fps.
Same as Internet Explorer 9.
"We cannot have homeland security unless we understand that the whole planet is our homeland "
supernova_00
Posts: 4832
Joined: June 24th, 2004, 8:03 pm
Location: Maryland, USA

Re: Direct2D & DirectWrite HW Acceleration For Minefield - Info

Post by supernova_00 »

iceccold wrote:
Omega X wrote:http://ie.microsoft.com/testdrive/Performance/01FlyingImages/Default.html
This test from Microsoft shows an interesting stress on D2D. IE9 preview gets 60fps while Minefield gets 30. I wonder if it has something to do with the script that rotates the images.


I tried it on MozillaDeveloperPreview 3.7 alpha 3 and I get around 60fps.
Same as Internet Explorer 9.

I get 8 :/
User avatar
iceccold
Posts: 661
Joined: February 24th, 2010, 10:53 am
Location: Subotica, Serbia
Contact:

Re: Direct2D & DirectWrite HW Acceleration For Minefield - Info

Post by iceccold »

supernova_00 wrote:I get 8 :/

Did you enabled D2D?

Edit: sometimes I get around 30.
Dunno why is this happening.
"We cannot have homeland security unless we understand that the whole planet is our homeland "
User avatar
_Dexter_
Posts: 1436
Joined: August 30th, 2008, 6:54 pm
Location: Miami

Re: Direct2D & DirectWrite HW Acceleration For Minefield - Info

Post by _Dexter_ »

Don't forget to post the resolution you are running at along with the frame rate for the ie9 test. I run at 1920x1200 and get 50fps.
Intel i7 Core Quad @ 4.25Ghz | Cooler Master Hyper 212 Plus | 12GB PC3-16000 RAM | ASUS HD6970 2GB - 12.3 CATS | ASUS PA246Q IPS 24" LCD 16:10 | OCZ AGILITY-EX SSD SLC | Windows 7 SP1 x64 Ultimate
Locked