Pixmap Implementation

This topic provides an introduction to implementing EGL pixmap surfaces on the Symbian platform.

Target audience: Device creators.

According to the EGL specification, EGLNativePixmapType is defined by the platform, which in this case is Symbian. Historically, Symbian has defined EGLNativePixmapType as being a CFbsBitmap pointer. It is possible to create an EGLSurface to render to a CFbsBitmap.


The CFbsBitmap interface is used to represent standard bitmaps that are owned by the Font and Bitmap Server. CFbsBitmap can be drawn to a window through CWindowGc or drawn to an off-screen target through CFbsBitGc. There are several different types and formats of CFbsBitmap. An EGL implementation may support a subset of these types and formats.

  • Some EGL implementations may support only a type of CFbsBitmap known as a hardware-bitmap, created by using CFbsBitmap::CreateHardwareBitmap(). This type of bitmap is implemented under the Screen Driver interface known as RHardwareBitmap and can be hardware accelerated. However, there are some limitations as described in Screen Driver Graphics Acceleration Support.

  • The Symbian reference EGL supports rendering to a CFbsBitmap created through the standard CFbsBitmap::Create() function. EGL implementations are not required to support rendering to this type of bitmap.

  • ROM bitmaps are intrinsically unsuitable as render targets.

  • Similarly compressed bitmaps are not intended to be used by EGL.

Implementations are encouraged to identify and reject unsupported bitmap types as early as possible—for example, during eglCreatePixmapSurface.

EGL implementations vary in their support for CFbsBitmap pixel formats. The Symbian reference EGL supports creating a pixmap surface from a CFbsBitmap of the following formats:

The Font and Bitmap Server is a singleton process that owns bitmaps. CFbsBitmap objects are actually client-side handles to the bitmap objects, which are stored on a globally visible chunk.

During any period of access to a bitmap's data, you need to bound access to the data as follows:

  1. Call CFbsBitmap::BeginDataAccess().

  2. Call CFbsBitmap::DataAddress(), which returns a pointer. (This remains valid until you call CFbsBitmap::EndDataAccess().)

  3. Manipulate the data using the pointer returned from DataAddress().

  4. Call CFbsBitmap::EndDataAccess().

Some hardware-accelerated implementations of OpenGL ES may require hardware-accelerated bitmaps in order to operate correctly. In this case the eglCreatePixmapSurface function can use CFbsBitmap::HardwareBitmapHandle() to discover whether a bitmap is actually a hardware bitmap and can be written to by a hardware accelerator.