diff options
Diffstat (limited to 'services/surfaceflinger/DisplayDevice.cpp')
| -rw-r--r-- | services/surfaceflinger/DisplayDevice.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/services/surfaceflinger/DisplayDevice.cpp b/services/surfaceflinger/DisplayDevice.cpp index 309fd0a791..65c3839141 100644 --- a/services/surfaceflinger/DisplayDevice.cpp +++ b/services/surfaceflinger/DisplayDevice.cpp @@ -224,6 +224,7 @@ DisplayDevice::DisplayDevice( std::unique_ptr<RE::Surface> renderSurface, int displayWidth, int displayHeight, + int displayInstallOrientation, bool hasWideColorGamut, const HdrCapabilities& hdrCapabilities, const int32_t supportedPerFrameMetadata, @@ -239,6 +240,7 @@ DisplayDevice::DisplayDevice( mSurface{std::move(renderSurface)}, mDisplayWidth(displayWidth), mDisplayHeight(displayHeight), + mDisplayInstallOrientation(displayInstallOrientation), mPageFlipCount(0), mIsSecure(isSecure), mLayerStack(NO_LAYER_STACK), @@ -610,9 +612,8 @@ void DisplayDevice::setProjection(int orientation, // need to take care of primary display rotation for mGlobalTransform // for case if the panel is not installed aligned with device orientation if (mType == DisplayType::DISPLAY_PRIMARY) { - int primaryDisplayOrientation = mFlinger->getPrimaryDisplayOrientation(); DisplayDevice::orientationToTransfrom( - (orientation + primaryDisplayOrientation) % (DisplayState::eOrientation270 + 1), + (orientation + mDisplayInstallOrientation) % (DisplayState::eOrientation270 + 1), w, h, &R); } |