diff options
author | Andy McFadden <fadden@android.com> | 2013-08-14 11:23:06 -0700 |
---|---|---|
committer | Andy McFadden <fadden@android.com> | 2013-08-14 11:23:06 -0700 |
commit | 2533c83b4ed8e1ca5b259d59373f941c8f0e9635 (patch) | |
tree | bfad6cb63427aca3993b6d70b0c53aee18160ebc /cmds | |
parent | fe9611bd65a8d968d6512f6a83078ac064ec8e6e (diff) | |
download | frameworks_av-2533c83b4ed8e1ca5b259d59373f941c8f0e9635.zip frameworks_av-2533c83b4ed8e1ca5b259d59373f941c8f0e9635.tar.gz frameworks_av-2533c83b4ed8e1ca5b259d59373f941c8f0e9635.tar.bz2 |
Use destroyDisplay()
Use the new SurfaceComposerClient::destroyDisplay call to shut the
virtual display down.
Change-Id: I0225a44594abf427d386456622b23b01fdd1690f
Diffstat (limited to 'cmds')
-rw-r--r-- | cmds/screenrecord/screenrecord.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/cmds/screenrecord/screenrecord.cpp b/cmds/screenrecord/screenrecord.cpp index 28fc00f..c904b03 100644 --- a/cmds/screenrecord/screenrecord.cpp +++ b/cmds/screenrecord/screenrecord.cpp @@ -460,17 +460,9 @@ static status_t recordScreen(const char* fileName) { printf("Stopping encoder and muxer\n"); } - // Shut everything down. - // - // The virtual display will continue to produce frames until "dpy" - // goes out of scope (and something causes the Binder traffic to transmit; - // can be forced with IPCThreadState::self()->flushCommands()). This - // could cause SurfaceFlinger to get stuck trying to feed us, so we want - // to set a NULL Surface to make the virtual display "dormant". + // Shut everything down, starting with the producer side. bufferProducer = NULL; - SurfaceComposerClient::openGlobalTransaction(); - SurfaceComposerClient::setDisplaySurface(dpy, bufferProducer); - SurfaceComposerClient::closeGlobalTransaction(); + SurfaceComposerClient::destroyDisplay(dpy); encoder->stop(); muxer->stop(); |