[317580] fix issue where the screen wouldn't be rotated properly in bypass mode
In some situations, the screen transformation would not be
applied while in bypass mode.
Change-Id: I3d6dd52e4c12b11aae97b54bf8e2322536eee37f
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index a18f473..3a8690e 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -466,6 +466,18 @@
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());