Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 303c4273 authored by Sally Qi's avatar Sally Qi Committed by Android (Google) Code Review
Browse files

Merge "Rename OverlayProperties API." into main

parents c963d064 5c5cd969
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -18223,7 +18223,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;
  }
+2 −3
Original line number Diff line number Diff line
@@ -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() {
+2 −5
Original line number Diff line number Diff line
@@ -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;
        }