Skip to content

Commit 9622e20

Browse files
author
Romain Guy
committed
Add system property to force hw acceleration.
Change-Id: I538e641435f282b1af20866a8acd1f8d292734c4
1 parent 2d56123 commit 9622e20

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

core/java/android/view/Window.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import android.net.Uri;
2727
import android.os.Bundle;
2828
import android.os.IBinder;
29+
import android.os.SystemProperties;
2930
import android.util.Slog;
3031
import android.view.accessibility.AccessibilityEvent;
3132

@@ -472,11 +473,14 @@ static CompatibilityInfoHolder getCompatInfo(Context context) {
472473
}
473474

474475
private class LocalWindowManager extends WindowManagerImpl.CompatModeWrapper {
476+
private static final String PROPERTY_HARDWARE_UI = "persist.sys.ui.hw";
477+
475478
private final boolean mHardwareAccelerated;
476479

477480
LocalWindowManager(WindowManager wm, boolean hardwareAccelerated) {
478481
super(wm, getCompatInfo(mContext));
479-
mHardwareAccelerated = hardwareAccelerated;
482+
mHardwareAccelerated = hardwareAccelerated ||
483+
SystemProperties.getBoolean(PROPERTY_HARDWARE_UI, false);
480484
}
481485

482486
public boolean isHardwareAccelerated() {

0 commit comments

Comments
 (0)