diff options
| author | Alex Sakhartchouk <alexst@google.com> | 2010-08-05 11:24:14 -0700 |
|---|---|---|
| committer | Alex Sakhartchouk <alexst@google.com> | 2010-08-05 11:24:14 -0700 |
| commit | 55e81983562ca507883f32f817e9d24e1c49b909 (patch) | |
| tree | 47cc8923a42cde3305c6304c4d06cc3c23d20bc4 /libs/rs/rsFont.cpp | |
| parent | 518f033b68649c151cc8725ea8c557eae01cc567 (diff) | |
| download | frameworks_base-55e81983562ca507883f32f817e9d24e1c49b909.zip frameworks_base-55e81983562ca507883f32f817e9d24e1c49b909.tar.gz frameworks_base-55e81983562ca507883f32f817e9d24e1c49b909.tar.bz2 | |
Fixing fonts to use constant color instead of variable.
Change-Id: Ia590dfed482f82b7bc748c25b7b1592efea5b68c
Diffstat (limited to 'libs/rs/rsFont.cpp')
| -rw-r--r-- | libs/rs/rsFont.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/libs/rs/rsFont.cpp b/libs/rs/rsFont.cpp index a741adc..833bee0 100644 --- a/libs/rs/rsFont.cpp +++ b/libs/rs/rsFont.cpp @@ -259,7 +259,7 @@ FontState::FontState() mCurrentQuadIndex = 0; mRSC = NULL; mLibrary = NULL; - setFontColor(0.0f, 0.0f, 0.0f, 1.0f); + setFontColor(0.1f, 0.1f, 0.1f, 1.0f); } FontState::~FontState() @@ -521,6 +521,11 @@ void FontState::issueDrawCommand() { ObjectBaseRef<const ProgramStore> tmpPS(mRSC->getFragmentStore()); mRSC->setFragmentStore(mFontProgramStore.get()); + if(mFontColorDirty) { + mFontShaderF->setConstantColor(mFontColor[0], mFontColor[1], mFontColor[2], mFontColor[3]); + mFontColorDirty = false; + } + if (!mRSC->setupCheck()) { mRSC->setVertex((ProgramVertex *)tmpV.get()); mRSC->setRaster((ProgramRaster *)tmpR.get()); @@ -669,6 +674,13 @@ void FontState::setFontColor(float r, float g, float b, float a) { mFontColorDirty = true; } +void FontState::getFontColor(float *r, float *g, float *b, float *a) const { + *r = mFontColor[0]; + *g = mFontColor[1]; + *b = mFontColor[2]; + *a = mFontColor[3]; +} + void FontState::deinit(Context *rsc) { mInitialized = false; |
