summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/api/current.txt2
-rw-r--r--core/java/android/hardware/OverlayProperties.java5
-rw-r--r--graphics/java/android/graphics/HardwareRenderer.java7
3 files changed, 5 insertions, 9 deletions
diff --git a/core/api/current.txt b/core/api/current.txt
index eb78d59af993..dee7dda690c8 100644
--- a/core/api/current.txt
+++ b/core/api/current.txt
@@ -18174,7 +18174,7 @@ package android.hardware {
@FlaggedApi("android.hardware.flags.overlayproperties_class_api") public final class OverlayProperties implements android.os.Parcelable {
method @FlaggedApi("android.hardware.flags.overlayproperties_class_api") public int describeContents();
- method @FlaggedApi("android.hardware.flags.overlayproperties_class_api") public boolean supportMixedColorSpaces();
+ method @FlaggedApi("android.hardware.flags.overlayproperties_class_api") public boolean isMixedColorSpacesSupported();
method @FlaggedApi("android.hardware.flags.overlayproperties_class_api") public void writeToParcel(@NonNull android.os.Parcel, int);
field @FlaggedApi("android.hardware.flags.overlayproperties_class_api") @NonNull public static final android.os.Parcelable.Creator<android.hardware.OverlayProperties> CREATOR;
}
diff --git a/core/java/android/hardware/OverlayProperties.java b/core/java/android/hardware/OverlayProperties.java
index 014cf6d86818..72586b2b22cb 100644
--- a/core/java/android/hardware/OverlayProperties.java
+++ b/core/java/android/hardware/OverlayProperties.java
@@ -73,7 +73,7 @@ public final class OverlayProperties implements Parcelable {
* @return True if the device can support fp16, false otherwise.
* @hide
*/
- public boolean supportFp16ForHdr() {
+ public boolean isFp16SupportedForHdr() {
if (mNativeObject == 0) {
return false;
}
@@ -88,14 +88,13 @@ public final class OverlayProperties implements Parcelable {
* false if GPU composition fallback is otherwise required.
*/
@FlaggedApi(Flags.FLAG_OVERLAYPROPERTIES_CLASS_API)
- public boolean supportMixedColorSpaces() {
+ public boolean isMixedColorSpacesSupported() {
if (mNativeObject == 0) {
return false;
}
return nSupportMixedColorSpaces(mNativeObject);
}
-
@FlaggedApi(Flags.FLAG_OVERLAYPROPERTIES_CLASS_API)
@Override
public int describeContents() {
diff --git a/graphics/java/android/graphics/HardwareRenderer.java b/graphics/java/android/graphics/HardwareRenderer.java
index 9cde1878d9d8..8cd262e783d8 100644
--- a/graphics/java/android/graphics/HardwareRenderer.java
+++ b/graphics/java/android/graphics/HardwareRenderer.java
@@ -1390,10 +1390,6 @@ public class HardwareRenderer {
int largestWidth = activeMode.getPhysicalWidth();
int largestHeight = activeMode.getPhysicalHeight();
final OverlayProperties overlayProperties = defaultDisplay.getOverlaySupport();
- boolean supportFp16ForHdr = overlayProperties != null
- ? overlayProperties.supportFp16ForHdr() : false;
- boolean supportMixedColorSpaces = overlayProperties != null
- ? overlayProperties.supportMixedColorSpaces() : false;
for (int i = 0; i < allDisplays.length; i++) {
final Display display = allDisplays[i];
@@ -1421,7 +1417,8 @@ public class HardwareRenderer {
nInitDisplayInfo(largestWidth, largestHeight, defaultDisplay.getRefreshRate(),
wideColorDataspace, defaultDisplay.getAppVsyncOffsetNanos(),
defaultDisplay.getPresentationDeadlineNanos(),
- supportFp16ForHdr, supportMixedColorSpaces);
+ overlayProperties.isFp16SupportedForHdr(),
+ overlayProperties.isMixedColorSpacesSupported());
mDisplayInitialized = true;
}