mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 23:02:20 +00:00
0cffcc7253
When Surfaces/SurfaceTextures are allocated they are given a handle, which is a monotonically increasing 32-bit integer. To render Surfaces, we typically pass the Surface handle to the compositor, which then looks it up in a map to find the corresponding SurfaceTexture. Following a GPU process restart, content may be left with stale handles referencing SurfaceTextures which no longer exist. Once new SurfaceTextures are allocated, these stale handles may reference new SurfaceTextures with no relation to the old handle. This can lead to rendering the wrong texture. Additionally, we may crash when allocating "sync" SurfaceTextures, as the previous sync texture for a certain handle may not have been released yet. To fix this, this patch combines the existing handle with a new ID uniquely identifying the process in which the SurfaceTexture was allocated (or 0 for the parent process). We use a monotonically increasing value rather than the pid to guard against the new GPU process possibly having the same pid as the previous instance. We combine these two 32-bit integers and use the resulting 64-bit integer as the Surface handle. Differential Revision: https://phabricator.services.mozilla.com/D150963 |
||
---|---|---|
.. | ||
2d | ||
angle | ||
cairo | ||
config | ||
docs | ||
gl | ||
graphite2 | ||
harfbuzz | ||
ipc | ||
layers | ||
ots | ||
qcms | ||
skia | ||
src | ||
tests | ||
thebes | ||
vr | ||
webrender_bindings | ||
wgpu_bindings | ||
wr | ||
ycbcr | ||
metrics.yaml | ||
moz.build |