aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/runtime/GLES_COMPUTE/GCScheduler.h
diff options
context:
space:
mode:
authorIoan-Cristian Szabo <ioan-cristian.szabo@arm.com>2017-12-22 17:32:17 +0000
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:42:33 +0000
commit77eb21f7d9c6e34e985dfa96152fb8b6c40f9a8a (patch)
tree0b1cb2c0d7bd38bd2f7eacf41d90ea3a2b758f21 /arm_compute/runtime/GLES_COMPUTE/GCScheduler.h
parent88b8d8c2651ee52467fb9e2029ddc9820d442228 (diff)
downloadComputeLibrary-77eb21f7d9c6e34e985dfa96152fb8b6c40f9a8a.tar.gz
Fix destruction order of singleton objects and resolve hang GLES issue.
Change-Id: I9df42d4255b371b275a74aa521406e6796ee436b Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/113901 Reviewed-by: Anthony Barbier <anthony.barbier@arm.com> Tested-by: Anthony Barbier <anthony.barbier@arm.com>
Diffstat (limited to 'arm_compute/runtime/GLES_COMPUTE/GCScheduler.h')
-rw-r--r--arm_compute/runtime/GLES_COMPUTE/GCScheduler.h24
1 files changed, 19 insertions, 5 deletions
diff --git a/arm_compute/runtime/GLES_COMPUTE/GCScheduler.h b/arm_compute/runtime/GLES_COMPUTE/GCScheduler.h
index 817f8b54b1..8aac9c4023 100644
--- a/arm_compute/runtime/GLES_COMPUTE/GCScheduler.h
+++ b/arm_compute/runtime/GLES_COMPUTE/GCScheduler.h
@@ -35,10 +35,6 @@ class IGCKernel;
/** Provides global access to a OpenGL ES context and command queue. */
class GCScheduler
{
-private:
- /** Constructor */
- GCScheduler();
-
public:
/** Access the scheduler singleton.
*
@@ -67,7 +63,25 @@ public:
/** Blocks until all commands in the associated command queue have finished. */
void sync();
+
+private:
+ /** Constructor */
+ GCScheduler();
+ /** Destructor */
+ ~GCScheduler();
+ /** Prevent instances of this class from being copied */
+ GCScheduler(const GCScheduler &) = delete;
+ /** Prevent instances of this class from being copied */
+ GCScheduler &operator=(const GCScheduler &) = delete;
+
+ /** Set up EGL context */
+ void setup_context();
+
+ /** Flag to ensure symbols initialisation is happening before Scheduler creation */
+ static std::once_flag _initialize_symbols;
+
+ EGLDisplay _display; /**< Underlying EGL Display. */
+ EGLContext _context; /**< Underlying EGL Context. */
};
}
-
#endif /* __ARM_COMPUTE_GCSCHEDULER_H__ */