Graph display method and electronic equipment
By introducing Vsync sources that support multiple Vsync signal generation cycles in terminal devices and adjusting the frame rate gear, the graphic display compatibility of Linux and Android systems is achieved, improving the consistency and synchronization accuracy of the user experience.
Patent Information
- Application Number
- CN202410180529.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-18
- Publication Date
- 2025-08-19
AI Technical Summary
In dual-system scenarios, there are differences in the graphics display mechanisms of Linux and Android systems, resulting in differences in the windows seen from the user's perspective because they come from different systems, affecting the user experience.
By introducing a Vsync source into the terminal device, multiple Vsync signal generation cycles are supported, allowing the second operating system to adjust the frame rate gear according to the current scene, and display the graphics through the window of the first operating system, so as to achieve flexible adjustment of the frame rate and compatibility of the graphics display.
It solves the problem of graphic display compatibility of dual systems, ensures the consistency of windows seen by the user's perspective, and improves the accuracy and flexibility of clock synchronization between graphic drawing and display.
Smart Images

Figure CN120508338A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of electronic technology, and in particular to a graphic display method and electronic equipment. Background Art
[0002] Dual-OS scenarios present numerous compatibility issues. For example, in a dual-OS setup involving Linux and Android, differences in the graphics display mechanisms between Linux and Android can lead to differences in the windows viewed by the user, impacting the user experience. Therefore, dual-OS graphics display compatibility is a pressing issue that needs to be addressed. Summary of the Invention
[0003] The embodiments of the present application provide a graphics display method and an electronic device to solve the compatibility problem of dual-system graphics display.
[0004] In a first aspect, a graphics display method is provided, which can be applied to a terminal device including a first operating system and a second operating system. The first operating system runs in a hardware environment, and the second operating system runs in a container or a virtual machine. The second operating system can determine a first frame rate gear according to the current scene, where the first frame rate gear is one of N frame rate gears, and the N frame rate gears correspond to one of N refresh frame rates supported by the display screen of the terminal device, where N is a positive integer; the second operating system can draw graphics according to a first period, where the first period is a graphics drawing period corresponding to the first frame rate gear; and the second operating system can display the graphics through a window of the first operating system.
[0005] In an embodiment of the present application, in a terminal device with dual operating systems, guest system graphics can be displayed through the host system's window. This eliminates the differences in the windows seen by the user due to the different operating systems, thus resolving the compatibility issue of dual-system graphics displays. Furthermore, the guest system's corresponding display screen refresh frame rate is no longer a single frame rate; it can be adjusted based on the current scene, providing greater flexibility in graphics display by adapting the frame rate to the current scene.
[0006] In one possible design, the terminal device includes a Vsync source, which is used to generate a Vsync signal, and the Vsync signal is used to indicate graphics drawing. The Vsync source supports N Vsync signal generation cycles, and the N Vsync signal generation cycles are respectively equal to the N graphics drawing cycles corresponding to the N frame rate gears. The second operating system draws graphics according to the first cycle, including: the second operating system adjusts the Vsync signal generation cycle of the Vsync source to the first cycle; the second operating system monitors the Vsync signal from the Vsync source, and draws a frame of graphics each time a Vsync signal is monitored.
[0007] In an embodiment of the present application, the frame rate of the guest system is adjustable. In order to make the frame rate of the guest system adjustable, the Vsync source in the terminal device no longer supports only a single Vsync signal generation cycle, but supports N Vsync signal generation cycles (corresponding to N frame rate gears). Moreover, the Vsync signal generation cycle of the Vsync source is adjustable, so the frame rate of the guest system is adjustable. For example, if the guest system wants to use the first frame rate gear, the Vsync signal generation cycle of the Vsync source is adjusted to the first cycle, and then graphics are drawn with the first cycle so that the refresh frame rate of the display screen is the first frame rate gear. In this way, flexible adjustment of the frame rate of the guest system is achieved.
[0008] In one possible design, the Vsync source includes a Vsync hardware source or a Vsync software source, where the Vsync hardware source includes a hardware module for generating a Vsync signal, and the Vsync software source includes a software module for generating a Vsync signal.
[0009] In an embodiment of the present application, in order to enable the frame rate of the guest system to be flexibly adjusted, the Vsync source in the terminal device supports N Vsync signal generation cycles (corresponding to N frame rate gears) and the Vsync signal generation cycle of the Vsync source is adjustable. In addition, it should be noted that since the guest system runs in a container or a virtual machine, it cannot interact with the Vsync hardware source running in the hardware environment, so the Vsync source currently used by the guest system is only a Vsync software source, and there is no Vsync hardware source. In an embodiment of the present application, the Vsync source used by the guest system is not limited to the Vsync software source, but can also be a Vsync hardware source. Whether to use a Vsync hardware source or a Vsync software source can be selected according to actual conditions, and is not limited in the embodiment of the present application. For example, the Vsync software source has lower hardware requirements, and the Vsync hardware source can improve the accuracy of clock synchronization between graphics drawing and graphics display. If hardware conditions permit, the Vsync hardware source can be used, otherwise, the Vsync software source can be used.
[0010] In one possible design, the Vsync source includes a Vsync hardware source, which is located in the hardware environment. The second operating system adjusts the Vsync signal generation period of the Vsync source to the first period, including: the second operating system adjusts the Vsync signal generation period of the Vsync source to the first period through the first operating system; the second operating system monitors the Vsync signal from the Vsync source, including: the second operating system monitors the Vsync signal from the Vsync source through the first operating system.
[0011] In an embodiment of the present application, when the Vsync source is a Vsync hardware source, the guest system can adjust the Vsync signal generation period of the Vsync hardware source through the host system, and monitor the Vsync signal from the Vsync hardware source through the host system. In this way, the communication barrier between the guest system and the Vsync hardware source is removed, so that the Vsync source used by the guest system is not limited to the Vsync software source, but can also be a Vsync hardware source, thereby improving the accuracy of clock synchronization for graphics drawing and graphics display.
[0012] In one possible design, the second operating system adjusts the Vsync signal generation period of the Vsync source to the first period through the first operating system, including: the second operating system sends a first request to the first operating system, and the first request is used to request the first operating system to switch the Vsync signal generation period of the Vsync hardware source to the first period.
[0013] In an embodiment of the present application, when the Vsync source is a Vsync hardware source, the guest system can send a request to the host system to request that the host system adjust the Vsync signal generation period of the Vsync hardware source, thereby adjusting the frame rate. In this way, the communication barrier between the guest system and the Vsync hardware source is removed, and the accuracy of clock synchronization for graphics rendering and display is improved.
[0014] In one possible design, the Vsync hardware source includes N listening channels, and the Vsync hardware source generates a different period of Vsync signals in each of the N listening channels, and the N listening channels correspond to the N Vsync signal generation periods, respectively. The second operating system adjusts the Vsync signal generation period of the Vsync source to a first period through the first operating system, including: the second operating system adjusts the current listening channel of the Vsync hardware source to the first listening channel among the N listening channels through the first operating system, and the Vsync signal generation period in the first listening channel is the first period; the second operating system monitors the Vsync signal from the Vsync source through the first operating system, including: the second operating system monitors the Vsync signal from the Vsync hardware source through the first listening channel, and the first listening channel is provided by the first operating system.
[0015] In an embodiment of the present application, to enable flexible adjustment of the guest system's frame rate, the Vsync hardware source supports N monitoring channels (corresponding to N frame rate levels). The guest system can adjust the Vsync hardware source's monitoring channels through the host system to adjust the Vsync signal generation period, thereby achieving frame rate adjustment.
[0016] In one possible design, before the second operating system monitors the Vsync signal from the Vsync hardware source through the first monitoring channel, the further design also includes: the second operating system sends a Vsync hardware source request to the first operating system, where the Vsync hardware source request is used to request to monitor the Vsync signal from the Vsync hardware source; and the second operating system receives N monitoring channels of the Vsync hardware source returned by the first operating system.
[0017] In an embodiment of the present application, to enable flexible adjustment of the guest system's frame rate, the Vsync hardware source supports N monitoring channels (corresponding to N frame rate levels). The guest system can obtain the N monitoring channels of the Vsync hardware source from the host system and then adjust the monitoring channels according to the current scenario to achieve frame rate adjustment.
[0018] In one possible design, the N listening channels correspond to N interfaces.
[0019] In the embodiments of the present application, the guest system monitors the Vsync signal from the Vsync hardware source through different interfaces at different periods, resulting in different graphics drawing periods and different display refresh frame rates, thereby achieving frame rate adjustment. Furthermore, monitoring the Vsync signal from the Vsync hardware source enables precise synchronization between graphics drawing and graphics display.
[0020] In one possible design, the second operating system determines the first frame rate gear according to the current scenario, including: the second operating system determines the first frame rate gear according to the current device load and / or the currently running application.
[0021] In the embodiments of the present application, the guest system's frame rate can be adjusted based on the current scenario. For example, when the current device load is high, a lower frame rate is used to avoid excessive load and rapid power loss; when the current device load is low, a higher frame rate is used to ensure the user's visual experience.
[0022] In one possible design, the second operating system determines the first frame rate gear based on the currently running application, including: when the display screen includes only one application window, determining the first frame rate gear based on the application type of the application; or when the display screen includes multiple application windows, determining one application among the multiple applications, and determining the first frame rate gear based on the application type of the determined application.
[0023] In the embodiment of the present application, the frame rate of the guest system can be adjusted according to the currently running application. For example, if the currently running application is a game application, a higher frame rate can be used to ensure the user's gaming experience; if the currently running application is an e-reading application, a lower frame rate can be used to avoid wasted power.
[0024] In one possible design, determining one application among the multiple applications includes: determining one application among the multiple applications based on a priority relationship among the multiple applications; or determining one application among the multiple applications, the determined application being the application corresponding to the focus window.
[0025] In the embodiment of the present application, the frame rate of the guest system can be adjusted according to the currently running application. If there are multiple currently running applications, one application is determined from the multiple applications, and then the frame rate is determined based on the application, which is highly flexible.
[0026] In one possible design, the second operating system displays the graphics through a window of the first operating system, including: the second operating system provides the graphics to the first operating system; the first operating system displays the graphics in a first window, the first window is an associated window of the second window, and the second window is a window in the second operating system used to carry the graphics.
[0027] In an embodiment of the present application, the guest system and the host system can be window-associated. The guest system's graphics can be displayed through the associated window in the host system, ensuring that the windows viewed by the user do not differ due to being from different systems, thus resolving the compatibility issue of dual-system graphics displays.
[0028] In one possible design, the terminal device includes a first cache queue and a second cache queue, the first cache queue corresponds to the first operating system, the second cache queue corresponds to the second operating system, and the second operating system provides the graphics to the first operating system, including: the second operating system draws the graphics in the first cache in the second cache queue; the second operating system moves the first cache out of the second cache queue and into the first cache queue; the first operating system obtains the graphics from the first cache queue and fills the graphics into the window.
[0029] In this embodiment of the present application, the guest system and the host system each have a corresponding buffer queue, and these two buffer queues can interact with each other. For example, after the guest system draws a graphic in Buffer 1 in its own buffer queue, Buffer 1 can be moved out of the guest system's buffer queue and into the host system's buffer queue, allowing the host system to consume the graphic in Buffer 1. In this way, the guest system's graphics are displayed in the host system's window, resolving the compatibility issue of dual-system graphics display.
[0030] In one possible design, after the first operating system obtains the graphics from the first cache queue and fills the graphics into the window, the method further includes: the first operating system moves the first cache out of the first cache queue and into the second cache queue.
[0031] In this embodiment of the present application, after the host system consumes the graphics in cache 1, cache 1 can be returned to the cache queue of the guest system, completing a cross-system graphics display. In this way, the differences in the graphics display mechanisms between the two systems are bridged and the compatibility issue of the graphics display between the two systems is resolved.
[0032] In a second aspect, an electronic device is further provided, including:
[0033] a processor, a memory, and one or more programs;
[0034] The one or more programs are stored in the memory, and the one or more programs include instructions. When the instructions are executed by the processor, the electronic device executes the method provided in the first aspect above.
[0035] In a third aspect, a computer-readable storage medium is further provided, wherein the computer-readable storage medium is used to store a computer program. When the computer program is run on a computer, the computer is caused to execute the method provided in the first aspect above.
[0036] In a fourth aspect, a computer program product is also provided, comprising a computer program, which, when run on a computer, enables the computer to execute the method provided in the first aspect above.
[0037] In the fifth aspect, a chip is also provided, which is coupled to a memory in an electronic device and is used to call a computer program stored in the memory and execute the technical solution provided in the first aspect of the embodiment of the present application. In the embodiment of the present application, "coupling" refers to the direct or indirect combination of two components with each other.
[0038] For the technical effects that can be achieved in the above-mentioned second to fifth aspects, please refer to the description of the technical effects that can be achieved by the corresponding design scheme in the above-mentioned first aspect, and this application will not repeat them here. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 A schematic diagram of the structure of an electronic device provided in one embodiment of the present application;
[0040] Figure 2 A schematic diagram of a dual system provided in one embodiment of the present application;
[0041] Figure 3 A schematic diagram of a flow chart of a graphic display method provided in one embodiment of the present application;
[0042] Figure 4A and Figure 4B A schematic diagram of window association provided in an embodiment of the present application;
[0043] Figures 5A to 5C A schematic diagram of buffer management in a dual-system scenario provided in one embodiment of the present application;
[0044] Figure 6 Another flowchart of a graphic display method according to an embodiment of the present application is provided;
[0045] Figure 7Another schematic diagram of a dual system provided in one embodiment of the present application;
[0046] Figure 8 A schematic diagram of another flow chart of a graphic display method provided in an embodiment of the present application;
[0047] Figure 9 Another structural diagram of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0048] Below, some terms used in the embodiments of the present application are explained to facilitate understanding by those skilled in the art.
[0049] The at least one involved in the embodiment of the present application includes one or more; wherein, more means greater than or equal to two. In addition, it should be understood that, in the description of this specification, words such as "first" and "second" are only used for the purpose of distinguishing the description, and cannot be understood as expressing or implying relative importance, nor can they be understood as expressing or implying order. For example, the first operating system and the second operating system do not represent the importance of the two or the order of the two, but are only for distinguishing the description. In the embodiment of the present application, "and / or" is only a description of the association relationship, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the previous and next associated objects are in an "or" relationship.
[0050] The directional terms mentioned in the embodiments of the present application, such as "up", "down", "left", "right", "inside", "outside", etc., are only references to the directions in the drawings. Therefore, the directional terms used are for better and clearer explanation and understanding of the embodiments of the present application, rather than indicating or implying that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the embodiments of the present application.
[0051] References to "one embodiment," "in some examples," or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the specification. Thus, phrases such as "in some examples," "in one embodiment," "in some other embodiments," and "in other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0052] The graphic display method provided in the embodiment of the present application is applicable to a dual operating system (hereinafter referred to as: dual system) scenario. The dual system scenario includes two operating systems, for example, a first operating system and a second operating system. The dual system scenario can be applicable to terminal devices. Exemplarily, the terminal device can be a mobile phone, a personal computer (PC), etc. Optionally, the PC can include a tablet computer, a laptop computer, a desktop computer, etc. Alternatively, the terminal device can also be a wearable device such as a watch or a bracelet. Alternatively, the terminal device can also be a smart home device such as a television or a refrigerator. Alternatively, the terminal device can also be a means of transportation, such as various types of vehicles. Alternatively, the terminal device can also be an in-vehicle device, such as a car computer, a smart cockpit, or various systems in the smart cockpit, such as an in-vehicle infotainment system IVI (In-Vehicle Infotainment) or other in-vehicle devices, such as a vehicle domain controller (VDC), a cockpit domain controller (CDC), an intelligent driving domain controller (ADAS / AD Domain Controller, ADC), a mobile data center (MDC), etc. Exemplarily, the vehicle-mounted device can be integrated with the vehicle (for example, it can be set inside the vehicle); or, it can be separated from the vehicle (for example, the vehicle-mounted device can be implemented in the form of a terminal device, etc.). In addition, it should be understood that, according to the needs of actual use, the vehicle can also be replaced with other vehicles or transportation tools such as trains, aircraft, mobile platforms, etc., and this application does not limit this. Alternatively, the terminal device can also be a virtual reality (VR) device, an augmented reality (AR) device, a mixed reality (MR) device, etc. In short, the embodiments of this application do not limit the specific type of terminal device, and it can be any device with dual systems.
[0053] In some examples, the first operating system may be Android. Harmony Any operating system.
[0054] In some examples, the second operating system may include Any operating system.
[0055] It is understandable that different types of devices have different corresponding operating systems. For example, when the terminal device is a mobile phone, the first operating system may be Hongmeng Any of; the second operating system can be Hongmeng For another example, when the terminal device is a PC, the first operating system can be Any of; the second operating system can be Any of .
[0056] In an embodiment of the present application, the first operating system and the second operating system may be the same or different. In other words, the dual-system scenario may include two types: isomorphic and heterogeneous. Isomorphic can be understood as the two operating systems in the dual-system scenario being the same, for example, the first operating system and the second operating system are both Android systems. Heterogeneous can be understood as the two operating systems in the dual-system scenario being different, for example, the first operating system is an Android system and the second operating system is a Linux system. The graphic display method provided in an embodiment of the present application may be applicable to isomorphic or heterogeneous types. This article mainly uses heterogeneous types as an example for illustration. The specific graphic display method will be described later.
[0057] Figure 1 The electronic device is a schematic diagram showing the structure of the electronic device. The electronic device is a terminal device with dual systems. For the dual systems and terminal devices, please refer to the above description and will not be repeated. Figure 1 As shown, the electronic device may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0058] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors. The controller may serve as the nerve center and command center of the electronic device. The controller may generate operation control signals based on instruction opcodes and timing signals to control instruction fetching and execution. The processor 110 may also include memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a high-speed cache memory. This memory may store instructions or data that have just been used or are being recycled by the processor 110. If the processor 110 needs to use the instruction or data again, it can directly retrieve it from the memory. This avoids duplicate accesses, reduces the processor 110's waiting time, and thus improves system efficiency.
[0059] In some embodiments, the processor 110 may execute the graphics display method provided in the embodiments of the present application.
[0060] In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface.
[0061] The I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple I2C bus lines. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, and the like via different I2C bus interfaces. For example, the processor 110 may be coupled to the touch sensor 180K via the I2C interface, enabling communication between the processor 110 and the touch sensor 180K via the I2C bus interface, thereby implementing the touch function of the electronic device 100.
[0062] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the I2S interface, enabling the function of answering calls through a Bluetooth headset.
[0063] The PCM interface can also be used for audio communication, sampling, quantizing, and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface, enabling the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
[0064] The UART interface is a universal serial data bus used for asynchronous communication. This bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is typically used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 via the UART interface to implement Bluetooth functionality. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the UART interface, enabling the function of playing music through Bluetooth headphones.
[0065] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display 194 and the camera 193. MIPI interfaces include the camera serial interface (CSI) and the display serial interface (DSI). In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the camera function of the electronic device 100. The processor 110 and the display 194 communicate via the DSI interface to implement the display function of the electronic device 100.
[0066] The GPIO interface can be configured via software. The GPIO interface can be configured as either a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 to the camera 193, display 194, wireless communication module 160, audio module 170, sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
[0067] The USB interface 130 is an interface that complies with USB standards and may be a Mini USB interface, a Micro USB interface, a USB Type-C interface, or the like. The USB interface 130 can be used to connect a charger to charge the electronic device 100, or to transfer data between the electronic device 100 and peripheral devices. It can also be used to connect headphones to play audio. This interface can also be used to connect other electronic devices, such as augmented reality devices.
[0068] It is understood that the interface connection relationship between the modules illustrated in the embodiment of the present invention is merely an illustrative illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods from the above embodiments, or a combination of multiple interface connection methods.
[0069] The wireless communication function of the electronic device can be implemented using antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, a modem processor, and a baseband processor. Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antenna can be used in conjunction with a tuning switch.
[0070] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to electronic devices. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
[0071] The wireless communication module 160 can provide wireless communication solutions for electronic devices, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc. The wireless communication module 160 can be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0072] In some embodiments, antenna 1 of the electronic device is coupled to mobile communication module 150 , and antenna 2 is coupled to wireless communication module 160 , so that the electronic device can communicate with the network and other devices through wireless communication technology.
[0073] The display screen 194 is used to display the display interface of the application, etc. The display screen 194 includes a display panel. In some embodiments, the electronic device may include 1 or N display screens 194, where N is a positive integer greater than 1.
[0074] The electronic device 100 can realize the shooting function through the ISP, the camera 193, the video codec, the GPU, the display screen 194 and the application processor, etc. Among them, the ISP is used to process the data fed back by the camera 193.
[0075] The internal memory 121 can be used to store computer executable program code, which includes instructions. The processor 110 executes various functional applications and data processing of the electronic device by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system, and the software code of at least one application, etc. The data storage area can store data (such as images, videos, etc.) generated during the use of the electronic device. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash memory, etc.
[0076] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device. The external memory card communicates with the processor 110 via the external memory interface 120 to implement data storage functions. For example, files such as pictures and videos can be stored on the external memory card.
[0077] The electronic device can implement audio functions such as music playback and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0078] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be provided in the processor 110, or some functional modules of the audio module 170 can be provided in the processor 110.
[0079] The speaker 170A, also called a "speaker," is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music or listen to external speaker scenarios such as hands-free calls through one or more speakers 170A.
[0080] The receiver 170B, also called "earpiece", can be one or more and is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or voice message, the voice can be heard by placing the receiver 170B close to the human ear.
[0081] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals.
[0082] The headphone jack 170D is used to connect a wired headphone.
[0083] The pressure sensor 180A is used to sense the pressure signal and convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be disposed on the display screen 194 .
[0084] The gyro sensor 180B can be used to determine the motion posture of the electronic device. In some embodiments, the gyro sensor 180B can be used to determine the angular velocity of the electronic device around three axes (i.e., the x, y, and z axes). The gyro sensor 180B can also be used for anti-shake photography.
[0085] The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device calculates the altitude using the air pressure value measured by the air pressure sensor 180C to assist in positioning and navigation.
[0086] The magnetic sensor 180D includes a Hall sensor, and the electronic device can use the magnetic sensor 180D to detect the opening and closing of the flip cover.
[0087] The acceleration sensor 180E can detect the magnitude of the electronic device's acceleration in various directions (generally three axes) and the magnitude and direction of gravity when the electronic device is stationary.
[0088] The distance sensor 180F is used to measure distance. The electronic device can measure distance using infrared or laser.
[0089] The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device emits infrared light through the light emitting diode. The electronic device uses the photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device. When insufficient reflected light is detected, the electronic device can determine that there is no object near the electronic device.
[0090] The ambient light sensor 180L is used to sense the brightness of the ambient light. The electronic device can adaptively adjust the brightness of the display screen 194 according to the sensed ambient light brightness.
[0091] The fingerprint sensor 180H is used to collect fingerprints.
[0092] The temperature sensor 180J is used to detect temperature.
[0093] The touch sensor 180K, also known as a "touch panel," can be mounted on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also known as a "touch screen." The touch sensor 180K is used to detect touch operations applied to or near it. The touch sensor can transmit the detected touch operations to the application processor to determine the type of touch event.
[0094] The bone conduction sensor 180M can obtain a vibration signal. In some embodiments, the bone conduction sensor 180M can obtain a vibration signal of a vibrating bone mass in a human vocal part.
[0095] The buttons 190 include a power button, a volume button, etc. The button 190 can be a mechanical button. It can also be a touch button. The electronic device can receive button input and generate key signal input related to the user settings and function control of the electronic device. The motor 191 can generate a vibration prompt. The motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. The indicator 192 can be an indicator light, which can be used to indicate the charging status, power changes, messages, missed calls, notifications, etc. The SIM card interface 195 is used to connect the SIM card. The SIM card can be connected to and separated from the electronic device by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195.
[0096] It is understandable that Figure 1 The components shown do not constitute a specific limitation on the electronic device. The electronic device in the embodiment of the present invention may include Figure 1 More or fewer components. In addition, Figure 1 The combination / connection relationship between the components can also be adjusted and modified.
[0097] The following describes the technical solutions provided by the embodiments of the present application in conjunction with the accompanying drawings.
[0098] With the advancement of terminal technology, a variety of operating systems have emerged, and there are more and more applications based on different operating systems. For example, applications based on the Android operating system can be called Android applications. Android applications need to run in the Android runtime environment. Alternatively, applications based on the Harmony operating system can be called Harmony applications. Harmony applications need to run in the Harmony runtime environment. In real life, it is inevitable to encounter a situation where the user's terminal device is operating system A, but the user wants to use an application of operating system B on the terminal device. For example, the terminal device is a Linux system, and the user wants to run an Android application on the terminal device. In this case, the Android application cannot be run directly because the terminal device cannot provide the Android runtime environment.
[0099] To solve the above problem, in an embodiment of the present application, the terminal device may have a dual operating system. Continuing with the above example, the terminal device may include a dual system, such as a Linux system and an Android system, so that the terminal device can provide an Android operating environment and can run Android applications in the Android operating environment.
[0100] Take the dual operating system of the terminal device including the first operating system and the second operating system as an example. The first operating system can be The second operating system may include The embodiment of the present application does not limit the specific types of the first operating system and the second operating system. Optionally, the first operating system and the second operating system can be the same or different. This article mainly uses the example of the first operating system and the second operating system being different as an example for description.
[0101] In some examples, one of the first operating system and the second operating system may be a host system, and the other operating system may be a guest system. The host system can be understood as a system running on hardware. Optionally, the host system can also be referred to as a native operating system, which can be the operating system configured when the terminal device leaves the factory. The guest system can be understood as a system running in a virtual machine or container. The embodiments of this application do not elaborate on the technology of virtual machines and containers. Optionally, the guest system can also be referred to as a compatible operating system, which can be an operating system installed by the user in the terminal device according to his or her needs. For example, the native operating system of the user's terminal device is operating system A, and the user wants to use an application of operating system B in this terminal device. The user can install operating system B in this terminal device, then operating system A is the host system, and operating system B is the guest system.
[0102] For ease of understanding, the following description uses the example of the first operating system being the host system and the second operating system being the guest system. Figure 2 , is a schematic diagram of a dual system provided in an embodiment of the present application. Figure 2 In the figure, the right half is the first operating system and the left half is the second operating system. Figure 2 In the example, the first operating system is the host system, the second operating system is the guest system, and the first operating system is Linux, and the second operating system is Android. It should be noted that, Figure 2This is just an example, and there may be other variations. For example, the first operating system may be an operating system other than Linux, and the second operating system may be an operating system other than Android. Figure 2 As shown, the terminal device may include a base for compatibility with the host system and the guest system. For example, the terminal device can run the Android system through the base. Optionally, the base can be implemented using virtual machine technology or container technology, which is not limited in this embodiment of the application.
[0103] like Figure 2 , the Linux system may include one or more Linux applications (for example, application 3 and application 4), which run in the native operating system (i.e., the host system) and can be called native applications. The Android system may include one or more Android applications (for example, application 1 and application 2), which run in a compatible operating system (i.e., the Android system) and can be called compatible applications. It can be understood that the Linux system has its own graphics display mechanism, and native applications are displayed according to this graphics display mechanism. The Android system also has its own graphics display mechanism, and compatible applications are displayed according to this graphics display mechanism. Since there are differences in the graphics display mechanisms of the two systems, there will be differences in the windows of native applications and compatible applications. In an embodiment of the present application, in order to ensure that the windows seen from the user's perspective will not differ because they come from different systems, cross-system display of graphics in dual systems is proposed, which solves the compatibility problem of graphics display in dual systems.
[0104] For example, in an embodiment of the present application, the desktop of the terminal device may be provided by the host system. Figure 2 , the desktop of the terminal device is the desktop provided by the Linux system, referred to as the Linux desktop. In some examples, the Linux desktop may include application windows of native applications (ie, Linux applications). For example, Figure 2 , after the user starts application 3 in the Linux system, the Linux system creates Linux window 3 and displays the content of application 3 through Linux window 3. Similarly, after the user starts application 4 in the Linux system, the Linux system creates Linux window 4 and displays the content of application 4 through Linux window 4. In other examples, the Linux desktop can also provide display windows for various compatible applications (i.e., Android applications). For example, Figure 2In the embodiment of the present application, after the user starts application 1 in the Android system, the Android system can create Android window 1. In the Linux desktop, Linux window 1 is provided, and Android window 1 can be associated with Linux window 1. In this way, the display content in Android window 1 can be displayed through Linux window 1. Similarly, after the user starts application 2 in the Android system, the Android system creates Android window 2. Linux window 2 is provided in the Linux desktop, and Android window 2 can be associated with Linux window 2. In this way, the display content in Android window 2 can be displayed through Linux window 2. Therefore, for application windows in the Android system, they can be displayed through the associated window in the Linux system. In this way, whether it is a native application or a compatible application, it can be displayed through the Linux window, so the windows seen from the user's perspective will not be different because they come from different systems, thereby achieving the compatibility of the graphic display of the dual systems and improving the user experience.
[0105] The following text Figure 2 Taking application 1 in the guest system as an example, the cross-system graphic display process provided by the embodiment of the present application is explained.
[0106] For example, see Figure 3 , is a flow chart of a graphic display method provided in an embodiment of the present application. The method can be applied to a terminal device with a dual system. For example, the terminal device may include Figure 1 For another example, the dual system may include Figure 2 The first operating system and the second operating system shown. Figure 3 As shown, the process includes:
[0107] S301: The host system displays the desktop.
[0108] Optionally, the desktop displayed by the host system can be called a Linux desktop. Optionally, the Linux desktop can include icons for native applications (e.g., Linux applications) as well as icons for compatible applications (e.g., Android applications). Therefore, users can open native applications and / or compatible applications within this desktop. For more information on native and compatible applications, please refer to the previous description.
[0109] S302: The host system sends a startup instruction of application 1 to the guest system. Application 1 is an application in the guest system, such as an Android application.
[0110] It is understandable that before S302, the process may further include: the host system receives an input operation, where the input operation is used to start application 1. For example, the desktop displayed by the host system includes an icon of application 1, and the input operation may be an operation on the icon.
[0111] In this embodiment of the present application, after the guest system receives the startup instruction from application 1, it can execute the cross-system graphics display process. In this embodiment of the present application, the cross-system graphics display process can include three steps: Step 1: Window Association. Step 2: Graphics Drawing. Step 3: Graphics Display. For the implementation principles of Step 1, please refer to S303 to S305 below. For the implementation principles of Step 2, please refer to S306 to S307 below. For the implementation principles of Step 3, please refer to S308 to S309 below.
[0112] S303: The guest system creates window 1.
[0113] It is understandable that, when the guest system is an Android system, window 1 is an Android window.
[0114] S304: The guest system sends window information of window 1 to the host system.
[0115] In some examples, the window information of window 1 may include at least one of the following: (1) Attributes of window 1. The attributes may include the size and / or shape of window 1. The size may include the width and / or height of window 1. (2) A window identifier of window 1, which is used to uniquely identify window 1. Therefore, in an embodiment of the present application, the guest system may configure a window identifier for each window. Exemplarily, the window identifier may be a window ID, such as a task ID. (3) A surface identifier of the surface corresponding to window 1. It should be noted that surface can be understood as the drawing board corresponding to window 1. After application 1 draws graphics on the drawing board, the graphics are displayed through window 1. Optionally, the surface identifier and the window identifier may be the same or different. (4) An application identifier of the application corresponding to window 1 (for example, application 1). The application identifier may include the package name of the application.
[0116] S305: The host system associates window 1 with window 2.
[0117] It is understood that before S305 , the host system may also include the step of creating window 2. Optionally, the properties of window 2 may be identical to those of window 1. For example, the size of window 2 may be identical to that of window 1, and / or the shape of window 2 may be identical to that of window 1. This ensures that window 2 and window 1 are identical in shape and size, ensuring that the windows viewed by the user do not differ due to being hosted on different systems, thereby improving the user experience.
[0118] Optionally, the host system may also set a window identifier for window 2 to uniquely identify window 2. Exemplarily, the window identifier may be a window ID, such as a Task ID. Optionally, the host system may also set a surface identifier for the surface corresponding to window 2. The optional surface identifier may be the same as or different from the window identifier. In combination with the foregoing, it can be seen that window 1 has a window identifier, and the surface corresponding to window 1 (for the sake of convenience, referred to as surface1) has a surface identifier. Window 2 also has a window identifier, and the surface corresponding to window 2 (for the sake of convenience, referred to as surface2) also has a surface identifier. Therefore, the association between window 1 and window 2 in S305 can be implemented in a variety of ways, including but not limited to way one and way two.
[0119] Method 1: Window ID 1 of window 1 is associated with window ID 2 of window 2. Optionally, the association of window ID 1 with window ID 2 may include: window ID 1 and window ID 2 are the same. For example, Figure 4A The host system receives window information of window 1 sent by the guest system, including window identifier 1. After creating window 2, the host system sets the window identifier of window 2 to the same window identifier as window 1, that is, to window identifier 1. Alternatively, associating window identifier 1 with window identifier 2 may also include: window identifier 1 and window identifier 2 are different, but a mapping relationship is established between window identifier 1 and window identifier 2, and window identifier 1 and window identifier 2 are associated through the mapping relationship.
[0120] Method 2: Surface ID 1 of surface 1 corresponding to window 1 is associated with surface ID 2 of surface 2 corresponding to window 2. Optionally, surface ID 1 and surface ID 2 are associated, which may include: surface ID 1 and surface ID 2 are the same. For example, see Figure 4BThe host system receives the window information of window 1 sent by the guest system, including surface identifier 1 of surface 1 corresponding to window 1. After the host system creates window 2, it sets the surface identifier of surface 2 corresponding to window 2 to the same surface identifier as surface 1, that is, to surface identifier 1. Alternatively, associating surface identifier 1 with surface identifier 2 may also include: surface identifier 1 and surface identifier 2 are different, but a mapping relationship between surface identifier 1 and surface identifier 2 is established, and surface identifier 1 is associated with surface identifier 2 through the mapping relationship.
[0121] It should be noted that the above two methods can be used alone or in combination. Of course, in addition to the above two methods, there can also be other implementation methods, which are not limited in the embodiments of this application.
[0122] In the embodiment of the present application, after window 1 is associated with window 2, when window 1 changes, window 2 changes accordingly. For example, when window 1 is reduced (or enlarged), window 2 is reduced (or enlarged) accordingly; or, when window 1 is minimized (or maximized), window 2 is minimized (or maximized) accordingly; or, when window 1 is destroyed, window 2 is destroyed accordingly, and so on.
[0123] S306: The guest system determines a first frame rate level among N frame rate levels according to the current scene, where N is a positive integer.
[0124] In an embodiment of the present application, the terminal device can provide N frame rate gears. The frame rate gear can be understood as the display refresh frame rate. In some examples, the higher the gear, the higher the display refresh frame rate, and the lower the gear, the lower the display refresh frame rate. Optionally, a frame rate gear can correspond to a frame rate value. Taking N=3 as an example, the three frame rate gears correspond to three frame rate values: 45Hz, 60Hz, and 90Hz.
[0125] Optionally, S306 includes but is not limited to the following methods:
[0126] Method 1: Determine the first frame rate level based on the current device load.
[0127] Optionally, the current device load can be described by at least one parameter among the current central processing unit (CPU) usage, graphics processing unit (GPU) usage, and memory occupancy. Taking the current CPU usage as an example, the current device load is positively correlated with the current CPU usage. For example, the greater the current device load, the greater the current CPU usage, and vice versa. Similarly, the current device load is positively correlated with the current GPU usage. The current device load is positively correlated with the current memory occupancy. Therefore, in method one, the guest system can determine the first frame rate gear based on at least one of the current CPU usage, GPU usage, and memory occupancy.
[0128] In some examples, the guest system can determine, based on the current CPU usage and the correspondence between the CPU usage and the frame rate gear, that the frame rate gear corresponding to the current CPU usage is the first frame rate gear. Exemplarily, the correspondence can include correspondences between multiple CPU usages and multiple frame rate gears. Optionally, the correspondence can be stored in advance in the terminal device. Optionally, the correspondence can be a system default setting or a user setting, which is not limited in the embodiments of the present application.
[0129] In other examples, the guest system can determine, based on the current GPU usage rate and the correspondence between the GPU usage rate and the frame rate gear, that the frame rate gear corresponding to the current GPU usage rate is the first frame rate gear. Exemplarily, the correspondence may include correspondences between multiple GPU usage rates and multiple frame rate gears. Optionally, the correspondence may be stored in advance in the terminal device. Optionally, the correspondence may be a system default setting or a user setting, which is not limited in the embodiments of the present application.
[0130] In some other examples, the guest system can determine, based on the current memory occupancy rate and the correspondence between the memory occupancy rate and the frame rate gear, that the frame rate gear corresponding to the current memory occupancy rate is the first frame rate gear. Exemplarily, the correspondence relationship may include a correspondence relationship between multiple memory occupancies and multiple frame rate gears. Optionally, the correspondence relationship may be stored in the terminal device in advance. Optionally, the correspondence relationship may be a system default setting or a user setting, which is not limited in the embodiments of the present application.
[0131] Method 2: Determine the first frame rate level based on the currently running application.
[0132] Optionally, the currently running application may include an application running in the foreground. For example, the currently running application may include application 1 started in S302 above.
[0133] In some examples, the guest system can determine the first frame rate gear according to the application type of the currently running application. Exemplarily, the terminal device stores a correspondence between the application type and the frame rate gear. Exemplarily, the correspondence between the application type and the frame rate gear can be as shown in Table 1 below:
[0134] Table 1
[0135] Application Type Frame rate gear Frame rate Video playback Gear 2 60Hz E-reading Gear 1 45Hz Games Gear 3 90Hz
[0136] Assuming that the guest application determines that the currently running application is a video player, for example, Huawei Video, the corresponding frame rate gear is determined to be gear 2, and the corresponding frame rate is 60Hz. Assuming that the guest system determines that the currently running application is a game, the corresponding frame rate gear is determined to be gear 3, and the corresponding frame rate is 90Hz. Optionally, the corresponding relationship (for example, Table 1) can be system default or user-set, and is not limited in this embodiment of the application.
[0137] Consider that the currently running application can be one or more. If it is one, the frame rate gear is determined according to the application. If it is more than one, an application can be determined from multiple applications, and then the frame rate gear is determined based on the determined application. Among them, determining an application from multiple applications may include: Method 1, randomly determining an application. Method 2, determining the application corresponding to the focus window. The focus window can be understood as the window where the user is currently executing the business, such as the window where the cursor is currently located. Method 3, determining the application based on the priority relationship between multiple applications. Optionally, the priority of the application can be determined based on the user's use of the application. For example, the more frequently the user uses the application, the higher the priority of the application. Of course, the priority of the application can also be determined in other ways. For example, the user can specify the priority relationship between different applications.
[0138] The above method 1 and method 2 are two methods for the guest system to determine the first frame rate gear. The guest system can use any one of the above two methods or a combination of the two. For example, the guest system can use one of the above two methods by default, or the user can specify that the guest system use one of the above two methods. For example, a switch button is provided in the terminal device, and the switch between the above two methods can be achieved through the switch button. The switch button can be located anywhere in the terminal device, such as in the settings application or control center of the terminal device.
[0139] In one example, the guest system may determine the frame rate gear once every period of time (determined by the above-mentioned method 1 or method 2), that is, periodically determine the frame rate gear. The period may be pre-configured, such as one day, three hours, or five hours. Alternatively, the guest system may determine the frame rate gear once each time an application is opened. Alternatively, the guest system may determine the frame rate gear once each time the computer is turned on. Optionally, after the computer is turned on, the frame rate gear may no longer be adjusted, or the frame rate gear may be adjusted periodically or each time an application is opened.
[0140] S307 , the guest system draws graphics according to the first cycle, where the first cycle is a graphics drawing cycle corresponding to the first frame rate level.
[0141] For example, if the first frame rate is 60Hz, the display refreshes every 16.66 milliseconds (the reciprocal of 60Hz), so the guest system draws a frame every 16.66 milliseconds (the first cycle). For example, if the first frame rate is 90Hz, the display refreshes every 11.11 milliseconds (the reciprocal of 90Hz), so the guest system draws a frame every 11.11 milliseconds (the first cycle).
[0142] To ensure synchronization between graphics drawing and display, in an embodiment of the present application, the terminal device includes a vertical synchronization (Vsync) source that periodically generates a Vsync signal. The guest system can monitor the Vsync signal from the Vsync source. The guest system draws a frame of graphics each time it monitors a Vsync signal. Therefore, if the Vsync source generates a Vsync signal at a period of 16.66 milliseconds, that is, the guest system monitors a Vsync signal every 16.66 milliseconds, then the guest system draws a frame of graphics every 16.66 milliseconds.
[0143] In an embodiment of the present application, the Vsync source can support N Vsync signal generation cycles, and these N Vsync signal generation cycles are the reciprocals of the N frame rate gears mentioned above. For example, the N frame rate gears include 45Hz, 60Hz, and 90Hz, and the corresponding reciprocals are 22.22 milliseconds, 16.66 milliseconds, and 11.11 milliseconds, respectively. Therefore, the Vsync source can support 3 Vsync signal generation cycles, which are 22.22 milliseconds, 16.66 milliseconds, and 11.11 milliseconds, respectively.
[0144] In an embodiment of the present application, the Vsync signal generation period of the Vsync source can be adjusted. For example, after the guest system determines the first frame rate gear, the Vsync signal generation period of the Vsync source can be adjusted to the first period (i.e., the inverse of the first frame rate gear). Taking the first frame rate gear being 60Hz as an example, the first period is 16.66 milliseconds (the inverse of 60Hz). After the Vsync signal generation period of the Vsync source is adjusted to 16.66 milliseconds, the Vsync source generates a Vsync signal every 16.66 milliseconds, that is, the guest system will monitor a Vsync signal every 16.66 milliseconds, then the guest system will draw a frame of graphics every 16.66 milliseconds, and ultimately achieve a frame rate of 60Hz for the display screen.
[0145] In some examples, the Vsync source can be of multiple types. For example, the Vsync source can include a Vsync hardware source or a Vsync software source. For ease of understanding, the Vsync hardware source and the Vsync software source are briefly described first.
[0146] The Vsync hardware source can be understood as a hardware module in a terminal device for generating a Vsync signal. For example, the hardware module may include an integrated circuit (IC), which may be connected to a display panel. Optionally, the integrated circuit may be located on a display panel or a display driver chip or other location, which is not limited in this embodiment of the present application. It is understandable that since the guest system runs in a container or a virtual machine and cannot communicate directly with the hardware, that is, the guest system cannot directly monitor the Vsync signal from the Vsync hardware source, and the host system runs on hardware, the host system can monitor the Vsync signal from the Vsync hardware source. Therefore, if the Vsync source is a Vsync hardware source, the guest system can monitor the Vsync signal from the Vsync hardware source through the host system.
[0147] A Vsync software source is understood to be a software module in a terminal device that generates a Vsync signal. For example, the Vsync software source can be a software emulation of the Vsync software source. A guest system can include a Vsync software source, so the guest system can monitor the Vsync signal through the Vsync software source within the system, without having to monitor the Vsync signal through the host system's Vsync hardware source.
[0148] It should be noted that since the Vsync software source needs to simulate the hardware, it consumes a lot of power. Therefore, if you consider the power consumption cost, you can use the Vsync hardware source. The part about the Vsync hardware source will be discussed later. Figure 6 is described in .
[0149] S308, the guest system provides graphics to the host system.
[0150] S309, the host system displays the graphics in window 2.
[0151] In the embodiment of the present application, the guest system can provide graphics to the host system through a buffer queue. Figure 5A 、 Figure 5B and Figure 5C , explaining the implementation process of S308 to S309.
[0152] See Figure 5A , is a schematic diagram of a buffer queue provided in an embodiment of the present application. Figure 5A , bufferqueue can include queue 1 and queue 2. Each queue includes one or more buffers. Queue 1 corresponds to the guest system, and queue 2 corresponds to the host system. Buffer queue can manage all buffers in queue 1 and queue 2. Optionally, the number of buffers in queue 1 and queue 2 can be the same or different. In this embodiment of the application, the guest system can apply for a buffer in queue 1, for example, Figure 5A After the guest system draws graphics in the buffer, it queues the buffer in queue 2, waiting for the host system to consume it. After the host system finishes consuming it, it can release the buffer, and then the buffer is queued back to queue 1.
[0153] See Figure 5B , is a flow chart of a graphic display method provided in an embodiment of the present application. The process can be applied to Figure 5A As shown in the buffer queue. Figure 5B , the process may include:
[0154] S501, the buffer queue determines the buffers in each queue that are in the free state. The buffers in the free state can be understood as buffers that can be used for graphics drawing. For example, see Figure 5A , buffer1 in queue 1 is in free state.
[0155] S502: The guest system sends a dequeue request to the buffer queue.
[0156] S503, the buffer queue sends a dequeue success indication message to the guest system, the indication message may include information about the buffer in the free state in queue 1. Optionally, the information may include the identifier, address, etc. of the buffer. For example, Figure 5A Buffer 1 in queue 1 is in the free state, so the indication sent by the buffer queue to the guest system can include information about buffer 1. In this way, the guest system can perform operations on buffer 1 based on this information, such as drawing graphics.
[0157] S504: After the guest system draws in buffer 1, the state of buffer 1 switches to the dequeue state. In other words, a buffer in the dequeue state means that the buffer is filled with graphics.
[0158] S505, the guest system sends a queue request to the buffer queue, which may carry the information of buffer1. It is worth noting that, as mentioned above, Figure 5A In the example, buffer1 is originally in queue 1. After the guest system dequeues it, buffer1 is dequeued for graphics drawing. After the drawing is completed, the guest system can enqueue buffer1 into queue 2, as shown in the following example: Figure 5A In other words, buffer1 was originally in queue 1. After drawing is completed, it is queued in queue 2 and waits for the host system to consume it.
[0159] S506: The guest system switches the state of buffer 1 to queue state, indicating that buffer 1 is waiting for consumption.
[0160] S507: The guest system sends an indication message to the host system, indicating that a buffer is waiting to be consumed in queue 2. Optionally, the indication message may include information about buffer 1, such as the buffer identifier and address of buffer 1, the window identifier of the corresponding window (i.e., window 1), and the surface identifier of the corresponding surface. Optionally, the indication message may be a graphic buffer request.
[0161] S508: The host system initiates an acquired request to the buffer queue.
[0162] S509: The buffer queue returns an indication message indicating that the acquisition was successful to the host system. Optionally, the indication message may include information about buffer 1, such as the buffer identifier and address of buffer 1, the window identifier of the corresponding window (i.e., window 1), and the surface identifier of the corresponding surface.
[0163] S510: The host system switches the state of buffer 1 to the acquired state, indicating that buffer 1 has been consumed.
[0164] At S511 , the host system associates buffer 1 with window 2. Therefore, the graphics in buffer 1 can be filled into window 2. For example, the host system can perform a convert and attach operation on buffer 1 so that the graphics in buffer 1 can be filled into window 2.
[0165] S512: The host system sends a release request to the buffer queue to release buffer 1. Optionally, the release request may carry information about buffer 1, such as the buffer ID and address of buffer 1, the window ID of the corresponding window (i.e., window 1), and the surface ID of the corresponding surface.
[0166] It should be noted that after receiving the release request, the buffer queue can return buffer1 to queue 1, such as Figure 5A .
[0167] S513, Buffer Queue switches the state of buffer 1 to free state.
[0168] From the above description, we can see that the buffer has four states, such as Figure 5C , the four states include: free state, dequeue state, queue state, acquired state. Among them, the buffers in free state, dequeue state, and queue state are controlled by the guest system, and the buffers in acquired state are controlled by the host system. Figure 5CAfter a buffer in the free state is dequeued by the guest system, its state changes to the dequeued state. The guest system queues the dequeued buffer, changing its state to the queued state, indicating that it is ready for consumption. The host system consumes graphics from the queued buffer, changing its state to the acquired state. After the graphics are consumed, the buffer returns to the free state, completing a cycle and enabling cross-system display of graphics from the guest system to the host system.
[0169] See Figure 6 , is another flow chart of the graphic display method provided by an embodiment of the present application. This flow can be understood as Figure 3 A refinement of the process shown. Figure 6 , the process may include:
[0170] S601: The host system displays the desktop.
[0171] S602: The host system sends a startup instruction of application 1 to the guest system.
[0172] S603: The guest system creates window 1.
[0173] S604: The guest system sends window information of window 1 to the host system.
[0174] S605: The host system associates window 1 with window 2.
[0175] Optionally, the implementation principle of S601 to S605 is the same as Figure 3 The implementation principles of S301 to S305 are the same and will not be repeated.
[0176] S606: The guest system sends a Vsync hardware source request to the host system. The Vsync hardware source request is used to request monitoring of a Vsync signal from a Vsync hardware source.
[0177] As mentioned above, since the guest system runs in a container or virtual machine, it cannot directly monitor the Vsync signal from the Vsync hardware source, so it needs to monitor the Vsync signal from the Vsync hardware source through the host system. Therefore, in an embodiment of the present application, the guest system can send a Vsync hardware source request to the host system to request to monitor the Vsync signal from the Vsync hardware source.
[0178] S607: The host system returns N monitoring channels of the Vsync hardware source to the guest system, where N monitoring channels correspond to N frame rate levels, and N is a positive integer.
[0179] In an embodiment of the present application, the Vsync hardware source may include N monitoring channels, each monitoring channel being used to monitor the Vsync signal from the Vsync hardware source in a periodic manner. In other words, each monitoring channel corresponds to a frame rate gear. For example, channel 1 corresponds to 45Hz, channel 2 corresponds to 60Hz, and channel 3 corresponds to 90Hz. Therefore, when the guest system uses channel 1 to monitor the Vsync signal, a Vsync signal is monitored every 22.22 milliseconds (the inverse of 45Hz). When the guest system uses channel 2 to monitor the Vsync signal, a Vsync signal is monitored every 16.66 milliseconds (the inverse of 60Hz). When the guest system uses channel 3 to monitor the Vsync signal, a Vsync signal is monitored every 11.11 milliseconds (the inverse of 90Hz).
[0180] In some examples, the monitoring channel can be implemented through an interface, and different monitoring channels can correspond to different interfaces. In other words, the host system can send interface information of N interfaces to the guest system. The interface information may include the identification, address, etc. of the interface, which is not limited in the embodiments of the present application. In short, the guest system can monitor the information transmitted in the interface (i.e., the Vsync signal) through the interface information. Optionally, the monitoring channel can also be implemented by other means, which is not limited in the embodiments of the present application.
[0181] Optionally, the embodiment of the present application does not limit the execution order between S606 and S607 and other steps. For example, S606 and S607 can be executed when the terminal device is turned on.
[0182] S608: The guest system determines a first frame rate level among N frame rate levels according to the current scene.
[0183] Optional, the implementation principle of S608 is the same as Figure 3 The implementation principle of S306 is the same and will not be repeated.
[0184] S609: The guest system sends a frame rate switching request to the host system, instructing the host system to switch the frame rate to the first frame rate gear.
[0185] In an embodiment of the present application, after the guest system determines the first frame rate gear, the host system can instruct the Vsync hardware source to adjust the current frame rate gear to the first frame rate gear. Therefore, the guest system can send a frame rate switching request to the host system to instruct the host system to switch the frame rate to the first frame rate gear.
[0186] S610: The host system switches the current monitoring channel of the Vsync hardware source to a first monitoring channel corresponding to the first frame rate gear.
[0187] As mentioned above, the Vsync hardware source can include N monitoring channels, each corresponding to N frame rate levels. The host system can adjust the current monitoring channel to the first monitoring channel corresponding to the first frame rate level. In this way, the guest system can monitor the Vsync signal from the Vsync hardware source through the first monitoring channel.
[0188] S611: The guest system monitors the Vsync signal through the first monitoring channel, and draws a frame of graphics each time a Vsync signal is detected.
[0189] As mentioned above, N monitoring channels correspond to N frame rate levels. After the guest system determines the first frame rate level, it monitors the Vsync signal through the monitoring channel corresponding to the first frame rate level. Assuming the first frame rate level is 60Hz, a Vsync signal is detected every 16.66 milliseconds through the monitoring channel corresponding to the first frame rate level.
[0190] S612: The guest system provides graphics to the host system.
[0191] S613, the host system displays the graphics in window 2.
[0192] Optionally, the implementation principle of S612 to S613 is the same as Figure 3 The implementation principles of S308 to S309 are the same and will not be repeated.
[0193] See Figure 7 , is another schematic diagram of a dual system provided in an embodiment of the present application. Figure 7 It can be understood as Figure 2 A refinement of the dual system shown.
[0194] Figure 7 The left half of the image is the guest system, taking the Android system as an example. The guest system can be a hierarchical structure. Optionally, the hierarchical structure can be to divide the software into several layers, each with a clear role and division of labor. The layers communicate with each other through software interfaces. For example, Figure 7When the guest system is an Android system, the layered structure may include an application layer (referred to as APP layer), an application framework layer (Framework FWK), etc. Of course, it may also include other layers, such as the Hardware Abstraction Layer (HAL), which are not listed one by one in the embodiments of this application. Figure 7 , the APP layer in the guest system can include one or more applications, Figure 7 In this example, application 1 and application 2 are used. Figure 7 The FWK layer includes a frame rate control module and a window management module. The frame rate control module is used to determine the frame rate gear. The window management module is used to realize the window association of the two systems. It should be noted that Figure 7 In the example, the frame rate control module and the window management module are located in the FWK layer. Optionally, the frame rate control module and the window management module can also be located in other layers, which is not limited in the embodiment of the present application. Figure 7 The guest system may further include a synthesis module (e.g., surface Flinger) for synthesizing an interface, which is a complete display screen presented to the user. The synthesis module may be located at any layer in the guest system, and the embodiment of the present application is not limited thereto. For example, the synthesis module may be located at the hardware abstraction layer (HAL) ( Figure 7 (not shown). Figure 7 The guest system may also include a hardware compositor (HWC) for obtaining N frame rate levels of the Vsync hardware source.
[0195] Figure 7 The right half of the host system is the Linux system. Optionally, the host system can also be a layered structure, which is not limited in the present embodiment. For example, the host system includes an application layer (abbreviated as APP layer) and other layers. Figure 7 , the APP layer in the host system can include one or more applications. Figure 7 In this example, application 3 and application 4 are used. Figure 7 , the APP layer in the Linux system can also include a shell application. The shell application is used to manage the associated windows in the Linux system and the windows in the guest system. Figure 7The host system may also include a graphics proxy module and a rendering service. The graphics proxy module is used to associate application windows in the guest system with application windows in the host system. The rendering service is used to communicate with the Vsync hardware source. It should be noted that the graphics proxy module and rendering service can be located at any layer in the host system and are not limited in this embodiment of the present application.
[0196] The following text Figure 7 Taking Application 1 in the example, the graphic display process of the dual system is described. Exemplarily, the process may include:
[0197] Step 1: After the guest system starts application 1, it creates window 1 of application 1 through the window management module. The window management module sends window information of window 1 to the graphics proxy module in the host system.
[0198] Step 2: The graphics proxy module in the host system requests the shell application to create window 2. The graphics proxy module associates window 2 with window 1. The process of associating window 2 with window 1 is described above.
[0199] Step 3: The frame rate control module in the guest system determines a first frame rate level among N frame rate levels according to the current scene.
[0200] Step 4: The synthesis module in the guest system monitors the Vsync signal according to the first period corresponding to the first frame rate gear.
[0201] The implementation of steps 3 and 4 will be described later. Figure 8 Instructions.
[0202] Step 5: The synthesis module in the guest system draws a frame of graphics each time it detects a Vsync signal.
[0203] In step 6, the guest system provides the graphics to the host system. For example, the guest system can provide the graphics to the host system through shared memory. Shared memory includes a cache queue. The detailed implementation process is described above.
[0204] Step 7: The host system displays the graphics in Window 2.
[0205] See Figure 8 , which is a refinement of steps 3 and 4 in the previous text. Figure 8 , the process includes:
[0206] S801, the hardware compositor (HWC) in the guest system sends a Vsync hardware source request to the graphics proxy module in the host system.
[0207] S802: The graphics proxy module in the host system sends a Vsync hardware source request to the rendering service.
[0208] S803: The rendering service in the host system returns N monitoring channels of the Vsync hardware source to the graphics proxy module, where the N monitoring channels correspond to N frame rate levels.
[0209] S804: The graphics proxy module in the host system returns N monitoring channels of the Vsync hardware source to the hardware synthesizer in the guest system.
[0210] S805: The hardware synthesizer in the guest system stores N monitoring channels.
[0211] S806: The frame rate control module in the guest system obtains N frame rate levels from the hardware synthesizer.
[0212] S807: The frame rate control module in the guest system determines a first frame rate level among N frame rate levels according to the current scene.
[0213] Optionally, the frame rate control module may include a data acquisition module and a frame rate determination module. The data acquisition module is used to collect data, such as data such as the current device load and / or the currently running application. Optionally, the data acquisition module may be an automatic protection switching (APS). The frame rate determination module is used to determine a first frame rate gear among N frame rate gears based on the data collected by the data acquisition module (the current device load and / or the currently running application). Optionally, the frame rate determination module may be an accelerated graphics port (AGP).
[0214] S808: The frame rate control module in the guest system sends a switching instruction of the first frame rate gear to the synthesis module.
[0215] S809: The synthesis module in the guest system sends a switching instruction for the first frame rate gear to the hardware synthesizer.
[0216] S810: The hardware synthesizer in the guest system sends a switching instruction for the first frame rate gear to the graphics proxy module in the host system.
[0217] S811: The graphics proxy module in the host system sends a switching instruction for the first frame rate gear to the rendering service.
[0218] S812: The rendering service in the host system adjusts the current monitoring channel of the Vsync hardware source to the first monitoring channel corresponding to the first frame rate gear.
[0219] S813: The synthesis module in the guest system monitors the Vsync signal through the first monitoring channel.
[0220] Figure 9 This is a structural diagram of an electronic device 900 provided in an embodiment of the present application. The electronic device 900 may be the terminal device mentioned above (for example, a terminal device with dual systems, for which the dual systems can be referred to the above description and will not be repeated). Figure 9 As shown, the electronic device 900 may include: one or more processors 901; one or more memories 902; a communication interface 903, and one or more computer programs 904. The above components may be connected via one or more communication buses 905. The one or more computer programs 904 are stored in the above memory 902 and configured to be executed by the one or more processors 901. The one or more computer programs 904 include instructions. For example, when the electronic device 900 is a terminal device with dual systems as described above, the instructions may be used to execute the relevant steps of the terminal device in the above corresponding embodiments, such as executing Figure 3 、 Figure 5B or Figure 6 The communication interface 903 is used to implement communication between the electronic device 900 and other devices. For example, the communication interface can be a transceiver.
[0221] In the embodiments provided in the present application above, the method provided in the embodiment of the present application is introduced from the perspective of an electronic device (e.g., a mobile phone) as an execution subject. In order to implement the various functions in the method provided in the embodiment of the present application above, the electronic device may include a hardware structure and / or a software module to implement the above functions in the form of a hardware structure, a software module, or a hardware structure plus a software module. Whether a function of the above functions is executed in the form of a hardware structure, a software module, or a hardware structure plus a software module depends on the specific application and design constraints of the technical solution.
[0222] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)). In the absence of conflict, the solutions of the above embodiments can be used in combination.
[0223] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0224] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0225] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0226] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0227] Obviously, those skilled in the art may make various changes and modifications to the present application without departing from the scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include these modifications and variations.
Claims
1. A graphic display method, characterized in that: Applied to a terminal device including a first operating system and a second operating system, the first operating system running in a hardware environment and the second operating system running in a container or a virtual machine, the method comprising: The second operating system determines a first frame rate gear according to the current scene, where the first frame rate gear is one of N frame rate gears, and the N frame rate gears correspond to one of N refresh frame rates supported by the display screen of the terminal device, where N is a positive integer; The second operating system draws graphics according to a first cycle, where the first cycle is a graphics drawing cycle corresponding to the first frame rate level; The second operating system displays the graphics through a window of the first operating system.
2. The method according to claim 1, characterized in that The terminal device includes a Vsync source, the Vsync source is used to generate a Vsync signal, the Vsync signal is used to indicate graphics drawing, the Vsync source supports N Vsync signal generation cycles, the N Vsync signal generation cycles are respectively equal to N graphics drawing cycles corresponding to the N frame rate gears, and the second operating system draws graphics according to the first cycle, including: The second operating system adjusts the Vsync signal generation period of the Vsync source to a first period; The second operating system monitors the Vsync signal from the Vsync source, and draws a frame of graphics each time a Vsync signal is monitored.
3. The method according to claim 2, characterized in that The Vsync source includes a Vsync hardware source or a Vsync software source. The Vsync hardware source includes a hardware module for generating a Vsync signal. The Vsync software source includes a software module for generating a Vsync signal.
4. The method according to claim 3, characterized in that The Vsync source includes a Vsync hardware source, the Vsync hardware source is located in the hardware environment, and the second operating system adjusts the Vsync signal generation period of the Vsync source to a first period, including: The second operating system adjusts the Vsync signal generation period of the Vsync source to a first period through the first operating system; The second operating system monitors a Vsync signal from the Vsync source, including: The second operating system monitors a Vsync signal from the Vsync source through the first operating system.
5. The method according to claim 4, characterized in that The second operating system adjusts, through the first operating system, a Vsync signal generation period of the Vsync source to a first period, including: The second operating system sends a first request to the first operating system, where the first request is used to request the first operating system to switch the Vsync signal generation period of the Vsync hardware source to a first period.
6. The method according to claim 4 or 5, characterized in that The Vsync hardware source includes N monitoring channels, the Vsync hardware source generates a Vsync signal in each of the N monitoring channels at a different period, the N monitoring channels respectively corresponding to the N Vsync signal generation periods, and the second operating system adjusts the Vsync signal generation period of the Vsync source to a first period through the first operating system, including: The second operating system adjusts, through the first operating system, a current monitoring channel of the Vsync hardware source to a first monitoring channel among the N monitoring channels, where a Vsync signal generation period in the first monitoring channel is the first period; The second operating system monitors the Vsync signal from the Vsync source through the first operating system, including: The second operating system monitors the Vsync signal from the Vsync hardware source through the first monitoring channel, where the first monitoring channel is provided by the first operating system.
7. The method according to claim 6, characterized in that Before the second operating system monitors the Vsync signal from the Vsync hardware source through the first monitoring channel, the second operating system further includes: The second operating system sends a Vsync hardware source request to the first operating system, where the Vsync hardware source request is used to request monitoring of a Vsync signal from a Vsync hardware source; The second operating system receives the N monitoring channels of the Vsync hardware source returned by the first operating system.
8. The method according to claim 6 or 7, characterized in that The N monitoring channels correspond to N interfaces.
9. The method according to any one of claims 1 to 8, characterized in that: The second operating system determines the first frame rate level according to the current scene, including: The second operating system determines the first frame rate gear according to the current device load and / or the currently running application.
10. The method according to claim 9, characterized in that The second operating system determines the first frame rate level according to the currently running application, including: When the display screen includes only one application window, the first frame rate gear is determined according to the application type of the application; or, When the display screen includes windows of multiple applications, one application is determined from the multiple applications, and a first frame rate gear is determined according to an application type of the determined application.
11. The method according to claim 10, characterized in that Determining an application from the multiple applications includes: Determine one application from the plurality of applications according to the priority relationship of the plurality of applications; or An application is determined from the multiple applications, where the determined application is the application corresponding to the focus window.
12. The method according to any one of claims 1 to 11, characterized in that: The second operating system displays the graphic through the window of the first operating system, including: The second operating system provides the graphics to the first operating system; The first operating system displays the graphics in a first window, the first window is an associated window of a second window, and the second window is a window in the second operating system for carrying the graphics.
13. The method according to claim 12, characterized in that The terminal device includes a first cache queue and a second cache queue, the first cache queue corresponds to the first operating system, the second cache queue corresponds to the second operating system, and the second operating system provides the graphics to the first operating system, including: The second operating system draws the graphics in a first buffer in the second buffer queue; The second operating system moves the first cache out of the second cache queue and into the first cache queue; The first operating system obtains the graphics from the first cache queue and fills the graphics into the window.
14. The method according to claim 13, characterized in that After the first operating system obtains the graphics from the first cache queue and fills the graphics into the window, the method further includes: The first operating system moves the first buffer out of the first buffer queue and into the second buffer queue.
15. An electronic device, characterized in that: include: a processor, a memory, and one or more programs; The one or more programs are stored in the memory, and the one or more programs include instructions. When the instructions are executed by the processor, the electronic device performs the method steps according to any one of claims 1 to 14.
16. A computer-readable storage medium, characterized in that The computer-readable storage medium is used to store a computer program, and when the computer program is run on a computer, the computer is caused to perform the method according to any one of claims 1 to 14.