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

Commit e68d565d authored by Ken Wakasa's avatar Ken Wakasa
Browse files

Deallocate offscreen buffer for non-HW-accel draw

Follow up to I5bc980c4dc41bc304be3c190934c1f7c55c9d244

This frees up 800KB on occam_svelte when LatinIME is in background.
Confirmed the performance effect in keyboard-bring up speed was unperceivable.

bug: 8967766
Change-Id: I0fab179c61179564bd3a0349c9825e7d61f7e1f2
parent 80c9b829
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -605,4 +605,8 @@ public class KeyboardView extends View {
        super.onDetachedFromWindow();
        freeOffscreenBuffer();
    }

    public void deallocateMemory() {
        freeOffscreenBuffer();
    }
}
+2 −0
Original line number Diff line number Diff line
@@ -1322,7 +1322,9 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
        }
    }

    @Override
    public void deallocateMemory() {
        super.deallocateMemory();
        mGestureTrailsPreview.deallocateMemory();
    }
}