Merge "Stop using default value for Surface producerControlledByApp parameter" into klp-dev
This commit is contained in:
commit
2a36497e45
@ -46,13 +46,13 @@ namespace android {
|
|||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
|
||||||
SurfaceControl::SurfaceControl(
|
SurfaceControl::SurfaceControl(
|
||||||
const sp<SurfaceComposerClient>& client,
|
const sp<SurfaceComposerClient>& client,
|
||||||
const sp<IBinder>& handle,
|
const sp<IBinder>& handle,
|
||||||
const sp<IGraphicBufferProducer>& gbp)
|
const sp<IGraphicBufferProducer>& gbp)
|
||||||
: mClient(client), mHandle(handle), mGraphicBufferProducer(gbp)
|
: mClient(client), mHandle(handle), mGraphicBufferProducer(gbp)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
SurfaceControl::~SurfaceControl()
|
SurfaceControl::~SurfaceControl()
|
||||||
{
|
{
|
||||||
destroy();
|
destroy();
|
||||||
@ -71,7 +71,7 @@ void SurfaceControl::destroy()
|
|||||||
IPCThreadState::self()->flushCommands();
|
IPCThreadState::self()->flushCommands();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SurfaceControl::clear()
|
void SurfaceControl::clear()
|
||||||
{
|
{
|
||||||
// here, the window manager tells us explicitly that we should destroy
|
// here, the window manager tells us explicitly that we should destroy
|
||||||
// the surface's resource. Soon after this call, it will also release
|
// the surface's resource. Soon after this call, it will also release
|
||||||
@ -83,7 +83,7 @@ void SurfaceControl::clear()
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool SurfaceControl::isSameSurface(
|
bool SurfaceControl::isSameSurface(
|
||||||
const sp<SurfaceControl>& lhs, const sp<SurfaceControl>& rhs)
|
const sp<SurfaceControl>& lhs, const sp<SurfaceControl>& rhs)
|
||||||
{
|
{
|
||||||
if (lhs == 0 || rhs == 0)
|
if (lhs == 0 || rhs == 0)
|
||||||
return false;
|
return false;
|
||||||
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -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;
|
||||||
|
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user