Image rendering method and electronic equipment

By determining the occlusion relationship of each view area in a multi-window scenario and rendering the window according to the frame rate of the unoccluded view area, the problem of resource waste and power consumption increase caused by inaccurate occlusion rate prediction in the prior art is solved, and more efficient image rendering and smoother user experience are achieved.

CN120070711APending Publication Date: 2025-05-30HUAWEI TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202311612879.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-28
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

Existing image rendering methods are difficult to accurately predict the occlusion rate in multi-window scenarios, resulting in inaccurate determination of the target frame rate, which in turn leads to waste of resources, unnecessary power consumption and other problems of increasing window rendering time.

Method used

By receiving a refresh request, the view area information of each window is obtained, the occlusion relationship of each view area is determined, and the frame rate of the obstructed view area is rendered according to the frame rate of the unobstructed view area, and the frame rate of the obstructed view area is ignored to avoid invalid rendering.

Benefits of technology

It effectively reduces resource waste and unnecessary power consumption, reduces the rendering time of other windows, improves the fluency of windows, and simplifies the complexity of window frame rate rendering control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120070711A_ABST
    Figure CN120070711A_ABST
Patent Text Reader

Abstract

The invention discloses an image rendering method and electronic equipment. The method comprises the steps that the electronic equipment receives a first refreshing request, wherein the first refreshing request is used for requesting to render a first window of a first application and a second window of a second application; the electronic equipment obtains first information of a first window according to the first refreshing request, the first window comprises a first view area and a second view area, and the first information comprises a first frame rate of the first view area and a second frame rate of the second view area; and the electronic equipment obtains second information of the second window, and the second information comprises information of each view area of the second window. And the electronic equipment determines that the first view area is shielded by the second window according to the first information and the second information. And the electronic equipment renders the first window according to the second frame rate. Therefore, the electronic equipment only needs to pay attention to the refreshing request of the second view area which is not shielded, but neglects the refreshing request of the first view area which is shielded, so that the consumption of the computing power and the power consumption of the electronic equipment by invalid rendering is effectively prevented.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the technical field of image rendering, and in particular, to an image rendering method and an electronic device. Background Art

[0002] With the development of the technical field of image rendering, a multi-window user interface appears on an electronic device. Among them, there may be partial occlusion in the multi-windows. For example, Figure 1 as shown, a part of window 1 is occluded by window 2. However, the rendering process of the electronic device 100 will render window 1 and window 2 at the inherent refresh rate. Then, when synthesizing the image, the image of the occluded part of window 1 will be cropped, resulting in waste of resources and unnecessary power consumption. At the same time, due to resource competition, the rendering duration of other windows increases, resulting in problems with the display smoothness of other windows.

[0003] In order to reduce resource waste, avoid unnecessary power consumption, and reduce the rendering duration of other windows, the current image rendering method is usually: the electronic device calculates the target frame rate of each window according to the Z-axis order (which can be simply referred to as the Z-order), transparency, occlusion rate, and whether there is user interaction of each window. The occlusion rate can be understood as the probability that a window is occluded. For example, if the window size is large, its occlusion rate is large; if the window size is small, its occlusion rate is small. Then, the target frame rate of the window is the frame rate of the window with a small occlusion rate. Then, the electronic device notifies the target frame rate to the application window. When the application window receives a vertical synchronization (VSync) signal, that is, a refresh signal, it determines whether each window needs to perform image rendering according to the inherent refresh frequency of each window. If image rendering is not required, the electronic device directly copies the rendering result of the previous refresh cycle cached; otherwise, the electronic device performs image rendering. Therefore, the smoothness of the unoccluded part is effectively guaranteed, and the power consumption caused by invalid refreshing of the occluded part is avoided.

[0004] However, the occlusion rate is not easy to determine. For example, if the window size is large, even if the occlusion rate is high, the area of the unoccluded part of the window is still very large, while if the window size is small, even if the occlusion rate is low, the area of the unoccluded part may be very small; for another example, although most of the area is occluded, the occluded part is a static area, while the unoccluded part is in a dynamic refresh state. Therefore, the occlusion rate prediction is not accurate enough, resulting in inaccurate determination of the target frame rate, and thus inaccurate control of the window rendering frame rate. There are still problems such as resource waste, unnecessary power consumption, and increased rendering duration of other windows. Summary of the Invention

[0005] The image rendering method and the electronic device provided by the embodiments of the present application reduce resource waste, avoid unnecessary power consumption, and reduce the rendering duration of other windows.

[0006] To achieve the above object, the embodiments of the present application adopt the following technical solutions.

[0007] In a first aspect, the present application provides a view display method. The execution subject of this method can be an electronic device or a component located in the electronic device (such as a chip, a chip system, or a processor, etc.). Hereinafter, the case where the execution subject is an electronic device will be described as an example. The method may include: The electronic device receives a first refresh request, where the first refresh request is used to request rendering of a first window of a first application and a second window of a second application, and the first application and the second application may be the same or different. In response to the first refresh request, the electronic device obtains first information of the first window. The first window includes a first view area and a second view area, and the first information includes a first frame rate of the first view area and a second frame rate of the second view area. And, the electronic device obtains second information of the second window, where the second information includes information of each view area of the second window. The electronic device determines that the first view area is blocked by the second window according to the first information and the second information. The electronic device renders the first window at the second frame rate.

[0008] Wherein, the first information includes information of each view area of the first window. Both the first information and the second information may include: The information of each view area may include area information of each view area, the stacking order of each window, and area information of each window, etc., which are not specifically limited in the present application.

[0009] Wherein, the first view area being blocked by the second window can be understood as: The second window covers the first view area. Specifically, the first window is located below the second window, and the area coordinates of the first view area of the first window partially or completely coincide with the area coordinates of the second window.

[0010] In this way, in the present application, the occlusion relationship between each window is clarified, and through the occlusion relationship between each window, for the occluded window, the electronic device uses the frame rate of the unoccluded view area in this window for rendering, while the rendering of the occluded view area in this window is an invalid rendering. Therefore, ignoring the frame rate of the occluded view area can effectively prevent the consumption of the computing power and power consumption of the electronic device by invalid rendering. In addition, the rendering operation is executed by the system of the electronic device and does not require the participation of the business application side.

[0011] In other words, the electronic device can actively adjust the rendering frame rate of the layer according to the occlusion situation of each view area of the layer, avoiding the accuracy of frame rate recognition when the window frame rate is inconsistent due to occlusion and refresh area. At the same time, the complexity of window frame rate rendering control is reduced, and the upper-layer application is made unaware.

[0012] In some design solutions, the view display method provided by this application may further include: The electronic device adjusts the first frame rate of the first view area to a target frame rate, and the target frame rate is less than the first frame rate. The electronic device renders the first view area at the target frame rate. In this way, by restricting the frame rate of the occluded first view area, the electronic device effectively prevents the consumption of the computing power and power consumption of the electronic device caused by invalid rendering.

[0013] In some design solutions, the view display method provided by this application may further include: The electronic device reuses the existing texture image of the first view area. In this way, by reusing the existing texture image of the occluded first view area, the electronic device does not need to perform real-time rendering on the first view area, effectively preventing the consumption of the computing power and power consumption of the electronic device caused by invalid rendering.

[0014] In one design solution, the first window further includes a third view area, and the first information further includes the third frame rate of the third view area. The electronic device renders the first window at the second frame rate. Specifically, when the second frame rate is greater than the third frame rate, the electronic device renders the second view area and the second view area at the second frame rate. In this way, for an unoccluded window, by selecting the maximum frame rate of each view area in the window, the electronic device effectively ensures the smooth rendering of the window, thereby effectively ensuring the smoothness of the unoccluded window.

[0015] In one design solution, the first information and the second information further include: the area information of each view area, the stacking order of each window, and the area information of each window. The electronic device determines that the first view area is occluded by the second window according to the first information and the second information. Specifically, the electronic device determines that the first window is occluded by the second window according to the stacking order and area information of the first window and the stacking order and area information of the second window. The electronic device determines that the first view area is occluded by the second window according to the area information of the first view area, the area information of the second view area, and the area information of the second window.

[0016] In one design solution, after the electronic device determines that the first view area is occluded by the second window according to the first information and the second information, it further includes: The electronic device configures a first mark for the first view area, and the first mark is an identifier of the occluded state. In this way, the electronic device can conveniently track the occlusion state of the first view area through this first mark.

[0017] In some design solutions, the view display method provided by this application may further include: The electronic device detects the occlusion state of the first view area. When it is detected that the first view area is not occluded, the electronic device deletes the first mark of the first view area.

[0018] In a design, the first refresh request is further used to request rendering of a third window of a third application, where the third application is the same as or different from the first application and the second application. The method further includes: in response to the first refresh request, the electronic device obtains third information of the third window, where the third window includes a third view area, and the third information includes a third frame rate of the third view area. After the electronic device determines that the first view area is blocked by the second window, it further includes: the electronic device determines whether the second window and the third window are blocked according to the first information, the second information, and the third information. In this way, if the electronic device creates multiple windows, the electronic device needs to detect the occlusion situation of each window, and after all windows are detected, the electronic device can render and draw an image.

[0019] In a second aspect, the present application provides an electronic device, including: a receiving module, configured to receive a first refresh request, where the first refresh request is used to request rendering of a first window of a first application and a second window of a second application, and the first application and the second application are the same as or different from each other. An obtaining module, configured to, in response to the first refresh request, obtain first information of the first window, where the first window includes a first view area and a second view area, and the first information includes a first frame rate of the first view area and a second frame rate of the second view area; and obtain second information of the second window, where the second information includes information of each view area of the second window. A determining module, configured to determine, according to the first information and the second information, that the first view area is blocked by the second window. A rendering module, configured to render the first window at the second frame rate.

[0020] Among them, the first information includes information of each view area of the first window. Both the first information and the second information may include: the information of each view area may include area information of each view area, stacking order of each window, and area information of each window, etc., which are not specifically limited in the present application.

[0021] Among them, that the first view area is blocked by the second window can be understood as: the second window covers the first view area. Specifically, the first window is located below the second window, and the area coordinates of the first view area of the first window coincide with the area coordinates of the second window partially or completely.

[0022] In this way, in the present application, the occlusion relationship between each window is clarified. Based on the occlusion relationship between each window, for the occluded window, the electronic device uses the frame rate of the unoccluded view area in this window for rendering, while the rendering of the occluded view area in this window is invalid rendering. Therefore, by ignoring the frame rate of the occluded view area, it can effectively prevent the consumption of the computing power and power consumption of the electronic device caused by invalid rendering. In addition, the rendering operation is executed by the system of the electronic device and does not require the participation of the business application side.

[0023] In other words, the electronic device can actively adjust the rendering frame rate of the layer according to the occlusion situation of each view area of the layer, avoiding the accuracy of frame rate recognition when the window frame rate is inconsistent due to occlusion and refresh area. At the same time, it reduces the complexity of window frame rate rendering control and realizes the invisibility of upper-layer applications.

[0024] In some design solutions, the present application provides an electronic device that may further include: an adjustment module for adjusting the first frame rate of the first view area to a target frame rate, where the target frame rate is less than the first frame rate. The rendering module is used to render the first view area at the target frame rate. In this way, the electronic device effectively prevents the consumption of the computing power and power consumption of the electronic device caused by invalid rendering by restricting the frame rate of the occluded first view area.

[0025] In some design solutions, the present application provides an electronic device that may further include: a multiplexing module for multiplexing the existing texture image of the first view area. In this way, the electronic device effectively prevents the consumption of the computing power and power consumption of the electronic device caused by invalid rendering by multiplexing the existing texture image of the occluded first view area without performing real-time rendering on the first view area.

[0026] In a design solution, the first window further includes a third view area, and the first information further includes the third frame rate of the third view area. The rendering module is used to: when the second frame rate is greater than the third frame rate, render the second view area and the second view area at the second frame rate. In this way, for the unoccluded window, the electronic device effectively ensures the smooth progress of the rendering of this window by selecting the maximum frame rate of each view area in this window, thereby effectively ensuring the smoothness of the unoccluded window.

[0027] In a design solution, the first information and the second information further include: the area information of each view area, the stacking order of each window, and the area information of each window. The determination module is used to: determine that the first window is occluded by the second window according to the stacking order and area information of the first window and the stacking order and area information of the second window; determine that the first view area is occluded by the second window according to the area information of the first view area, the area information of the second view area, and the area information of the second window.

[0028] In some design solutions, an electronic device provided by the present application may further include: a configuration module configured to configure a first mark for the first view area, where the first mark is an identifier of an occluded state. In this way, the electronic device can conveniently track the occlusion state of the first view area through the first mark.

[0029] In some design solutions, an electronic device provided by the present application may further include: a detection module configured to detect the occlusion state of the first view area; and a deletion module configured to delete the first mark of the first view area when it is detected that the first view area is not occluded.

[0030] In one design solution, the first refresh request is used to request rendering of a third window of a third application, where the third application is the same as or different from the first application and the second application. The obtaining module is configured to obtain third information of the third window in response to the first refresh request, where the third window includes a third view area, and the third information includes a third frame rate of the third view area. The determining module is configured to determine whether the second window and the third window are occluded according to the first information, the second information, and the third information. In this way, if the electronic device creates multiple windows, the electronic device needs to detect the occlusion situation of each window, and after all windows are detected, the electronic device can render and draw an image.

[0031] In a third aspect, the present application provides an electronic device, including: one or more processors; and a memory storing code therein; when the code is executed by the processor, the electronic device is caused to execute the method as described in the first aspect.

[0032] In a fourth aspect, the present application provides a computer-readable storage medium including computer instructions, which, when running on an electronic device, cause the electronic device to execute the method as described in the first aspect.

[0033] Wherein, for the specific implementation manners and corresponding technical effects of each of the above second aspect to fourth aspect, reference may be made to the specific implementation manners and technical effects of the above first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 A schematic diagram of an interface of an existing electronic device;

[0035] Figure 2 A schematic diagram of the structure of an electronic device provided by an embodiment of the present application;

[0036] Figure 3 A schematic diagram of the software architecture of an existing electronic device;

[0037] Figure 4 A flowchart of an existing image rendering method;

[0038] Figure 5 A flowchart of an existing image rendering method;

[0039] Figure 6-1 A flowchart of an image rendering method provided by an embodiment of the present application;

[0040] Figure 6-2 A flowchart of an image rendering method provided by an embodiment of the present application;

[0041] Figure 7 A flowchart of an image rendering method provided by an embodiment of the present application;

[0042] Figure 8 A schematic diagram of the interface of another electronic device provided by an embodiment of the present application;

[0043] Figure 9 A schematic diagram of the interface of another electronic device provided by an embodiment of the present application;

[0044] Figure 10 A schematic diagram of the stacking order of window 1 and window 2 provided by an embodiment of the present application;

[0045] Figure 11 A flowchart of the layer frame rate limit provided by an embodiment of the present application;

[0046] Figure 12 A schematic diagram of the Nth frame image provided by an embodiment of the present application;

[0047] Figure 13 A schematic diagram of the (N + 1)th frame image provided by an embodiment of the present application;

[0048] Figure 14 For Figure 12 and Figure 13 A flowchart of the layer frame rate limit of the frame images shown;

[0049] Figure 15 A schematic diagram of the (N + 2)th frame image provided by an embodiment of the present application;

[0050] Figure 16 A schematic diagram of the (N + 3)th frame image provided by an embodiment of the present application;

[0051] Figure 17 For Figure 15 and Figure 16 A flowchart of the layer frame rate limit of the frame images shown;

[0052] Figure 18Schematic diagram of the view area tracking process for multiple windows provided by the embodiments of the present application;

[0053] Figure 19 Schematic diagram of the structure of an electronic device provided by the embodiments of the present application. Detailed implementation manners

[0054] Figure 2 Block diagram of the structure of an electronic device provided by the embodiments of the present application.

[0055] As Figure 2 shown, the electronic device 100 may include a processor 110, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, a memory 120, an antenna 1, a wireless communication module 160, a display screen 170, and a sensor module 150, etc. The sensor module 150 may include a pressure sensor 150A, a touch sensor 150B, etc.

[0056] It can be understood that the structure schematically shown in the embodiments of the present application does not constitute a specific limitation on the electronic device. In other embodiments of the present application, the electronic device may include more or fewer components than those shown in the figure, or combine certain components, or split certain components, or have different component arrangements. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0057] 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, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors.

[0058] The controller may generate operation control signals according to the instruction operation code and timing signals to complete the control of fetching and executing instructions.

[0059] A memory can also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can hold the instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be directly retrieved from the memory. This avoids repeated accesses and reduces the waiting time of the processor 110, thus improving the efficiency of the system.

[0060] The charging management module 140 is configured to receive a charging input from a charger. Here, the charger can be a wireless charger or a wired charger. In some embodiments of wired charging, the charging management module 140 can receive the charging input from the wired charger through the USB interface 130. In some embodiments of wireless charging, the charging management module 140 can receive the wireless charging input through the wireless charging coil of the electronic device. While charging the battery 142, the charging management module 140 can also supply power to the electronic device through the power management module 141.

[0061] The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives the inputs from the battery 142 and / or the charging management module 140 and supplies power to the processor 110, the display screen 170, the wireless communication module 160, etc. The power management module 141 can also be used to monitor parameters such as the battery capacity, the number of battery charge cycles, and the battery health status (leakage, impedance). In some other embodiments, the power management module 141 can also be provided in the processor 110. In some other embodiments, the power management module 141 and the charging management module 140 can also be provided in the same device.

[0062] The wireless communication function of the electronic device can be implemented through the antenna 1, the wireless communication module 160, the modulation and demodulation processor, and the baseband processor, etc.

[0063] The antenna 1 is used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device can be used to cover a single or multiple communication bands. Different antennas can also be multiplexed to improve the utilization rate of the antennas. For example, the antenna 1 can be multiplexed as the diversity antenna of the wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0064] The wireless communication module 160 may provide solutions for wireless communications applied to an electronic device, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite systems (GNSSs), frequency modulation (FM), near field communication (NFC), infrared (IR), etc. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 1, performs frequency modulation and filtering processing on the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 may also receive signals to be sent from the processor 110, perform frequency modulation and amplification on them, and convert them into electromagnetic waves through the antenna 1 for radiation. In some embodiments, the wireless communication module 160 receives application information sent by a server.

[0065] The electronic device implements a display function through a GPU, a display screen 170, an application processor, etc. The GPU is a microprocessor for image processing, connected to the display screen 170 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.

[0066] The display screen 170 is used to display images, videos, etc. The display screen 170 includes a display panel. The display panel may adopt a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device may include one or N display screens 170, where N is a positive integer greater than 1.

[0067] The memory 120 can be used to store computer-executable program codes, and the executable program codes include instructions. The memory 120 can include a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function (such as a sound playback function, an image playback function, etc.). The data storage area can store data created during the use of the electronic device (such as audio data, a phone book, etc.). In addition, the memory 120 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the electronic device by running the instructions stored in the memory 120, and / or the instructions stored in the memory provided in the processor.

[0068] The pressure sensor 150A is used to sense a pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 150A can be disposed on the display screen 170. There are many types of pressure sensors 150A, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, etc. The capacitive pressure sensor can include at least two parallel plates having conductive materials. When a force acts on the pressure sensor 150A, the capacitance between the electrodes changes. The electronic device determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 170, the electronic device detects the intensity of the touch operation according to the pressure sensor 150A. The electronic device can also calculate the position of the touch according to the detection signal of the pressure sensor 150A. In some embodiments, touch operations with the same touch position but different touch operation intensities can correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, the instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, the instruction to create a new short message is executed.

[0069] The touch sensor 150B, also called a "touch control device". The touch sensor 150B can be disposed on the display screen 170, and the touch sensor 150B and the display screen 170 form a touch screen, also called a "touch control screen". The touch sensor 150B is used to detect a touch operation acting thereon or nearby. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 170. In some other embodiments, the touch sensor 150B can also be disposed on the surface of the electronic device, at a different position from the display screen 170.

[0070] Of course, the electronic device may further include other functional units, which are not limited in the embodiments of the present application.

[0071] In addition, actions, terms, etc. involved between the embodiments of the present application can be referred to each other without limitation. In the embodiments of the present application, each message name or parameter name in the message is only an example, and other names can also be used in specific implementations without limitation.

[0072] Among them, the above-mentioned electronic device can be a mobile phone, a tablet computer, a laptop, a notebook computer, an ultra-mobile personal computer (UMPC), a handheld computer, a netbook, a personal digital assistant (PDA), a wearable electronic device, etc. The specific form of the electronic device is not particularly limited in the embodiments of the present application.

[0073] In some embodiments, the software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservices architecture, or a cloud architecture. Exemplarily, taking the software system of the electronic device 100 adopting a layered architecture as an example, in combination with Figure 3 the described image rendering solution, Figure 3 a schematic diagram of the software of the electronic device 100 in the image rendering solution is shown.

[0074] The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. The layers communicate with each other through software interfaces.

[0075] As Figure 3 shown, the electronic device 100 at least includes: an application layer (or application program layer), a system service layer, and a hardware driver layer.

[0076] Among them, the application layer includes a series of application program packages, such as settings, desktop, system applications, third-party applications, game applications, video applications, etc. Among them, the third-party applications can include, but are not limited to, third-party applications downloaded from an application market, such as social applications, shopping applications (not shown in the figure), etc. Among them, the windows / controls of each application program can be rendered separately or uniformly rendered by a rendering service, and the rendered windows are submitted to the compositor in the system service layer for composition. In some embodiments, the application programs in the application layer can submit rendering instructions to the rendering service in the system service layer to complete the rendering of the application program interface, etc.

[0077] The system service layer includes a rendering service and a compositor. Among them, the rendering service is used to perform rendering according to a refresh signal, and the compositor can be used to composite the layers corresponding to each window, such as the desktop layer, the SystemUI layer, the negative first screen layer, etc. Among them, the desktop window corresponds to the desktop layer, the SystemUI window corresponds to the SystemUI layer, the negative first screen window corresponds to the negative first screen layer, etc. Exemplarily, the compositor may include a hardware compositor and a graphics processing unit (GPU), etc.

[0078] In one example, based on Figure 3 the software architecture of the electronic device 100 shown, Figure 4 is a schematic diagram of an image drawing process provided by an embodiment of the present application. Combining Figure 3 and Figure 4 shown, the image drawing process is as follows: ① When the user operates the screen of the electronic device, the hardware of the electronic device sends a refresh signal VSync to the rendering service. ② After receiving the refresh signal VSync, the rendering service sends the refresh signal VSync to the application window (such as Figure 3 application window 1 in). After receiving the refresh signal VSync, the rendering process of the application renders the application window and draws an image. Then, ③ The application window can submit the rendering result to the compositor. Among them, each application window corresponds to a layer in the compositor, and the compositor can composite each application window, that is, composite the layers corresponding to each application window. ④ The compositor can send the composite result to the display screen for display.

[0079] It can be understood that Figure 3 the software architecture of the electronic device 100 shown is only for exemplary illustration. In practical applications, it may also include more or fewer modules, and the levels to which each module belongs may also be different. For example: There may also be a framework module between the unified application and the rendering service. Each level can also have other division methods, and the embodiments of the present application do not limit this.

[0080] In one example, in a window occlusion scenario, based on the above Figures 2-4 shown electronic device, Figure 5 is a schematic diagram of an image rendering process provided by an embodiment of the present application. As Figure 5As shown, the image rendering method is generally as follows: ① The application of the electronic device calculates the target frame rate of each window based on the Z-axis order, transparency, occlusion rate, and presence or absence of user interaction of each application window (referred to as the window). Exemplarily, the frame rate adjustment and refresh module of the application is used to calculate the target frame rate of each window based on the Z-axis order, transparency, occlusion rate, and presence or absence of user interaction of each application window (referred to as the window). ② The electronic device sends the refresh signal VSync to the window and notifies the target frame rate of the window to the window. ③ When the application window receives the refresh signal VSync, the application window determines whether image rendering is required based on its own target frame rate. ④ If image rendering is not required, the electronic device directly copies the rendering result of the previous refresh cycle of the cache (such as the image buffer). ⑤ Otherwise, the electronic device performs image rendering. Therefore, it effectively guarantees the smoothness of the unoccluded part and avoids the increase in power consumption caused by invalid refreshing of the occluded part.

[0081] However, the target frame rate is determined based on the occlusion rate of the window. And the occlusion rate is not easy to determine. For example, if the window size is large, even if the occlusion rate is high, the unoccluded area of the window is still very large. While if the window size is small, even if the occlusion rate is low, the unoccluded area may be very small. Another example is that although most of the area is occluded, the occluded part is a static area, while the unoccluded part is in a dynamic refresh state. Therefore, the occlusion rate prediction is not accurate enough, resulting in inaccurate determination of the target frame rate, and thus inaccurate control of the window rendering frame rate. There are still problems such as resource waste, unnecessary power consumption, and increased rendering duration of other windows.

[0082] To solve the above technical problems, the present application provides an image rendering method, which is applied to an electronic device. The method includes: The electronic device receives a first refresh request, where the first refresh request is used to request rendering of the first window of the first application and the second window of the second application, and the first application and the second application may be the same or different. In response to the first refresh request, the electronic device obtains first information of the first window. The first window includes a first view area and a second view area, and the first information includes the first frame rate of the first view area and the second frame rate of the second view area. And, the electronic device obtains second information of the second window, where the second information includes information of each view area of the second window. The electronic device determines that the first view area is occluded by the second window according to the first information and the second information. The electronic device renders the first window according to the second frame rate. In this way, the electronic device only needs to pay attention to the refresh requests of the unoccluded second view area and ignore the refresh requests of the occluded first view area, thereby effectively preventing the consumption of the computing power and power consumption of the electronic device by invalid rendering.

[0083] In one example, Figure 6-1 provided by the embodiment of the present application Figure 2 is a schematic diagram of an image drawing process of the electronic device shown.Figure 6-1 Schematic diagram of adding a window frame rate control module to the system service layer shown in Figure 3 . Among them, the window frame rate control module is used to control the frame rate of each window. The window frame rate control module may include a window frame rate management unit and a layer dynamic tracking unit. Among them, the window frame rate management unit is used to manage the frame rate of each window. The layer dynamic tracking unit is used to detect the occlusion relationship between each window (corresponding layer), and the layer dynamic tracking unit is also used to record the status of each window.

[0084] In one example, Figure 6-1 The image drawing process shown in Figure 3 is different from the image drawing process shown in Figure 6-1 in that: ② After the rendering service receives the refresh signal VSync, it sends a refresh instruction to the window frame rate control module. The layer dynamic tracking unit of the window frame rate control module determines the occlusion relationship of each layer, determines the target frame rate of each layer according to the occlusion relationship, and informs the window frame rate management unit of the target frame rate. ③ The window frame rate management unit records the target frame rate of each window and carries the target frame rate in the refresh instruction. ④ The window frame rate management unit sends the refresh instruction to the application window (such as

[0085] In another example, Figure 6-2 is a schematic diagram of an image drawing process of an electronic device provided by the present application. Figure 2 Schematic diagram of adding a window frame rate control module to the system service layer shown in Figure 6-2 Schematic diagram of adding a window frame rate control module to the system service layer shown in Figure 3 . Figure 6-2 Compared with Figure 6-1 , the difference is that the window frame rate control module is located between the application layer and the system service layer. In the embodiments of the present application, the setting position of the window frame rate control module is not limited. In the embodiments of the present application, the case where the window frame rate control module is located in the system service layer is taken as an example for illustration. In this way, the window frame rate control module is deployed as a sub-module into the rendering composition module process, reducing the inter-process transmission delay of obtaining submitted data during layer dynamic tracking, making the window occlusion area tracking more real-time.

[0086] In another example, since the window frame rate control module is deployed as a sub-module of the rendering composition module, the window frame rate management unit can be merged with the APP VSYNC signal management module originally in the system of the electronic device. In other words, the function of the window frame rate management unit is added to the signal management module, and only the window frame rate control module is added, simplifying the management between module functions.

[0087] The technical solutions involved in the following embodiments can all be implemented in a device having a structure as shown in Figure 2 and Figure 6-1 shown.

[0088] Figure 7 FIG. is a schematic flowchart of an image rendering method provided by an embodiment of the present application. As shown in Figure 7 shown, the method is applied to an electronic device, and the method may include: S700 - S708 (where some steps are optional), and specifically, S700 - S708 may be:

[0089] S700. The electronic device displays a first interface.

[0090] The first interface may be an application interface of a first application, or an application interface of a second application, or a combined interface of the first application and the second application. The first application and the second application are different applications, and the embodiments of the present application do not make specific limitations.

[0091] The first interface may include multiple windows. In one example, the multiple windows may be understood as multiple application windows of the same application. For example, the first application includes a first application window (referred to as the first window for short) and a second application window (referred to as the second window for short); the multiple windows may also be understood as multiple application windows of different applications. For example, the first application includes a third application window (referred to as the third window for short), and the second application includes a fourth application window (referred to as the fourth window for short). The embodiments of the present application do not make specific limitations.

[0092] In one example, a window may include multiple view areas. For example, the first window may include a first view area and a second view area.

[0093] Exemplarily, Figure 8 FIG. is a schematic diagram of an interface of an electronic device provided by an embodiment of the present application. As shown in Figure 8 shown, the electronic device 100 displays an interface 101, on which a window 1 (i.e., the first window) and a window 2 (i.e., the second window) are displayed. The window 1 includes a view area A (i.e., the first view area) and a view area B (i.e., the second view area), and the window 2 includes a view area C. Between Figure 8 the window 1 and the window 2 there is no occlusion.

[0094] S701. The electronic device receives the user's operation on the first interface.

[0095] This operation can be understood as the user's touch operation on the first interface. For example, operations such as clicking, swiping, and dragging on the first interface or the controls / windows on the first interface are not specifically limited in the embodiments of the present application.

[0096] Continuing with the above example, this operation is: the user operates window 2 and drags window 2 to the view area A of window 1.

[0097] In a specific implementable manner, for S701, reference can be specifically made to Figure 6-1 the relevant description in ① shown in

[0098] S702. In response to this operation, the electronic device obtains the first information of each window.

[0099] That is to say, in response to the user's operation, the electronic device updates Figure 8 the information of the interface 101 shown in Figure 10 That is, the electronic device 100 updates the following information: the stacking order of the windows, the area information of each window, and the area information of each view area in each window. Among them, the updated stacking order is Figure 10 the stacking order shown in Figure 10 As shown, on the Z-axis, along the positive direction of the Z-axis, window 1 is sorted in front of window 2. That is to say, from the user's perspective, the user will first see window 2 and then see window 1.

[0100] In a specific implementable manner, for S702, reference can be specifically made to Figure 6-1 the relevant description in ② shown in

[0101] S703. The electronic device determines the occlusion relationship between each window and the target frame rate of each window according to the first information of each window.

[0102] In a specific implementable manner, each window includes a first window and a second window. The first window includes a first view area and a second view area. The first information of the first window includes the stacking order and area information of the first window, and the second information of the second window includes the stacking order and area information of the second window. S703 can specifically be:

[0103] S7031. The electronic device determines that the first window is occluded by the second window according to the stacking order and area information of the first window and the stacking order and area information of the second window.

[0104] Continuing with the above example, the electronic device 100 can determine that window 2 occludes window 1 according to the updated information.

[0105] S7032. The electronic device determines that the first view area is blocked by the second window according to the area information of the first view area, the area information of the second view area, and the area information of the second window.

[0106] Continuing with the above example, after the electronic device determines that the first window is blocked by the second window, it further determines which areas of the first window are blocked by the second window. Specifically, the electronic device 100 can determine that the view area A of window 1 is blocked by window 2 according to the updated information: the area information of each window and the area information of each view area in each window.

[0107] S7033. The electronic device determines the target frame rate of each window.

[0108] In a specific implementable manner, as Figure 11 shown, when an application window is created, the electronic device applies to the VSYNC management of the system layer to create a communication connection channel for a refresh signal (or called VSYNC signal) (such as Figure 11 the Channel channel shown). The window frame rate management unit of the electronic device establishes a control node for each channel on the original basis. The object of this node includes a window identifier and a limited frame rate. Among them, the window identifier is a globally unique identifier, and the window identifier includes, but is not limited to, window ID, layer ID, layer handle, BINGDER ID, etc. Among them, if the frame rate value is a positive integer, the identifier value is valid, and the frame rate of this layer needs to be limited; otherwise, no limit processing is performed on the frame rate of this layer. In this way, the electronic device can actively adjust the rendering frame rate of the layer according to the occlusion situation of each view area of the layer, avoiding the accuracy of frame rate recognition when the window frame rate is inconsistent due to occlusion and refresh area. At the same time, it reduces the complexity of window frame rate rendering control and realizes the upper-layer application being unaware.

[0109] In an example, the frame rate of this layer is limited. Specifically, it can be: when the occlusion area increases, the electronic device calculates that the target frame rate of the layer decreases, and then the electronic device updates the limited frame rate to the reduced value; when the occlusion area decreases, the electronic device calculates that the target frame rate of the layer increases, and then the electronic device updates the limited frame rate to the increased value; when the occlusion area disappears, that is, no view area is blocked, the electronic device deletes the limited frame rate value, or updates the limited frame rate value to -1, that is, no limit is imposed on the frame rate of this layer.

[0110] In a specific implementable manner, the electronic device determines that the target frame rate of the first window is the frame rate of the second view area (the view area not blocked by the second window). Subsequently, when rendering the first window, the electronic device renders the first window at the second frame rate. That is to say, after the electronic device determines that the first view area of the first window is blocked, it means that the first view area is an invalid area. At this time, the electronic device adjusts the target frame rate of the first window to the frame rate of the second view area. In this way, it effectively ensures that the rendering of the second view area proceeds normally, while the rendering of the first view area is invalid because it is blocked. Therefore, regardless of whether the first view area is rendered, while ensuring the smoothness of the display area, the power consumption of the electronic device is saved.

[0111] In another specific implementable manner, the electronic device determines that the highest frame rate among the frame rates of each view area of the second window is the target frame rate of the second window. Exemplarily, assume that the second window includes a third view area and a fourth view area, the frame rate of the third view area is the third frame rate, and the frame rate of the fourth view area is the fourth frame rate. Among them, the third frame rate is greater than the fourth frame rate. When the second window is not blocked, the electronic device determines that the third frame rate is the target frame rate of the second window. Subsequently, when rendering the second window, the electronic device renders the second window at the third frame rate. In this way, it effectively ensures that the rendering of each view area in the second window proceeds normally and guarantees the smoothness of the display area.

[0112] In a specific implementable manner, for S703, reference can be specifically made to Figure 6-1 the relevant description in ③ shown in

[0113] S704. After the electronic device determines that the first window is blocked, it configures a first mark for the first window, and the first mark is an identifier of the blocked state.

[0114] In a specific implementable manner, S704 can specifically be: after the electronic device determines that the first view area of the first window is blocked, it configures a first mark for the first view area.

[0115] Of course, the electronic device can also mark the unblocked window or view area. Exemplarily, after the electronic device determines that the first window is blocked, it configures a second mark for the second window, and the second mark is an identifier of the unblocked state.

[0116] Of course, the electronic device can mark the blocked window or view area and mark the unblocked window or view area. Specifically, the electronic device can adopt a combination of the above two marking methods, and the embodiments of the present application do not make specific limitations.

[0117] In some embodiments, the image rendering method provided by the embodiments of the present application further includes: the electronic device detects the occlusion status of each window or each view area. When it is determined that the occluded window / view area becomes unoccluded, the electronic device deletes the marker used to mark the occluded status. In this way, the electronic device does not need to track or detect the window / view area marked as occluded.

[0118] At the same time, when the marker is deleted, the electronic device cancels the frame rate limit. That is to say, the electronic device restores the inherent frame rate of the occluded window / view area.

[0119] S705. The electronic device stores the target frame rate of each window.

[0120] That is to say, the electronic device records the target frame rate of each window in each refresh cycle.

[0121] In one example, the electronic device also records the marker information of each window, such as the above-mentioned first marker and / or second marker.

[0122] S706. The electronic device renders each window according to the target frame rate of each window.

[0123] In a specific implementable manner, S706 can be specifically implemented as: the electronic device renders the first window according to the target frame rate of the second view area, and the electronic device renders the second window according to the highest frame rate of each view area in the second window. That is to say, the electronic device controls the frame rate of each view area in the first window to be the target frame rate of the first view area. And, the electronic device controls the frame rate of each view area in the second window to be the highest frame rate.

[0124] In another specific implementable manner, S706 can be specifically implemented as: the electronic device renders the second view area according to the target frame rate of the second view area, and reuses the existing image of the first view area, and the electronic device renders the second window according to the highest frame rate of each view area in the second window.

[0125] In a specific implementable manner, for S706, reference can be specifically made to Figure 6-1 the relevant description in item ④ shown in

[0126] S707. The electronic device draws a frame image according to the rendering result of each window.

[0127] In a specific implementable manner, the specific implementation manner of S707 is: the electronic device obtains the images of each window according to the rendering result. Then, the electronic device synthesizes the images of each window to obtain the first frame image.

[0128] In a specific implementable manner, for S707, reference can be specifically made to Figure 6-1 the relevant descriptions in items ⑤ and ⑥ shown in

[0129] S708. The electronic device displays a second interface, and the synthetic image of each window is displayed on the second interface.

[0130] In a specific implementable manner, for S708, reference can be specifically made to Figure 6-1 the relevant description in ⑦ shown in, which will not be elaborated here.

[0131] Exemplarily, continuing with the above example, Figure 9 FIG. is a schematic diagram of an interface of an electronic device provided by an embodiment of the present application. As Figure 9 shown, the electronic device 100 displays an interface 102, and a window 1 (i.e., the first window) and a window 2 (i.e., the second window) are displayed on the interface 102. The window 1 includes a view area A (i.e., the first view area) and a view area B (i.e., the second view area), and the window 2 includes a view area C. In Figure 9 the view area A in the window 1 is blocked by the window 2.

[0132] Regarding the process of changing from the above first interface to the second interface and from the second interface to the first interface, the following will be exemplarily described in combination with scenarios, specifically as follows:

[0133] First, the process of each window / view area changing from unblocked to blocked.

[0134] When the electronic device displays Figure 8 the interface 101 shown, the frame image rendered by the electronic device can correspond to Figure 12 the Nth frame image shown. Figure 8 The window 1 shown corresponds to Figure 12 the layer 1 shown, Figure 8 the window 2 shown corresponds to Figure 12 the layer 2 shown.

[0135] At the Nth frame, as Figure 12 shown, the layer 1 and the layer 2 are tiled side by side in the display window without blocking each other. Then the electronic device obtains the regional information (x1, y1, w1, h1), frame rate (60), z-order (0), and layer regional information (x11, y11, W1, H1) of the view area of the layer 1, and analyzes that the layer 1 is not blocked, so it does not track the layer 1, and the frame rate of the window is not restricted. Similarly, the electronic device obtains the regional information (x2, y2, w2, h2), frame rate (60), z-order (1), and layer regional information (X2, Y2, W2, H2) of the view area of the layer 2, and gets that the layer 2 is not blocked, does not track the layer 2, and is not restricted either. Specifically, the following Table 1 shows the information of the layer 1 and the layer 2 in the Nth frame image:

[0136] Table 1

[0137]

[0138] As can be seen, as shown in Table 1, if there is no view area entering the area tracking process and the view areas are not blocked, then all layers are synchronized with the screen VSYNC mechanism according to the system default. That is to say, as Figure 14 shown, if the view area A of Layer 1 is not blocked, then each VSYNC signal of the electronic device hardware can notify Layer 1. The window frame rate management unit does not impose any restrictions. After receiving the VSYNC signal notification, Layer 1 immediately performs drawing and rendering. Therefore, the overall frame rate remains at the original level.

[0139] When the user operates Figure 8 the interface 101 shown, the relative relationship between Window 1 and Window 2 changes, that is, the relative relationship between Layer 1 and Layer 2 also changes. Specifically, when the user drags Window 2, the information of Window 1 remains unchanged, and the position of Window 2 changes, that is, the information of Layer 2 also changes. At this time, the frame image synthesized by the electronic device is Figure 13 the (N + 1)-th frame image shown.

[0140] At the (N + 1)-th frame, as Figure 13 shown, Layer 1 remains unchanged, but the position of Layer 2 changes. Update the relevant information of Layer 2. At the same time, due to the position change of Layer 2, part of the area of Layer 1 is blocked. The electronic device adds Layer 1 to the tracking queue. The following Table 2 shows the information of Layer 1 and Layer 2 of the (N + 1)-th frame image. Specifically:

[0141] Table 2

[0142]

[0143] As can be seen, as shown in Table 2, Layer 1 is blocked and Layer 1 enters the view area tracking process. Then the electronic device creates an independent VSYNC control node for Layer 1 and maintains the value of its limited frame rate. For example, as Figure 14 shown, this value can be set as low as 1 fps at the lowest and the screen refresh rate value at the highest.

[0144] That is to say, when entering the tracking state, as Figure 14 shown, if Layer 1 is covered, the VSYNC signal of the hardware will be intercepted by the VSYNC control node of this layer, and the VSYNC notification period of Layer 1 will be calculated based on the limit value of the layer, and the unexpired VSYNC signals will be blocked. As Figure 14 shown, the limited frame rate is 1 fps.

[0145] When the user continues to drag Window 2, the information of Window 1 remains unchanged, and Window 2 completely covers view area A in Window 1. At this time, the frame image obtained by the electronic device can beFigure 15 The (N + 2)-th frame image shown

[0146] At the (N + 2)-th frame, as Figure 15 shown, due to the continuous movement of Layer 2, the view area A of Layer 1 is covered. Therefore, Layer 1 enters the occlusion state. The limited frame rate of Layer 1 after occlusion is calculated as 1 fps, and the subsequent state changes are continuously tracked. The following Table 3 shows the information of Layer 1 and Layer 2 in the (N + 2)-th frame image. Specifically:

[0147] Table 3

[0148]

[0149] It can be seen from Table 3 that the view area A in Layer 1 is occluded, and Layer 1 is in the view area tracking process. Then, the VSYNC control node created by the electronic device still maintains the value of its limited frame rate. For example, as Figure 17 shown, this value can be set as low as 1 fps at the lowest and the screen refresh rate value at the highest.

[0150] That is to say, during the tracking state process, as Figure 17 shown, the view area A of Layer 1 is covered. Then, the VSYNC signal of the hardware will be intercepted by the VSYNC control node of this layer, and the VSYNC notification period of Layer 1 is calculated based on the limited value of the layer, and the unexpired VSYNC signals are blocked. As Figure 17 shown, the limited frame rate is 1 fps.

[0151] Second, the process of each window / view area from being occluded to unoccluded.

[0152] When the user continues to drag Window 2, the information of Window 1 remains unchanged, and Window 2 does not cover the view area A in Window 1. At this time, the frame image obtained by the electronic device can be Figure 16 the (N + 3)-th frame image shown

[0153] At the (N + 3)-th frame, as Figure 16 shown, since Layer 2 moves downward, the view area A of Layer 1 is no longer occluded. Therefore, the state of Layer 1 is updated, and the frame rate limit of Layer 1 is released. The following Table 4 shows the information of Layer 1 and Layer 2 in the (N + 3)-th frame image:

[0154] Table 4

[0155]

[0156] It can be seen that, as shown in Table 4, when the tracked view area A is found to be in a non-complete occlusion or unoccluded state during a frame-by-frame recognition process, the electronic device needs to recalculate the target frame rate of layer 1. If the target frame rate changes, the electronic device needs to immediately restart the frame rate improvement process for layer 1 where the view area A is located, that is, modify the frame rate limit value of the VSYNC control node, or cancel the frame rate limit.

[0157] That is to say, Figure 17 As shown, when it is detected that the viewing area A is not blocked, the electronic device immediately releases the frame rate limit of layer 1. When the first VSYNC signal after the VSYNC screen is released is sent, the previous rendering request of layer 1 can be responded to immediately, and the rendering frequency of layer 1 can be directly pulled back to the effect before the tracking state in the subsequent VSYNC signal, so as to achieve the effect of quickly restoring the rendering frame rate of layer 1.

[0158] The above description uses two windows as an example. If the electronic device creates multiple windows, the electronic device needs to detect the occlusion of each window. Only after all windows are detected can the electronic device render and draw the image. Figure 18 The image rendering process shown is as follows:

[0159] S1801. When the window layer is submitted for rendering and synthesis, the electronic device obtains the properties of the layer's dynamic refresh and updates the state identification table, including the layer area, z-order, and view area information (such as position, size, frame rate, etc.).

[0160] S1802: After all layers in this synthesis are submitted, the electronic device calculates the occlusion area of ​​each layer, that is, the area occluded by the upper layer, and updates the layer occlusion status indicator.

[0161] S1803, the electronic device detects the occlusion status mark of the layer. If the layer is not occluded, execute S1808; otherwise, add it to the tracking table and continue the following process.

[0162] S1804: The electronic device analyzes the occlusion status of each viewing area in the layer one by one based on the occluded area information of the layer, marks the occluded viewing area as being in an occluded state, and updates the state identification table.

[0163] S1805. The electronic device detects whether the viewing area of ​​the layer is blocked. If not, it goes to S18010 and continues to process the next layer. Otherwise, it executes S1806.

[0164] When calculating the new target frame rate of the layer of the electronic device, all occluded view areas are removed, and the maximum frame rate of the remaining unoccluded view areas is taken as the target frame rate value. If all view areas are occluded, the target frame rate value is set to the min value, and the min value can be pre-configured, such as 1fps.

[0165] S1807: The electronic device sets the new target frame rate as the limit frame rate of the layer and sets it in the window frame rate management unit.

[0166] S1808: For the unoccluded layer, the electronic device determines whether it has been tracked before. If it has been tracked, S1809 is executed; otherwise, S1810 is executed.

[0167] S1809: The electronic device cancels the view area tracking of the layer.

[0168] S1810: The electronic device analyzes the next window layer until all the windows in the foreground have been analyzed.

[0169] In this way, in the present application, by determining the occlusion relationship between windows, for the occluded windows, the electronic device uses the frame rate of the unoccluded view areas in the window for rendering, ignoring the frame rate of the occluded view areas, effectively preventing the consumption of the computing power and power consumption of the electronic device by ineffective rendering. In addition, the rendering operation is executed by the system of the electronic device without relying on the participation of the business application side.

[0170] In other words, the electronic device can actively adjust the rendering frame rate of the layer according to the occlusion situation of each view area of the layer, avoiding the accuracy of frame rate recognition when the window frame rate is inconsistent due to occlusion and refresh area. At the same time, the complexity of window frame rate rendering control is reduced, achieving the imperceptibility of upper-layer applications.

[0171] If there is no special explanation and logical conflict, the terms and / or descriptions between the various embodiments of the present application are consistent and can be referenced to each other. The technical features in different embodiments can be combined to form new embodiments according to their inherent logical relationships.

[0172] The above mainly introduces the solution provided by the embodiments of the present application from the perspective of methods. It can be understood that in order for an electronic device to implement the above functions, it includes the corresponding hardware structures and / or software modules for executing each function. Combining the units and algorithm steps of each example described in the embodiments disclosed in the present application, the embodiments of the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed in the form of hardware or computer-driven hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the technical solution of the embodiments of the present application.

[0173] The embodiments of the present application can divide the functional modules of the electronic device according to the above method examples. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional module. It should be noted that the division of units in the embodiments of the present application is illustrative, only a logical functional division, and there may be other division methods in actual implementation.

[0174] As Figure 19 shown, it is a schematic structural diagram of an electronic device provided by an embodiment of the present application. The electronic device 1000 can be used to implement the methods described in each of the above method embodiments. Exemplarily, the electronic device 1000 may specifically include: a display unit 1001 and a processing unit 1002.

[0175] Among them, the display unit 1001 is used to execute to support the electronic device 1000 to execute Figure 7 step S700 in Figure 7 or step S708 in

[0176] And / or, the display unit 1001 is further used to support the electronic device 1000 to execute other steps executed by the electronic device in the embodiments of the present application. Figure 7 The processing unit 1002 is used to execute to support the electronic device 1000 to execute

[0177] steps S701 to S707 in Figure 19 And / or, the processing unit 1002 is further used to support the electronic device 1000 to execute other steps executed by the electronic device in the embodiments of the present application.

[0178] Optionally, Figure 19The electronic device 1000 shown may further include a storage unit ( Figure 19 not shown in the figure), and the storage unit stores programs or instructions. When the processing unit 1002 executes the programs or instructions, it causes Figure 19 the electronic device 1000 shown to be able to execute the methods shown in Figure 7 and so on.

[0179] Figure 19 For the technical effects of the electronic device 1000 shown, reference may be made to Figure 7 the technical effects of the methods shown in and so on, which will not be elaborated here. Figure 19 The processing unit 1002 involved in the electronic device 1000 shown may be implemented by a processor or processor-related circuit components and may be a processor or a processing module. The communication unit may be implemented by a transceiver or transceiver-related circuit components and may be a transceiver or a transceiver module. The display unit 1001 may be implemented by components related to a display screen.

[0180] It should be understood that each step in the above method embodiments may be completed by the integrated logic circuit in the hardware of the processor or by instructions in software form. The method steps disclosed in combination with the embodiments of the present application may be directly embodied as being executed and completed by the hardware processor, or executed and completed by a combination of the hardware and software modules in the processor.

[0181] It should be noted that all relevant contents of each step involved in the above method embodiments may be cited to the function descriptions of the corresponding functional modules, which will not be elaborated here.

[0182] The embodiments of the present application further provide a computer-readable storage medium, including instructions, which when running on a computer, cause the computer to execute any of the above methods.

[0183] The embodiments of the present application further provide a computer program product containing instructions, which when running on a computer, cause the computer to execute any of the above methods.

[0184] The embodiments of the present application further provide a chip, which includes a processor and an interface circuit. The interface circuit is coupled to the processor. The processor is used to run computer programs or instructions to implement the above methods, and the interface circuit is used to communicate with other modules outside the chip.

[0185] Any feature or all or part of any step of the embodiments of the present application may be freely combined. The combined technical solutions are also within the scope of the present application.

[0186] In the description of this application, unless otherwise specified, " / " means "or". For example, A / B can mean A or B. "And / or" in this article is only a correlative relationship describing related objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist simultaneously, and B exists alone. In addition, "at least one" means one or more, and "a plurality of" means two or more. The words such as "first" and "second" do not limit the quantity and execution order, and the words such as "first" and "second" do not necessarily limit to be different.

[0187] In the description of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design solution described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Exactly speaking, using words such as "exemplary" or "for example" aims to present relevant concepts in a specific way.

[0188] Through the description of the above embodiments, those skilled in the art can clearly understand that, for the convenience and conciseness of description, only the above division of each functional module is used as an example. In actual applications, the above functions can be allocated to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.

[0189] In several embodiments provided by this application, it should be understood that the disclosed device and method can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there can be other division methods. For example, multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point, the displayed or discussed coupling or direct coupling or communication connection to each other can be through some interfaces. The indirect coupling or communication connection of the device or unit can be in electrical, mechanical or other forms.

[0190] The unit described as a separated component may or may not be physically separated. The component displayed as a unit may be a physical unit or multiple physical units, that is, it can be located in one place, or can be distributed to multiple different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0191] In addition, in each embodiment of the present application, each functional unit can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit.

[0192] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiments of the present application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. The software product is stored in a storage medium and includes several instructions for causing a device (which can be a single-chip microcomputer, a chip, etc.) or a processor to execute all or part of the steps of the methods described in the embodiments of the present application. The foregoing storage medium includes: various media such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disc that can store program codes.

[0193] The above content is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. An image rendering method, characterized in that, the method includes: Receiving a first refresh request for requesting to render a first window of a first application and a second window of a second application, where the first application and the second application may be the same or different; In response to the first refresh request, obtaining first information of the first window, where the first window includes a first view area and a second view area, and the first information includes a first frame rate of the first view area and a second frame rate of the second view area; and, Obtaining second information of the second window, where the second information includes information of each view area of the second window; Determining that the first view area is blocked by the second window according to the first information and the second information; Rendering the first window at the second frame rate.

2. The method according to claim 1, characterized in that, further includes: Adjusting the first frame rate of the first view area to a target frame rate, where the target frame rate is less than the first frame rate; Rendering the first view area at the target frame rate.

3. The method according to claim 1, characterized in that, further includes: Reusing the existing texture image of the first view area.

4. The method according to any one of claims 1-3, characterized in that, the first window further includes a third view area, and the first information further includes a third frame rate of the third view area; The rendering the first window at the second frame rate includes: When the second frame rate is greater than the third frame rate, rendering the second view area and the second view area at the second frame rate.

5. The method according to any one of claims 1-4, characterized in that, the first information and the second information further include: area information of each view area, stacking order of each window, and area information of each window; The determining that the first view area is blocked by the second window according to the first information and the second information includes: Determining that the first window is blocked by the second window according to the stacking order and area information of the first window and the stacking order and area information of the second window; Determining that the first view area is blocked by the second window according to the area information of the first view area, the area information of the second view area, and the area information of the second window.

6. The method according to any one of claims 1-5, characterized in that, after determining that the first view area is blocked by the second window according to the first information and the second information, further includes: Configuring a first mark for the first view area, where the first mark is an identifier of the blocked state.

7. The method according to claim 6, characterized in that, further includes: Detecting the occlusion state of the first view area; When detecting that the first view area is not blocked, deleting the first mark of the first view area.

8. The method according to any one of claims 1-7, characterized in that, the first refresh request is further used to request to render a third window of a third application, where the third application may be the same as or different from the first application and the second application, and the method further includes: In response to the first refresh request, obtain third information of the third window, where the third window includes a third view area, and the third information includes a third frame rate of the third view area. After determining that the first view area is blocked by the second window, it further includes: Determine whether the second window and the third window are blocked according to the first information, the second information, and the third information.

9. An electronic device, characterized in that the electronic device includes: a receiving module, configured to receive a first refresh request, where the first refresh request is used to request rendering of a first window of a first application and a second window of a second application, and the first application and the second application are the same or different; an obtaining module, configured to, in response to the first refresh request, obtain first information of the first window, where the first window includes a first view area and a second view area, and the first information includes a first frame rate of the first view area and a second frame rate of the second view area; and obtain second information of the second window, where the second information includes information of each view area of the second window; a determining module, configured to determine that the first view area is blocked by the second window according to the first information and the second information; a rendering module, configured to render the first window according to the second frame rate.

10. The electronic device according to claim 9, characterized in that it further includes: an adjustment module, configured to adjust the first frame rate of the first view area to a target frame rate, where the target frame rate is less than the first frame rate; the rendering module is configured to render the first view area according to the target frame rate.

11. The electronic device according to claim 9, characterized in that it further includes: a multiplexing module, configured to multiplex an existing texture image of the first view area.

12. The electronic device according to any one of claims 9-11, characterized in that the first window further includes a third view area, and the first information further includes a third frame rate of the third view area; the rendering module is configured to: when the second frame rate is greater than the third frame rate, render the second view area and the second view area according to the second frame rate.

13. The electronic device according to any one of claims 9-12, characterized in that the first information and the second information further include: area information of each view area, stacking order of each window, and area information of each window; the determining module is configured to: determine that the first window is blocked by the second window according to the stacking order and area information of the first window and the stacking order and area information of the second window; determine that the first view area is blocked by the second window according to the area information of the first view area, the area information of the second view area, and the area information of the second window.

14. The electronic device according to any one of claims 9-13, characterized in that it further includes: a configuration module, configured to configure a first mark for the first view area, where the first mark is an identifier of a blocked state.

15. The electronic device according to claim 14, characterized in that it further includes: A detection module, configured to detect an occlusion state of the first view area; A deletion module, configured to delete the first mark in the first view area when it is detected that the first view area is not occluded.

16. The electronic device according to claim 15, wherein, the first refresh request is further configured to request rendering of a third window of a third application, the third application being the same as or different from the first application and the second application, the obtaining module is configured to obtain third information of the third window in response to the first refresh request, the third window including a third view area, and the third information including a third frame rate of the third view area; the determining module is configured to determine whether the second window and the third window are occluded according to the first information, the second information, and the third information.

17. An electronic device, wherein, the electronic device includes: one or more processors; and a memory storing code; when the code is executed by the processor, the electronic device is caused to execute the method according to any one of claims 1-8.

18. A computer-readable storage medium, wherein, it includes computer instructions, when the computer instructions are run on an electronic device, the electronic device is caused to execute the method according to any one of claims 1-8.

Citation Information

Cited By

  • Containerized gap application multi-window rendering method based on screenshot increment extraction

    CN122044917A

  • A containerized multi-window rendering method for a mirco-service application based on screenshot incremental extraction

    CN122044917B