Commit 8aa3ca9d177c0ed54926b769de7d0bce0f8482d3

Igor Nazarov 2023-07-26T19:55:56

Fix ExternalImageTarget EGLImage race Race may happen when ExternalImageTarget EGLImage is destroyed while its GLES Texture/Renderbuffer target is modified/destroyed. Fixed by providing `egl::Image` with `egl::ContextMutex` even when `context` is `nullptr`. This CL also changes `SharedContextMutex` merging rules when `mRank` is equal - now priority goes to the `lockedMutex`. This is done to prevent unnecessary `mRoot` update of Context mutex when merging with `egl::Image` only mutex. Bug: angleproject:6957 Change-Id: I823e53b98f70ed3eaca191e8be5b168dc07899f6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4720835 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Igor Nazarov <i.nazarov@samsung.com>