From 717a25dc2a411edb548859cd6870363346c71b01 Mon Sep 17 00:00:00 2001 From: Dianne Hackborn Date: Tue, 15 Nov 2011 18:59:59 -0800 Subject: Add new ManagedEGLContext class to help apps participate in memory trimming. This class provides an API for an application to know when it is time to destroy its EGL context when memory is being trimmed. By having this in the framework, we can still detect whether it will be useful to destroy any EGL contexts (because we know if doing so will destroy all of them). Change-Id: I1eac8d640052778052926b875c7928008f752182 --- core/java/android/view/WindowManagerImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'core/java/android/view/WindowManagerImpl.java') diff --git a/core/java/android/view/WindowManagerImpl.java b/core/java/android/view/WindowManagerImpl.java index d89bc36ad8d4..660e3f44f065 100644 --- a/core/java/android/view/WindowManagerImpl.java +++ b/core/java/android/view/WindowManagerImpl.java @@ -21,6 +21,7 @@ import android.content.ComponentCallbacks2; import android.content.res.CompatibilityInfo; import android.content.res.Configuration; import android.graphics.PixelFormat; +import android.opengl.ManagedEGLContext; import android.os.IBinder; import android.util.AndroidRuntimeException; import android.util.Log; @@ -428,7 +429,7 @@ public class WindowManagerImpl implements WindowManager { } } // Terminate the hardware renderer to free all resources - HardwareRenderer.terminate(); + ManagedEGLContext.doTerminate(); break; } // high end gfx devices fall through to next case -- cgit v1.2.3