| Index: include/core/SkTypes.h
|
| diff --git a/include/core/SkTypes.h b/include/core/SkTypes.h
|
| index 1051f08ceaa807840cc361eb212e47377fed1ab2..27280d42832bc1f001026f3a0dbd9ea51783e873 100644
|
| --- a/include/core/SkTypes.h
|
| +++ b/include/core/SkTypes.h
|
| @@ -519,7 +519,7 @@
|
| /** Free the current buffer, and set the internal reference to NULL. Same
|
| as calling sk_free(release())
|
| */
|
| - void reset() {
|
| + void free() {
|
| sk_free(fPtr);
|
| fPtr = NULL;
|
| }
|
| @@ -571,7 +571,7 @@
|
| /**
|
| * Reallocates the block to a new size. The ptr may or may not change.
|
| */
|
| - void* reset(size_t size = 0, OnShrink shrink = kAlloc_OnShrink, bool* didChangeAlloc = NULL) {
|
| + void* reset(size_t size, OnShrink shrink = kAlloc_OnShrink, bool* didChangeAlloc = NULL) {
|
| if (size == fSize || (kReuse_OnShrink == shrink && size < fSize)) {
|
| if (didChangeAlloc) {
|
| *didChangeAlloc = false;
|
| @@ -587,6 +587,13 @@
|
| }
|
|
|
| return fPtr;
|
| + }
|
| +
|
| + /**
|
| + * Releases the block back to the heap
|
| + */
|
| + void free() {
|
| + this->reset(0);
|
| }
|
|
|
| /**
|
|
|