Loading services/surfaceflinger/SurfaceFlinger.cpp +15 −4 Original line number Original line Diff line number Diff line Loading @@ -665,10 +665,21 @@ status_t SurfaceFlinger::getDisplayInfo(const sp<IBinder>& display, DisplayInfo* info->orientation = 0; info->orientation = 0; } } char value[PROPERTY_VALUE_MAX]; property_get("ro.sf.hwrotation", value, "0"); int additionalRot = atoi(value) / 90; if ((type == DisplayDevice::DISPLAY_PRIMARY) && (additionalRot & DisplayState::eOrientationSwapMask)) { info->h = hwc.getWidth(type); info->w = hwc.getHeight(type); info->xdpi = ydpi; info->ydpi = xdpi; } else { info->w = hwc.getWidth(type); info->w = hwc.getWidth(type); info->h = hwc.getHeight(type); info->h = hwc.getHeight(type); info->xdpi = xdpi; info->xdpi = xdpi; info->ydpi = ydpi; info->ydpi = ydpi; } info->fps = float(1e9 / hwc.getRefreshPeriod(type)); info->fps = float(1e9 / hwc.getRefreshPeriod(type)); // All non-virtual displays are currently considered secure. // All non-virtual displays are currently considered secure. Loading Loading
services/surfaceflinger/SurfaceFlinger.cpp +15 −4 Original line number Original line Diff line number Diff line Loading @@ -665,10 +665,21 @@ status_t SurfaceFlinger::getDisplayInfo(const sp<IBinder>& display, DisplayInfo* info->orientation = 0; info->orientation = 0; } } char value[PROPERTY_VALUE_MAX]; property_get("ro.sf.hwrotation", value, "0"); int additionalRot = atoi(value) / 90; if ((type == DisplayDevice::DISPLAY_PRIMARY) && (additionalRot & DisplayState::eOrientationSwapMask)) { info->h = hwc.getWidth(type); info->w = hwc.getHeight(type); info->xdpi = ydpi; info->ydpi = xdpi; } else { info->w = hwc.getWidth(type); info->w = hwc.getWidth(type); info->h = hwc.getHeight(type); info->h = hwc.getHeight(type); info->xdpi = xdpi; info->xdpi = xdpi; info->ydpi = ydpi; info->ydpi = ydpi; } info->fps = float(1e9 / hwc.getRefreshPeriod(type)); info->fps = float(1e9 / hwc.getRefreshPeriod(type)); // All non-virtual displays are currently considered secure. // All non-virtual displays are currently considered secure. Loading