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

Commit 812ccbeb authored by Romain Guy's avatar Romain Guy
Browse files

Add new hardwareAccelerated manifest attribute to enable HW drawing.

Change-Id: I2bb0252f3699cb720e7f5b6868419c9904e4fb35
parent 76b70498
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
@@ -4563,6 +4563,17 @@
 visibility="public"
>
</field>
<field name="hardwareAccelerated"
 type="int"
 transient="false"
 volatile="false"
 value="16843540"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="hasCode"
 type="int"
 transient="false"
@@ -48600,6 +48611,17 @@
 visibility="public"
>
</field>
<field name="FLAG_HARDWARE_ACCELERATED"
 type="int"
 transient="false"
 volatile="false"
 value="1048576"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="FLAG_HAS_CODE"
 type="int"
 transient="false"
+6 −0
Original line number Diff line number Diff line
@@ -272,6 +272,12 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
     */
    public static final int FLAG_SUPPORTS_XLARGE_SCREENS = 1<<19;
    
    /**
     * Value for {@link #flags}: true when the application's rendering should
     * be hardware accelerated.
     */
    public static final int FLAG_HARDWARE_ACCELERATED = 1<<20;
    
    /**
     * Value for {@link #flags}: this is true if the application has set
     * its android:neverEncrypt to true, false otherwise. It is used to specify
+6 −0
Original line number Diff line number Diff line
@@ -1535,6 +1535,12 @@ public class PackageParser {
            ai.flags |= ApplicationInfo.FLAG_VM_SAFE_MODE;
        }

        if (sa.getBoolean(
                com.android.internal.R.styleable.AndroidManifestApplication_hardwareAccelerated,
                false)) {
            ai.flags |= ApplicationInfo.FLAG_HARDWARE_ACCELERATED;
        }

        if (sa.getBoolean(
                com.android.internal.R.styleable.AndroidManifestApplication_hasCode,
                true)) {
+5 −7
Original line number Diff line number Diff line
@@ -8598,8 +8598,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility
                && !isHapticFeedbackEnabled()) {
            return false;
        }
        return mAttachInfo.mRootCallbacks.performHapticFeedback(
                feedbackConstant,
        return mAttachInfo.mRootCallbacks.performHapticFeedback(feedbackConstant,
                (flags & HapticFeedbackConstants.FLAG_IGNORE_GLOBAL_SETTING) != 0);
    }

@@ -8671,8 +8670,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility
                ViewConfiguration.getLongPressTimeout() - delayOffset);
    }

    private static int[] stateSetUnion(final int[] stateSet1,
                                       final int[] stateSet2) {
    private static int[] stateSetUnion(final int[] stateSet1, final int[] stateSet2) {
        final int stateSet1Length = stateSet1.length;
        final int stateSet2Length = stateSet2.length;
        final int[] newSet = new int[stateSet1Length + stateSet2Length];
+2 −1
Original line number Diff line number Diff line
@@ -1566,7 +1566,8 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager

        boolean scalingRequired = false;
        Bitmap cache = null;
        if ((flags & FLAG_CHILDREN_DRAWN_WITH_CACHE) == FLAG_CHILDREN_DRAWN_WITH_CACHE ||
        if (canvas.getGL() == null &&
                (flags & FLAG_CHILDREN_DRAWN_WITH_CACHE) == FLAG_CHILDREN_DRAWN_WITH_CACHE ||
                (flags & FLAG_ALWAYS_DRAWN_WITH_CACHE) == FLAG_ALWAYS_DRAWN_WITH_CACHE) {
            cache = child.getDrawingCache(true);
            if (mAttachInfo != null) scalingRequired = mAttachInfo.mScalingRequired;
Loading