diff options
author | Mike Reed <reed@google.com> | 2018-01-22 13:34:53 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-01-22 20:50:47 +0000 |
commit | baafcdcd543571238654df87f060a9f5be0eb570 (patch) | |
tree | a66b87861c24de59e2148ad35ee8dcb763291ffb /include | |
parent | ec97ac9be2b1d12620337da2b99c95e214170ded (diff) |
move zero-init to sk_malloc for masks
Bug: skia:
Change-Id: I75d557068bdcd9e9f7e380e4fa447f9d83dd1554
Reviewed-on: https://skia-review.googlesource.com/98200
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/core/SkMask.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/core/SkMask.h b/include/core/SkMask.h index 9d3a7b495f..d4c5e3599c 100644 --- a/include/core/SkMask.h +++ b/include/core/SkMask.h @@ -114,7 +114,11 @@ struct SkMask { */ void* getAddr(int x, int y) const; - static uint8_t* AllocImage(size_t bytes); + enum AllocType { + kUninit_Alloc, + kZeroInit_Alloc, + }; + static uint8_t* AllocImage(size_t bytes, AllocType = kUninit_Alloc); static void FreeImage(void* image); enum CreateMode { |