From 83cafffeac037ab2f9d00f98f8d2f3da8fc9b857 Mon Sep 17 00:00:00 2001 From: Jesse Hall Date: Mon, 16 Sep 2013 15:24:53 -0700 Subject: Stop using default value for Surface producerControlledByApp parameter Bug: 10785749 Change-Id: Ifbf9340e5eabe621a69e990ec3e05ac51f8db66a --- libs/gui/SurfaceControl.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'libs/gui/SurfaceControl.cpp') diff --git a/libs/gui/SurfaceControl.cpp b/libs/gui/SurfaceControl.cpp index f4e88f5db8..16e533cd2e 100644 --- a/libs/gui/SurfaceControl.cpp +++ b/libs/gui/SurfaceControl.cpp @@ -46,13 +46,13 @@ namespace android { // ============================================================================ SurfaceControl::SurfaceControl( - const sp& client, + const sp& client, const sp& handle, const sp& gbp) : mClient(client), mHandle(handle), mGraphicBufferProducer(gbp) { } - + SurfaceControl::~SurfaceControl() { destroy(); @@ -71,7 +71,7 @@ void SurfaceControl::destroy() IPCThreadState::self()->flushCommands(); } -void SurfaceControl::clear() +void SurfaceControl::clear() { // here, the window manager tells us explicitly that we should destroy // the surface's resource. Soon after this call, it will also release @@ -83,7 +83,7 @@ void SurfaceControl::clear() } bool SurfaceControl::isSameSurface( - const sp& lhs, const sp& rhs) + const sp& lhs, const sp& rhs) { if (lhs == 0 || rhs == 0) return false; @@ -181,7 +181,9 @@ sp SurfaceControl::getSurface() const { Mutex::Autolock _l(mLock); if (mSurfaceData == 0) { - mSurfaceData = new Surface(mGraphicBufferProducer); + // This surface is always consumed by SurfaceFlinger, so the + // producerControlledByApp value doesn't matter; using false. + mSurfaceData = new Surface(mGraphicBufferProducer, false); } return mSurfaceData; } -- cgit v1.2.3-59-g8ed1b