summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Sakhartchouk <alexst@google.com>2011-03-17 13:49:38 -0700
committerAlex Sakhartchouk <alexst@google.com>2011-03-17 13:49:38 -0700
commit20a9354e52cb5cd22c38c7146efe37e1f9f690f3 (patch)
treef5c27f3d75e211cf17b8673c428ddedbc86d76dc
parent630e6d7d26fea26abcaaa8c4dabe1fda5d817a41 (diff)
downloadframeworks_base-20a9354e52cb5cd22c38c7146efe37e1f9f690f3.zip
frameworks_base-20a9354e52cb5cd22c38c7146efe37e1f9f690f3.tar.gz
frameworks_base-20a9354e52cb5cd22c38c7146efe37e1f9f690f3.tar.bz2
Fixing a small bug in debug output
Default font wasn't reset for debug output but used the last font instead. Change-Id: I8fd713336febb8258d364845799ade42633907ab
-rw-r--r--libs/rs/rsContext.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/libs/rs/rsContext.cpp b/libs/rs/rsContext.cpp
index c63d183..a7c0180 100644
--- a/libs/rs/rsContext.cpp
+++ b/libs/rs/rsContext.cpp
@@ -429,6 +429,8 @@ void Context::displayDebugStats() {
mStateFont.getFontColor(&oldR, &oldG, &oldB, &oldA);
uint32_t bufferLen = strlen(buffer);
+ ObjectBaseRef<Font> lastFont(getFont());
+ setFont(NULL);
float shadowCol = 0.1f;
mStateFont.setFontColor(shadowCol, shadowCol, shadowCol, 1.0f);
mStateFont.renderText(buffer, bufferLen, 5, getHeight() - 6);
@@ -436,6 +438,7 @@ void Context::displayDebugStats() {
mStateFont.setFontColor(1.0f, 0.7f, 0.0f, 1.0f);
mStateFont.renderText(buffer, bufferLen, 4, getHeight() - 7);
+ setFont(lastFont.get());
mStateFont.setFontColor(oldR, oldG, oldB, oldA);
}