def get_render_resolution(self, refresh=False, package=None):
        """
        Return render resolution after rotation

        Args:
            refresh: whether to force refresh render resolution
            package: package name, default to the package of top activity

        Returns:
            offset_x, offset_y, offset_width and offset_height of the display

        """
        if refresh or 'offset_x' not in self._display_info:
            self.adjust_all_screen(package)
        x, y, w, h = self._display_info.get('offset_x', 0), \
            self._display_info.get('offset_y', 0), \
            self._display_info.get('offset_width', 0), \
            self._display_info.get('offset_height', 0)
        if self.display_info["orientation"] in [1, 3]:
            x, y, w, h = y, x, h, w
        return x, y, w, h

        Return render resolution after rotation

        Args:
            refresh: whether to force refresh render resolution
            package: package name, default to the package of top activity

        Returns:
            offset_x, offset_y, offset_width and offset_height of the display

        
airtest/core/android/android.py