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
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user