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:
parent
02a094c3aa
commit
fd4ee4dea1
@ -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));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user