Fixing font bug, initialization was done in the wrong order.

Change-Id: Icc7b932f25be1ca6e5423bba6a5cfc965f6c3341
This commit is contained in:
Alex Sakhartchouk
2010-10-12 14:15:17 -07:00
parent 7d4cb2e118
commit 960ae15cf3

View File

@@ -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;
}