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
main
Ken Wakasa 2013-08-01 18:01:48 +09:00
parent 80c9b829bd
commit e68d565d0f
2 changed files with 6 additions and 0 deletions

View File

@ -605,4 +605,8 @@ public class KeyboardView extends View {
super.onDetachedFromWindow();
freeOffscreenBuffer();
}
public void deallocateMemory() {
freeOffscreenBuffer();
}
}

View File

@ -1322,7 +1322,9 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
}
}
@Override
public void deallocateMemory() {
super.deallocateMemory();
mGestureTrailsPreview.deallocateMemory();
}
}