diff options
author | Mike Reed <reed@google.com> | 2017-04-03 14:41:44 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-04-03 19:29:38 +0000 |
commit | 6b3155c4be0476bc53541b0431c368a44e69f0a7 (patch) | |
tree | 2de5a87716b38a587c475731df815e5c8178e133 /src/core/SkBitmapDevice.cpp | |
parent | 2db3232c88cbaec5585f263111f334ca7272fe10 (diff) |
Revert[4] "clean up (partially) colortable api""""
Fixes:
- create temp api for android to pass nullptr
- don't release and access sk_sp<SkData> at the same time in parameters
This reverts commit b14131c1851eea6acbd34cc42a8f860daed36b21.
Bug: skia:
Change-Id: Ic0e4f62520ba9f35455499ed30d306ad19d998a8
Reviewed-on: https://skia-review.googlesource.com/11129
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
Diffstat (limited to 'src/core/SkBitmapDevice.cpp')
-rw-r--r-- | src/core/SkBitmapDevice.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/core/SkBitmapDevice.cpp b/src/core/SkBitmapDevice.cpp index 3be63ba66b..95ea45c29d 100644 --- a/src/core/SkBitmapDevice.cpp +++ b/src/core/SkBitmapDevice.cpp @@ -121,9 +121,8 @@ SkBitmapDevice* SkBitmapDevice::Create(const SkImageInfo& origInfo, } } else { // This bitmap has transparency, so we'll zero the pixels (to transparent). - // We use a ZeroedPRFactory as a faster alloc-then-eraseColor(SK_ColorTRANSPARENT). - SkMallocPixelRef::ZeroedPRFactory factory; - if (!bitmap.tryAllocPixels(info, &factory, nullptr/*color table*/)) { + // We use the flag as a faster alloc-then-eraseColor(SK_ColorTRANSPARENT). + if (!bitmap.tryAllocPixels(info, nullptr/*colortable*/, SkBitmap::kZeroPixels_AllocFlag)) { return nullptr; } } |