Loading services/surfaceflinger/DisplayDevice.cpp +15 −0 Original line number Diff line number Diff line Loading @@ -367,6 +367,20 @@ status_t DisplayDevice::orientationToTransfrom( int orientation, int w, int h, Transform* tr) { uint32_t flags = 0; char value[PROPERTY_VALUE_MAX]; property_get("ro.sf.hwrotation", value, "0"); int additionalRot = atoi(value); if (additionalRot) { additionalRot /= 90; if (orientation == DisplayState::eOrientationUnchanged) { orientation = additionalRot; } else { orientation += additionalRot; orientation %= 4; } } switch (orientation) { case DisplayState::eOrientationDefault: flags = Transform::ROT_0; Loading @@ -383,6 +397,7 @@ status_t DisplayDevice::orientationToTransfrom( default: return BAD_VALUE; } tr->set(flags, w, h); return NO_ERROR; } Loading Loading
services/surfaceflinger/DisplayDevice.cpp +15 −0 Original line number Diff line number Diff line Loading @@ -367,6 +367,20 @@ status_t DisplayDevice::orientationToTransfrom( int orientation, int w, int h, Transform* tr) { uint32_t flags = 0; char value[PROPERTY_VALUE_MAX]; property_get("ro.sf.hwrotation", value, "0"); int additionalRot = atoi(value); if (additionalRot) { additionalRot /= 90; if (orientation == DisplayState::eOrientationUnchanged) { orientation = additionalRot; } else { orientation += additionalRot; orientation %= 4; } } switch (orientation) { case DisplayState::eOrientationDefault: flags = Transform::ROT_0; Loading @@ -383,6 +397,7 @@ status_t DisplayDevice::orientationToTransfrom( default: return BAD_VALUE; } tr->set(flags, w, h); return NO_ERROR; } Loading