Public Types | Static Public Member Functions | Static Protected Member Functions | Friends

gfxTextRunWordCache Class Reference

Cache individual "words" (strings delimited by white-space or white-space-like characters that don't involve kerning or ligatures) in textruns. More...

#include <gfxTextRunWordCache.h>

List of all members.

Public Types

enum  { TEXT_IN_CACHE = 0x10000000, TEXT_TRAILING_ARABICCHAR = 0x20000000, TEXT_INCOMING_ARABICCHAR = 0x40000000, TEXT_UNUSED_FLAGS = 0x80000000 }

Static Public Member Functions

static gfxTextRunMakeTextRun (const PRUnichar *aText, PRUint32 aLength, gfxFontGroup *aFontGroup, const gfxFontGroup::Parameters *aParams, PRUint32 aFlags)
 Create a textrun using cached words.
static gfxTextRunMakeTextRun (const PRUint8 *aText, PRUint32 aLength, gfxFontGroup *aFontGroup, const gfxFontGroup::Parameters *aParams, PRUint32 aFlags)
 Create a textrun using cached words.
static void RemoveTextRun (gfxTextRun *aTextRun)
 Remove a textrun from the cache.

Static Protected Member Functions

static nsresult Init ()
static void Shutdown ()

Friends

class gfxPlatform

Detailed Description

Cache individual "words" (strings delimited by white-space or white-space-like characters that don't involve kerning or ligatures) in textruns.


Member Enumeration Documentation

anonymous enum
Enumerator:
TEXT_IN_CACHE 
TEXT_TRAILING_ARABICCHAR 

nsTextFrameThebes sets these, but they're defined here rather than in nsTextFrameUtils.h because the cache also needs to check the _INCOMING flag

TEXT_INCOMING_ARABICCHAR 

When set, the previous character for this textrun was an Arabic character.

This is used for the context detection necessary for bidi.numeral implementation.

TEXT_UNUSED_FLAGS 

Member Function Documentation

static nsresult gfxTextRunWordCache::Init (  )  [static, protected]
static gfxTextRun* gfxTextRunWordCache::MakeTextRun ( const PRUnichar aText,
PRUint32  aLength,
gfxFontGroup aFontGroup,
const gfxFontGroup::Parameters aParams,
PRUint32  aFlags 
) [static]

Create a textrun using cached words.

Invalid characters (see gfxFontGroup::IsInvalidChar) will be automatically treated as invisible missing.

Parameters:
aFlags the flag TEXT_IS_ASCII must be set by the caller, if applicable; TEXT_IN_CACHE is added if we have a reference to the textrun in the cache and RemoveTextRun must be called when the textrun dies.
static gfxTextRun* gfxTextRunWordCache::MakeTextRun ( const PRUint8 *  aText,
PRUint32  aLength,
gfxFontGroup aFontGroup,
const gfxFontGroup::Parameters aParams,
PRUint32  aFlags 
) [static]

Create a textrun using cached words.

Invalid characters (see gfxFontGroup::IsInvalidChar) will be automatically treated as invisible missing.

Parameters:
aFlags the flag TEXT_IS_ASCII must be set by the caller, if applicable; TEXT_IN_CACHE is added if we have a reference to the textrun in the cache and RemoveTextRun must be called when the textrun dies.
static void gfxTextRunWordCache::RemoveTextRun ( gfxTextRun aTextRun  )  [static]

Remove a textrun from the cache.

This must be called before aTextRun is deleted! The text in the textrun must still be valid.

static void gfxTextRunWordCache::Shutdown (  )  [static, protected]

Friends And Related Function Documentation

friend class gfxPlatform [friend]

The documentation for this class was generated from the following file: