From 6c99633f73410325ca9d13ddca0b95d2feced471 Mon Sep 17 00:00:00 2001 From: "reed@google.com" Date: Tue, 8 Nov 2011 13:55:36 +0000 Subject: return the prev value from SetFontCacheLimit git-svn-id: http://skia.googlecode.com/svn/trunk@2622 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/core/SkGraphics.cpp | 3 +++ 1 file changed, 3 insertions(+) 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; } -- cgit v1.2.3