From 90396672ba79fcb5a9152e03958e5be6bdc232e6 Mon Sep 17 00:00:00 2001 From: Jason Sams Date: Tue, 3 Nov 2009 13:59:34 -0800 Subject: [PATCH] Don't release the GL context when all-apps looses its surface. --- src/com/android/launcher2/AllAppsView.java | 23 ++++++++-------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/src/com/android/launcher2/AllAppsView.java b/src/com/android/launcher2/AllAppsView.java index 89d11d1ddc..8d6820cfe9 100644 --- a/src/com/android/launcher2/AllAppsView.java +++ b/src/com/android/launcher2/AllAppsView.java @@ -158,10 +158,6 @@ public class AllAppsView extends RSSurfaceView @Override public void surfaceDestroyed(SurfaceHolder holder) { super.surfaceDestroyed(holder); - - destroyRenderScript(); - mRS = null; - mRollo = null; } @Override @@ -171,18 +167,15 @@ public class AllAppsView extends RSSurfaceView super.surfaceChanged(holder, format, w, h); - if (mRS != null) { - destroyRenderScript(); - mRS = null; - mRollo = null; - } + if (mRS == null) { - mRS = createRenderScript(true); - mRollo = new RolloRS(); - mRollo.init(getResources(), w, h); - if (mAllAppsList != null) { - mRollo.setApps(mAllAppsList); - Log.d(TAG, "surfaceChanged... calling mRollo.setApps"); + mRS = createRenderScript(true); + mRollo = new RolloRS(); + mRollo.init(getResources(), w, h); + if (mAllAppsList != null) { + mRollo.setApps(mAllAppsList); + Log.d(TAG, "surfaceChanged... calling mRollo.setApps"); + } } Resources res = getContext().getResources();