From 26a2b97dbe48ee45e9ae70110714048f2f360f97 Mon Sep 17 00:00:00 2001 From: Romain Guy Date: Mon, 17 Apr 2017 09:39:51 -0700 Subject: Enable wide color gamut rendering When wide color gamut rendering is requested, hwui will now use an rgba16f scRGB-nl surface for rendering. This change also fixes the way screenshots are handled in the platform to behave properly with wide gamut rendering. This change does not affect hardware layers. They also need to use rgba16f scRGB-nl; this will be addressed in another CL. Bug: 29940137 Test: CtsUiRenderingTestCases, CtsGraphicsTestCases Change-Id: I68fd96c451652136c566ec48fb0e97c2a7a257c5 --- packages/Shell/src/com/android/shell/Screenshooter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages/Shell/src') diff --git a/packages/Shell/src/com/android/shell/Screenshooter.java b/packages/Shell/src/com/android/shell/Screenshooter.java index 92c5fcc3139f..8e27edf93d9c 100644 --- a/packages/Shell/src/com/android/shell/Screenshooter.java +++ b/packages/Shell/src/com/android/shell/Screenshooter.java @@ -100,7 +100,7 @@ final class Screenshooter { // Rotate the screenshot to the current orientation if (rotation != ROTATION_FREEZE_0) { Bitmap unrotatedScreenShot = Bitmap.createBitmap(displayWidth, displayHeight, - Bitmap.Config.ARGB_8888); + Bitmap.Config.ARGB_8888, screenShot.hasAlpha(), screenShot.getColorSpace()); Canvas canvas = new Canvas(unrotatedScreenShot); canvas.translate(unrotatedScreenShot.getWidth() / 2, unrotatedScreenShot.getHeight() / 2); -- cgit v1.2.3-59-g8ed1b