Merge "Update transform hint from relayout window (2/2)" into sc-dev
diff --git a/libs/gui/BLASTBufferQueue.cpp b/libs/gui/BLASTBufferQueue.cpp
index 184d242..364c939 100644
--- a/libs/gui/BLASTBufferQueue.cpp
+++ b/libs/gui/BLASTBufferQueue.cpp
@@ -205,6 +205,11 @@
applyTransaction = true;
}
+ if (mSurfaceControl != nullptr) {
+ mTransformHint = mSurfaceControl->getTransformHint();
+ mBufferItemConsumer->setTransformHint(mTransformHint);
+ }
+
ui::Size newSize(width, height);
if (mRequestedSize != newSize) {
mRequestedSize.set(newSize);
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index e01ea5c..b99531b 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -2857,7 +2857,9 @@
(currentState.orientedDisplaySpaceRect != drawingState.orientedDisplaySpaceRect)) {
display->setProjection(currentState.orientation, currentState.layerStackSpaceRect,
currentState.orientedDisplaySpaceRect);
- mDefaultDisplayTransformHint = display->getTransformHint();
+ if (display->isPrimary()) {
+ mDefaultDisplayTransformHint = display->getTransformHint();
+ }
}
if (currentState.width != drawingState.width ||
currentState.height != drawingState.height) {
@@ -6912,6 +6914,8 @@
parent->addChild(layer);
}
+ layer->updateTransformHint(mDefaultDisplayTransformHint);
+
if (state->initialProducer != nullptr) {
mGraphicBufferProducerList.insert(state->initialProducer);
LOG_ALWAYS_FATAL_IF(mGraphicBufferProducerList.size() > mMaxGraphicBufferProducerListSize,