summaryrefslogtreecommitdiffstats
path: root/libs/rs/rsFont.h
diff options
context:
space:
mode:
authorAlex Sakhartchouk <alexst@google.com>2010-08-17 11:09:49 -0700
committerAlex Sakhartchouk <alexst@google.com>2010-08-17 11:09:49 -0700
commit94bbccc36322168a596369c8341dad938c8f949f (patch)
treec785190c159c0dfd7e1b031c1bc3a7d492d329ff /libs/rs/rsFont.h
parent0c316eeb437a0ac1d6840690be643d1a553f0b23 (diff)
downloadframeworks_base-94bbccc36322168a596369c8341dad938c8f949f.zip
frameworks_base-94bbccc36322168a596369c8341dad938c8f949f.tar.gz
frameworks_base-94bbccc36322168a596369c8341dad938c8f949f.tar.bz2
Propagating some useful font changes.
Change-Id: Ia3b31a0fa0c59c5edbd3edaca164ca85e090e708
Diffstat (limited to 'libs/rs/rsFont.h')
-rw-r--r--libs/rs/rsFont.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/libs/rs/rsFont.h b/libs/rs/rsFont.h
index ab229be..defe38b 100644
--- a/libs/rs/rsFont.h
+++ b/libs/rs/rsFont.h
@@ -93,6 +93,7 @@ protected:
bool mHasKerning;
DefaultKeyedVector<uint32_t, CachedGlyphInfo* > mCachedGlyphs;
+ CachedGlyphInfo* getCachedUTFChar(int32_t utfChar);
CachedGlyphInfo *cacheGlyph(uint32_t glyph);
void updateGlyphCache(CachedGlyphInfo *glyph);
@@ -129,9 +130,11 @@ protected:
uint32_t mMaxWidth;
uint32_t mCurrentRow;
uint32_t mCurrentCol;
+ bool mDirty;
CacheTextureLine(uint32_t maxHeight, uint32_t maxWidth, uint32_t currentRow, uint32_t currentCol) :
- mMaxHeight(maxHeight), mMaxWidth(maxWidth), mCurrentRow(currentRow), mCurrentCol(currentCol) {
+ mMaxHeight(maxHeight), mMaxWidth(maxWidth), mCurrentRow(currentRow), mCurrentCol(currentCol),
+ mDirty(false) {
}
bool fitBitmap(FT_Bitmap *bitmap, uint32_t *retOriginX, uint32_t *retOriginY) {
@@ -143,6 +146,7 @@ protected:
*retOriginX = mCurrentCol;
*retOriginY = mCurrentRow;
mCurrentCol += bitmap->width;
+ mDirty = true;
return true;
}
@@ -151,6 +155,10 @@ protected:
};
Vector<CacheTextureLine*> mCacheLines;
+ uint32_t getRemainingCacheCapacity();
+
+ void precacheLatin(Font *font);
+ String8 mLatinPrecache;
Context *mRSC;