Graphics Resource Component Overview

The Graphics Resource component is not available on all systems. When present, together with the Graphics Resource Adaptation component, it provides an abstraction layer for the memory management of graphics data, both pixel data and non-pixel data (such as OpenVG command lists). The Graphics Resource component is the generic part, which provides the client API, whereas the Graphics Resource Adaptation component provides the adaptation part, which device creators can adapt to suit their graphics acceleration hardware if any is available.

Target audience: Device creators.

Note: The Graphics Resource component is deprecated in Symbian^3 and will be removed in Symbian^4 (S^4). However, a new Graphics Resource Interface component is planned for S^4. This new component will provide a similar but reduced API that is optimized for sharing images across processes.

The CBR package name for the Graphics Resource component is graphics_graphicsresource.

Key classes

The following diagram shows the relationships between the key classes.

Figure 1. Key Graphics Resource component classes
Class Description

RSgImage

A handle to a reference-counted, two-dimensional pixel array that can be used as a source or target for different rendering pipelines. Attributes that are set at creation time define parameters such as the size, screen and usage. These cannot be changed after creation.

An image can be shared between processes by passing its unique identifier. Alternatively it can be created as process-specific and not shareable, which may have performance advantages.

RSgImageCollection

A handle to a reference-counted collection of images with the same attributes which is allocated in such a way that it can be used with the graphics composition components. Clients can access each of the images in the collection individually through RSgImage handles. Interoperability with the graphics composition components is achieved by passing the surface identifier returned by RSgImageCollection::SurfaceId() in calls to the Composition Interface API or the Surface Update API.

RSgDrawable

A handle to a reference-counted graphics resource that can be drawn in different rendering pipelines—for example, DirectGDI or OpenVG. Instances of RSgDrawable allow access to drawable resources created using other APIs without knowing the concrete type of the resource.