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

Commit 9622e204 authored by Romain Guy's avatar Romain Guy
Browse files

Add system property to force hw acceleration.

Change-Id: I538e641435f282b1af20866a8acd1f8d292734c4
parent 2d56123b
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.Bundle;
import android.os.IBinder;
import android.os.SystemProperties;
import android.util.Slog;
import android.view.accessibility.AccessibilityEvent;

@@ -472,11 +473,14 @@ public abstract class Window {
    }

    private class LocalWindowManager extends WindowManagerImpl.CompatModeWrapper {
        private static final String PROPERTY_HARDWARE_UI = "persist.sys.ui.hw";

        private final boolean mHardwareAccelerated;

        LocalWindowManager(WindowManager wm, boolean hardwareAccelerated) {
            super(wm, getCompatInfo(mContext));
            mHardwareAccelerated = hardwareAccelerated;
            mHardwareAccelerated = hardwareAccelerated ||
                    SystemProperties.getBoolean(PROPERTY_HARDWARE_UI, false);
        }

        public boolean isHardwareAccelerated() {