MozillaZine


Direct2D/DirectWrite Accelerated Rendering For Firefox

Discussion about official Mozilla Firefox builds
squall_leonhart

User avatar
 
Posts: 885
Joined: March 17th, 2008, 5:32 am
Location: Australia

Post Posted March 11th, 2010, 11:45 am

Memory usage appears to have returned to normal in the latest nightly.

sysKin

User avatar
 
Posts: 893
Joined: March 17th, 2004, 9:09 pm
Location: Adelaide, Australia

Post Posted March 12th, 2010, 10:48 pm

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

Post Posted March 13th, 2010, 5:46 am

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?

squall_leonhart

User avatar
 
Posts: 885
Joined: March 17th, 2008, 5:32 am
Location: Australia

Post Posted March 13th, 2010, 6:31 am

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.

sysKin

User avatar
 
Posts: 893
Joined: March 17th, 2004, 9:09 pm
Location: Adelaide, Australia

Post Posted March 13th, 2010, 7:41 am

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

Omega X

User avatar
 
Posts: 8197
Joined: October 18th, 2007, 2:38 pm
Location: A Parallel Dimension...

Post Posted March 13th, 2010, 11:30 am

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.
Latest: Firefox/86.0 *ESR/78.8.0 - Mobile/81.1.5 - Thunderbird/78.8.0
Nightly: Nightly/88.0a1 - Mobile/GV 88.0a1 - Daily/88.0a1

sysKin

User avatar
 
Posts: 893
Joined: March 17th, 2004, 9:09 pm
Location: Adelaide, Australia

Post Posted March 13th, 2010, 8:00 pm

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.

squall_leonhart

User avatar
 
Posts: 885
Joined: March 17th, 2008, 5:32 am
Location: Australia

Post Posted March 14th, 2010, 4:49 am

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.

Omega X

User avatar
 
Posts: 8197
Joined: October 18th, 2007, 2:38 pm
Location: A Parallel Dimension...

Post Posted March 15th, 2010, 10:15 am

That gamma thing looks interesting. I wonder if Bas knows about this already.
Latest: Firefox/86.0 *ESR/78.8.0 - Mobile/81.1.5 - Thunderbird/78.8.0
Nightly: Nightly/88.0a1 - Mobile/GV 88.0a1 - Daily/88.0a1

sysKin

User avatar
 
Posts: 893
Joined: March 17th, 2004, 9:09 pm
Location: Adelaide, Australia

Post Posted March 16th, 2010, 5:01 am

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.

Omega X

User avatar
 
Posts: 8197
Joined: October 18th, 2007, 2:38 pm
Location: A Parallel Dimension...

Post Posted March 16th, 2010, 10:53 am

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.
Latest: Firefox/86.0 *ESR/78.8.0 - Mobile/81.1.5 - Thunderbird/78.8.0
Nightly: Nightly/88.0a1 - Mobile/GV 88.0a1 - Daily/88.0a1

iceccold

User avatar
 
Posts: 661
Joined: February 24th, 2010, 10:53 am
Location: Subotica, Serbia

Post Posted March 16th, 2010, 2:09 pm

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

Post Posted March 16th, 2010, 2:13 pm

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 :/

iceccold

User avatar
 
Posts: 661
Joined: February 24th, 2010, 10:53 am
Location: Subotica, Serbia

Post Posted March 16th, 2010, 2:15 pm

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 "

_Dexter_

User avatar
 
Posts: 1436
Joined: August 30th, 2008, 6:54 pm
Location: Miami

Post Posted March 16th, 2010, 4:29 pm

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

Return to Firefox Builds


Who is online

Users browsing this forum: No registered users and 1 guest