NewRasterDirect should *not* erase the pixels -- direct means the client is in-charge

BUG=skia:
R=bsalomon@google.com

Author: reed@google.com

Review URL: https://codereview.chromium.org/246493002

git-svn-id: http://skia.googlecode.com/svn/trunk@14296 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
commit-bot@chromium.org 2014-04-22 15:02:43 +00:00
parent 02a094c3aa
commit fd4ee4dea1

View File

@ -2672,10 +2672,5 @@ SkCanvas* SkCanvas::NewRasterDirect(const SkImageInfo& info, void* pixels, size_
if (!bitmap.installPixels(info, pixels, rowBytes)) { if (!bitmap.installPixels(info, pixels, rowBytes)) {
return NULL; return NULL;
} }
// should this functionality be moved into allocPixels()?
if (!bitmap.info().isOpaque()) {
bitmap.eraseColor(0);
}
return SkNEW_ARGS(SkCanvas, (bitmap)); return SkNEW_ARGS(SkCanvas, (bitmap));
} }