From e216948d63958e75a2321096bda5598bd1608711 Mon Sep 17 00:00:00 2001 From: Derek Sollenberger Date: Tue, 20 Nov 2018 10:57:20 -0500 Subject: Cleanup of Bitmap.h entry points. All Bitmap constructors have been made private and the only way to create one is through the allocate or createFrom factories. SkColorSpace is now explicitly passed in to all the factories and is no longer assumed to be sRGB. Test: atest CtsGraphicsTestCases Change-Id: I92c1c5c59df6de7fdd90e9504a2c2717cb854588 --- libs/hwui/HardwareBitmapUploader.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libs/hwui/HardwareBitmapUploader.cpp') diff --git a/libs/hwui/HardwareBitmapUploader.cpp b/libs/hwui/HardwareBitmapUploader.cpp index a97c12cad9fd..b9860ada18fc 100644 --- a/libs/hwui/HardwareBitmapUploader.cpp +++ b/libs/hwui/HardwareBitmapUploader.cpp @@ -253,7 +253,8 @@ sk_sp HardwareBitmapUploader::allocateHardwareBitmap(const SkBitmap& sou eglDestroySyncKHR(display, fence); } - return sk_sp(new Bitmap(buffer.get(), bitmap.info(), Bitmap::computePalette(bitmap))); + return Bitmap::createFrom(buffer.get(), bitmap.refColorSpace(), bitmap.alphaType(), + Bitmap::computePalette(bitmap)); } } // namespace android::uirenderer -- cgit v1.2.3-59-g8ed1b