HW Accelerated Compositing of Gecko Layers in Firefox
- Omega X
- Posts: 8225
- Joined: October 18th, 2007, 2:38 pm
- Location: A Parallel Dimension...
HW Accelerated Compositing of Gecko Layers in Firefox
Hardware Accelerated Compositing of Gecko Layers in Firefox
(That was a mouthful)
Things to Know BEFORE running Hardware Accelerated Compositing in Firefox:
For the sake of organization, Direct2D & DirectWrite is discussed here: viewtopic.php?f=23&t=1775755
IF its not directly related to HW Compositing of Layers, then it shouldn't be discussed here.
1. Some Add-ons may interfere with proper operation.
2. Your Video Drivers should be updated to the latest version.
3. Hardware Acceleration is a work in progress. There WILL be issues.
4. OpenGL is targeted for OSX and Linux Desktop systems.
5. OpenGL ES is targeted for Mobile Linux systems (Android/Maemo)
5. Direct3D is targeted for ALL Windows systems.
How to Turn on Direct3D for Windows(XP, Vista, 7) or OpenGL Accelerated Compositing Layers for OSX and Linux:
(On Windows, Accelerated Layers are turned on by Default.)
Open up the Options Dialog: Firefox Menu > Options (Classic Menu: Tools > Options)
Select: Advanced > General Tab > "Use hardware acceleration when available"
Alternatively:
In about:config, Search for "layers.accelerate-all".
- If its not there then add it. (Right Click anywhere and select "NEW" then "Boolean". Add in the pref without quotes.)
- Double Click the pref to turn it "true". That will enable compositing of layers. To revert, double click again.
If successful, rendering of pages and elements should become faster. Scrolling should also become much faster.
(IF you're using Nightly Builds, You should not be turning this off. You should use it and report bugs so that it can continue to improve.)
Known Issues:
- Performance can suffer due to other bugs.
- Random bouts of graphics corruption may occur.
- Corruption in text boxes may occur.
Filing Bugs:
If you would like to file bugs for this issue, be sure to search for the bug first.
These Search Queries can also show what issues are already filed.
OGL: https://bugzilla.mozilla.org/buglist.cgi?query_format=advanced&short_desc=OpenGL&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&short_desc_type=allwordssubstr&resolution=---
D3D: https://bugzilla.mozilla.org/buglist.cgi?query_format=advanced&order=Bug%20Number&short_desc=d3d9&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&short_desc_type=allwordssubstr&resolution=---
If the bug is not filed then Open a New bug, create a descriptive title of the problem with "Core:Graphics" as the component and "Trunk" as the version and give them detailed information on the problem including Platform, Graphics Hardware and Driver Version.
Frequently Asked Questions:
1. What is Hardware Accelerated Compositing?
- Hardware Accelerated Compositing uses the Graphics Processor Unit(GPU) to accelerate certain elements in Gecko on screen. Examples may include: Native Video(Theora, WebM), Images, CSS3 Transitions, CSS3 Transforms and some Canvas elements.
2. What is Gecko Layers?
- Gecko Layers is the new layout API developed by Mozilla for Gecko to improve the painting and manipulation of elements while allowing Hardware Acceleration by putting each element in it its own "Layer" and displaying graphics data of those elements faster. (See Below for More Information and a detailed explanation.)
3. Can Direct2D/DirectWrite run at the same time with Direct3D Compositing?
- Yes.
4.What's the difference between Direct2D/DirectWrite Rendering and Direct3D Compositing?
- Though Direct2D/DirectWrite handles similar cases. D2D & DW are intended to replace GDI+ as the native API for text and widgets. Bonus features include accelerated SVG through Direct2D's Vector Graphics API and general display improvement. Direct3D 9/10 will further enhance hardware acceleration on top of these.
Examples to Test:
(Coming Soon)
More Information:
http://www.basschouten.com/blog1.php/20 ... celeration
http://weblogs.mozillazine.org/roc/arch ... ayers.html
http://weblogs.mozillazine.org/roc/arch ... ayers.html
https://wiki.mozilla.org/Layers
Note: If there is something not detailed here, let me know and I'll add it.
(That was a mouthful)
Things to Know BEFORE running Hardware Accelerated Compositing in Firefox:
For the sake of organization, Direct2D & DirectWrite is discussed here: viewtopic.php?f=23&t=1775755
IF its not directly related to HW Compositing of Layers, then it shouldn't be discussed here.
1. Some Add-ons may interfere with proper operation.
2. Your Video Drivers should be updated to the latest version.
3. Hardware Acceleration is a work in progress. There WILL be issues.
4. OpenGL is targeted for OSX and Linux Desktop systems.
5. OpenGL ES is targeted for Mobile Linux systems (Android/Maemo)
5. Direct3D is targeted for ALL Windows systems.
How to Turn on Direct3D for Windows(XP, Vista, 7) or OpenGL Accelerated Compositing Layers for OSX and Linux:
(On Windows, Accelerated Layers are turned on by Default.)
Open up the Options Dialog: Firefox Menu > Options (Classic Menu: Tools > Options)
Select: Advanced > General Tab > "Use hardware acceleration when available"
Alternatively:
In about:config, Search for "layers.accelerate-all".
- If its not there then add it. (Right Click anywhere and select "NEW" then "Boolean". Add in the pref without quotes.)
- Double Click the pref to turn it "true". That will enable compositing of layers. To revert, double click again.
If successful, rendering of pages and elements should become faster. Scrolling should also become much faster.
(IF you're using Nightly Builds, You should not be turning this off. You should use it and report bugs so that it can continue to improve.)
Known Issues:
- Performance can suffer due to other bugs.
- Random bouts of graphics corruption may occur.
- Corruption in text boxes may occur.
Filing Bugs:
If you would like to file bugs for this issue, be sure to search for the bug first.
These Search Queries can also show what issues are already filed.
OGL: https://bugzilla.mozilla.org/buglist.cgi?query_format=advanced&short_desc=OpenGL&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&short_desc_type=allwordssubstr&resolution=---
D3D: https://bugzilla.mozilla.org/buglist.cgi?query_format=advanced&order=Bug%20Number&short_desc=d3d9&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&short_desc_type=allwordssubstr&resolution=---
If the bug is not filed then Open a New bug, create a descriptive title of the problem with "Core:Graphics" as the component and "Trunk" as the version and give them detailed information on the problem including Platform, Graphics Hardware and Driver Version.
Frequently Asked Questions:
1. What is Hardware Accelerated Compositing?
- Hardware Accelerated Compositing uses the Graphics Processor Unit(GPU) to accelerate certain elements in Gecko on screen. Examples may include: Native Video(Theora, WebM), Images, CSS3 Transitions, CSS3 Transforms and some Canvas elements.
2. What is Gecko Layers?
- Gecko Layers is the new layout API developed by Mozilla for Gecko to improve the painting and manipulation of elements while allowing Hardware Acceleration by putting each element in it its own "Layer" and displaying graphics data of those elements faster. (See Below for More Information and a detailed explanation.)
3. Can Direct2D/DirectWrite run at the same time with Direct3D Compositing?
- Yes.
4.What's the difference between Direct2D/DirectWrite Rendering and Direct3D Compositing?
- Though Direct2D/DirectWrite handles similar cases. D2D & DW are intended to replace GDI+ as the native API for text and widgets. Bonus features include accelerated SVG through Direct2D's Vector Graphics API and general display improvement. Direct3D 9/10 will further enhance hardware acceleration on top of these.
Examples to Test:
(Coming Soon)
More Information:
http://www.basschouten.com/blog1.php/20 ... celeration
http://weblogs.mozillazine.org/roc/arch ... ayers.html
http://weblogs.mozillazine.org/roc/arch ... ayers.html
https://wiki.mozilla.org/Layers
Note: If there is something not detailed here, let me know and I'll add it.
Last edited by Omega X on June 2nd, 2011, 11:52 am, edited 19 times in total.
-
- Posts: 434
- Joined: May 3rd, 2004, 10:30 pm
Re: HW Accelerated Compositing of Gecko Layers in Minefield
- If its not there then add it. (Right Click anywhere and select "NEW" then "Integer". Add in the pref without quotes.)
Shouldn't that read 'then "Boolean"'?
Thanks.
Shouldn't that read 'then "Boolean"'?
Thanks.
- Omega X
- Posts: 8225
- Joined: October 18th, 2007, 2:38 pm
- Location: A Parallel Dimension...
Re: HW Accelerated Compositing of Gecko Layers in Minefield
Atleast I thought it was.
The draft function must have gave me a bad revision.
The draft function must have gave me a bad revision.
-
- Posts: 669
- Joined: May 20th, 2010, 8:12 am
Re: HW Accelerated Compositing of Gecko Layers in Minefield
In the future I think Win7/Vista is supposed to use D3D10 (see https://bugzilla.mozilla.org/show_bug.cgi?id=546514), not sure if that's gonna be in Fx4 tho.
-
- Posts: 1896
- Joined: May 30th, 2004, 5:20 am
Re: HW Accelerated Compositing of Gecko Layers in Minefield
I did as instructed in the OP with no change. I am using the latest hourly build.
- Omega X
- Posts: 8225
- Joined: October 18th, 2007, 2:38 pm
- Location: A Parallel Dimension...
Re: HW Accelerated Compositing of Gecko Layers in Minefield
mat-- wrote:In the future I think Win7/Vista is supposed to use D3D10 (see https://bugzilla.mozilla.org/show_bug.cgi?id=546514), not sure if that's gonna be in Fx4 tho.
I was told that D3D9 was being used for all platforms.
-
- Posts: 1896
- Joined: May 30th, 2004, 5:20 am
Re: HW Accelerated Compositing of Gecko Layers in Minefield
By setting "layers.accelerate-all". to True. The result was no gain in performance-28FPS on the FishIE test plus it made a blank spot in the UI:
This was in the latest hourly and today's build.
This was in the latest hourly and today's build.
- Omega X
- Posts: 8225
- Joined: October 18th, 2007, 2:38 pm
- Location: A Parallel Dimension...
Re: HW Accelerated Compositing of Gecko Layers in Minefield
I thought that was reported, but I can't seem to find the bug.
-
- Posts: 1896
- Joined: May 30th, 2004, 5:20 am
Re: HW Accelerated Compositing of Gecko Layers in Minefield
No longer applicable.
Last edited by GTK66 on September 4th, 2010, 1:08 pm, edited 1 time in total.
- Omega X
- Posts: 8225
- Joined: October 18th, 2007, 2:38 pm
- Location: A Parallel Dimension...
Re: HW Accelerated Compositing of Gecko Layers in Minefield
As all unfinished features tend to perform. Not everything is an overnight change.
-
- Posts: 1896
- Joined: May 30th, 2004, 5:20 am
Re: HW Accelerated Compositing of Gecko Layers in Minefield
Omega X wrote:As all unfinished features tend to perform. Not everything is an overnight change.
Yes that is why there are nightly builds.
-
- Posts: 10
- Joined: August 26th, 2010, 6:17 pm
Re: HW Accelerated Compositing of Gecko Layers in Minefield
sipowicz wrote:By setting "layers.accelerate-all". to True. The result was no gain in performance-28FPS on the FishIE test plus it made a blank spot in the UI:
This was in the latest hourly and today's build.
I get that too when maximized and slight cut off otherwise
-
- Posts: 5937
- Joined: September 23rd, 2005, 5:40 pm
- Location: Tokyo , Japan
Re: HW Accelerated Compositing of Gecko Layers in Minefield
Omega X wrote:Known Issues:
- Popup Dialog Screens may disappear. (Options, Toolbar Customizations, Download Prompt)
not disappear.
#591734 - Setting layers.accelerate-all to true causes some dialogs to become transparent
[Desktop] Windows 7 Professional (32bit/SP1) / Geforce GTX 660Ti 2GB (350.12) / 4GB RAM
- Omega X
- Posts: 8225
- Joined: October 18th, 2007, 2:38 pm
- Location: A Parallel Dimension...
Re: HW Accelerated Compositing of Gecko Layers in Minefield
Changed and bug added. Thanks!
-
- Posts: 395
- Joined: February 13th, 2004, 5:53 am
Re: HW Accelerated Compositing of Gecko Layers in Minefield
sipowicz wrote:By setting "layers.accelerate-all". to True. The result was no gain in performance-28FPS on the FishIE test plus it made a blank spot in the UI:
This was in the latest hourly and today's build.
While there are some performance regressions (e.g. the FishIE benchmark, see https://bugzilla.mozilla.org/show_bug.cgi?id=593450) the over all realworld performance is through the roof. Scrolling is unbelievably fast.