fix opacity check in SkBitmapDevice::Create

BUG=skia:4777
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1576453002

Review URL: https://codereview.chromium.org/1576453002
This commit is contained in:
lsalzman 2016-01-08 11:20:14 -08:00 committed by Commit bot
parent 0e101667d6
commit 04d975ac34

View File

@ -95,7 +95,7 @@ SkBitmapDevice* SkBitmapDevice::Create(const SkImageInfo& origInfo,
if (!bitmap.setInfo(info)) { if (!bitmap.setInfo(info)) {
return nullptr; return nullptr;
} }
} else if (bitmap.info().isOpaque()) { } else if (info.isOpaque()) {
// If this bitmap is opaque, we don't have any sensible default color, // If this bitmap is opaque, we don't have any sensible default color,
// so we just return uninitialized pixels. // so we just return uninitialized pixels.
if (!bitmap.tryAllocPixels(info)) { if (!bitmap.tryAllocPixels(info)) {