CN114168240A - Window display method, device, equipment and storage medium - Google Patents

Window display method, device, equipment and storage medium Download PDF

Info

Publication number
CN114168240A
CN114168240A CN202111229622.8A CN202111229622A CN114168240A CN 114168240 A CN114168240 A CN 114168240A CN 202111229622 A CN202111229622 A CN 202111229622A CN 114168240 A CN114168240 A CN 114168240A
Authority
CN
China
Prior art keywords
window
display
app
display layer
rendering component
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111229622.8A
Other languages
Chinese (zh)
Inventor
王哲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing Jingling Information System Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingling Information System Technology Co Ltd filed Critical Beijing Jingling Information System Technology Co Ltd
Priority to CN202111229622.8A priority Critical patent/CN114168240A/en
Publication of CN114168240A publication Critical patent/CN114168240A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Abstract

The invention provides a window display method, a device, equipment and a storage medium. The method is applied to the electronic equipment, and the electronic equipment comprises the following steps: the system comprises a first operating system and a second operating system, wherein the first operating system comprises a window manager, and the second operating system comprises a first application program APP and an interface rendering component; the method comprises the following steps: the interface rendering component configures a virtual display layer corresponding to the first APP according to first display output information of a display side, so that the virtual display layer has first configuration information; the interface rendering component renders first display content of a first APP on the virtual display layer to obtain a first window; the first display content is obtained according to the first configuration information; the interface rendering component sends the first window to a window manager. According to the method provided by the embodiment of the invention, the first configuration information and the first display content of the virtual display layer are obtained according to the first display output information, the matching degree is higher, and the display effect of the display content is better.

Description

Window display method, device, equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for displaying a window.
Background
With the development of computer technology, in order to expand an application program (APP for short) in a Linux system and enrich an application environment, the Linux system can support the APP for running an Android system.
At present, when an android APP runs under a Linux system, a window manager of the Linux system directly receives a window rendered by the android APP for display. Android APP does not consider the display output parameters of the display screen when rendering the window, the window of the android APP is poor in matching degree with the display output parameters of the display screen, and the display effect is not good.
Disclosure of Invention
The invention provides a window display method, a window display device and a storage medium, which are used for improving the display effect of a window of an android application on a Linux system.
The invention provides a window display method. The window display method is applied to electronic equipment, and the electronic equipment comprises the following steps: the system comprises a first operating system and a second operating system which is deployed in the first operating system in a containerization mode, wherein the first operating system comprises a window manager, and the second operating system comprises a first application program APP and an interface rendering component; the method comprises the following steps:
the interface rendering component configures a virtual display layer corresponding to the first APP according to first display output information of a display side, wherein the virtual display layer has first configuration information;
the interface rendering component renders first display content of the first APP on the virtual display layer to obtain a first window; the first display content is obtained by the first APP according to the first configuration information;
the interface rendering component sends the first window to a window manager;
the window manager displays the first window.
According to the window display method provided by the invention, the interface rendering component configures the virtual display layer corresponding to the first APP according to the first display output information of the display side, and the method comprises the following steps:
the interface rendering component determines a virtual display layer corresponding to the first APP;
and the interface rendering component configures the virtual display layer corresponding to the first APP according to the first display output information of the display side.
According to the window display method provided by the invention, the interface rendering component determines the virtual display layer corresponding to the first APP, and the method comprises the following steps:
the interface rendering component determines a virtual display layer corresponding to the first APP according to the target corresponding relation and the distribution rule of the virtual display layer; the target correspondence includes: a correspondence of at least one APP to at least one virtual display layer.
According to the window display method provided by the invention, the interface rendering component determines the virtual display layer corresponding to the first APP, and the method comprises the following steps:
and if the virtual display layer corresponding to the first APP does not exist, creating the virtual display layer, and establishing a corresponding relation between the first APP and the virtual display layer.
According to a window display method provided by the present invention, the method further comprises:
the first APP obtains a layout mode matched with the first configuration information;
and the first APP generates first display content according to the layout mode matched with the first configuration information.
According to a window display method provided by the present invention, the method further comprises:
under the condition that the display side is changed, the interface rendering component acquires second display output information after the screen is changed;
the interface rendering component adjusts first configuration information of a virtual display layer corresponding to the first APP according to the second display output information to obtain second configuration information;
the interface rendering component renders the second display content adjusted by the first APP on the virtual display layer to obtain a second window; the second display content is obtained by adjusting the first display content by the first APP according to the second configuration information;
the interface rendering component sends the second window to a window manager; the window manager displays the second window.
According to the window display method provided by the invention, the first APP obtains a layout mode matched with the second configuration information;
and the first APP adjusts the first display content according to the layout mode matched with the second configuration information to obtain the second display content.
According to a window display method provided by the present invention, the first display output information includes at least one of: resolution and physical size information;
the second display output information comprises at least one of: resolution and physical size information.
According to a window display method provided by the present invention, the window manager displays the first window, including:
the window manager converts the coordinates of the first window according to the proportional parameters of the display side, and obtains and displays the converted first window;
the window manager displays the second window, including:
and the window manager converts the coordinates of the second window according to the changed proportional parameters of the display side, acquires and displays the converted second window.
The invention also provides a window display device. Applied to an electronic device, the electronic device comprising: the system comprises a first operating system and a second operating system which is deployed in the first operating system in a containerization mode, wherein the first operating system comprises a window manager, and the second operating system comprises a first application program APP and an interface rendering component; the interface rendering component includes:
the obtaining module is used for configuring a virtual display layer corresponding to the first APP according to first display output information of a display side, and the virtual display layer has first configuration information;
the processing module is used for rendering first display content of the first APP on the virtual display layer to obtain a first window; the first display content is obtained by the first APP according to the first configuration information;
the sending module is used for sending the first window to a window manager; the window manager displays the first window.
The present invention also provides an electronic device, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of any of the above-mentioned window display methods.
The invention also provides a non-transitory computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the window display method as described in any one of the above.
According to the window display method, device, equipment and storage medium provided by the invention, the interface rendering component included in the second operating system can configure the virtual display layer corresponding to the first APP according to the first display output information of the display side, so that the virtual display layer has the first configuration information. And the first display content of the first APP is obtained for the first APP according to the first configuration information. It can be seen that the first configuration information of the virtual display layer and the first display content of the first APP are both obtained according to the first display output information of the display side, and the matching degree of the first configuration information of the virtual display layer and the first display content of the first APP is higher than that of the first display output information of the display side. The interface rendering component renders a first display content of a first APP on the virtual display layer to obtain a first window which is used for displaying on the first operating system, the matching degree of the first window with the display side is high, and the display effect is good.
Drawings
In order to more clearly illustrate the technical solutions of the present invention or the prior art, the drawings needed for the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
FIG. 1 is a schematic diagram of multi-screen output of a Linux system when display output is not adjusted according to the prior art;
FIG. 2 is a schematic diagram of multi-screen output after adjusting the proportional parameters of the Linux system in the prior art;
FIG. 3 is a flowchart illustrating a window displaying method according to an embodiment of the present invention;
FIG. 4 is a second flowchart illustrating a window displaying method according to an embodiment of the present invention;
FIG. 5 is a third flowchart illustrating a window displaying method according to an embodiment of the present invention;
FIG. 6 is a schematic view of an interaction flow of a window displaying method according to an embodiment of the present invention;
FIG. 7 is a second schematic view illustrating an interaction flow of a window displaying method according to an embodiment of the present invention;
FIG. 8 is a schematic structural diagram of a window display device according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
First, a part of vocabulary and application scenarios related to the embodiment of the present invention will be described.
The window manager is used in the graphic operation system for managing the display of all application and system graphic windows and the distribution of input events such as mouse, keyboard, touch and the like.
The application's window Task, is displayed as a container of the application of a particular width and height. Each application may create one or more window tasks for displaying different content. The window in the embodiment of the invention refers to a window task.
In an embodiment of the invention, the application program APP generally refers to an application having one or more functions in an operating system, such as a file manager, a picture viewer, a music player, a video player, and the like.
In an embodiment of the invention, the second operating system runs in the first operating system in a containerized manner. As known to those skilled in the art, containerization, i.e., LXC implemented based on Linux kernel features, fully utilizes cgroups and Namespace features, isolates processes and resources, and enables efficient and lightweight implementation of the second operating system.
In the embodiment of the present invention, although not explicitly described, the first operating system and the second operating system are both Linux Kernel-based operating systems, which may be the same, for example, both the first operating system and the second operating system are Linux OS releases (such as Ubuntu) or are Android; the two may also be different, for example, one of the first and second operating systems is a Linux OS release and one is Android (Android).
In the embodiment of the present invention, although not explicitly described, the communication, notification, and the like between the first operating system and the second operating system may be implemented by Socket, MQ, shared memory, and the like, inter-process communication IPC, or implemented by Broadcast notification Broadcast at a system level.
As known to those skilled in the art, Android has a plurality of derivative versions, and Android (Android) referred to in the present invention covers Android OS issued by Google and AOSP and various derivative systems based on AOSP, such as MIUI, EMUI, One UI, and the like.
As known to those skilled in the art, the Linux operating system, also known as GNU/Linux, includes, but is not limited to, its various releases, such as Ubuntu, Redhat, Arch, Debian, and the like.
As known to those skilled in the art, there are many other Linux Kernel-based operating systems, such as Tizen, etc., which are also applicable to the solution of the present invention.
The electronic device in the embodiment of the present invention includes, for example: and the mobile phone, the tablet computer, the notebook computer, the computer and the like.
For convenience of description, the implementation process and principle of the embodiment of the present invention are described below by taking the first operating system as Linux OS and the second operating system as Android, which are only schematic and do not limit the present invention in particular.
The method provided by the embodiment of the invention can be realized by executing the corresponding software code by one electronic device such as a processor, and can also be realized by performing data interaction with a server while executing the corresponding software code by one electronic device.
For the above scenario, in the related art, when the android APP runs under the Linux system, the window manager of the Linux system directly receives the window rendered by the android APP for display. Android APP does not consider the display output parameters of the display screen when rendering the window, the window of the android APP is poor in matching degree with the display output parameters of the display screen, and the display effect is not good.
In addition, when windows of the Linux graphics system are output in multiple screens, if the display output is not adjusted, the problem of poor display effect as shown in fig. 1 may occur. As shown in fig. 1, when the display content of the triangle is moved from a screen 1 with a resolution of 1920 × 1080, 96 Dots Per Inch (DPI) DPI to a screen 2 with a resolution of 2560 × 1440, 128DPI, the display content of the triangle will be smaller. When the display content of the triangle is moved from the screen 2 with the resolution of 2560 × 1440, 128DPI to the screen 3 with the resolution of 3480 × 2160, 192DPI, the display content of the triangle is further reduced, and the display effect is poor.
The window manager of the Linux graphics system may set a scale value for each screen. As shown in fig. 2, when the triangle display content of the Linux application moves from the screen 1 with the resolution of 1920 × 1080, 96DPI to the screen 2 with the resolution of 2560 × 1440, 128DPI, the logical coordinate system can be scaled according to the scale value of the screen 2, and the Linux application's own graphical user interface framework supports the characteristic of High Dots Per Inch (HDPI), so that the triangle display content has the same size on different screens, and the display effect is better. When the triangle display content moves from the screen 2 with the resolution of 2560 × 1440, 128DPI to the screen 3 with the resolution of 3480 × 2160, 192DPI, the scaling of the logical coordinate system can be performed according to the scale value of the screen 3, and in addition, the Linux application self graphic user interface framework supports the HDPI characteristics, the triangle display content has better display effect on different screens.
The technical idea of the window display method of the embodiment of the invention is as follows:
when the window of the android APP is displayed on the Linux system, the interface rendering component of the android system can configure the virtual display layer corresponding to the first APP according to the first display output information of the display side, so that the virtual display layer has the first configuration information. And the first APP generates first display content according to the first configuration information, and then the first display content is rendered on the virtual display layer with the first configuration information, so that a first window with high matching degree with the display side and good display effect can be obtained.
The technical solution of the present invention is described in detail with specific embodiments in conjunction with fig. 3-8. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments.
Fig. 3 is a flowchart illustrating a window displaying method according to an embodiment of the present invention. As shown in fig. 3, the window display method according to the embodiment of the present invention is applied to an electronic device. The electronic device includes: the system comprises a first operating system and a second operating system which is deployed in the first operating system in a containerization mode, wherein the first operating system comprises a window manager, and the second operating system comprises a first application program APP and an interface rendering component; the window display method comprises the following steps:
step 101, configuring a virtual display layer corresponding to a first APP by an interface rendering component according to first display output information of a display side, wherein the virtual display layer has first configuration information.
In particular, for the android system, the interface rendering component may be a surface flicker component, which is mainly used for receiving, synthesizing and rendering graphics display data from multiple sources.
In the embodiment of the present invention, the display side refers to an input/output device with a display function, or a display tool that displays an image or a picture on a screen through a specific transmission device and reflects the image or the picture to human eyes, and may be a display screen such as an LCD or an OLED, a display projected on a curtain or a wall surface by an LED projector or a laser projector, or a virtual imaging display such as an AR or a VR. The picture output by the display side may be a horizontal screen, a vertical screen, or the like.
Optionally, the first display output information comprises at least one of: resolution and physical size information. For example, the first display output information may include: the resolution was 4800X 1200, and the physical size information was 40cm long and 35cm high. For another example, the first display output information may include: the physical size information is 25cm long and 18cm high.
The virtual display layer corresponding to the first APP refers to a virtual display screen in a second operating system, which corresponds to the first APP. The process of configuring the virtual display layer according to the first display output information of the display side and configuring the virtual display layer so that the virtual display layer has the first configuration information means configuring a virtual display layer (virtual display screen) corresponding to the first APP according to the resolution, physical size information and the like of the display side to be displayed by the first APP so that the virtual display layer has the first configuration information. It should be appreciated that the first configuration information is derived from the first display output information. The first configuration information includes information corresponding to the first display output information. For example, when the first display output information includes a resolution of 4800 × 1200 and the physical size information is 40cm long and 35cm high, the first configuration information includes a resolution of 4800 × 1200 and the physical size information is 40cm long and 35cm high.
For example, when a window of a certain shopping APP of the android system is to be displayed on the display side 1, the surfaflinger component of the android system may first acquire first display output information such as resolution, physical size information, and the like of the display side 1. Wherein the resolution is 4800X 1200, and the physical size information is 40cm long and 35cm high. And then configuring a virtual display layer corresponding to the shopping APP by the SurfaceFlinger component according to the resolution and physical size information of the display side 1, so that the virtual display layer has first configuration information. The first configuration information matches the first display output information. The first configuration information includes: the resolution was 4800X 1200, and the physical size information was 40cm long and 35cm high.
102, rendering first display content of a first APP on a virtual display layer by an interface rendering component to obtain a first window; the first display content is obtained by the first APP according to the first configuration information.
Optionally, the first display content may be obtained by:
the first APP obtains a layout mode matched with the first configuration information;
and the first APP generates first display content according to the layout mode matched with the first configuration information. At this time, the first APP provides an optimal layout manner according to the first configuration information, so that the drawn first display content matches with the first configuration information.
Specifically, a first APP of the android system prestores a plurality of Layout modes (Layout) according to horizontal screen arrangement, vertical screen arrangement and different DPIs. When the first APP is displayed, the optimal layout mode can be matched according to the display output information of the display side, and then the first display content of the first APP is drawn according to the layout mode.
For example, when a certain shopping APP of the android system is displayed on the Linux system, the shopping APP may first communicate with the interface rendering component to obtain first configuration information such as resolution, physical size information, and the like of the virtual display side. Wherein the resolution is 4800X 1200, and the physical size information is 40cm long and 35cm high. Then, the shopping APP selects a horizontal screen from a plurality of pre-stored layout modes according to information that the resolution is 4800 × 1200, the physical size information is 40cm long and 35cm high, the layout mode that the resolution is 4800 × 1200 and the physical size information is 40cm long and 35cm high is supported, and the first display content of the shopping APP is drawn according to the layout mode.
Specifically, in the process of rendering the first window, the interface rendering component communicates with the first APP to obtain the first display content, and renders the first display content on the virtual display layer to obtain the first window.
For example, the surfacemaker component communicates with a shopping APP to obtain first display content drawn in a layout manner of a landscape and a support resolution of 4800 × 1200, with physical size information of 40cm long and 35cm high. Then, the first display content is rendered on a virtual display layer with a resolution of 4800 × 1200, physical size information of 40cm in length, and a height of 35cm, to obtain a first window. In the rendering process, the layout mode of the first display content is matched with the first configuration information of the virtual display layer.
Step 103, the interface rendering component sends the first window to the window manager.
Specifically, after the first window is rendered, the interface rendering component of the android system sends the first window to the window manager of the Linux system.
Step 104, the window manager displays the first window.
Specifically, the window manager receives the rendered first window, provides services such as a window frame for the first window, and displays the first window on the display side. The display output information of the display side is matched with the first configuration information of the virtual display layer, and the first configuration information of the virtual display layer is matched with the layout mode of the first display content of the first APP, so that the first display content of the first APP has higher matching degree with the display side, and the display effect of the first display content is improved.
Optionally, the displaying of the first window by the window manager may be implemented by:
and the window manager converts the coordinates of the first window according to the proportional parameters of the display side, acquires and displays the converted first window.
Since the virtual display layer and the first display content are configured according to the display side, the first window sent by the virtual display layer is matched with the display side, and needs to be output to the display side with the scale parameter of 1. When the window manager displays the first window according to the scale parameter of the display side, the coordinate of the first window is converted, the operation of the coordinate conversion is overlapped with the operation of the display according to the scale parameter of the display side, the first window on the virtual display layer can be displayed on the display side with the scale parameter as 1, and the display effect of the first window can be further ensured.
Specifically, if the scale parameter on the display side is not 1, the coordinate system of the first window may be adjusted to ensure that the first window on the virtual display layer is displayed on the display side according to the scale parameter 1. That is, the first window displayed to the display side is ensured to be the same as the first window physical size information or the like on the virtual display layer. If the scale parameter of the display side is 1, the coordinates of the first window do not need to be converted, and the first window of the virtual display layer can be directly displayed on the display side according to the scale parameter of 1.
For example, when a first window of a certain shopping APP of the android system is displayed on the Linux system, the window manager needs to display the first window on the virtual display layer to the display side according to the scale parameter of 1. And if the scale parameter of the display side is 1, directly displaying the first window on the virtual display layer on the display side. And if the scale parameter of the display side is 2, converting the coordinates of the first window on the virtual display layer to reduce the first window according to the scale of 0.5, and then displaying the first window on the display side according to the scale parameter 2 preset by the display side. At this time, the window manager displays the first window with the scale parameter of 1.
According to the window display method provided by the embodiment of the invention, the interface rendering component included in the second operating system can configure the virtual display layer corresponding to the first APP according to the first display output information of the display side, so that the virtual display layer has the first configuration information. And the first display content of the first APP is obtained for the first APP according to the first configuration information. It can be seen that the first configuration information of the virtual display layer and the first display content of the first APP are both obtained according to the first display output information of the display side, and the matching degree of the first configuration information of the virtual display layer and the first display content of the first APP is higher than that of the first display output information of the display side. The interface rendering component renders a first display content of a first APP on the virtual display layer to obtain a first window which is used for displaying on the first operating system, the matching degree of the first window with the display side is high, and the display effect is good.
In an embodiment, as shown in fig. 4, in step 101, the interface rendering component configures a virtual display layer corresponding to the first APP according to first display output information on the display side, where the virtual display layer has the first configuration information, which may specifically be implemented by the following steps:
step 1011, the interface rendering component determines a virtual display layer corresponding to the first APP.
Specifically, the virtual display layer may be a virtual display layer newly created by the interface rendering component, or may also be a virtual display layer already created, and the interface rendering component establishes a correspondence between the virtual display layer already created and the first APP. At this time, the virtual display layer may receive, synthesize, and render the graphic display data of the first APP.
For example, when a certain shopping APP of the android system is displayed on the Linux system, the surfefinger component of the android system first creates a virtual display layer corresponding to the shopping APP, and establishes a corresponding relationship between the shopping APP and the virtual display layer.
And 1012, configuring a virtual display layer corresponding to the first APP according to the first display output information of the display side by the interface rendering component, wherein the virtual display layer has the first configuration information.
According to the method, the interface rendering component firstly determines the virtual display layer corresponding to the first APP, and then configures the virtual display layer according to the first display output information of the display side. On the one hand, due to the existence of the virtual display layer, the display content of the first APP can be rendered on the virtual display layer of the android system, the first operating system is not required to render a window, window display information does not need to be interacted between the two operating systems for many times, the rendering work can be completed quickly, and the window rendering and display efficiency can be improved; on the other hand, the virtual display layer is configured according to the first display output information of the display side, and the matching degree of the virtual display layer and the display side is high, so that the matching degree of the first window rendered on the virtual display layer and the display side is high, and the display effect is good.
Optionally, the interface rendering component determines the virtual display layer corresponding to the first APP, and may be implemented by the following steps:
the interface rendering component determines a virtual display layer corresponding to the first APP according to the target corresponding relation and the distribution rule of the virtual display layer; the target corresponding relation comprises: a correspondence of at least one APP to at least one virtual display layer.
Specifically, the target corresponding relationship may include a corresponding relationship between one APP and one virtual display layer, may also include a corresponding relationship between one APP and a plurality of virtual display layers, may also include a corresponding relationship between a plurality of APPs and one virtual display layer, and may also include a corresponding relationship between a plurality of APPs and a plurality of virtual display layers.
The allocation rules of the virtual display layers may be set as desired. For example, the allocation rule of the virtual display layer may allocate one virtual display layer for each individual APP; a virtual display layer can also be allocated to the APPs of the same type; it is also possible to allocate a virtual display layer for every n APPs according to the start-up sequence, n being an integer greater than 0.
In practical application, the virtual display layer corresponding to the first APP is determined by combining the target corresponding relationship and the set allocation rule of the virtual display layer, and the virtual display layer corresponding to the created virtual display layer and the first APP may be determined according to the established corresponding relationship between the first APP and the virtual display layer and the allocation relationship of the virtual display layer.
For example, a window of a certain game APP of the android system is displayed on the Linux system, if the target corresponding relationship is the corresponding relationship between the game APP and the created virtual display layer, and the allocation rule of the virtual display layer allocates a virtual display layer to APPs of the same type, the interface rendering component determines that the virtual display layer corresponding to the game APP is the created virtual display layer belonging to the game category.
According to the method provided by the embodiment of the invention, one or more virtual display layers can be allocated to the first APP according to the target corresponding relation and the preset virtual display layer allocation grid, so that the flexibility of window display can be improved. Moreover, the virtual display layers are reasonably distributed, so that the number of the created virtual display layers can be reduced, and the running speed of the system is increased.
Optionally, if there is no virtual display layer corresponding to the first APP, a virtual display layer is created, and a corresponding relationship between the first APP and the virtual display layer is established.
Specifically, if there is no virtual display layer corresponding to the first APP, it means that there is no virtual display layer corresponding to the first APP in the second operating system. At this time, a virtual display layer needs to be created, and a corresponding relationship between the virtual display layer and the first APP is established.
For example, an online shop window of a certain shopping APP of the android system is displayed on the Linux system, and the interface rendering component searches for a virtual display layer corresponding to the shopping APP. And if not, the interface rendering component creates a new virtual display layer and establishes the corresponding relation between the shopping APP and the virtual display layer.
In the above embodiment, when the second system does not have the virtual display layer corresponding to the first APP, a virtual display layer may be newly created, so that it may be ensured that the window of the first APP can be rendered and synthesized on the virtual display layer.
In an embodiment, as shown in fig. 5, the window display method may further perform the following operations:
and 105, under the condition that the display side is changed, the interface rendering component acquires second display output information after the screen is changed.
Optionally, the second display output information comprises at least one of: resolution and physical size information. In this case, the resolution and the physical size information can well represent the display information on the display side.
Specifically, the change on the display side means that the display output information on the display side, such as the resolution and physical size on the display side, changes. For example, when the display side 1 is changed to the display side 2, the resolution of the display output information is 4800 × 1200, the resolution is 6050 × 4500 when the physical size information is 40cm × 35cm long, and the physical size information is 60cm × 45cm long.
And when the display side is changed, the interface rendering component is communicated with a window manager of the Linux operating system to acquire the changed second display output information.
For example, when the display side is changed from the display side 1 with the resolution of 4800 × 1200 and the physical size information of 35cm long by 40cm to the display side 2 with the resolution of 6050 × 4500 and the physical size information of 45cm long by 60cm, the surfafinger module of the android system communicates with the window manager of the Linux system to acquire the second display output information of the display side 2 (the resolution of 6050 × 4500 and the physical size information of 45cm long by 60 cm).
And 106, the interface rendering component adjusts the first configuration information of the virtual display layer corresponding to the first APP according to the second display output information to obtain second configuration information.
Specifically, the interface rendering component adjusts the original first configuration information of the virtual display layer, so that the configuration information of the virtual display layer is converted from the first configuration information to second configuration information, and the second configuration information is matched with the second display output information.
For example: the interface rendering component adjusts the first configuration information of the virtual display layer according to the second display output information (resolution 6050 × 4500, physical size information is 60cm long by 45cm high) of the display side 2 obtained in step 201, so that the virtual display layer has second configuration information, wherein the second configuration information includes the resolution 6050 × 4500, and the physical size information is 60cm long by 45cm high. The second configuration information matches the second display output information.
Step 107, rendering the second display content adjusted by the first APP on the virtual display layer by the interface rendering component to obtain a second window; the second display content is obtained by adjusting the first display content by the first APP according to the second configuration information.
Optionally, the second display content may be obtained by:
the first APP obtains a layout mode matched with the second configuration information;
and the first APP adjusts the first display content according to the layout mode matched with the second configuration information to obtain second display content. At this time, the first APP may provide a layout manner matched with the second configuration information according to the second configuration information, and correspondingly adjust the display content to obtain second display content, so that the second display content is matched with the second configuration information.
Specifically, when the display side is changed, the optimal layout mode may be matched according to the changed second display output information of the display side, and then the original first display content may be adjusted according to the layout mode to draw the second display content.
For example, when the display side is changed and the configuration information of the virtual display layer is changed, the first APP communicates with the interface rendering component to acquire second configuration information such as resolution and physical size information of the virtual display side. Wherein, the resolution is 6050 multiplied by 4500, the physical size information is 60cm long and 45cm high. Then, the shopping APP selects a horizontal screen from a plurality of pre-stored layout modes according to the resolution 6050 × 4500 and the physical size information of the information with the length of 60cm and the height of 45cm, supports the resolution 6050 × 4500 and the physical size information of the information with the length of 60cm and the height of 45cm, adjusts the first display content according to the layout mode and draws the second display content. At this time, the layout mode of the second display content is matched with the second configuration information of the virtual display screen and the second display output information of the display side.
Step 108, the interface rendering component sends the second window to the window manager; the window manager displays a second window.
Optionally, the window manager displays the second window, which may specifically be implemented by the following steps:
and the window manager converts the coordinates of the second window according to the changed proportional parameters of the display side, acquires and displays the converted second window. The display process of the second window is basically the same as the display process of the first window in technical effect, and is not repeated herein.
In this embodiment, when the display side of the first APP is changed, that is, the first APP is displayed on multiple display sides, the interface rendering component adjusts the virtual display layer from the first configuration information to the second configuration information according to the second display output information, and the second configuration information matches with the second display output information after the display side is changed. And the first APP is matched with the layout mode again according to the second configuration information, and the first display content is adjusted according to the layout mode matched with the second configuration information to draw the second display content. Therefore, the second configuration information of the display side and the second display content of the first APP are obtained according to the second display output information after the display side is changed, and a better display effect can be achieved. At this time, when the first display content and the first arrangement information match the first display output information, the second display content and the second arrangement information match the second display output information after the display side is changed by adjusting the virtual display layer and the first APP. Therefore, through the adjustment of the virtual display layer and the first APP, the first APP multi-screen display of the second operating system running on the first operating system can be realized.
Illustratively, as shown in fig. 6, the window display method of the present embodiment includes the steps of:
step 1, the window manager sends first display output information to an interface rendering component.
And 2, the interface rendering component creates and configures a virtual display layer with first configuration information according to the received first display output information.
And 3, the interface rendering component sends the first configuration information to the android application.
And 4, matching the layout mode and drawing the first display content according to the first configuration information by the android application.
And 5, the android application sends the first display content to the interface rendering component.
And 6, rendering the first display content by the interface rendering component to obtain a first window.
And 7, the interface rendering component sends the first window to the window manager.
And 8, displaying the first window. The window management displays the first window with the scale parameter of 1.
And 9, under the condition that the display side is changed, the window manager sends the second display output information after the screen is changed to the interface rendering component.
And step 10, the interface rendering component adjusts the first configuration information of the virtual display layer to obtain second configuration information, and applies for video memory.
And step 11, the interface rendering component sends the second configuration information to the android application.
And step 12, the android application re-matches the layout mode and redraws the second display content.
And step 13, the android application sends the second display content to the interface rendering component.
And step 14, rendering the second display content on the virtual display layer with the second configuration information by the interface rendering component to obtain a second window.
And step 15, the interface rendering component sends the second window to the window manager.
And step 16, displaying the second window. And the window manager converts the coordinate of the second window according to the changed proportional parameter of the display side, so that the second window is displayed according to the proportional parameter of 1, and normal rendering and input processing of the Linux window and the android window on the same screen are ensured.
According to the window display method provided by the invention, the interface rendering component included in the second operating system can configure the virtual display layer corresponding to the first APP according to the first display output information of the display side, so that the virtual display layer has the first configuration information. And the first display content of the first APP is obtained for the first APP according to the first configuration information. It can be seen that the first configuration information of the virtual display layer and the first display content of the first APP are both obtained according to the first display output information of the display side, and the matching degree of the first configuration information of the virtual display layer and the first display content of the first APP is higher than that of the first display output information of the display side. The interface rendering component renders a first display content of a first APP on the virtual display layer to obtain a first window which is used for displaying on the first operating system, the matching degree of the first window with the display side is high, and the display effect is good.
Illustratively, as shown in fig. 7, the window display method of the present embodiment includes the steps of:
and a, sending the changed display output information. When the display side of the android window is changed, the window manager sends a display side change starting event and changed display output information to the android window protocol agent.
And b, sending the changed display output information. And the android window protocol agent sends the changed display output information to the interface rendering component.
And c, adjusting the configuration information. And the interface rendering component adjusts the configuration information of the virtual display layer and applies for video memory.
And d, sending the adjusted configuration information. And the interface rendering component sends the adjusted configuration information to the process management service component.
And e, sending the adjusted configuration information. And the process management service component sends the adjusted configuration information to the android application.
And f, re-matching the layout mode by the android application.
And step g, redrawing the display content by the android application.
And h, the android application sends the redrawn display content to the interface rendering component.
And step i, rendering. And the interface rendering component renders the newly drawn display content on the virtual display layer to obtain a new android window.
And step l, the interface rendering component sends the new android window to the android window protocol agent.
And m, the android window protocol agent sends a new android window to the window manager.
The window display device provided by the present invention is described below, and the window display device described below and the window display method described above may be referred to in correspondence with each other.
Fig. 8 is a schematic structural diagram of a window display device according to an embodiment of the present invention. The window display device provided by the embodiment is applied to electronic equipment, and the electronic equipment comprises: the system comprises a first operating system and a second operating system which is deployed in the first operating system in a containerization mode, wherein the first operating system comprises a window manager, and the second operating system comprises a first application program APP and an interface rendering component; as shown in fig. 8, the interface rendering component provided in this embodiment includes:
an obtaining module 210, configured to configure a virtual display layer corresponding to a first APP according to first display output information of a display side, where the virtual display layer has first configuration information;
a processing module 220, configured to render the first display content of the first APP on the virtual display layer, so as to obtain a first window; the first display content is obtained by the first APP according to the first configuration information;
a sending module 230, configured to send the first window to a window manager; the window manager displays the first window.
Optionally, the processing module 220 is further specifically configured to determine a virtual display layer corresponding to the first APP;
the processing module 220 is further specifically configured to configure the virtual display layer corresponding to the first APP according to the first display output information on the display side.
Optionally, the processing module 220 is further specifically configured to determine, according to the target correspondence and the allocation rule of the virtual display layer, the virtual display layer corresponding to the first APP; the target correspondence includes: a correspondence of at least one APP to at least one virtual display layer.
Optionally, the processing module 220 is further specifically configured to create the virtual display layer and establish a corresponding relationship between the first APP and the virtual display layer if the virtual display layer corresponding to the first APP does not exist.
Optionally, the first APP acquires a layout mode matched with the first configuration information;
and the first APP generates first display content according to the layout mode matched with the first configuration information.
Optionally, the obtaining module 210 is further configured to obtain, when the display side is changed, second display output information after the screen is changed;
the processing module 220 is further configured to adjust first configuration information of a virtual display layer corresponding to the first APP according to the second display output information to obtain second configuration information;
the processing module 220 is further configured to render the second display content adjusted by the first APP on the virtual display layer, so as to obtain a second window; the second display content is obtained by adjusting the first display content by the first APP according to the second configuration information;
the sending module 230 is further configured to send the second window to a window manager; the window manager displays the second window.
Optionally, the first APP acquires a layout mode matched with the second configuration information;
and the first APP adjusts the first display content according to the layout mode matched with the second configuration information to obtain the second display content.
Optionally, the first display output information comprises at least one of: resolution and physical size information; the second display output information comprises at least one of: resolution and physical size information.
Optionally, the window manager displays the first window, including: the window manager converts the coordinates of the first window according to the proportional parameters of the display side, and obtains and displays the converted first window;
the window manager displays the second window, including: and the window manager converts the coordinates of the second window according to the changed proportional parameters of the display side, acquires and displays the converted second window.
The apparatus of the embodiment of the present invention is configured to perform the method of any of the foregoing method embodiments, and the implementation principle and the technical effect are similar, which are not described herein again.
An example is as follows:
fig. 9 illustrates a physical structure diagram of an electronic device, and as shown in fig. 9, the electronic device may include: a processor (processor)810, a communication Interface 820, a memory 830 and a communication bus 840, wherein the processor 810, the communication Interface 820 and the memory 830 communicate with each other via the communication bus 840. The processor 810 may call logic instructions in the memory 830 to perform a window display method comprising: the interface rendering component configures a virtual display layer corresponding to the first APP according to first display output information of a display side, wherein the virtual display layer has first configuration information; the interface rendering component renders first display content of the first APP on the virtual display layer to obtain a first window; the first display content is obtained by the first APP according to the first configuration information; the interface rendering component sends the first window to a window manager; the window manager displays the first window.
In addition, the logic instructions in the memory 830 may be implemented in software functional units and stored in a computer readable storage medium when the logic instructions are sold or used as independent products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions which, when executed by a computer, enable the computer to perform the window display method provided by the above methods, the method comprising: the interface rendering component configures a virtual display layer corresponding to the first APP according to first display output information of a display side, wherein the virtual display layer has first configuration information; the interface rendering component renders first display content of the first APP on the virtual display layer to obtain a first window; the first display content is obtained by the first APP according to the first configuration information; the interface rendering component sends the first window to a window manager; the window manager displays the first window.
In yet another aspect, the present invention also provides a non-transitory computer-readable storage medium having stored thereon a computer program which, when executed by a processor, is implemented to perform the window display method provided above, the method including: the interface rendering component configures a virtual display layer corresponding to the first APP according to first display output information of a display side, wherein the virtual display layer has first configuration information; the interface rendering component renders first display content of the first APP on the virtual display layer to obtain a first window; the first display content is obtained by the first APP according to the first configuration information; the interface rendering component sends the first window to a window manager; the window manager displays the first window.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (12)

1. A window display method is applied to an electronic device, and the electronic device comprises the following steps: the system comprises a first operating system and a second operating system which is deployed in the first operating system in a containerization mode, wherein the first operating system comprises a window manager, and the second operating system comprises a first application program APP and an interface rendering component; the method comprises the following steps:
the interface rendering component configures a virtual display layer corresponding to the first APP according to first display output information of a display side, wherein the virtual display layer has first configuration information;
the interface rendering component renders first display content of the first APP on the virtual display layer to obtain a first window; the first display content is obtained by the first APP according to the first configuration information;
the interface rendering component sends the first window to a window manager;
the window manager displays the first window.
2. The method of claim 1, wherein the configuring, by the interface rendering component, the virtual display layer corresponding to the first APP according to first display output information on a display side includes:
the interface rendering component determines a virtual display layer corresponding to the first APP;
and the interface rendering component configures the virtual display layer corresponding to the first APP according to the first display output information of the display side.
3. The method of claim 2, wherein the interface rendering component determines a virtual display layer corresponding to the first APP, comprising:
the interface rendering component determines a virtual display layer corresponding to the first APP according to the target corresponding relation and the distribution rule of the virtual display layer; the target correspondence includes: a correspondence of at least one APP to at least one virtual display layer.
4. The method of claim 3, wherein the interface rendering component determines a virtual display layer corresponding to the first APP, including:
and if the virtual display layer corresponding to the first APP does not exist, creating the virtual display layer, and establishing a corresponding relation between the first APP and the virtual display layer.
5. The method according to any one of claims 1-4, further comprising:
the first APP obtains a layout mode matched with the first configuration information;
and the first APP generates first display content according to the layout mode matched with the first configuration information.
6. The method according to any one of claims 1-4, further comprising:
under the condition that the display side is changed, the interface rendering component acquires second display output information after the screen is changed;
the interface rendering component adjusts first configuration information of a virtual display layer corresponding to the first APP according to the second display output information to obtain second configuration information;
the interface rendering component renders the second display content adjusted by the first APP on the virtual display layer to obtain a second window; the second display content is obtained by adjusting the first display content by the first APP according to the second configuration information;
the interface rendering component sends the second window to a window manager; the window manager displays the second window.
7. The method of claim 6, further comprising: the first APP obtains a layout mode matched with the second configuration information;
and the first APP adjusts the first display content according to the layout mode matched with the second configuration information to obtain the second display content.
8. The method of claim 6, wherein the first display output information comprises at least one of: resolution and physical size information;
the second display output information comprises at least one of: resolution and physical size information.
9. The method of claim 6, wherein the window manager displays the first window, comprising:
the window manager converts the coordinates of the first window according to the proportional parameters of the display side, and obtains and displays the converted first window;
the window manager displays the second window, including:
and the window manager converts the coordinates of the second window according to the changed proportional parameters of the display side, acquires and displays the converted second window.
10. A window display device is applied to an electronic device, and the electronic device comprises: the system comprises a first operating system and a second operating system which is deployed in the first operating system in a containerization mode, wherein the first operating system comprises a window manager, and the second operating system comprises a first application program APP and an interface rendering component; the interface rendering component includes:
the obtaining module is used for configuring a virtual display layer corresponding to the first APP according to first display output information of a display side, and the virtual display layer has first configuration information;
the processing module is used for rendering first display content of the first APP on the virtual display layer to obtain a first window; the first display content is obtained by the first APP according to the first configuration information;
the sending module is used for sending the first window to a window manager; the window manager displays the first window.
11. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the steps of the window display method according to any one of claims 1 to 9 are implemented when the processor executes the program.
12. A non-transitory computer readable storage medium having stored thereon a computer program, wherein the computer program when executed by a processor implements the steps of the window display method according to any one of claims 1 to 9.
CN202111229622.8A 2021-10-21 2021-10-21 Window display method, device, equipment and storage medium Pending CN114168240A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111229622.8A CN114168240A (en) 2021-10-21 2021-10-21 Window display method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111229622.8A CN114168240A (en) 2021-10-21 2021-10-21 Window display method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114168240A true CN114168240A (en) 2022-03-11

Family

ID=80477280

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111229622.8A Pending CN114168240A (en) 2021-10-21 2021-10-21 Window display method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114168240A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023065740A1 (en) * 2021-10-21 2023-04-27 北京字节跳动网络技术有限公司 Window display method and apparatus, device, and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110546648A (en) * 2017-06-09 2019-12-06 三星电子株式会社 System and method for stereoscopic content detection
CN113157362A (en) * 2021-04-27 2021-07-23 麒麟软件有限公司 Android multi-window display method applied to Linux

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110546648A (en) * 2017-06-09 2019-12-06 三星电子株式会社 System and method for stereoscopic content detection
CN113157362A (en) * 2021-04-27 2021-07-23 麒麟软件有限公司 Android multi-window display method applied to Linux

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023065740A1 (en) * 2021-10-21 2023-04-27 北京字节跳动网络技术有限公司 Window display method and apparatus, device, and storage medium

Similar Documents

Publication Publication Date Title
EP4095671A1 (en) Screencasting method, and terminal apparatus
CN112269604B (en) Window interaction method and device for compatibly running Android application on Linux
CN110795195B (en) Webpage rendering method and device, electronic equipment and storage medium
CN102918490B (en) Interacting with remote applications displayed within a virtual desktop of a tablet computing device
CN106791936B (en) Virtual gift display method and device
US9899002B2 (en) Information processing methods for displaying parts of an object on multiple electronic devices
WO2020192451A1 (en) Real-time picture projection method and apparatus of ar glasses screen, controller and medium
CN110989878A (en) Animation display method and device in applet, electronic equipment and storage medium
KR20210147868A (en) Video processing method and device
CN104035683A (en) Split-screen multitask interaction method for communication terminal
CN111190672A (en) UI (user interface) adaptation method of electronic equipment, electronic equipment and storage medium
CN111796826B (en) Bullet screen drawing method, device, equipment and storage medium
CN110178111B (en) Image processing method and device for terminal
CN106155768B (en) Method and device for running application in split screen mode
CN114168240A (en) Window display method, device, equipment and storage medium
CN112116681B (en) Image generation method, device, computer equipment and storage medium
CN113467666B (en) Method and device for adjusting application window
JP2017111719A (en) Video processing device, video processing method and video processing program
CN112379963B (en) Remote application window control method and device and computer equipment
US20180307455A1 (en) Automatic real-time configuration of a multi-head display system
EP3454258B1 (en) Graphic identification code generation method and apparatus
CN113918056B (en) Method and device for adjusting application window
KR102583879B1 (en) Apparatus for editing printing region and method thereof
US11403831B1 (en) Efficient color theming of background images in web-based mixed reality environments
CN116483359B (en) New mimicry drawing method and device, electronic equipment and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20220406

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant after: BEIJING BYTEDANCE NETWORK TECHNOLOGY Co.,Ltd.

Address before: 2005, floor 2, No. 39, West Street, Haidian District, Beijing 100082

Applicant before: Beijing jingling Information System Technology Co.,Ltd.

TA01 Transfer of patent application right