liboverlay: Remove additional overlay SET ioctl calls.

The MSMFB_OVERLAY_SET ioctl gets called everytime there is a setSource called.
This is an expensive call and should not be done unnecessarily.

Change-Id: I2d9be394f48b9dea31b9f4f39b1b576c4ad42b47
This commit is contained in:
Naomi Luis 2011-03-07 17:47:56 -08:00 committed by Govind Surti
parent 7017323f14
commit 73a28215fa

View File

@ -785,14 +785,18 @@ bool OverlayControlChannel::setSource(uint32_t w, uint32_t h,
if (ioctl(mFD, MSMFB_OVERLAY_GET, &ov))
return false;
mOVInfo = ov;
int flags = mOVInfo.flags;
if (!ignoreFB)
mOVInfo.flags |= MDP_OV_PLAY_NOWAIT;
else
mOVInfo.flags &= ~MDP_OV_PLAY_NOWAIT;
if (ioctl(mFD, MSMFB_OVERLAY_SET, &mOVInfo))
return false;
if (flags != mOVInfo.flags) {
if (ioctl(mFD, MSMFB_OVERLAY_SET, &mOVInfo))
return false;
}
return true;
}
mOrientation = orientation;