Loading libs/hwui/hwui/Bitmap.cpp +14 −4 Original line number Diff line number Diff line Loading @@ -474,7 +474,13 @@ void Bitmap::setAlphaType(SkAlphaType alphaType) { void Bitmap::getSkBitmap(SkBitmap* outBitmap) { outBitmap->setHasHardwareMipMap(mHasHardwareMipMap); if (isHardware()) { if (uirenderer::Properties::isSkiaEnabled()) { // TODO: add color correctness for Skia pipeline - pass null color space for now outBitmap->allocPixels(SkImageInfo::Make(info().width(), info().height(), info().colorType(), info().alphaType(), nullptr)); } else { outBitmap->allocPixels(info()); } uirenderer::renderthread::RenderProxy::copyGraphicBufferInto(graphicBuffer(), outBitmap); return; } Loading @@ -483,10 +489,14 @@ void Bitmap::getSkBitmap(SkBitmap* outBitmap) { } void Bitmap::getSkBitmapForShaders(SkBitmap* outBitmap) { outBitmap->setInfo(mInfo, rowBytes()); if (isHardware() && uirenderer::Properties::isSkiaEnabled()) { getSkBitmap(outBitmap); } else { outBitmap->setInfo(info(), rowBytes()); outBitmap->setPixelRef(sk_ref_sp(this), 0, 0); outBitmap->setHasHardwareMipMap(mHasHardwareMipMap); } } void Bitmap::getBounds(SkRect* bounds) const { SkASSERT(bounds); Loading Loading
libs/hwui/hwui/Bitmap.cpp +14 −4 Original line number Diff line number Diff line Loading @@ -474,7 +474,13 @@ void Bitmap::setAlphaType(SkAlphaType alphaType) { void Bitmap::getSkBitmap(SkBitmap* outBitmap) { outBitmap->setHasHardwareMipMap(mHasHardwareMipMap); if (isHardware()) { if (uirenderer::Properties::isSkiaEnabled()) { // TODO: add color correctness for Skia pipeline - pass null color space for now outBitmap->allocPixels(SkImageInfo::Make(info().width(), info().height(), info().colorType(), info().alphaType(), nullptr)); } else { outBitmap->allocPixels(info()); } uirenderer::renderthread::RenderProxy::copyGraphicBufferInto(graphicBuffer(), outBitmap); return; } Loading @@ -483,10 +489,14 @@ void Bitmap::getSkBitmap(SkBitmap* outBitmap) { } void Bitmap::getSkBitmapForShaders(SkBitmap* outBitmap) { outBitmap->setInfo(mInfo, rowBytes()); if (isHardware() && uirenderer::Properties::isSkiaEnabled()) { getSkBitmap(outBitmap); } else { outBitmap->setInfo(info(), rowBytes()); outBitmap->setPixelRef(sk_ref_sp(this), 0, 0); outBitmap->setHasHardwareMipMap(mHasHardwareMipMap); } } void Bitmap::getBounds(SkRect* bounds) const { SkASSERT(bounds); Loading