summaryrefslogtreecommitdiff
path: root/libs/rs
diff options
context:
space:
mode:
author Alex Sakhartchouk <alexst@google.com> 2010-10-12 14:17:59 -0700
committer Android (Google) Code Review <android-gerrit@google.com> 2010-10-12 14:17:59 -0700
commit2bc063fdb697574a58eddf12adf2cc301d6aab74 (patch)
tree8f823a7e55fdd35f6daea3e86ce1bfe61e0c5c55 /libs/rs
parent5a3b8e698e276839e502dcf41894b56ad59695c3 (diff)
parent960ae15cf37fe31790e255521ee2045312e82d36 (diff)
Merge "Fixing font bug, initialization was done in the wrong order."
Diffstat (limited to 'libs/rs')
-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 a95100539af1..8756f82341f7 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;
}