Commit d29f946d618091bae9756fb9c67e7eb974487417

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

Reland "Fix ExternalImageTarget EGLImage race" This is a reland of commit 8aa3ca9d177c0ed54926b769de7d0bce0f8482d3 Previous submission was reverted because of a failure in Android's "testDrawingHardwareBitmapNotLeaking" test. Bug was not in the reverted CL itself and is fixed by CL: https://chromium-review.googlesource.com/c/angle/angle/+/4733831 Original change's description: > 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> Bug: angleproject:6957 Change-Id: Ia698dbea64b8d51ea78f3af6558efc7266f8bdc8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4732892 Commit-Queue: Igor Nazarov <i.nazarov@samsung.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>