📜 ⬆️ ⬇️

Firefox and Direct2D acceleration: a real performance gain

I want to note that in spite of the fact that the news is rather old, I didn’t find any mention of it on Habré, not through Yandex, not through Google.

So, at the end of November, Bas Schouten published a note in his blog stating that he added another graphic backend to the Firefox browser code for working with Direct2D. Direct2D is a new API designed to replace the outdated and kicked out DirectX DirectDraw long ago. It works in Windows 7 and Windows Vista, if your video card driver meets at least the WDDM 1.0 standard.

Measurements of the speed of rendering popular pages show that the author tried not in vain :)
image
')
In the same post there is a link to the compiled version of Firefox with the necessary patches, and I decided to see if the benefits of using Direct2D are great.

First of all, I want to tell you about the work of this SVG-shki . It is something! If in the version without Direct2D, as in other browsers, it costs to enlarge at least one photo at least on the floor of the screen, everything starts to slow down, then in the version with Direct2D, even if all 4 images are stretched to full screen (1920 × 1200), and one of move them, the processor load remains minimal, and the movement is very smooth.

I also decided to drive the peacekeeper performance test, which also shows an impressive performance boost:
image
By the way, Google Chrome in the same test was the fastest at 30%.

As for real sites, finally, at least in one browser, it became possible to work with page scale! = 100% and fixed background pictures :) For example, the site wii.ign.com , which was called as an example of a heavy site, will scroll perfectly at any scale, unlike the non-hardware accelerated version, where it just dies. (unfortunately, now the background has disappeared from this page and it stops to stop everywhere :)

In general, we expect Mozilla to include the code in the final version of Firefox 3.7, especially since Microsoft has already made a statement that in the ninth version of Internet Explorer there will be hardware acceleration via Direct2D, and in Opera, as you know, hardware acceleration will be in the Presto 2.4 engine.

Source: https://habr.com/ru/post/77903/


All Articles