MSgImage_Sw Class Reference

class MSgImage_Sw

This interface allows direct access to the pixel data of an image from user-side code. It is intended for use by software implementations of functions in the Graphics subsystem.

This interface is only supported if the image is or can be stored in system memory. This is always the case on platforms without hardware acceleration and also on platforms with Unified Memory Architecture (UMA) hardware accelerators.

Member Functions Documentation

BeginDataAccess(TSgCpuAccess)

TInt BeginDataAccess ( TSgCpuAccess aCpuAccess ) [pure virtual]

Marks the beginning of CPU access to the pixel data. This function must be called before DataAddress() in builds with SYMBIAN_GRAPHICS_AUTOFLUSH_CACHE and prepares the image for CPU access to its pixel data in system memory. Calls to BeginDataAccess() must be coupled with subsequent calls to EndDataAccess() .

Pre-condition
aCpuAccess is not ESgCpuAccessNone.
The image has not been mapped for CPU access to its pixel data by a call to RSgImage::MapReadOnly() , RSgImage::MapWriteOnly() or RSgImage::MapReadWrite() .
The image has not been prepared for CPU access to its pixel data by a call to BeginDataAccess() .
Post-condition
The image is prepared for CPU access to its pixel data.

Parameters

TSgCpuAccess aCpuAccess Whether the pixel data is going to be only read, only written or read and written by the CPU until the corresponding call to EndDataAccess().

DataAddress()

TAny * DataAddress ( ) const [pure virtual]

Retrieves the base address of the pixel data in system memory.

Pre-condition
In builds with SYMBIAN_GRAPHICS_AUTOFLUSH_CACHE, the image has been prepared for CPU access to its pixel data by a previous call to BeginDataAccess() .
Post-condition
None.
panic
SGRES-ADAPTER 4 in debug builds with SYMBIAN_GRAPHICS_AUTOFLUSH_CACHE, if the image has not been prepared for CPU access to its pixel data by a previous call to BeginDataAccess() .

DataStride()

TInt DataStride ( ) const [pure virtual]

Retrieves the number of bytes between rows of the pixel data in system memory.

Pre-condition
None.
Post-condition
None.

EndDataAccess()

TInt EndDataAccess ( ) [pure virtual]

Marks the end of CPU access to the pixel data. This function must be called when finished using the values returned by DataAddress() in builds with SYMBIAN_GRAPHICS_AUTOFLUSH_CACHE and ensures that, if the CPU has modified the pixel data, any subsequent usage of the image by the GPU will reflect its new state. Calls to EndDataAccess() must correspond to prior calls to BeginDataAccess() .

Pre-condition
The image has been prepared for CPU access to its pixel data by a successful call to BeginDataAccess() .
Post-condition
The image is no longer prepared for CPU access to its pixel data.