Merge "Attach color space after performing a readback" into pi-dev
diff --git a/libs/hwui/hwui/Bitmap.cpp b/libs/hwui/hwui/Bitmap.cpp
index 795ec5b..263d249 100644
--- a/libs/hwui/hwui/Bitmap.cpp
+++ b/libs/hwui/hwui/Bitmap.cpp
@@ -296,6 +296,11 @@
outBitmap->allocPixels(info());
}
uirenderer::renderthread::RenderProxy::copyGraphicBufferInto(graphicBuffer(), outBitmap);
+ if (mInfo.colorSpace()) {
+ sk_sp<SkPixelRef> pixelRef = sk_ref_sp(outBitmap->pixelRef());
+ outBitmap->setInfo(mInfo);
+ outBitmap->setPixelRef(std::move(pixelRef), 0, 0);
+ }
return;
}
outBitmap->setInfo(mInfo, rowBytes());