am 2a36497e: Merge "Stop using default value for Surface producerControlledByApp parameter" into klp-dev

* commit '2a36497e45d4d96e35fed89cfdcb09b71459ac3c':
  Stop using default value for Surface producerControlledByApp parameter
This commit is contained in:
Jesse Hall 2013-09-16 20:30:11 -07:00 committed by Android Git Automerger
commit b8080d9a3b
3 changed files with 9 additions and 7 deletions

View File

@ -181,7 +181,9 @@ sp<Surface> SurfaceControl::getSurface() const
{ {
Mutex::Autolock _l(mLock); Mutex::Autolock _l(mLock);
if (mSurfaceData == 0) { 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; return mSurfaceData;
} }

View File

@ -73,7 +73,7 @@ DisplayDevice::DisplayDevice(
mLayerStack(NO_LAYER_STACK), mLayerStack(NO_LAYER_STACK),
mOrientation() mOrientation()
{ {
mNativeWindow = new Surface(producer); mNativeWindow = new Surface(producer, false);
ANativeWindow* const window = mNativeWindow.get(); ANativeWindow* const window = mNativeWindow.get();
int format; int format;

View File

@ -2782,7 +2782,7 @@ status_t SurfaceFlinger::captureScreenImplLocked(
// create a surface (because we're a producer, and we need to // create a surface (because we're a producer, and we need to
// dequeue/queue a buffer) // dequeue/queue a buffer)
sp<Surface> sur = new Surface(producer); sp<Surface> sur = new Surface(producer, false);
ANativeWindow* window = sur.get(); ANativeWindow* window = sur.get();
status_t result = NO_ERROR; status_t result = NO_ERROR;