class CFbsRasterizer : public CBase |
CFbsRasterizer represents the system's rasterizer that has the ability to generate standard pixel data from data stored in proprietary formats.
Multiple formats of proprietary data may be supported by the rasterizer. Formats are identified by UID. Support for formats is platform-specific and controlled by the platform vendor. The OS does not mandate that the system's rasterizer must support any specific data formats.
CFbsRasterizer is used solely by the Font & Bitmap Server component to simulate pixel access to extended bitmaps, i.e. bitmaps created using CFbsBitmap::CreateExtendedBitmap(). CFbsRasterizer is not intended for use by applications.
CFbsRasterizer is intended to be implemented by licensees through derivation from the abstract base class. If a licensee wishes to provide a rasterizer implementation, they should create a rasterizer dll that is exported as "fbsrasterizer.dll" and include it in their ROM. Note that a stub rasterizer is exported to "fbsrasterizer.dll" and is loaded by the Font & Bitmap server by default to prevent a rogue dll being loaded in the rasterizer's place from the C:\ drive or removable media. Licensees can override this by using the following build option: -DFBSRASTERIZER_DLL <rasterizer_dll_name> where <rasterizer_dll_name> is the name of the licensee rasterizer dll.
CFbsRasterizer will be instantiated in client threads that use the Font & Bitmap Server, including the Window Server's main thread. Therefore the implementation of the rasterizer must be robust. Rasterizer functions should never lead to process termination, even when invalid proprietary data is passed in. Instances of CFbsRasterizer are not intended to be shared between threads.
The CFbsRasterizer interface has been designed to allow the implementation to optimise certain access patterns for performance. For example, the implementation might prepare for sequential access to a region by rasterizing the entire region inside a private scratch buffer. A further opportunity would be to take advantage of the immutability of extended bitmaps by maintaining rasterized scratch buffers for the most recently used bitmaps.
Public Member Functions | |
---|---|
void | BeginBitmap ( TInt64 , const TBitmapDesc &, const TRegion *) |
void | EndBitmap ( TInt64 ) |
TInt | GetInterface ( TUid , TAny *&) |
IMPORT_C CFbsRasterizer * | New () |
const TUint32 * | ScanLine ( TInt64 , const TPoint &, TInt ) |
void | BeginBitmap | ( | TInt64 | aBitmapId, |
const TBitmapDesc & | aBitmapDesc, | |||
const TRegion * | aRegionOfInterest | |||
) | [pure virtual] |
Registers an extended bitmap so that scanline access requests can be made on the bitmap. The same bitmap may be registered multiple times. The rasterizer instance must be able to maintain at least 3 registrations simultaneously. This is to support BitGDI drawing operations that make use of 3 source bitmaps.
TInt64 aBitmapId | A unique identifier for the bitmap that is being registered. This identifier is never reused for other bitmaps. |
const TBitmapDesc & aBitmapDesc | A full description of the bitmap including the proprietary data. The description and proprietary data associated with a particular value of aBitmapId never changes. This allows the implementation to cache this information even after a bitmap has been unregistered. |
const TRegion * aRegionOfInterest | The region within which scanline access requests will be made, if known. A value of NULL implies that the user does not have any useful information to contribute and the implementation must be prepared to accept scanline requests anywhere inside the bitmap. If the rasterizer uses the region of interest after the call to BeginBitmap() then it must make a copy of it, since the region pointed to by aRegionOfInterest is valid only during the call to BeginBitmap(). |
void | EndBitmap | ( | TInt64 | aBitmapId | ) | [pure virtual] |
Unregisters a bitmap previously registered using BeginBitmap() . The rasterizer should access the proprietary data of a bitmap only between calls to BeginBitmap() and EndBitmap() , since a bitmap can be destroyed without notifying the rasterizer after the call to EndBitmap() .
TInt64 aBitmapId | A unique identifier for the bitmap that is being unregistered. |
TInt | GetInterface | ( | TUid | aInterfaceId, |
TAny *& | aInterface | |||
) | [pure virtual] |
Returns a pointer to an extension interface. Allows extension of the CFbsRasterizer interface without breaking compatibility with existing implementations.
const TUint32 * | ScanLine | ( | TInt64 | aBitmapId, |
const TPoint & | aPixel, | |||
TInt | aLength | |||
) | [pure virtual] |
Requests a pointer to a scanline containing pixel data for a specified bitmap.
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.