Closed Bug 1910138 Opened 3 months ago Closed 16 days ago

Enable Accelerated Canvas2D on Windows

Categories

(Core :: Graphics: Canvas2D, enhancement)

Unspecified
Windows
enhancement

Tracking

()

RESOLVED FIXED
133 Branch
Tracking Status
relnote-firefox --- ?
firefox133 --- fixed

People

(Reporter: lsalzman, Assigned: lsalzman)

References

(Blocks 1 open bug, Regressed 4 open bugs)

Details

(Keywords: perf-alert)

Attachments

(4 files)

No description provided.

This disables the legacy Direct2D backend in Windows Nightly in favor
of using Accelerated Canvas2D instead. The goal of this experiment
is to collect performance and other bug feedback on AC2D versus Direct2D.

In general, AC2D has been fairly stable on other platforms, so it would be
nice to gradually move towards using AC2D on Windows as well so that we
are using one consistent acceleration solution.

This experiment is the first step towards that end.

Assignee: nobody → lsalzman
Status: NEW → ASSIGNED
Pushed by lsalzman@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2f15b6efa248 Disable Direct2D in Nightly. r=jrmuizel,aosmond
Flags: needinfo?(lsalzman)
Pushed by lsalzman@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/eed5e0ce8e90 Disable Direct2D in Nightly. r=jrmuizel,aosmond
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 130 Branch
Regressions: 1910480

Also seems to cause 7% regression on heap-unclassified

Blocks: gpu-canvas
Regressions: 1910816
Regressions: 1910869

(In reply to Lee Salzman [:lsalzman] from comment #1)

This disables the legacy Direct2D backend in Windows Nightly in favor
of using Accelerated Canvas2D instead. The goal of this experiment
is to collect performance and other bug feedback on AC2D versus Direct2D.

Could we change this only for a subset of Nightly users? For PDF, we find many regressions on Nightly, and having a different configuration between Nightly and Beta/Release will make us blind to regressions caused by gfx changes.

Regressions: 1910918
Regressions: 1910929
Regressions: 1911019
Regressions: 1910407, 1910868
No longer regressions: 1910407
Depends on: 1911231

(In reply to Pulsebot from comment #2)

Pushed by lsalzman@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2f15b6efa248
Disable Direct2D in Nightly. r=jrmuizel,aosmond

Perfherder has detected a browsertime performance change from push 2f15b6efa24884286c84068c76b9b21a7c2ee134.

Improvements:

Ratio Test Platform Options Absolute values (old vs new) Performance Profiles
25% motionmark-animometer windows11-64-shippable-qr fission webrender 45.95 -> 57.65 Before/After
20% motionmark-animometer-ramp windows11-64-shippable-qr fission webrender 809.52 -> 967.66 Before/After
17% imdb loadtime windows11-64-shippable-qr fission warm webrender 1,227.42 -> 1,016.85 Before/After
16% imdb LastVisualChange windows11-64-shippable-qr fission warm webrender 1,318.33 -> 1,109.00 Before/After
13% speedometer3 Charts-chartjs/Show tooltip/Async windows11-64-shippable-qr fission webrender 10.30 -> 8.98 Before/After
... ... ... ... ... ...
3% speedometer3 Perf-Dashboard/SelectingRange/total windows11-64-shippable-qr fission webrender 24.05 -> 23.43 Before/After

Details of the alert can be found in the alert summary, including links to graphs and comparisons for each of the affected tests.

If you need the profiling jobs you can trigger them yourself from treeherder job view or ask a sheriff to do that for you.

You can run these tests on try with ./mach try perf --alert 1576

For more information on performance sheriffing please see our FAQ.

Keywords: perf-alert

(In reply to Marco Castelluccio [:marco] from comment #8)

(In reply to Lee Salzman [:lsalzman] from comment #1)

This disables the legacy Direct2D backend in Windows Nightly in favor
of using Accelerated Canvas2D instead. The goal of this experiment
is to collect performance and other bug feedback on AC2D versus Direct2D.

Could we change this only for a subset of Nightly users? For PDF, we find many regressions on Nightly, and having a different configuration between Nightly and Beta/Release will make us blind to regressions caused by gfx changes.

I will think of a way to reasonably do this soon.

Regressions: 1911512

Maybe we could use Nimbus?
We could also use the same approach for enabling/disabling hardware acceleration in pdf.js so we can help find bugs with hardware acceleration enabled, but keep it disabled so in the meantime we can also find bugs in the "normal" configuration.

Depends on: 1911719
Status: RESOLVED → REOPENED
No longer depends on: 1911719
No longer regressions: 1911512
Resolution: FIXED → ---
Keywords: leave-open
Pushed by lsalzman@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/71bf1129a125 Re-enable Direct2D on Windows nightly. r=jrmuizel
Regressions: 1911958
Regressions: 1913065

(In reply to Pulsebot from comment #13)

Pushed by lsalzman@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/71bf1129a125
Re-enable Direct2D on Windows nightly. r=jrmuizel

Perfherder has detected a awsy performance change from push 71bf1129a12562d0be35a5df2f452fbf3c042fac.

Improvements:

Ratio Test Platform Options Absolute values (old vs new)
6% Heap Unclassified windows11-64-2009-shippable-qr fission tp6 110,120,215.08 -> 103,318,767.88

Details of the alert can be found in the alert summary, including links to graphs and comparisons for each of the affected tests.

If you need the profiling jobs you can trigger them yourself from treeherder job view or ask a sheriff to do that for you.

You can run these tests on try with ./mach try perf --alert 1718

For more information on performance sheriffing please see our FAQ.

Regressions: 1914275
Target Milestone: 130 Branch → ---
Summary: Disable Direct2D in Nightly → Disable Direct2D
Summary: Disable Direct2D → Enable Accelerated Canvas2D on Windows

Most issues related to the AC2D on Windows experiment should have been
addressed in related bugs, therefor it is time to starting rolling out
AC2D on Windows.

As before, this flips the gfx.canvas.accelerated pref to on, and also
flips the gfx.direct2d.disabled pref to true. With Direct2D disabled,
AC2D will then function. Direct2D can still be forced on via the
gfx.direct2d.force-enabled pref or by toggling the disabled pref, which
will subsequently automatically disable AC2D.

These two prefs will be set automatically with this change?
gfx.canvas.remote.worker-threads = 0
gfx.canvas.remote = False

(In reply to Mayank Bansal from comment #17)

These two prefs will be set automatically with this change?
gfx.canvas.remote.worker-threads = 0
gfx.canvas.remote = False

Worker threads is ignored, and remote canvas disables if there is no Direct2D. This was a recent-ish change.

Pushed by lsalzman@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/fe10049200df Enable Accelerated Canvas2D on Windows. r=aosmond
Pushed by lsalzman@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/adf856afde83 Fix remote canvas Direct2D pref check. r=aosmond
Status: REOPENED → RESOLVED
Closed: 3 months ago16 days ago
Resolution: --- → FIXED
Target Milestone: --- → 133 Branch

:lsalzman could you consider nominating this for a release note? (Process info)

Flags: needinfo?(lsalzman)

Release Note Request (optional, but appreciated)
[Why is this notable]: Windows now uses Accelerated Canvas2D for hardware acceleration of Canvas2D. This provides a consistent acceleration architecture across all platforms by utilizing WebGL instead of relying upon Direct2D.
[Affects Firefox for Android]: No
[Suggested wording]:
[Links (documentation, blog post, etc)]:

relnote-firefox: --- → ?
Flags: needinfo?(lsalzman)

Thanks, added to the Fx133 nightly release notes, please allow 30 minutes for the site to update.
Keeping the relnote-firefox flag as ? to keep it on the radar for inclusion in the final Fx133 release notes.

(In reply to Pulsebot from comment #19)

Pushed by lsalzman@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/fe10049200df
Enable Accelerated Canvas2D on Windows. r=aosmond

Perfherder has detected a browsertime performance change from push fe10049200dfa92f958f65b9fc37fef345694b41.

Improvements:

Ratio Test Platform Options Absolute values (old vs new) Performance Profiles
14% imdb loadtime windows11-64-shippable-qr fission warm webrender 1,220.78 -> 1,052.74 Before/After
13% speedometer3 Charts-chartjs/Show tooltip/total windows11-64-shippable-qr fission webrender 11.14 -> 9.65 Before/After
13% imdb LastVisualChange windows11-64-shippable-qr fission warm webrender 1,332.76 -> 1,160.93 Before/After
13% speedometer3 Charts-chartjs/Show tooltip/Async windows11-64-shippable-qr fission webrender 10.90 -> 9.50 Before/After
13% speedometer3 Charts-chartjs/Show tooltip/total windows11-64-shippable-qr fission webrender 11.06 -> 9.64 Before/After
... ... ... ... ... ...
4% speedometer3 Perf-Dashboard/SelectingRange/total windows11-64-shippable-qr fission webrender 25.05 -> 23.97 Before/After

Details of the alert can be found in the alert summary, including links to graphs and comparisons for each of the affected tests.

If you need the profiling jobs you can trigger them yourself from treeherder job view or ask a sheriff to do that for you.

You can run these tests on try with ./mach try perf --alert 2517

For more information on performance sheriffing please see our FAQ.

Regressions: 1926970
Regressions: 1927104
Regressions: 1926326
Regressions: 1927788
Regressions: 1927803
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: