diff options
| author | 2022-04-29 13:19:37 -0700 | |
|---|---|---|
| committer | 2022-04-29 13:19:37 -0700 | |
| commit | 195ff67523a34990ec9980221526303c5e90808c (patch) | |
| tree | 2ac4a71e42b6f842833d0cde73d20b0cc955c417 | |
| parent | 866f67dc94f48c029716e4a5b1e99c32b9a2f25e (diff) | |
Fix colorSpace lose during screen rotation.
- setColorSpace only supports Display_p3 and sRGB
Bug: 229735367
Test: test picture rotation and check log
Change-Id: If2d6ab965be28d35a3adf330e7050e16e40f9620
| -rw-r--r-- | core/java/android/view/SurfaceControl.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/java/android/view/SurfaceControl.java b/core/java/android/view/SurfaceControl.java index 6c4933e07b90..a1ce39e974e3 100644 --- a/core/java/android/view/SurfaceControl.java +++ b/core/java/android/view/SurfaceControl.java @@ -3883,8 +3883,8 @@ public final class SurfaceControl implements Parcelable { @Deprecated public Transaction setColorSpace(SurfaceControl sc, ColorSpace colorSpace) { checkPreconditions(sc); - if (colorSpace.getId() == ColorSpace.Named.DCI_P3.ordinal()) { - setDataSpace(sc, DataSpace.DATASPACE_DCI_P3); + if (colorSpace.getId() == ColorSpace.Named.DISPLAY_P3.ordinal()) { + setDataSpace(sc, DataSpace.DATASPACE_DISPLAY_P3); } else { setDataSpace(sc, DataSpace.DATASPACE_SRGB); } |