Merge "Fix colorSpace lose during screen rotation." into tm-dev am: 0be3f09073 am: 71420321e1

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18092563

Change-Id: I73af3d212229696a465b58df8c365e5ba42b8110
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
TreeHugger Robot
2022-04-29 23:50:53 +00:00
committed by Automerger Merge Worker

View File

@@ -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);
}