Closed Bug 1682230 Opened 3 years ago Closed 3 years ago

Don't call eglSetDamageRegion if gfx.webrender.allow-partial-present-buffer-age is false

Categories

(Core :: Graphics: WebRender, defect, P3)

defect

Tracking

()

RESOLVED FIXED
86 Branch
Tracking Status
firefox86 --- fixed

People

(Reporter: jnicol, Assigned: jnicol)

Details

Attachments

(1 file)

We recently(ish) added a pref gfx.webrender.allow-partial-present-buffer-age, which controls whether we query the EGL surface's buffer age at the beginning of the frame and attempt to only render the damaged regions, or whether we render the entire backbuffer. The significance of this, is that when the value is false, we do not call eglQuerySurface(EGL_BUFFER_AGE).

On Android (and potentially some Linux devices) we implement the KHR_partial_update extension. This is effectively a superset of EXT_buffer_age, where we additionally call eglSetDamageRegion() each frame prior to rendering. As the buffer's damage region, and therefore the buffer age, must be known to calculate the surface damage region, it is an error to call eglSetDamageRegion() without having called eglQuerySurface(EGL_BUFFER_AGE) beforehand. This means that when we set gfx.webrender.allow-partial-present-buffer-age to false, we get flooded with (probably harmless) EGL errors. To fix this, we should additionally make that pref stop us from calling eglSetDamageRegion().

"probably harmless", but does cause a crash in debug builds because we assert there is no error.

If gfx.webrender.allow-partial-present-buffer-age is false then we do
not query the egl buffer age, and always render the entire
backbuffer. However, we were still calling eglSetDamageRegion if
KHR_partial_present is available. Calling eglSetDamageRegion without
first querying the buffer age is an error, which was causing an
assertion failure in debug builds. To fix this, check the value of the
pref before calling eglSetDamageRegion.

Pushed by jnicol@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e071363ddf22
Don't call eglSetDamageRegion if buffer age is disabled. r=aosmond
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 86 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: