EGL Multithreading Requirements

This topic provides EGL implementers with information about the EGL multithreading requirements on the Symbian platform.

Target audience: Device creators.

Introduction

This topic provides clarifications to the following sections of the EGL specification:

  • 2.3 Direct Rendering and Address Spaces
  • 3.7 Rendering Context
  • 3.7.3 Binding Contexts and Drawables

For links to the relevant EGL specifications, see EGL Interface Overview.

Number of threads per process

An EGL implementation must support an unlimited number of threads per process. On Symbian all threads within a process share the same virtual address space. EGL objects that are used by multiple threads in a process are therefore used within the address space in which they are created, as required by the EGL specification.

With one exception, all EGL functions and handles must be able to be used and shared between all of the threads within the same process. The exception is the EGL window surface as explained in Symbian-Specific Behavior.

There is a graphics resource cost associated with each additional thread that uses EGL. Typically only one thread within a process uses EGL. While usage by eight threads within a process should be possible, it is exceptional and has not been encountered in practice. Therefore you may want to optimize your implementation for between one and eight threads.

Number of current contexts

An EGL implementation should not place arbitrary restrictions on the number of contexts that can be made current, other than the restrictions that are explicitly stated in the specification. For example, eglMakeCurrent() should not fail with EGL_BAD_ACCESS when a client attempts to make multiple OpenVG contexts current to separate threads, simply because the implementation has a limit to the number of contexts that can be current at the same time.

Related concepts
EGL Implementer's Guide