class TAcceleratedBitmapSpec |
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.
Public Member Functions | |
---|---|
TAcceleratedBitmapSpec () | |
TAcceleratedBitmapSpec ( CFbsBitmap *) | |
TAcceleratedBitmapSpec ( RHardwareBitmap ) | |
IMPORT_C TInt | GetInfo ( TAcceleratedBitmapInfo &) |
TInt | Handle () |
void | Lock ( TBitmapLockCount &) |
void | Lock ( TBitmapLockCount &, TAcceleratedBitmapInfo &) |
TAcceleratedBitmapType | Type () |
void | Unlock ( TBitmapLockCount &) |
Private Member Functions | |
---|---|
IMPORT_C void | DoLock ( TBitmapLockCount &) |
IMPORT_C void | DoLock ( TBitmapLockCount &, TAcceleratedBitmapInfo &) |
IMPORT_C void | DoUnlock ( TBitmapLockCount &) |
Public Member Enumerations | |
---|---|
enum | TAcceleratedBitmapLock { EBitmapIsStatic , EBitmapNeedsLocking } |
enum | TAcceleratedBitmapType { ENoBitmap , EFbsBitmap , EHardwareBitmap } |
Private Attributes | |
---|---|
TInt | iHandle |
TUint8 | iLockStatus |
TUint8 | iSpare1 |
TUint8 | iSpare2 |
TUint8 | iType |
TAcceleratedBitmapSpec | ( | ) | [inline] |
Default constructor. Use one of the other constructor overloads instead.
IMPORT_C | TAcceleratedBitmapSpec | ( | CFbsBitmap * | aBitmap | ) |
Constructor with a software or hardware bitmap. Its type is initialised to EFbsBitmap or EHardwareBitmap accordingly.
CFbsBitmap * aBitmap | The bitmap which the object will access. |
IMPORT_C | TAcceleratedBitmapSpec | ( | RHardwareBitmap | aBitmap | ) |
Constructor with a hardware bitmap. Its type is initialised to EHardwareBitmap.
RHardwareBitmap aBitmap | The bitmap which the object will access. |
IMPORT_C void | DoLock | ( | TBitmapLockCount & | aCount | ) | [private] |
Locks the bitmap, if required.
TBitmapLockCount & aCount | Reference to a bitmap lock count object for nesting (only the first instance does the locking). |
IMPORT_C void | DoLock | ( | TBitmapLockCount & | aCount, |
TAcceleratedBitmapInfo & | aInfo | |||
) | [private] |
Locks the bitmap, if required, setting the accelerated bitmap information address.
TBitmapLockCount & aCount | Reference to a bitmap lock count object for nesting (only the first instance does the locking). |
TAcceleratedBitmapInfo & aInfo | Information structure to set the address in. |
IMPORT_C void | DoUnlock | ( | TBitmapLockCount & | aCount | ) | [private] |
Unlocks the bitmap, if required.
TBitmapLockCount & aCount | Reference to a bitmap lock count object for nesting (only the last instance does the unlocking). |
IMPORT_C TInt | GetInfo | ( | TAcceleratedBitmapInfo & | aInfo | ) | const |
Fills a TAcceleratedBitmapInfo structure with data for the bitmap.
This data is only valid for the duration of any processing between a Lock() /Unlock() pair.
For compressed bitmaps the line pitch has no meaning so it is set to the negation of the compression type as defined by TBitmapfileCompression.
TAcceleratedBitmapInfo & aInfo | On return, holds the information needed to directly access the bitmap. |
void | Lock | ( | TBitmapLockCount & | aCount | ) | [inline] |
Prevents a bitmap from moving in memory. Lock() should be called before accessing the bitmap and Unlock() 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 Lock() and Unlock() methods within the same thread must use the same TBitmapLockCount object, even if Lock() and Unlock() are called by different instances of TAcceleratedBitmapSpec .
TBitmapLockCount & aCount | Maintains a count of the number of locks made on the bitmap. |
void | Lock | ( | TBitmapLockCount & | aCount, |
TAcceleratedBitmapInfo & | aInfo | |||
) | [inline] |
Prevents a bitmap from moving in memory. Lock() should be called before accessing the bitmap and Unlock() 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 Lock() and Unlock() methods within the same thread must use the same TBitmapLockCount object, even if Lock() and Unlock() are called by different instances of TAcceleratedBitmapSpec .
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. |
TAcceleratedBitmapType | Type | ( | ) | const [inline] |
Returns the type of the bitmap. The type is assigned during construction.
void | Unlock | ( | TBitmapLockCount & | aCount | ) | [inline] |
Frees a bitmap after a call to Lock() . A call to Unlock() must be made for each corresponding call to Lock() . This function should be called as soon as any bitmap access has finished. If, after the Unlock() operation, no more calls to Lock() 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 Lock() and Unlock() methods within the same thread must use the same TBitmapLockCount object, even if Lock() and Unlock() are called by different instances of TAcceleratedBitmapSpec .
TBitmapLockCount & aCount | Maintains a count of the number of locks made on the bitmap. |
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 . |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.