MozillaZine

HW Accelerated Compositing of Gecko Layers in Firefox

Discussion about official Mozilla Firefox builds
Omega X

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

Post Posted September 3rd, 2010, 2:04 pm

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.
Last edited by Omega X on June 2nd, 2011, 11:52 am, edited 19 times in total.
Latest: Firefox/70.0.1 *ESR/68.2.0 - Mobile/70.0 - Thunderbird/68.2.0
Nightly: Nightly/72.0a1 - Mobile/72.0a1 - Daily/72.0a1

tmeader
 
Posts: 434
Joined: May 3rd, 2004, 10:30 pm

Post Posted September 3rd, 2010, 2:10 pm

- 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.

Omega X

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

Post Posted September 3rd, 2010, 2:12 pm

Atleast I thought it was.

The draft function must have gave me a bad revision.
Latest: Firefox/70.0.1 *ESR/68.2.0 - Mobile/70.0 - Thunderbird/68.2.0
Nightly: Nightly/72.0a1 - Mobile/72.0a1 - Daily/72.0a1

mat--
 
Posts: 669
Joined: May 20th, 2010, 8:12 am

Post Posted September 3rd, 2010, 2:39 pm

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.

GTK66
 
Posts: 1896
Joined: May 30th, 2004, 5:20 am

Post Posted September 3rd, 2010, 2:50 pm

I did as instructed in the OP with no change. I am using the latest hourly build.

Omega X

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

Post Posted September 3rd, 2010, 2:51 pm

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.
Latest: Firefox/70.0.1 *ESR/68.2.0 - Mobile/70.0 - Thunderbird/68.2.0
Nightly: Nightly/72.0a1 - Mobile/72.0a1 - Daily/72.0a1

GTK66
 
Posts: 1896
Joined: May 30th, 2004, 5:20 am

Post Posted September 3rd, 2010, 3:03 pm

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:

Image

This was in the latest hourly and today's build.

Omega X

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

Post Posted September 3rd, 2010, 3:15 pm

I thought that was reported, but I can't seem to find the bug.
Latest: Firefox/70.0.1 *ESR/68.2.0 - Mobile/70.0 - Thunderbird/68.2.0
Nightly: Nightly/72.0a1 - Mobile/72.0a1 - Daily/72.0a1

GTK66
 
Posts: 1896
Joined: May 30th, 2004, 5:20 am

Post Posted September 3rd, 2010, 3:20 pm

With the results that I have received and the lack of any speed enhancement I would not do as instructed in the OP. It does nothing but create an additional problem.

No longer applicable.
Last edited by GTK66 on September 4th, 2010, 1:08 pm, edited 1 time in total.

Omega X

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

Post Posted September 3rd, 2010, 3:23 pm

As all unfinished features tend to perform. Not everything is an overnight change.
Latest: Firefox/70.0.1 *ESR/68.2.0 - Mobile/70.0 - Thunderbird/68.2.0
Nightly: Nightly/72.0a1 - Mobile/72.0a1 - Daily/72.0a1

GTK66
 
Posts: 1896
Joined: May 30th, 2004, 5:20 am

Post Posted September 3rd, 2010, 3:26 pm

Omega X wrote:As all unfinished features tend to perform. Not everything is an overnight change.


Yes that is why there are nightly builds.

margosmark
 
Posts: 10
Joined: August 26th, 2010, 6:17 pm

Post Posted September 3rd, 2010, 4:39 pm

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:

Image

This was in the latest hourly and today's build.



I get that too when maximized and slight cut off otherwise

pal-moz
 
Posts: 5937
Joined: September 23rd, 2005, 5:40 pm
Location: Tokyo , Japan

Post Posted September 3rd, 2010, 4:51 pm

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

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

Post Posted September 3rd, 2010, 5:17 pm

Changed and bug added. Thanks!
Latest: Firefox/70.0.1 *ESR/68.2.0 - Mobile/70.0 - Thunderbird/68.2.0
Nightly: Nightly/72.0a1 - Mobile/72.0a1 - Daily/72.0a1

Elen
 
Posts: 394
Joined: February 13th, 2004, 5:53 am

Post Posted September 3rd, 2010, 6:06 pm

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.

Return to Firefox Builds


Who is online

Users browsing this forum: No registered users and 1 guest