Merge "Fix recent apps in system UI for Skia pipeline" into oc-dev
am: 4277d8f3e6
Change-Id: Ia3b645a631ce0c43278a9adde690a851d08a8be0
This commit is contained in:
@@ -484,7 +484,13 @@ void Bitmap::setAlphaType(SkAlphaType alphaType) {
|
|||||||
void Bitmap::getSkBitmap(SkBitmap* outBitmap) {
|
void Bitmap::getSkBitmap(SkBitmap* outBitmap) {
|
||||||
outBitmap->setHasHardwareMipMap(mHasHardwareMipMap);
|
outBitmap->setHasHardwareMipMap(mHasHardwareMipMap);
|
||||||
if (isHardware()) {
|
if (isHardware()) {
|
||||||
outBitmap->allocPixels(info());
|
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);
|
uirenderer::renderthread::RenderProxy::copyGraphicBufferInto(graphicBuffer(), outBitmap);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -493,9 +499,13 @@ void Bitmap::getSkBitmap(SkBitmap* outBitmap) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Bitmap::getSkBitmapForShaders(SkBitmap* outBitmap) {
|
void Bitmap::getSkBitmapForShaders(SkBitmap* outBitmap) {
|
||||||
outBitmap->setInfo(info(), rowBytes());
|
if (isHardware() && uirenderer::Properties::isSkiaEnabled()) {
|
||||||
outBitmap->setPixelRef(this);
|
getSkBitmap(outBitmap);
|
||||||
outBitmap->setHasHardwareMipMap(mHasHardwareMipMap);
|
} else {
|
||||||
|
outBitmap->setInfo(info(), rowBytes());
|
||||||
|
outBitmap->setPixelRef(this);
|
||||||
|
outBitmap->setHasHardwareMipMap(mHasHardwareMipMap);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Bitmap::getBounds(SkRect* bounds) const {
|
void Bitmap::getBounds(SkRect* bounds) const {
|
||||||
|
|||||||
Reference in New Issue
Block a user