aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-11-08 13:55:36 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-11-08 13:55:36 +0000
commit6c99633f73410325ca9d13ddca0b95d2feced471 (patch)
treeafc8b7b776936176c6d73730c21a2dcf7a14a2e9
parent77407ca019ca1bb98dd65f940be825d38719e983 (diff)
return the prev value from SetFontCacheLimit
git-svn-id: http://skia.googlecode.com/svn/trunk@2622 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r--src/core/SkGraphics.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/SkGraphics.cpp b/src/core/SkGraphics.cpp
index 5e8e549624..48692370d9 100644
--- a/src/core/SkGraphics.cpp
+++ b/src/core/SkGraphics.cpp
@@ -149,6 +149,8 @@ size_t SkGraphics::GetFontCacheLimit() {
}
size_t SkGraphics::SetFontCacheLimit(size_t bytes) {
+ size_t prev = gFontCacheLimit;
+
if (bytes < SK_MIN_FONT_CACHE_LIMIT) {
bytes = SK_MIN_FONT_CACHE_LIMIT;
}
@@ -158,5 +160,6 @@ size_t SkGraphics::SetFontCacheLimit(size_t bytes) {
if (bytes < GetFontCacheUsed()) {
SetFontCacheUsed(bytes);
}
+ return prev;
}