Merge "[317580] fix issue where the screen wouldn't be rotated properly in bypass mode" into gingerbread
This commit is contained in:
commit
fc84e8269b
@ -466,6 +466,18 @@ bool Layer::setBypass(bool enable)
|
||||
return true;
|
||||
}
|
||||
|
||||
void Layer::updateBuffersOrientation()
|
||||
{
|
||||
sp<GraphicBuffer> buffer(getBypassBuffer());
|
||||
if (buffer != NULL && mOrientation != buffer->transform) {
|
||||
ClientRef::Access sharedClient(mUserClientRef);
|
||||
SharedBufferServer* lcblk(sharedClient.get());
|
||||
if (lcblk) { // all buffers need reallocation
|
||||
lcblk->reallocateAll();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t Layer::doTransaction(uint32_t flags)
|
||||
{
|
||||
const Layer::State& front(drawingState());
|
||||
|
@ -83,6 +83,8 @@ public:
|
||||
virtual void onRemoved();
|
||||
virtual bool setBypass(bool enable);
|
||||
|
||||
void updateBuffersOrientation();
|
||||
|
||||
inline sp<GraphicBuffer> getBypassBuffer() const {
|
||||
return mBufferManager.getActiveBuffer(); }
|
||||
|
||||
|
@ -725,8 +725,12 @@ void SurfaceFlinger::setBypassLayer(const sp<LayerBase>& layer)
|
||||
{
|
||||
// if this layer is already the bypass layer, do nothing
|
||||
sp<Layer> cur(mBypassLayer.promote());
|
||||
if (mBypassLayer == layer)
|
||||
if (mBypassLayer == layer) {
|
||||
if (cur != NULL) {
|
||||
cur->updateBuffersOrientation();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// clear the current bypass layer
|
||||
mBypassLayer.clear();
|
||||
|
Loading…
Reference in New Issue
Block a user