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

Commit 5c5cd969 authored by Sally Qi's avatar Sally Qi
Browse files

Rename OverlayProperties API.

- Display#getOverlaySupport is non-null, no need to check the object in
  HardwareRenderer side.

Bug: 307552682
Bug: 267234573
Test: builds
Change-Id: I58589fd95de5f9853d758f1e3cc899a634d39eb5
parent c65d4849
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
  }
+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;
        }