From c27a4a1d7d3794b92518735c2ba84871748c16f4 Mon Sep 17 00:00:00 2001 From: Geoff Lang Date: Mon, 27 Nov 2023 14:44:07 -0500 Subject: Re-use EGL sync object allocations. Create a pool of EGL sync objects with their implementations that can be re-used. Update all backend implementations to support multiple calls to initialize/destroy. Pool size of 32 chosen through experimentation using Chrome. Bug: angleproject:8430 Change-Id: I86fea41aed35eddccc953efb3802bf5fdb7f3cb2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5063341 Reviewed-by: Shahbaz Youssefi Commit-Queue: Geoff Lang --- src/libANGLE/EGLSync.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/libANGLE/EGLSync.h') diff --git a/src/libANGLE/EGLSync.h b/src/libANGLE/EGLSync.h index 7fa32c9837..3082c702ab 100644 --- a/src/libANGLE/EGLSync.h +++ b/src/libANGLE/EGLSync.h @@ -29,10 +29,10 @@ class Context; namespace egl { -class Sync final : public angle::RefCountObject, public LabeledObject +class Sync final : public LabeledObject { public: - Sync(rx::EGLImplFactory *factory, const SyncID &id, EGLenum type); + Sync(rx::EGLImplFactory *factory, EGLenum type); ~Sync() override; void setLabel(EGLLabelKHR label) override; @@ -40,10 +40,11 @@ class Sync final : public angle::RefCountObject, public const SyncID &id() const { return mId; } - void onDestroy(const Display *display) override; + void onDestroy(const Display *display); Error initialize(const Display *display, const gl::Context *context, + const SyncID &id, const AttributeMap &attribs); Error clientWait(const Display *display, const gl::Context *context, -- cgit v1.2.3