Loading services/surfaceflinger/DisplayDevice.cpp +10 −0 Original line number Diff line number Diff line Loading @@ -134,6 +134,11 @@ DisplayDevice::DisplayDevice( property_get("persist.panel.orientation", property, "0"); panelOrientation = atoi(property) / 90; mPanelInverseMounted = false; // Check if panel is inverse mounted (contents show up HV flipped) property_get("persist.panel.inversemounted", property, "0"); mPanelInverseMounted = !!atoi(property); // initialize the display orientation transform. setProjection(panelOrientation, mViewport, mFrame); } Loading Loading @@ -408,6 +413,11 @@ status_t DisplayDevice::orientationToTransfrom( default: return BAD_VALUE; } if (DISPLAY_PRIMARY == mHwcDisplayId && isPanelInverseMounted()) { flags = flags ^ Transform::ROT_180; } tr->set(flags, w, h); return NO_ERROR; } Loading services/surfaceflinger/DisplayDevice.h +7 −1 Original line number Diff line number Diff line Loading @@ -126,6 +126,10 @@ public: int32_t getHwcDisplayId() const { return mHwcDisplayId; } const wp<IBinder>& getDisplayToken() const { return mDisplayToken; } bool isPanelInverseMounted() const { return mPanelInverseMounted; } // We pass in mustRecompose so we can keep VirtualDisplaySurface's state // machine happy without actually queueing a buffer if nothing has changed status_t beginFrame(bool mustRecompose) const; Loading Loading @@ -215,7 +219,7 @@ private: /* * Transaction state */ static status_t orientationToTransfrom(int orientation, status_t orientationToTransfrom(int orientation, int w, int h, Transform* tr); uint32_t mLayerStack; Loading @@ -232,6 +236,8 @@ private: int mPowerMode; // Current active config int mActiveConfig; // Panel is inverse mounted int mPanelInverseMounted; }; }; // namespace android Loading services/surfaceflinger/SurfaceFlinger.cpp +6 −0 Original line number Diff line number Diff line Loading @@ -3530,6 +3530,12 @@ void SurfaceFlinger::renderScreenImplLocked( // make sure to clear all GL error flags engine.checkErrors(); if (DisplayDevice::DISPLAY_PRIMARY == hw->getDisplayType() && hw->isPanelInverseMounted()) { rotation = (Transform::orientation_flags) (rotation ^ Transform::ROT_180); } // set-up our viewport engine.setViewportAndProjection( reqWidth, reqHeight, sourceCrop, hw_h, yswap, rotation); Loading Loading
services/surfaceflinger/DisplayDevice.cpp +10 −0 Original line number Diff line number Diff line Loading @@ -134,6 +134,11 @@ DisplayDevice::DisplayDevice( property_get("persist.panel.orientation", property, "0"); panelOrientation = atoi(property) / 90; mPanelInverseMounted = false; // Check if panel is inverse mounted (contents show up HV flipped) property_get("persist.panel.inversemounted", property, "0"); mPanelInverseMounted = !!atoi(property); // initialize the display orientation transform. setProjection(panelOrientation, mViewport, mFrame); } Loading Loading @@ -408,6 +413,11 @@ status_t DisplayDevice::orientationToTransfrom( default: return BAD_VALUE; } if (DISPLAY_PRIMARY == mHwcDisplayId && isPanelInverseMounted()) { flags = flags ^ Transform::ROT_180; } tr->set(flags, w, h); return NO_ERROR; } Loading
services/surfaceflinger/DisplayDevice.h +7 −1 Original line number Diff line number Diff line Loading @@ -126,6 +126,10 @@ public: int32_t getHwcDisplayId() const { return mHwcDisplayId; } const wp<IBinder>& getDisplayToken() const { return mDisplayToken; } bool isPanelInverseMounted() const { return mPanelInverseMounted; } // We pass in mustRecompose so we can keep VirtualDisplaySurface's state // machine happy without actually queueing a buffer if nothing has changed status_t beginFrame(bool mustRecompose) const; Loading Loading @@ -215,7 +219,7 @@ private: /* * Transaction state */ static status_t orientationToTransfrom(int orientation, status_t orientationToTransfrom(int orientation, int w, int h, Transform* tr); uint32_t mLayerStack; Loading @@ -232,6 +236,8 @@ private: int mPowerMode; // Current active config int mActiveConfig; // Panel is inverse mounted int mPanelInverseMounted; }; }; // namespace android Loading
services/surfaceflinger/SurfaceFlinger.cpp +6 −0 Original line number Diff line number Diff line Loading @@ -3530,6 +3530,12 @@ void SurfaceFlinger::renderScreenImplLocked( // make sure to clear all GL error flags engine.checkErrors(); if (DisplayDevice::DISPLAY_PRIMARY == hw->getDisplayType() && hw->isPanelInverseMounted()) { rotation = (Transform::orientation_flags) (rotation ^ Transform::ROT_180); } // set-up our viewport engine.setViewportAndProjection( reqWidth, reqHeight, sourceCrop, hw_h, yswap, rotation); Loading