Fix bug in SkAutoSMalloc::reset
https://codereview.chromium.org/15858007/ git-svn-id: http://skia.googlecode.com/svn/trunk@9257 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
0fb775cd77
commit
0f2b1953c7
@ -588,7 +588,7 @@ public:
|
||||
SkAutoMalloc::OnShrink shrink = SkAutoMalloc::kAlloc_OnShrink,
|
||||
bool* didChangeAlloc = NULL) {
|
||||
size = (size < kSize) ? kSize : size;
|
||||
bool alloc = size != fSize && (SkAutoMalloc::kAlloc_OnShrink == shrink || size < fSize);
|
||||
bool alloc = size != fSize && (SkAutoMalloc::kAlloc_OnShrink == shrink || size > fSize);
|
||||
if (NULL != didChangeAlloc) {
|
||||
*didChangeAlloc = alloc;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user