Rendering method and device, electronic equipment and readable storage medium
The WBMS process obtains window layer information and directly performs fuzzy processing in the application process, solving the problems of low efficiency and high power consumption in the prior art, and achieving more efficient fuzzy processing and power consumption reduction.
Patent Information
- Application Number
- CN202411015504.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-26
- Publication Date
- 2024-11-01
AI Technical Summary
Prior Art In the process of window blur processing in electronic devices, the graphics processor is inefficient and consumes a lot of GPU resources, resulting in an increase in power consumption.
After receiving the blur rendering request from the foreground window through the WBMS process, it obtains the window layer information, determines the visible area, and sends a blur rendering instruction to the corresponding application process, and directly performs blur processing in the application process to avoid the process of screenshot and exporting images .
It reduces the power consumption of electronic devices during window blur processing, improves processing efficiency, and saves GPU resources.
Smart Images

Figure CN118885248A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of electronic technology, and specifically relates to a rendering method, device, electronic device and readable storage medium. Background Art
[0002] As electronic devices develop towards intelligence, there are more and more applications (Application, APP), and the display effects of user interfaces (User Interface, UI) are becoming more and more abundant. Usually, in the case of drop-down menus, overlapping displays, etc., the display interface may be composed of multiple windows superimposed on each other, specifically including a foreground window corresponding to a foreground application and a background window corresponding to a background application.
[0003] In order to achieve a better interface display effect, in situations such as drop-down menus and overlapping displays, the background of the foreground window, that is, the background window, needs to be blurred to avoid visual conflicts. In related technologies, the background blurring method of the foreground window usually obtains the image of the background window, determines the range and area that needs to be blurred, cuts out a copy of the area, blurs the copy, and then maps the blurred image obtained after processing to the display layer of the upper foreground window, and finally renders it to the screen.
[0004] In the above processing methods, since the blurring process is performed in a graphics processing unit (GPU), the image processing efficiency is low, and the copying form consumes a large amount of GPU resources, thereby increasing the power consumption of the electronic device. Summary of the invention
[0005] The purpose of the embodiments of the present application is to provide a rendering method, device, electronic device and readable storage medium, which can reduce the power consumption of the electronic device during window blur processing.
[0006] In a first aspect, an embodiment of the present application provides a rendering method, which includes: when a blur rendering request sent by an application process corresponding to a first foreground window is received through a WBMS process, window layer information is obtained through the WBMS process; based on the window layer information, a visible area of a second foreground window is determined through the WBMS process, and the display level of the first foreground window is higher than the display level of the second foreground window; a blur rendering instruction is sent to the application process corresponding to the second foreground window through the WBMS process, and the blur rendering instruction is used to inform the application process corresponding to the second foreground window to perform window blur rendering processing; and blur rendering processing is performed on the visible area of the second foreground window through the application process corresponding to the second foreground window.
[0007] In a second aspect, an embodiment of the present application provides a rendering device, which includes: an acquisition module, a determination module and a processing module; the acquisition module is used to obtain window layer information through the WBMS process when a blur rendering request sent by an application process corresponding to the first foreground window is received through the WBMS process; the determination module is used to determine the visible area of the second foreground window based on the window layer information through the WBMS process, and the display level of the first foreground window is higher than the display level of the second foreground window; the sending module is used to send a blur rendering instruction to the application process corresponding to the second foreground window through the WBMS process, and the blur rendering instruction is used to inform the application process corresponding to the second foreground window to perform window blur rendering processing; the processing module is used to perform blur rendering processing on the visible area of the second foreground window through the application process corresponding to the second foreground window.
[0008] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the program or instructions are executed by the processor, the steps of the method described in the first aspect are implemented.
[0009] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0010] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.
[0011] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method described in the first aspect.
[0012] In an embodiment of the present application, when a fuzzy rendering request sent by an application process corresponding to the first foreground window is received through a WBMS process, the window layer information is obtained through the WBMS process; through the WBMS process, based on the window layer information, the visible area of the second foreground window is determined, and the display level of the first foreground window is higher than the display level of the second foreground window; through the WBMS process, a fuzzy rendering instruction is sent to the application process corresponding to the second foreground window, and the fuzzy rendering instruction is used to inform the application process corresponding to the second foreground window to perform window fuzzy rendering processing; through the application process corresponding to the second foreground window, fuzzy rendering processing is performed on the visible area of the second foreground window. In this solution, the visible layer information of the foreground window and the visible layer information of the background window can be obtained through the WBMS process, so that the visible area of the background window can be directly determined, that is, the area in the background window that needs to be blurred is determined, and then the application process corresponding to the background window performs fuzzy processing on the area, so there is no need to perform the process of saving the screenshot of the background window to the GPU and exporting the blurred image from the GPU, thereby saving the GPU processing step, and then reducing the power consumption of the electronic device during the window blur processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 This is one of the flowchart diagrams of a rendering method provided in an embodiment of the present application;
[0014] Figure 2 This is a second flowchart of a rendering method provided in an embodiment of the present application;
[0015] Figure 3 This is a third flowchart of a rendering method provided in an embodiment of the present application;
[0016] Figure 4 This is a fourth flowchart of a rendering method provided in an embodiment of the present application;
[0017] Figure 5 This is a fifth flowchart of a rendering method provided in an embodiment of the present application;
[0018] Figure 6 is a structural schematic diagram of a rendering device provided in an embodiment of the present application;
[0019] Figure 7 This is one of the hardware structure diagrams of an electronic device provided in an embodiment of the present application;
[0020] Figure 8 This is the second schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0021] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0022] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0023] The terms "at least one (item)", "at least one of" and the like in the specification and claims of the present application refer to any one, any two or a combination of more than two of the objects included therein. For example, at least one (item) of a, b, and c can be represented by: "a", "b", "c", "a and b", "a and c", "b and c" and "a, b and c", where a, b, and c can be single or multiple. Similarly, "at least two (items)" refers to two or more, and its meaning is similar to that of "at least one (item)".
[0024] It should be noted that the rendering method provided in the embodiments of the present application can be executed by electronic devices such as mobile phones, tablet computers, laptop computers, PDAs, and vehicle-mounted electronic devices. In some embodiments of the present application, the rendering method provided in the embodiments of the present application is described by taking the electronic device as the execution subject to execute the rendering method as an example.
[0025] The following is an explanation of the technical terms involved in the embodiments of the present application:
[0026] Process: An instance of a program running in the system of an electronic device, which is an independent entity in the system of an electronic device.
[0027] Foreground application: The application that the user is currently interacting with or using.
[0028] Foreground window: The window that the user currently sees and interacts with.
[0029] Background apps: An app's process is running, but the user is not currently interacting with the app.
[0030] Background window: The display window corresponding to the background application.
[0031] Window: The area on the display screen of an electronic device used to display and operate applications.
[0032] Rendering: The process of converting graphics or image data into a visible image.
[0033] Screenshot: Capturing the image or interface displayed on the display screen of an electronic device.
[0034] Motion effect: Dynamic effect refers to the visual effect of interface elements during movement.
[0035] Double Data Rate (DDR) bandwidth: DDR bandwidth is a metric used to describe the data transfer speed of the memory or bus system of an electronic device. It indicates the amount of data that can be transferred per unit time, usually measured in bits per second (bps). Higher DDR bandwidth usually means faster data transfer speeds.
[0036] Graphics Processing Unit (GPU): also known as display core, visual processor, display chip GPU, mainly used to process graphics and image data.
[0037] Hardware Composer (HWC): A hardware module responsible for synthesizing and rendering graphics data and displaying it on the display screen of an electronic device.
[0038] Static blur: The image blur effect does not change in response to user interaction or changes in image content.
[0039] Dynamic blur: Different from static blur, the blur effect changes with user interaction or changes in image content. It is often called "real-time blur".
[0040] Currently, in the field of electronic technology, electronic devices such as smart phones, when pulling down the notification bar, starting an application, or exiting an application, in order to reflect advanced UI display effects, will blur the background image of the foreground UI interface. There are both static and dynamic blur effects.
[0041] Normally, the foreground window and the background window each have their own rendering process, and can render the image content in the window display area in their respective processes. In order to achieve a cross-process window blur effect, the existing solution in the Android system is: first, the background window needs to be rendered on the GPU side, then it is copied from the GPU to the memory in the form of a screenshot, and then the screenshot is blurred, and finally the blurred screenshot and the display layer of the foreground window are combined and displayed together.
[0042] However, in this process, whether copying screenshots or uploading renderings requires DDR bandwidth and GPU resources, which is inefficient.
[0043] In the rendering method provided in the embodiment of the present application, when a fuzzy rendering request sent by an application process corresponding to the first foreground window is received through the WBMS process, the window layer information is obtained through the WBMS process; through the WBMS process, based on the window layer information, the visible area of the second foreground window is determined, and the display level of the first foreground window is higher than the display level of the second foreground window; through the WBMS process, a fuzzy rendering instruction is sent to the application process corresponding to the second foreground window, and the fuzzy rendering instruction is used to inform the application process corresponding to the second foreground window to perform window fuzzy rendering processing; through the application process corresponding to the second foreground window, fuzzy rendering processing is performed on the visible area of the second foreground window. In this solution, the determination of the visible area of the background window is completed through the WBMS process, and then the fuzzy processing is performed on the determined visible area through the application process corresponding to the background window. In this way, the process of saving a screenshot of the background window to the memory and exporting the blurred image from the memory is avoided, thereby saving the memory processing step and reducing power consumption.
[0044] The execution subject of the rendering method provided in the embodiment of the present application may be a rendering device, and the rendering device may be an electronic device, or a functional module in an electronic device. The technical solution provided in the embodiment of the present application is described below by taking an electronic device as an example.
[0045] The present application embodiment provides a rendering method. Figure 1 FIG. 1 is a flowchart of a rendering method provided by an embodiment of the present application, which can be applied to electronic devices. Figure 1 As shown, the rendering method provided in the embodiment of the present application may include the following steps 201 to 204.
[0046] Step 201: When the electronic device receives a fuzzy rendering request sent by an application process corresponding to a first foreground window through a WBMS process, the electronic device obtains window layer information through the WBMS process.
[0047] In some embodiments of the present application, the WBMS process is used to manage the window blurring process among multiple processes.
[0048] In some embodiments of the present application, the WBMS process is used to perform at least one of the following operations:
[0049] receiving at least one blur rendering request;
[0050] Sending at least one blur rendering instruction;
[0051] Get the window's visible layer information.
[0052] In some embodiments of the present application, the first foreground window is the window with the highest display level.
[0053] In some embodiments of the present application, the first foreground window is a window corresponding to an application process currently running on the electronic device and is a window that the user is interactively using.
[0054] Exemplarily, the above-mentioned blurred rendering request may be a blurred rendering request sent by the first foreground window to the WBMS process through the application process corresponding to the first foreground window after receiving the user's interactive operation. The user's interactive operation may be a user's swiping up or pulling down on the electronic device screen, or clearing background operations, etc., which is not limited in this application.
[0055] Exemplarily, the blur rendering instruction may be a blur rendering instruction sent by the electronic device to at least one second foreground window through the WBMS process.
[0056] It can be understood that the display level of the second foreground window is lower than the display level of the first foreground window.
[0057] Exemplarily, the WBMS process may be an existing process in the electronic device, or may be a newly added process.
[0058] In some embodiments of the present application, the above-mentioned window layer information includes visible layer information of the first foreground window and all layer information of the second foreground window.
[0059] In some embodiments of the present application, the visible layer information of the first foreground window is the layer information corresponding to the image displayed on the interface when the first foreground window is currently running.
[0060] In some embodiments of the present application, the layer information of the second foreground window is the layer information corresponding to the image displayed in the second foreground window.
[0061] In some embodiments of the present application, the above-mentioned window layer information includes but is not limited to application information to which the visible layer belongs, relative hierarchical order of the layers, and image element information included in the layers.
[0062] Step 202: The electronic device determines the visible area of the second foreground window based on the window layer information through the WBMS process.
[0063] In some embodiments of the present application, the display level of the second foreground window is lower than that of the first foreground window.
[0064] Exemplarily, the number of the second foreground windows may be one or more.
[0065] In some embodiments of the present application, the second foreground window may be a window corresponding to an application process currently running on the electronic device, but the user is not interactively using it.
[0066] In some embodiments of the present application, the visible area of the second foreground window is an area that is not blocked by the first foreground window.
[0067] In some embodiments of the present application, the electronic device determines the display area of the first foreground window based on the visible layer information of the first foreground window, and then determines the area corresponding to the layer information of the second foreground window, excluding the display area of the first foreground window, as the visible area.
[0068] Optionally, in some embodiments of the present application, the above step 202 specifically includes steps 202a to 202c:
[0069] Step 202a: The electronic device determines the visible area of the first foreground window according to the visible layer information of the first foreground window through the WBMS process.
[0070] In some embodiments of the present application, based on the visible layer information of the first foreground window, the area where the foreground window is currently running and displayed is determined as the visible area of the foreground window.
[0071] Step 202b: The electronic device determines, through the WBMS process, an area corresponding to the layer information of the second foreground window, which corresponds to the visible area of the first foreground window, as an invisible area of the second foreground window.
[0072] In some embodiments of the present application, the electronic device determines, through the WBMS process, an area in the layer information corresponding area of the second foreground window that overlaps with the visible area of the first foreground window as an invisible area of the second foreground window.
[0073] Step 202c: The electronic device determines the area in the second foreground window except the invisible area as the visible area of the second foreground window through the WBMS process.
[0074] In some embodiments of the present application, if the area corresponding to the layer information of the second foreground window is larger than the area corresponding to the visible layer information of the first foreground window, the area corresponding to the visible layer information of the first foreground window is determined as an invisible area, and the area corresponding to the layer information of the second foreground window is removed from the invisible area to determine the visible area of the second foreground window.
[0075] For example, if the area size corresponding to the layer information of the second foreground window is 200*100, the area size corresponding to the visible layer information of the first foreground window is 100*100, and the area corresponding to the visible layer information of the first foreground window is in the middle of the area corresponding to the layer information of the second foreground window, then the 100*100 in the middle of the area corresponding to the layer information of the second foreground window is an invisible area, and the two areas of 50*100 on the left and right of the area corresponding to the layer information of the second foreground window are visible areas.
[0076] Step 203: The electronic device sends a blur rendering instruction to the application process corresponding to the second foreground window through the WBMS process.
[0077] In some embodiments of the present application, the above-mentioned blur rendering instruction is used to inform the application process corresponding to the second foreground window to perform blur rendering processing.
[0078] In some embodiments of the present application, after receiving the blur rendering instruction from the WBMS process through the application process corresponding to the second foreground window, the electronic device performs blur rendering processing on the visible area of the second foreground window.
[0079] It is understandable that if there are multiple second foreground windows, the electronic device sends the blur rendering instructions of different second foreground windows to the application processes of the corresponding second foreground windows respectively through the above-mentioned WBMS process.
[0080] In some embodiments of the present application, the blur rendering instruction carries at least one of the following information:
[0081] Area information of visible area;
[0082] Blur effect information;
[0083] Blur degree information.
[0084] Exemplarily, the region information of the visible region may include, but is not limited to, pixel points included in the region, the location of the region, image element information in the region, and the like.
[0085] Exemplarily, the blur effect information may be static blur, or dynamic blur, or partial dynamic blur and partial static blur.
[0086] Exemplarily, the blur level information may be light blur, heavy blur, or blurred according to a blur threshold parameter.
[0087] Step 204: The electronic device performs blur rendering processing on the visible area of the second foreground window through the application process corresponding to the second foreground window.
[0088] In some embodiments of the present application, the above-mentioned execution of blur rendering processing may be static blur processing or dynamic blur processing of the visible area of the second foreground window.
[0089] In some embodiments of the present application, the above-mentioned blur rendering processing can be specifically performed on the GPU side of the electronic device.
[0090] Exemplarily, the static blur is an image blur effect that does not change with user interaction or changes in image content.
[0091] For example, the above dynamic blur is different from static blur, and the blur effect changes with user interaction or changes in image content. It is also often called "real-time blur".
[0092] Optionally, in some embodiments of the present application, combined with Figure 1 ,like Figure 2 As shown, in combination with the above step 203, the above step 204 specifically includes step 204a:
[0093] Step 204a: When the electronic device receives a blur rendering instruction through the application process corresponding to the second foreground window, the electronic device performs blur rendering processing on the visible area of the second foreground window through the application process corresponding to the second foreground window.
[0094] In some embodiments of the present application, the electronic device performs blur processing on the visible area of the second foreground window on the GPU side according to the information carried in the blur rendering instruction through the application process corresponding to the second foreground window.
[0095] In this way, the electronic device can determine the visible area of each second foreground window through the WBMS process, and then carry the corresponding information in the blurred rendering instruction to the application process corresponding to each second foreground window, so that the application process corresponding to the second foreground window can directly perform blurred processing based on the information, thereby improving the efficiency of the window blurred rendering processing.
[0096] In the rendering method provided in the embodiment of the present application, when a fuzzy rendering request sent by an application process corresponding to the first foreground window is received through a WBMS process, the window layer information is obtained through the WBMS process; through the WBMS process, based on the window layer information, the visible area of the second foreground window is determined, and the display level of the first foreground window is higher than the display level of the second foreground window; through the WBMS process, a fuzzy rendering instruction is sent to the application process corresponding to the second foreground window, and the fuzzy rendering instruction is used to inform the application process corresponding to the second foreground window to perform window fuzzy rendering processing; through the application process corresponding to the second foreground window, fuzzy rendering processing is performed on the visible area of the second foreground window. In this solution, the visible layer information of the foreground window and the visible layer information of the background window can be obtained through the WBMS process, so that the visible area of the background window can be directly determined, that is, the area in the background window that needs to be blurred is determined, and then the application process corresponding to the background window performs fuzzy processing on the area, so there is no need to perform the process of saving the screenshot of the background window to the GPU and exporting the blurred image from the GPU, thereby saving the GPU processing step, and then reducing the power consumption of the electronic device during the window blur processing.
[0097] Optionally, in some embodiments of the present application, combined with Figure 1 ,like Figure 3 As shown, before the above step 201, the rendering method provided in the embodiment of the present application further includes step 301, and the above step 201 may specifically include step 201a:
[0098] Step 301: The electronic device sends a fuzzy rendering request to the WBMS process through the application process corresponding to the first foreground window.
[0099] In some embodiments of the present application, the above-mentioned blur rendering request is used to request the WBMS process to perform window blur rendering processing.
[0100] In some embodiments of the present application, the triggering condition for sending the blur rendering request to the WBMS process is receiving an operation of the user on the first foreground window.
[0101] Exemplarily, the user's operation on the first foreground window may be to pull down a notification bar, or to reduce a window display area, or to view an application process corresponding to the second foreground window.
[0102] In some embodiments of the present application, when receiving a user operation on the first foreground window, the electronic device sends a fuzzy rendering request to the WBMS process through the application process corresponding to the first foreground window.
[0103] Further, in some embodiments of the present application, the above step 201 specifically includes step 201a:
[0104] Step 201a: When the electronic device receives a fuzzy rendering request through the WBMS process, the electronic device obtains window layer information from the system layer synthesis management service process through the WBMS process.
[0105] In some embodiments of the present application, the above-mentioned system layer synthesis management service (SurfaceFlinger) process is used to manage the layer information of all layers of the electronic device system.
[0106] In some embodiments of the present application, since the window layer information of all applications in the electronic device is stored in the SurfaceFlinger process, the electronic device can directly obtain the required window layer information from the SurfaceFlinger process through the WBMS process.
[0107] In this way, since the electronic device can obtain window layer information directly from the SurfaceFlinger process through the WBMS process to determine the area that needs to be blurred rendering, it can avoid the electronic device using GPU resources to obtain screenshot images of the background window, thereby reducing the power consumption of the electronic device.
[0108] Optionally, in some embodiments of the present application, combined with Figure 1 ,like Figure 4 As shown, after the above step 204, the rendering method provided in the embodiment of the present application further includes steps 501 and 502:
[0109] Step 501: The electronic device obtains a blurred window image through a system layer synthesis management service process.
[0110] In some embodiments of the present application, the above-mentioned window blurred image is an image obtained after blurring the visible area.
[0111] In some embodiments of the present application, the application process corresponding to the second foreground window performs blur processing on the visible area on the GPU side and then transmits the blurred image to the SurfaceFlinger process.
[0112] Step 502: The electronic device fuses the window blurred image with the display layer of the first foreground window through the system layer synthesis management service process to obtain a foreground display image.
[0113] In some embodiments of the present application, the foreground display image includes a clear area and a blurred area.
[0114] In some embodiments of the present application, the clear area is the area displayed by the first foreground window, and the blurred area is the background area visible to the second foreground window except the first foreground window.
[0115] In some embodiments of the present application, the electronic device may fuse the window blurred image with the display layer currently displayed by the first foreground window through a hardware compositing renderer (Hardware Composer, HWC).
[0116] In some embodiments of the present application, the above-mentioned HWC is a hardware module responsible for synthesizing and rendering graphic data and displaying it on the display screen of the electronic device.
[0117] In some embodiments of the present application, after the electronic device obtains the foreground display image, it renders and displays it on the display screen of the electronic device.
[0118] In this way, the electronic device can directly merge the acquired blurred window image with the display layer of the first foreground window to obtain an image with a clear first foreground window and a blurred background area, and render it on the display screen of the electronic device to improve the aesthetics during user use.
[0119] The following is a detailed description of the process of the rendering method provided in the embodiment of the present application using a specific embodiment. Figure 5 As shown, it specifically includes steps A1 to A5:
[0120] Step A1: The electronic device sends a fuzzy rendering request to the WBMS process through the foreground process corresponding to the first foreground window.
[0121] Step A2: After receiving the fuzzy rendering request through the WBMS process, the electronic device obtains window layer information from the SurfaceFlinger end, specifically including the visible layer information of the first foreground window and the layer information of the second foreground window.
[0122] Step A3: The electronic device determines the visible area of the second foreground window, that is, the area where fuzzy rendering processing needs to be performed, through the WBMS process according to the acquired window layer information, and sends a fuzzy rendering instruction to the second foreground window.
[0123] Step A4: After the electronic device receives the blurred rendering instruction through the application process of the second foreground window, it uses the GPU to perform blurred rendering processing on the visible area of the second foreground window according to the information carried in the blurred rendering instruction, obtains a window blurred image, and sends it to the SurfaceFlinger end.
[0124] Step A5: After receiving the blurred window image through the SurfaceFlinger end, the electronic device merges the blurred window image with the display layer of the second foreground window to obtain the foreground display image.
[0125] In this way, the visible layer information of the first foreground window and the layer information of the second foreground window can be obtained through the WBMS process, so as to directly determine the area in the second foreground window that needs to be blurred, and then perform blurring on the area through the application process corresponding to the second foreground window. Therefore, there is no need to save the screenshot of the second foreground window to the GPU and export the blurred rendered image from the GPU, thereby saving the GPU processing steps and reducing the power consumption of the electronic device during the window blurring process.
[0126] Each of the above-mentioned method embodiments, or various possible implementation methods in each method embodiment can be executed separately, or any two or more of them can be executed in combination with each other. The specific implementation method can be determined according to actual usage requirements, and the embodiments of the present application do not limit this.
[0127] The rendering method provided in the embodiment of the present application can be executed by an electronic device or a rendering device. In the embodiment of the present application, the rendering device provided in the embodiment of the present application is described by taking the rendering method executed by the rendering device as an example.
[0128] Figure 6 A possible structural diagram of a rendering device involved in an embodiment of the present application is shown. Figure 6 As shown, the rendering device 700 may include: an acquisition module 701, a determination module 702, a sending module 703 and a processing module 704;
[0129] Among them, the above-mentioned acquisition module 701 is used to obtain window layer information through the WBMS process when a blur rendering request sent by the application process corresponding to the first foreground window is received through the WBMS process; the above-mentioned determination module 702 is used to determine the visible area of the second foreground window through the WBMS process based on the window layer information obtained by the above-mentioned acquisition module 701, and the display level of the first foreground window is higher than the display level of the second foreground window; the above-mentioned sending module 703 is used to send a blur rendering instruction to the application process corresponding to the second foreground window through the WBMS process, and the blur rendering instruction is used to inform the application process corresponding to the second foreground window to perform window blur rendering processing; the above-mentioned processing module 704 is used to perform blur rendering processing on the visible area of the second foreground window through the application process corresponding to the second foreground window.
[0130] Optionally, in some embodiments of the present application, the sending module 703 is also used for the acquisition module 701 to send a fuzzy rendering request to the WBMS process through the application process corresponding to the first foreground window before acquiring the window layer information through the WBMS process when the fuzzy rendering request is received from the application process corresponding to the first foreground window through the WBMS process; the acquisition module 701 is specifically used to acquire the window layer information from the system layer synthesis management service process through the WBMS process when the fuzzy rendering request is received through the WBMS process.
[0131] Optionally, in some embodiments of the present application, the above-mentioned determination module 702 is specifically used to:
[0132] Determine the visible area of the first foreground window according to the visible layer information of the first foreground window through the WBMS process;
[0133] Determine, through the WBMS process, an area corresponding to the layer information of the second foreground window, which corresponds to the visible area of the first foreground window, as an invisible area of the second foreground window;
[0134] Through the WBMS process, the area in the second foreground window except the invisible area is determined as the visible area of the second foreground window.
[0135] Optionally, in some embodiments of the present application, the above-mentioned processing module 704 is specifically used to perform blurred rendering processing on the visible area of the second foreground window through the application process corresponding to the second foreground window when a blurred rendering instruction is received through the application process corresponding to the second foreground window.
[0136] Optionally, in some embodiments of the present application, the blur rendering instruction carries at least one of the following information:
[0137] Area information of visible area;
[0138] Blur rendering effect information;
[0139] Blur rendering degree information.
[0140] In the rendering device provided in the embodiment of the present application, when a fuzzy rendering request sent by an application process corresponding to the first foreground window is received through a WBMS process, the window layer information is obtained through the WBMS process; through the WBMS process, based on the window layer information, the visible area of the second foreground window is determined, and the display level of the first foreground window is higher than the display level of the second foreground window; through the WBMS process, a fuzzy rendering instruction is sent to the application process corresponding to the second foreground window, and the fuzzy rendering instruction is used to inform the application process corresponding to the second foreground window to perform window fuzzy rendering processing; through the application process corresponding to the second foreground window, fuzzy rendering processing is performed on the visible area of the second foreground window. In this solution, the visible layer information of the foreground window and the visible layer information of the background window can be obtained through the WBMS process, so that the visible area of the background window can be directly determined, that is, the area in the background window that needs to be blurred is determined, and then the application process corresponding to the background window performs fuzzy processing on the area, so there is no need to perform the process of saving the screenshot of the background window to the GPU and exporting the blurred image from the GPU, thereby saving the GPU processing step, and then reducing the power consumption of the rendering device during the window blur processing.
[0141] The rendering device in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or it can be other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
[0142] The rendering device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0143] The rendering device provided in the embodiment of the present application can implement each process implemented in the rendering method embodiment, and will not be described again here to avoid repetition.
[0144] Alternatively, if Figure 7 As shown, an embodiment of the present application further provides an electronic device 800, including a processor 801 and a memory 802, wherein the memory 802 stores a program or instruction that can be executed on the processor 801, and when the program or instruction is executed by the processor 801, the various steps of the above-mentioned rendering method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0145] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.
[0146] Figure 8 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.
[0147] The electronic device 100 includes but is not limited to components such as a radio frequency unit 101, a network module 102, an audio output unit 103, an input unit 104, a sensor 105, a display unit 106, a user input unit 107, an interface unit 108, a memory 109, and a processor 110.
[0148] Those skilled in the art will appreciate that the electronic device 100 may also include a power source (such as a battery) for supplying power to various components, and the power source may be logically connected to the processor 110 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Figure 8 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.
[0149] Among them, the above-mentioned processor 110 is used to obtain window layer information through the WBMS process when a blurred rendering request sent by the application process corresponding to the first foreground window is received through the WBMS process; the above-mentioned processor 110 is also used to determine the visible area of the second foreground window through the WBMS process based on the window layer information obtained by the above-mentioned processor 110, and the display level of the first foreground window is higher than the display level of the second foreground window; the above-mentioned radio frequency unit 101 is used to send a blurred rendering instruction to the application process corresponding to the second foreground window through the WBMS process, and the blurred rendering instruction is used to inform the application process corresponding to the second foreground window to perform window blurred rendering processing; the above-mentioned processor 110 is also used to perform blurred rendering processing on the visible area of the second foreground window through the application process corresponding to the second foreground window.
[0150] Optionally, in some embodiments of the present application, the above-mentioned radio frequency unit 101 is also used for the above-mentioned processor 110 to send a blurred rendering request to the WBMS process through the application process corresponding to the first foreground window before obtaining the window layer information through the WBMS process when the blurred rendering request sent by the application process corresponding to the first foreground window is received through the WBMS process; the above-mentioned processor 110 is specifically used to obtain the window layer information from the system layer synthesis management service process through the WBMS process when the blurred rendering request is received through the WBMS process.
[0151] Optionally, in some embodiments of the present application, the processor 110 is specifically configured to:
[0152] Determine the visible area of the first foreground window according to the visible layer information of the first foreground window through the WBMS process;
[0153] Determine, through the WBMS process, an area corresponding to the layer information of the second foreground window, which corresponds to the visible area of the first foreground window, as an invisible area of the second foreground window;
[0154] Through the WBMS process, the area in the second foreground window except the invisible area is determined as the visible area of the second foreground window.
[0155] Optionally, in some embodiments of the present application, the above-mentioned processor 110 is specifically used to perform blurred rendering processing on the visible area of the second foreground window through the application process corresponding to the second foreground window when a blurred rendering instruction is received through the application process corresponding to the second foreground window.
[0156] Optionally, in some embodiments of the present application, the blur rendering instruction carries at least one of the following information:
[0157] Area information of visible area;
[0158] Blur rendering effect information;
[0159] Blur rendering degree information.
[0160] In the electronic device provided by the embodiment of the present application, when a fuzzy rendering request sent by an application process corresponding to the first foreground window is received through a WBMS process, the window layer information is obtained through the WBMS process; through the WBMS process, based on the window layer information, the visible area of the second foreground window is determined, and the display level of the first foreground window is higher than the display level of the second foreground window; through the WBMS process, a fuzzy rendering instruction is sent to the application process corresponding to the second foreground window, and the fuzzy rendering instruction is used to inform the application process corresponding to the second foreground window to perform window fuzzy rendering processing; through the application process corresponding to the second foreground window, fuzzy rendering processing is performed on the visible area of the second foreground window. In this solution, the visible layer information of the foreground window and the visible layer information of the background window can be obtained through the WBMS process, so that the visible area of the background window can be directly determined, that is, the area in the background window that needs to be blurred is determined, and then the application process corresponding to the background window performs fuzzy processing on the area, so there is no need to perform the process of saving the screenshot of the background window to the GPU and exporting the blurred image from the GPU, thereby saving the GPU processing step, and then reducing the power consumption of the electronic device during the window blur processing.
[0161] It should be understood that in the embodiment of the present application, the input unit 104 may include a graphics processor (Graphics Processing Unit, GPU) 1041 and a microphone 1042, and the graphics processor 1041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 106 may include a display panel 1061, and the display panel 1061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 107 includes a touch panel 1071 and at least one of other input devices 1072. The touch panel 1071 is also called a touch screen. The touch panel 1071 may include two parts: a touch detection device and a touch controller. Other input devices 1072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
[0162] The memory 109 can be used to store software programs and various data. The memory 109 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 109 may include a volatile memory or a non-volatile memory, or the memory 109 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 109 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
[0163] The processor 110 may include one or more processing units; optionally, the processor 110 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 110.
[0164] An embodiment of the present application further provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned rendering method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0165] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0166] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned rendering method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0167] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0168] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned rendering method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0169] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0170] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0171] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A rendering method, characterized in that: The method comprises: When a fuzzy rendering request sent by an application process corresponding to the first foreground window is received through a window fuzzy management service WBMS process, the window layer information is obtained through the WBMS process; Determining, by the WBMS process, a visible area of a second foreground window based on the window layer information, wherein a display level of the first foreground window is higher than a display level of the second foreground window; Sending a blur rendering instruction to the application process corresponding to the second foreground window through the WBMS process, wherein the blur rendering instruction is used to inform the application process corresponding to the second foreground window to perform window blur rendering processing; Through the application process corresponding to the second foreground window, blur rendering processing is performed on the visible area of the second foreground window.
2. The method according to claim 1, characterized in that: In the case where a fuzzy rendering request sent by an application process corresponding to the first foreground window is received through the window fuzzy management service WBMS process, before obtaining the window layer information through the WBMS process, the method further includes: Sending a fuzzy rendering request to the WBMS process through the application process corresponding to the first foreground window; In the case where a fuzzy rendering request sent by an application process corresponding to the first foreground window is received through a window fuzzy management service WBMS process, obtaining window layer information through the WBMS process includes: When the fuzzy rendering request is received through the WBMS process, the window layer information is obtained from the system layer synthesis management service process through the WBMS process.
3. The method according to claim 1, characterized in that The window layer information includes visible layer information of the first foreground window and layer information of the second foreground window; The determining, through the WBMS process, the visible area of the second foreground window based on the window layer information includes: Determining, by the WBMS process, a visible area of the first foreground window according to the visible layer information of the first foreground window; Determining, through the WBMS process, an area corresponding to the layer information of the second foreground window, which corresponds to the visible area of the first foreground window, as an invisible area of the second foreground window; Through the WBMS process, an area in the second foreground window except the invisible area is determined as a visible area of the second foreground window.
4. The method according to claim 1, characterized in that: The performing blur rendering processing on the visible area of the second foreground window through the application process corresponding to the second foreground window includes: When the blur rendering instruction is received through the application process corresponding to the second foreground window, blur rendering processing is performed on the visible area of the second foreground window through the application process corresponding to the second foreground window.
5. The method according to claim 4, characterized in that The blur rendering instruction carries at least one of the following information: area information of the visible area; Blur rendering effect information; Blur rendering degree information.
6. A rendering device, characterized in that: The rendering device comprises: an acquisition module, a determination module, a sending module and a processing module; The acquisition module is used to acquire the window layer information through the WBMS process when receiving a fuzzy rendering request sent by the application process corresponding to the first foreground window through the WBMS process; The determining module is used to determine the visible area of the second foreground window based on the window layer information obtained by the obtaining module through the WBMS process, and the display level of the first foreground window is higher than the display level of the second foreground window; The sending module is used to send a fuzzy rendering instruction to the application process corresponding to the second foreground window through the WBMS process, and the fuzzy rendering instruction is used to inform the application process corresponding to the second foreground window to perform window fuzzy rendering processing; The processing module is used to perform blur rendering processing on the visible area of the second foreground window through the application process corresponding to the second foreground window.
7. The device according to claim 6, characterized in that The sending module is further configured to, when the acquiring module receives the blur rendering request sent by the application process corresponding to the first foreground window through the WBMS process, before acquiring the window layer information through the WBMS process, send the blur rendering request to the WBMS process through the application process corresponding to the first foreground window; The acquisition module is specifically used to acquire the window layer information from the system layer synthesis management service process through the WBMS process when the fuzzy rendering request is received through the WBMS process.
8. The device according to claim 6, characterized in that The determination module is specifically used for: Determining, by the WBMS process, a visible area of the first foreground window according to the visible layer information of the first foreground window; Determining, through the WBMS process, an area corresponding to the layer information of the second foreground window, which corresponds to the visible area of the first foreground window, as an invisible area of the second foreground window; Through the WBMS process, an area in the second foreground window except the invisible area is determined as a visible area of the second foreground window.
9. The device according to claim 6, characterized in that The processing module is specifically used to perform blur rendering processing on the visible area of the second foreground window through the application process corresponding to the second foreground window when the blur rendering instruction is received through the application process corresponding to the second foreground window.
10. The method according to claim 9, characterized in that The blur rendering instruction carries at least one of the following information: area information of the visible area; Blur rendering effect information; Blur rendering degree information.
11. An electronic device, characterized in that: The method comprises a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the rendering method according to any one of claims 1 to 5.
12. A readable storage medium, characterized in that: The readable storage medium stores a program or an instruction, and when the program or the instruction is executed by a processor, the steps of the rendering method according to any one of claims 1 to 5 are implemented.
