summaryrefslogtreecommitdiffstats
path: root/libs/gui
diff options
context:
space:
mode:
authorJesse Hall <jessehall@google.com>2013-09-16 20:30:11 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-09-16 20:30:11 -0700
commitb8080d9a3b760617c5dde7b1d2d63aa2bcecf3a7 (patch)
tree29ddedf4f71b30684c88a12ace48071cf5dc2edb /libs/gui
parentfccb7ac5968ee4cb852035b8ed93f8a21b6e7075 (diff)
parent2a36497e45d4d96e35fed89cfdcb09b71459ac3c (diff)
downloadframeworks_native-b8080d9a3b760617c5dde7b1d2d63aa2bcecf3a7.zip
frameworks_native-b8080d9a3b760617c5dde7b1d2d63aa2bcecf3a7.tar.gz
frameworks_native-b8080d9a3b760617c5dde7b1d2d63aa2bcecf3a7.tar.bz2
am 2a36497e: Merge "Stop using default value for Surface producerControlledByApp parameter" into klp-dev
* commit '2a36497e45d4d96e35fed89cfdcb09b71459ac3c': Stop using default value for Surface producerControlledByApp parameter
Diffstat (limited to 'libs/gui')
-rw-r--r--libs/gui/SurfaceControl.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/libs/gui/SurfaceControl.cpp b/libs/gui/SurfaceControl.cpp
index f4e88f5..16e533c 100644
--- a/libs/gui/SurfaceControl.cpp
+++ b/libs/gui/SurfaceControl.cpp
@@ -46,13 +46,13 @@ namespace android {
// ============================================================================
SurfaceControl::SurfaceControl(
- const sp<SurfaceComposerClient>& client,
+ const sp<SurfaceComposerClient>& client,
const sp<IBinder>& handle,
const sp<IGraphicBufferProducer>& 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<SurfaceControl>& lhs, const sp<SurfaceControl>& rhs)
+ const sp<SurfaceControl>& lhs, const sp<SurfaceControl>& rhs)
{
if (lhs == 0 || rhs == 0)
return false;
@@ -181,7 +181,9 @@ sp<Surface> 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;
}