Loading services/core/java/com/android/server/display/ColorFade.java +10 −1 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ import android.opengl.EGLDisplay; import android.opengl.EGLSurface; import android.opengl.GLES20; import android.opengl.GLES11Ext; import android.os.SystemProperties; import android.util.Slog; import android.view.DisplayInfo; import android.view.Surface.OutOfResourcesException; Loading Loading @@ -71,6 +72,9 @@ final class ColorFade { // See code for details. private static final int DEJANK_FRAMES = 3; private static final boolean DESTROY_SURFACE_AFTER_DETACH = SystemProperties.getBoolean("ro.egl.destroy_after_detach", false); private final int mDisplayId; // Set to true when the animation context has been fully prepared. Loading Loading @@ -330,10 +334,15 @@ final class ColorFade { destroyScreenshotTexture(); destroyGLShaders(); destroyGLBuffers(); if (!DESTROY_SURFACE_AFTER_DETACH) { destroyEglSurface(); } } finally { detachEglContext(); } if (DESTROY_SURFACE_AFTER_DETACH) { destroyEglSurface(); } // This is being called with no active context so shouldn't be // needed but is safer to not change for now. GLES20.glFlush(); Loading Loading
services/core/java/com/android/server/display/ColorFade.java +10 −1 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ import android.opengl.EGLDisplay; import android.opengl.EGLSurface; import android.opengl.GLES20; import android.opengl.GLES11Ext; import android.os.SystemProperties; import android.util.Slog; import android.view.DisplayInfo; import android.view.Surface.OutOfResourcesException; Loading Loading @@ -71,6 +72,9 @@ final class ColorFade { // See code for details. private static final int DEJANK_FRAMES = 3; private static final boolean DESTROY_SURFACE_AFTER_DETACH = SystemProperties.getBoolean("ro.egl.destroy_after_detach", false); private final int mDisplayId; // Set to true when the animation context has been fully prepared. Loading Loading @@ -330,10 +334,15 @@ final class ColorFade { destroyScreenshotTexture(); destroyGLShaders(); destroyGLBuffers(); if (!DESTROY_SURFACE_AFTER_DETACH) { destroyEglSurface(); } } finally { detachEglContext(); } if (DESTROY_SURFACE_AFTER_DETACH) { destroyEglSurface(); } // This is being called with no active context so shouldn't be // needed but is safer to not change for now. GLES20.glFlush(); Loading