From 2be4e8ff23f24285f4c195ba5537c7a51c13be4d Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Wed, 6 Mar 2013 20:42:56 -0800 Subject: [PATCH] workaround to fix screenshot leak on N4 Bug: 8322020 Change-Id: Ie60af0eb431866b8d64b2674ae7bd8b5ee05f5d6 --- services/surfaceflinger/SurfaceFlinger.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index f1e9c65e3..0ad471bed 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -2810,6 +2810,9 @@ status_t SurfaceFlinger::captureScreenImplLocked( glDeleteTextures(1, &tname); + DisplayDevice::makeCurrent(mEGLDisplay, + getDefaultDisplayDevice(), mEGLContext); + return result; }