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

Commit 3cd0a593 authored by Michael Jurka's avatar Michael Jurka
Browse files

Improve Recent Apps scrolling performance

- 20fps improvement using software rendering
- 10fps improvement using hardware rendering
- in sw mode, rendering recents background in the recent items themselves and using a bitmap cache to draw individual items (gives perf gains for sw mode)
- in sw and hw mode, no longer doing a fade on the recents scroll view (gives perf gains for hw mode) - instead we draw a black gradient where we would normally fade
- fading recents & notifications immediately when swiped
- removing unused code

Change-Id: I908e2a25b89c9dfbf9b8c8f3810fa43064261b33
parent 3b21427b
Loading
Loading
Loading
Loading
+66 −59
Original line number Diff line number Diff line
@@ -19,10 +19,16 @@
-->

<!--    android:background="@drawable/status_bar_closed_default_background" -->
<RelativeLayout
<FrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_height="match_parent"
    android:layout_width="wrap_content">

    <RelativeLayout android:id="@+id/recent_item"
        android:layout_gravity="bottom"
        android:layout_height="wrap_content"
    android:layout_width="@dimen/status_bar_recents_thumbnail_view_width">
        android:layout_width="wrap_content"
        android:paddingBottom="@*android:dimen/status_bar_height">

        <FrameLayout android:id="@+id/app_thumbnail"
            android:layout_width="wrap_content"
@@ -55,7 +61,7 @@
        />

        <TextView android:id="@+id/app_label"
        android:layout_width="wrap_content"
            android:layout_width="@dimen/status_bar_recents_app_label_width"
            android:layout_height="wrap_content"
            android:textSize="@dimen/status_bar_recents_app_label_text_size"
            android:fadingEdge="horizontal"
@@ -71,7 +77,7 @@
        />

        <TextView android:id="@+id/app_description"
        android:layout_width="wrap_content"
            android:layout_width="@dimen/status_bar_recents_app_label_width"
            android:layout_height="wrap_content"
            android:textSize="@dimen/status_bar_recents_app_description_text_size"
            android:fadingEdge="horizontal"
@@ -86,3 +92,4 @@
        />

    </RelativeLayout>
</FrameLayout>
+3 −4
Original line number Diff line number Diff line
@@ -30,13 +30,12 @@
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_alignParentBottom="true"
        android:paddingBottom="@*android:dimen/status_bar_height"
        android:clipToPadding="false"
        android:clipChildren="false">

        <LinearLayout android:id="@+id/recents_glow"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_height="match_parent"
            android:layout_gravity="bottom|right"
            android:orientation="horizontal"
            android:clipToPadding="false"
@@ -44,7 +43,7 @@
            >
            <com.android.systemui.recent.RecentsHorizontalScrollView android:id="@+id/recents_container"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_height="match_parent"
                android:layout_marginRight="@dimen/status_bar_recents_right_glow_margin"
                android:divider="@null"
                android:stackFromBottom="true"
@@ -58,7 +57,7 @@

                <LinearLayout android:id="@+id/recents_linear_layout"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_height="match_parent"
                    android:orientation="horizontal"
                    android:clipToPadding="false"
                    android:clipChildren="false">
+72 −67
Original line number Diff line number Diff line
@@ -19,10 +19,14 @@
-->

<!--    android:background="@drawable/status_bar_closed_default_background" -->
<RelativeLayout
<FrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_height="wrap_content"
    android:layout_width="@dimen/status_bar_recents_thumbnail_view_width">
    android:layout_width="match_parent">

    <RelativeLayout android:id="@+id/recent_item"
        android:layout_height="wrap_content"
        android:layout_width="match_parent">

        <FrameLayout android:id="@+id/app_thumbnail"
            android:layout_width="wrap_content"
@@ -95,3 +99,4 @@
        />

    </RelativeLayout>
</FrameLayout>
+2 −2
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@
            android:layout_marginTop="@*android:dimen/status_bar_height">
            <com.android.systemui.recent.RecentsVerticalScrollView
                android:id="@+id/recents_container"
                android:layout_width="@dimen/status_bar_recents_width"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginRight="0dp"
                android:divider="@null"
@@ -53,7 +53,7 @@
                android:clipChildren="false">

                <LinearLayout android:id="@+id/recents_linear_layout"
                    android:layout_width="wrap_content"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="vertical"
                    android:clipToPadding="false"
+2 −2
Original line number Diff line number Diff line
@@ -19,10 +19,10 @@
-->

<!--    android:background="@drawable/status_bar_closed_default_background" -->
<RelativeLayout
<RelativeLayout android:id="@+id/recent_item"
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_height="wrap_content"
    android:layout_width="@dimen/status_bar_recents_thumbnail_view_width">
    android:layout_width="wrap_content">

    <FrameLayout android:id="@+id/app_thumbnail"
        android:layout_width="wrap_content"
Loading