Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <GraphicsAccelerator.h>

Class TAcceleratedBitmapSpec

class TAcceleratedBitmapSpec;

Description

A utility class that provides access to the contents of a bitmap.

The bitmap can be a hardware bitmap (RHardwareBitmap), or an ordinary bitmap (CFbsBitmap). An object of this class is used as a parameter by several accelerated graphics operations, e.g. TGopBitBlt, to specify the source bitmap for the operation.

Members

Defined in TAcceleratedBitmapSpec:


Construction and destruction


TAcceleratedBitmapSpec()

inline TAcceleratedBitmapSpec();

Description

Default constructor. Use one of the other constructor overloads instead.


TAcceleratedBitmapSpec(CFbsBitmap *)

IMPORT_C TAcceleratedBitmapSpec(CFbsBitmap *aBitmap);

Description

Parameters

CFbsBitmap *aBitmap


TAcceleratedBitmapSpec(RHardwareBitmap)

IMPORT_C TAcceleratedBitmapSpec(RHardwareBitmap aBitmap);

Description

Parameters

RHardwareBitmap aBitmap

[Top]


Member functions


GetInfo(TAcceleratedBitmapInfo &)const

IMPORT_C TInt GetInfo(TAcceleratedBitmapInfo &aInfo) const;

Description

Parameters

TAcceleratedBitmapInfo &aInfo

Return value

TInt


Lock(TBitmapLockCount &)

inline void Lock(TBitmapLockCount &aCount);

Description

Prevents a bitmap from moving in memory. TAcceleratedBitmapSpec::Lock(TBitmapLockCount &) should be called before accessing the bitmap and TAcceleratedBitmapSpec::Unlock(TBitmapLockCount &) immediately afterwards. Although it is not necessary to lock and unlock some types of bitmap, it is a small overhead, and it is recommended that you always do it.

If a bitmap is already locked, all uses of the TAcceleratedBitmapSpec::Lock(TBitmapLockCount &) and TAcceleratedBitmapSpec::Unlock(TBitmapLockCount &) methods within the same thread must use the same TBitmapLockCount object, even if TAcceleratedBitmapSpec::Lock(TBitmapLockCount &) and TAcceleratedBitmapSpec::Unlock(TBitmapLockCount &) are called by different instances of TAcceleratedBitmapSpec.

Parameters

TBitmapLockCount &aCount

Maintains a count of the number of locks made on the bitmap.


Lock(TBitmapLockCount &,TAcceleratedBitmapInfo &)

inline void Lock(TBitmapLockCount &aCount, TAcceleratedBitmapInfo &aInfo);

Description

Prevents a bitmap from moving in memory. TAcceleratedBitmapSpec::Lock(TBitmapLockCount &) should be called before accessing the bitmap and TAcceleratedBitmapSpec::Unlock(TBitmapLockCount &) immediately afterwards. Although it is not necessary to lock and unlock some types of bitmap, it is a small overhead, and it is recommended that you always do it. Also updates a TAcceleratedBitmapInfo structure with any information that may have changed, (typically the bitmap's memory address).

If a bitmap is already locked, all uses of the TAcceleratedBitmapSpec::Lock(TBitmapLockCount &) and TAcceleratedBitmapSpec::Unlock(TBitmapLockCount &) methods within the same thread must use the same TBitmapLockCount object, even if TAcceleratedBitmapSpec::Lock(TBitmapLockCount &) and TAcceleratedBitmapSpec::Unlock(TBitmapLockCount &) are called by different instances of TAcceleratedBitmapSpec.

Parameters

TBitmapLockCount &aCount

Maintains a count of the number of locks made on the bitmap.

TAcceleratedBitmapInfo &aInfo

On return, contains the new address of the start of the bitmap.


Unlock(TBitmapLockCount &)

inline void Unlock(TBitmapLockCount &aCount);

Description

Frees a bitmap after a call to TAcceleratedBitmapSpec::Lock(TBitmapLockCount &). A call to TAcceleratedBitmapSpec::Unlock(TBitmapLockCount &) must be made for each corresponding call to TAcceleratedBitmapSpec::Lock(TBitmapLockCount &). This function should be called as soon as any bitmap access has finished. If, after the TAcceleratedBitmapSpec::Unlock(TBitmapLockCount &) operation, no more calls to TAcceleratedBitmapSpec::Lock(TBitmapLockCount &) are outstanding on the bitmap, the bitmap is free to be moved in memory again.

If a bitmap is already locked, all uses of the TAcceleratedBitmapSpec::Lock(TBitmapLockCount &) and TAcceleratedBitmapSpec::Unlock(TBitmapLockCount &) methods within the same thread must use the same TBitmapLockCount object, even if TAcceleratedBitmapSpec::Lock(TBitmapLockCount &) and TAcceleratedBitmapSpec::Unlock(TBitmapLockCount &) are called by different instances of TAcceleratedBitmapSpec.

Parameters

TBitmapLockCount &aCount

Maintains a count of the number of locks made on the bitmap.


Type()const

inline TAcceleratedBitmapType Type() const;

Description

Returns the type of the bitmap. The type is assigned during construction.

Return value

TAcceleratedBitmapSpec::TAcceleratedBitmapType

The type of bitmap.


Handle()const

inline TInt Handle() const;

Description

Returns the handle to the bitmap.

Return value

TInt

The handle to the bitmap.

[Top]


Member enumerations


Enum TAcceleratedBitmapType

TAcceleratedBitmapType

Description

Identifies the type of the bitmap.

TAcceleratedBitmapSpec::Type()const returns this value.

See also:

ENoBitmap

The object was created using the default constructor, and has no type.

EFbsBitmap

The bitmap is of type CFbsBitmap.

EHardwareBitmap

The bitmap is of type RHardwareBitmap.


Enum TAcceleratedBitmapLock

TAcceleratedBitmapLock

Description

EBitmapIsStatic

EBitmapNeedsLocking