summaryrefslogtreecommitdiffstats
path: root/libs/rs/rsFont.cpp
diff options
context:
space:
mode:
authorAlex Sakhartchouk <alexst@google.com>2010-10-12 14:15:17 -0700
committerAlex Sakhartchouk <alexst@google.com>2010-10-12 14:15:17 -0700
commit960ae15cf37fe31790e255521ee2045312e82d36 (patch)
treeeaee3ae547e0dddb0636d5fe514f8871cfbc9fb8 /libs/rs/rsFont.cpp
parent7d4cb2e1183285d171c36007897790069cd10ed3 (diff)
downloadframeworks_base-960ae15cf37fe31790e255521ee2045312e82d36.zip
frameworks_base-960ae15cf37fe31790e255521ee2045312e82d36.tar.gz
frameworks_base-960ae15cf37fe31790e255521ee2045312e82d36.tar.bz2
Fixing font bug, initialization was done in the wrong order.
Change-Id: Icc7b932f25be1ca6e5423bba6a5cfc965f6c3341
Diffstat (limited to 'libs/rs/rsFont.cpp')
-rw-r--r--libs/rs/rsFont.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/rs/rsFont.cpp b/libs/rs/rsFont.cpp
index a951005..8756f82 100644
--- a/libs/rs/rsFont.cpp
+++ b/libs/rs/rsFont.cpp
@@ -339,7 +339,6 @@ FontState::FontState()
mCurrentQuadIndex = 0;
mRSC = NULL;
mLibrary = NULL;
- setFontColor(0.1f, 0.1f, 0.1f, 1.0f);
// Get the renderer properties
char property[PROPERTY_VALUE_MAX];
@@ -378,6 +377,8 @@ FontState::FontState()
// Compute the gamma tables
mBlackGamma = gamma;
mWhiteGamma = 1.0f / gamma;
+
+ setFontColor(0.1f, 0.1f, 0.1f, 1.0f);
}
FontState::~FontState()
@@ -831,6 +832,7 @@ void FontState::setFontColor(float r, float g, float b, float a) {
} else if (luminance >= mWhiteThreshold) {
mConstants.mGamma = mWhiteGamma;
}
+
mConstantsDirty = true;
}