Interface generation apparatus and interface generation method
By introducing an animation effect accelerator to work in conjunction with the processor and graphics processor to share the animation effect processing task, the problem of low efficiency in electronic device interface generation is solved, and more efficient interface rendering and reduced power consumption are achieved.
Patent Information
- Application Number
- PCT/CN2025/082147
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-04-08
- Filing Date
- 2025-03-12
- Publication Date
- 2025-10-16
AI Technical Summary
When electronic devices generate application program interfaces, they consume a large amount of processor and memory resources, resulting in increased power consumption and reduced interface generation efficiency.
An animation effect accelerator is introduced to work in conjunction with the processor and graphics processor to share the animation effect processing task. The graphics processor only performs graphics rendering tasks, and the animation effect accelerator performs animation effect processing tasks, working in parallel to improve efficiency.
It reduces the workload of the processor and graphics processor, improves the efficiency of interface generation, and reduces power consumption.
Smart Images

Figure CN2025082147_16102025_PF_FP_ABST
Abstract
Description
Interface generation apparatus and interface generation method
[0001] The present application claims priority to the Chinese patent application No. 202410420835.6, filed on April 8, 2024, with the State Intellectual Property Office of China, and the Chinese patent application No. 202410420835.6 has the title of "Interface generation apparatus and interface generation method", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD
[0002] The present application relates to the technical field of computer, and in particular, to an interface generation apparatus and an interface generation method. BACKGROUND
[0003] With the development of electronic technology, more and more electronic devices participate in the daily life of users. And, with the resolution, size and other parameters of the screen of the electronic device becoming higher and higher, more and more content can be displayed on the electronic device. However, before the electronic device displays the interface of the application program, the electronic device needs to spend the computing resources of the processor and the storage resources of the memory to generate the interface of the application program. In the current interface design of the electronic device, space sense, depth sense and light and shadow are the trend of realizing high-quality interface design. Under this trend, the electronic device needs to spend more computing resources of the processor and storage resources of the memory to render to generate the interface of multiple application programs or multiple windows, which increases the power consumption of the processor and reduces the interface generation efficiency.
[0004] Therefore, how to provide an interface generation apparatus and an interface generation method to improve the interface generation efficiency is a problem to be solved. SUMMARY
[0005] The embodiments of the present application provide an interface generation apparatus and an interface generation method to improve the interface generation efficiency.
[0006] In a first aspect, the embodiments of the present application provide an interface generation apparatus, comprising: a processor configured to determine a first task; the first task comprising a first subtask and a second subtask; wherein the first subtask comprises a first graphic rendering task; the second subtask comprises an animation effect processing task; a graphic processor configured to obtain the first subtask and perform graphic rendering based on the first subtask to obtain a first layer; an animation effect accelerator configured to obtain the animation effect processing task in the second subtask and perform animation effect processing based on the animation effect processing task to obtain a second layer; wherein the animation effect processing comprises at least one of blur processing or round corner processing.
[0007] Compared with the traditional interface generation device, the animation effect accelerator is added in the embodiment of the application, and the interface is rendered by the processor, the graphic processor and the animation effect accelerator in cooperation, so as to improve the interface rendering efficiency. In the traditional technology, the interface generation task is directly issued to the graphic processor for execution by the processor, the graphic processor needs to execute both the graphic rendering task and the animation effect processing task, the whole process of the animation effect processing is complex, the number of execution instructions of the processor and the graphic processor is large, the power consumption is high, and the performance risk is large. Therefore, in the application, the processor determines the first task (that is, the interface generation task) and the first subtask and the second subtask in the first task, the first subtask is used to instruct to render a clear layer, and the second subtask is used to instruct to render a layer after animation effect processing. Further, the first subtask can be executed by the graphic processor, and the second subtask can be executed by the animation effect accelerator, that is, the graphic processor only needs to execute the graphic rendering task and does not need to execute the animation effect processing task, and the graphic processor and the animation effect accelerator can work in parallel, so that not only the work burden of the processor and the graphic processor can be reduced, but also the interface generation efficiency can be improved.
[0008] In some embodiments, the animation effect processing task is used to instruct a to-be-processed layer; and the animation effect accelerator is specifically used for performing animation effect processing on the to-be-processed layer based on the animation effect processing task to obtain a second layer.
[0009] In the embodiment of the application, the animation effect accelerator can obtain the second subtask, and can read a to-be-processed layer stored in the storage based on the animation effect processing task in the second subtask, and perform animation effect processing, such as corner rounding processing and / or blur processing, on the to-be-processed layer. The interface is rendered by the processor, the graphic processor and the animation effect accelerator in cooperation, the processor determines the first task and the first subtask and the second subtask in the first task, the first subtask is used to instruct to render a clear layer, and the second subtask is used to instruct to render a layer after animation effect processing. Further, the first subtask can be executed by the graphic processor, and the second subtask can be executed by the animation effect accelerator, that is, the graphic processor only needs to execute the graphic rendering task and does not need to execute the animation effect processing task, and the graphic processor and the animation effect accelerator can work in parallel, so that not only the work burden of the processor and the graphic processor can be reduced, but also the interface generation efficiency can be improved.
[0010] In some embodiments, the second subtask further includes a second graphic rendering task; the graphic processor is further used for obtaining the second graphic rendering task in the second subtask, and performing graphic rendering based on the second graphic rendering task to obtain a third layer; and the animation effect accelerator is specifically used for performing animation effect processing on the third layer based on the animation effect processing task to obtain the second layer.
[0011] In the embodiments of the present application, after the graphics processor performs graphics rendering based on the second graphics rendering task to obtain a third layer, the animation effect accelerator can obtain the third layer and perform animation effect processing, such as corner rounding processing and / or blur processing, on the third layer to obtain the second layer. The interface is rendered by the processor, the graphics processor and the animation effect accelerator working cooperatively. The processor determines the first task and the graphics rendering task and the animation effect processing task included in the first task. Further, the graphics rendering task can be performed by the graphics processor, and the animation effect processing task can be performed by the animation effect accelerator, that is, the graphics processor only needs to perform the graphics rendering task and does not need to perform the animation effect processing task, and the graphics processor and the animation effect accelerator can work in parallel, thereby not only reducing the work burden of the processor and the graphics processor, but also improving the interface generation efficiency.
[0012] In some embodiments, the interface generation apparatus further includes a task scheduler; and the processor is further configured to send the first dependency relationship to the task scheduler, the first dependency relationship being used to indicate a dependency relationship between performing the second graphics rendering task and the animation effect processing task in the second subtask; and the task scheduler is configured to schedule the graphics processor to perform the second graphics rendering task and schedule the animation effect accelerator to perform the animation effect processing task according to the first dependency relationship.
[0013] In the embodiments of the present application, the processor can send the first dependency relationship to the task scheduler. Further, the task scheduler can store the first dependency relationship after receiving the first dependency relationship. The task scheduler can schedule the graphics processor to perform the second graphics rendering task to obtain the third layer and schedule the animation effect accelerator to perform the animation effect processing task to obtain the second layer based on the first dependency relationship, without using the processor to schedule the graphics processor and the animation effect accelerator, thereby avoiding the problems of long execution time, heavy load, high complexity and the like required by the processor to issue tasks, and thereby improving the task issuing speed and the interface generation efficiency.
[0014] In some embodiments, the interface generation apparatus further includes a display subsystem configured to receive the first layer and the second layer and combine the first layer and the second layer into a to-be-displayed image.
[0015] In the embodiment of the present application, the display subsystem can simultaneously acquire multiple layers, superimpose the multiple layers online to generate a to-be-displayed image, and then send the to-be-displayed image to a display peripheral for display, so that the final dynamic effect interactive screen is displayed on the screen. In the conventional technology, a graphics processor is required to superimpose multiple layers, and the display subsystem sends a single layer to the display peripheral for display, which increases the power consumption of the graphics processor and also reduces the memory read-write power consumption. In the embodiment of the present application, the display subsystem can simultaneously acquire multiple layers, and then superimpose the multiple layers online to obtain a to-be-displayed image, so that the power consumption of the graphics processor can be reduced.
[0016] In some embodiments, the interface generation apparatus comprises a chip.
[0017] In the embodiment of the present application, the interface generation apparatus comprises a chip, and compared with the conventional interface generation apparatus, an animation effect accelerator is added, and the processor, the graphics processor and the animation effect accelerator cooperatively render the interface to improve the interface rendering efficiency.
[0018] In a second aspect, the embodiment of the present application provides an interface generation method, comprising: determining a first task by a processor; the first task comprising a first subtask and a second subtask, wherein the first subtask comprises a first graphics rendering task; the second subtask comprises an animation effect processing task; performing graphics rendering based on the first subtask by a graphics processor to obtain a first layer; performing animation effect processing based on the animation effect processing task in the second subtask by an animation effect accelerator to obtain a second layer; wherein the animation effect processing comprises at least one of blur processing or round corner processing.
[0019] In some embodiments, the animation effect processing task is used to indicate a to-be-processed layer; performing animation effect processing based on the animation effect processing task in the second subtask by the animation effect accelerator to obtain the second layer comprises: performing animation effect processing on the to-be-processed layer by the animation effect accelerator based on the animation effect processing task to obtain the second layer.
[0020] In some embodiments, the second subtask further comprises a second graphics rendering task; the method further comprises: acquiring the second graphics rendering task in the second subtask by the graphics processor, and performing graphics rendering based on the second graphics rendering task to obtain a third layer; performing animation effect processing based on the animation effect processing task in the second subtask by the animation effect accelerator to obtain the second layer comprises: performing animation effect processing on the third layer by the animation effect accelerator based on the animation effect processing task to obtain the second layer.
[0021] In some embodiments, the interface generation apparatus further comprises a task scheduler; the method further comprises: sending, by the processor, the first dependency relationship to the task scheduler, the first dependency relationship being used to indicate a dependency relationship of executing a second graphic rendering task and an animation effect processing task in the second subtask; and scheduling, by the task scheduler, the graphic processor to execute the second graphic rendering task and the animation effect accelerator to execute the animation effect processing task according to the first dependency relationship.
[0022] In some embodiments, the interface generation apparatus further comprises a display subsystem; the method further comprises: receiving, by the display subsystem, the first layer and the second layer, and compositing the first layer and the second layer into the to-be-displayed image.
[0023] In a third aspect, an embodiment of the present application provides an electronic device, including the apparatus in any one of the first aspect and the memory; the memory is used to store computer program codes, the computer program codes include computer instructions, and the apparatus invokes and runs the computer instructions.
[0024] In a fourth aspect, the present application provides a computer storage medium, which stores a computer program, and the computer program is executed by a processor to implement the method in any one of the second aspect.
[0025] In a fifth aspect, the present application provides a chip system, which includes a processor, and is used to support the electronic device to implement the functions in the second aspect, for example, to generate or process the information in the power supply control method. In a possible design, the chip system further includes a memory, and the memory is used to save necessary program instructions and data of the electronic device. The chip system can include a chip, or include the chip and other discrete devices.
[0026] In a sixth aspect, the present application provides a computer program product, which includes instructions, and when the computer program is executed by a computer, the computer is caused to execute the method in any one of the second aspect. BRIEF DESCRIPTION OF DRAWINGS
[0027] FIG. 1 is a structural schematic diagram of an electronic device provided by an embodiment of the present application.
[0028] FIG. 2 exemplarily shows a software architecture of an electronic device provided by an embodiment of the present application.
[0029] FIG. 3 is a schematic diagram of an interface generation apparatus provided by an embodiment of the present application.
[0030] FIG. 4 is a schematic diagram of dividing a target rendering tree into a plurality of rendering sub-trees provided by an embodiment of the present application.
[0031] FIG. 5 is a schematic diagram of determining a target rendering tree according to an embodiment of the present application.
[0032] FIG. 6 is a schematic diagram of a working flow of an interface generation apparatus according to an embodiment of the present application.
[0033] FIG. 7 is a schematic diagram of another interface generation apparatus according to an embodiment of the present application.
[0034] FIG. 8 is a schematic diagram of layer superimposition according to an embodiment of the present application.
[0035] FIG. 9 is a schematic diagram of a round corner processing according to an embodiment of the present application.
[0036] FIG. 10 is a schematic diagram of another layer superimposition according to an embodiment of the present application.
[0037] FIG. 11 is a schematic diagram of a working flow of another interface generation apparatus according to an embodiment of the present application.
[0038] FIG. 12 is a schematic diagram of a flow of an interface generation apparatus according to an embodiment of the present application.
[0039] FIG. 13 is a schematic diagram of a flow of an interface generation method according to an embodiment of the present application. DETAILED DESCRIPTION
[0040] The embodiments of the present application will be described below with reference to the accompanying drawings.
[0041] The terms "first", "second", "third", and "fourth" and the like in the description and in the claims of the present application and the accompanying drawings are used to distinguish between similar objects, not necessarily described in a particular order. Also, the terms "comprise", "comprising", "including", "including", "have", "has", "have" and their any variations are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a list of steps or units is not limited to the listed steps or units, but can optionally include other steps or units not listed or can optionally include other steps or units inherent to such processes, methods, products or devices.
[0042] In this document, the term "embodiment" means that the specific features, structures or characteristics described in connection with the embodiment can be included in at least one embodiment of the present application. The phrase appears in the specification does not necessarily refer to the same embodiment, nor is it independent or alternative to other embodiments. The skilled person in the art explicitly and implicitly understands that the embodiments described herein can be combined with other embodiments.
[0043] The term "user interface (UI)" in the embodiments of the present application is a medium interface for interaction and information exchange between an application or an operating system and a user, which realizes conversion between an internal form of information and a form acceptable by the user. The user interface is source code written in a specific computer language such as Java or extensible markup language (XML), and the interface source code is parsed and rendered on an electronic device to finally present content recognizable by the user. A commonly used form of the user interface is a graphic user interface (GUI), which refers to a user interface related to computer operation displayed in a graphic manner. It can be a visual interface element such as text, an icon, a button, a menu, a tab, a text box, a dialog box, a status bar, a navigation bar, a Widget, and the like displayed in a display screen of the electronic device.
[0044] For ease of understanding, the related terms and concepts involved in the embodiments of the present application are introduced first. The terms used in the implementation manner part of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application.
[0045] As a medium interface for interaction and information exchange between an application and a user, the electronic device needs to generate an interface of the foreground application for the application every time a vertical synchronization signal comes. The frequency of the vertical synchronization signal is related to the refresh rate of the screen of the electronic device, for example, the frequency of the vertical synchronization signal is the same as the refresh rate of the screen of the electronic device.
[0046] That is, before refreshing the content displayed on the screen each time, the electronic device needs to generate an interface of the foreground application for the application to present the newly generated interface of the application to the user when the screen is refreshed.
[0047] The interface displayed on the electronic device can include the interface of one or more applications, that is, the electronic device needs to generate the interface for one or more applications, synthesize the interfaces, and then obtain the synthesized interface displayed on the screen.
[0048] First, an exemplary electronic device provided in the embodiments of the present application is introduced.
[0049] Please refer to FIG. 1, which is a structural schematic diagram of an electronic device provided by an embodiment of the present application. The electronic device can include, but is not limited to, a smart phone, a smart wearable device (such as a smart watch), a tablet computer, a personal digital assistant, and various smart display devices. The electronic device can be built-in with a chip or a chip set or a circuit board carrying a chip or a chip set, which can work under necessary software driving. The chip or the chip set or the circuit board carrying the chip or the chip set can include a processor 101, a graphics processor 102, an animation effect acceleration engine 103, a task scheduler 104, a display subsystem module 105, and an internal memory 106. Further, it can also include interfaces, peripherals, and other components not shown in FIG. 1. Among them, the processor 101, the graphics processor 102, the animation effect acceleration engine 103, the task scheduler 104, the display subsystem module 105, and the internal memory 106 can be connected through a bus.
[0050] It can be understood that the structure shown in the embodiment of the present application does not constitute a specific limitation on the electronic device. In other embodiments of the present application, the electronic device can include more or fewer components than shown, or combine certain components, or split certain components, or different arrangement of components.
[0051] The processor 101 (Central Process Unit, CPU) can run an operating system, a file system (such as a flash file system), or an application program, etc., to control a plurality of hardware or software elements connected to the processor 101, and can process various data and perform operations. The processor 101 can load instructions or data stored in an external memory (not shown in FIG. 1) into the internal memory 106, and call instructions or data requiring operation to the processor 101 for operation, and when the operation is completed, the processor 101 temporarily stores the result in the internal memory 106, and stores instructions or data requiring long-term storage to the external memory through the controller. Alternatively, the processor 101 can also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 101 is a cache. The cache can save instructions or data that have just been used or are used repeatedly by the processor 101. If the processor 101 needs to use the instructions or data again, it can be directly called from the cache. This avoids repeated access and reduces the waiting time of the processor 101, thereby improving the efficiency of the system. In some embodiments, the processor 101 can run a rendering service (Render Service) and a plurality of application programs, and the plurality of application programs can be foreground application programs. Each of the plurality of application programs running on the processor 101 can generate a rendering tree, and the Render Service can fuse a plurality of rendering trees to obtain a target rendering tree, and then divide the target rendering tree according to the display layer order to obtain a plurality of rendering sub-trees, and then render. In the embodiments of the present application, the generation efficiency of the interface can be improved by unified rendering.
[0052] The graphic processor 102 (Graphic Process Unit, GPU) is a microprocessor specially used for performing drawing operation work on personal computers, workstations, game consoles, and some mobile devices (such as tablet computers, smart phones, etc.). In some embodiments, the processor 101 can call the graphic processor 102 to render a plurality of rendering sub-trees in parallel to obtain a plurality of layer data, so as to accelerate the rendering speed of the interface and improve the generation efficiency of the interface. In some embodiments, the graphic processor 102 is located inside the processor 101, and can also be located outside the processor 101, which is not specifically limited in the present application.
[0053] The animation acceleration engine 103 (AAE) is a hardware module for accelerating the generation of animation effects. The animation acceleration engine 103 can integrate a down scale operator, an up scale operator, a blur operator, a color space conversion (CSC) operator, a ToneMaping / Inverse Tone Maping operator, a rounded corner generator (RCG), a layer overlay operator (OV), a color enhancement operator (CE), a read direct memory access (RDMA) module, a write direct memory access (WDMA) module, and an on-chip RAM, etc. In this application, the operators in the animation acceleration engine 103 can be operated in a pipeline manner to accelerate the generation of animation effects. In some embodiments, the animation acceleration engine 103 can accelerate the processing of a layer, such as one or more times of blur processing, rounded corner processing, etc.
[0054] The task scheduler 104 (TS) can be used to schedule the graphics processor 102 and the animation acceleration engine 103, etc. In this application, the task scheduler 104 can receive event notifications sent by the graphics processor 102 or the animation acceleration engine 103 according to a configuration task dependency rule, and send corresponding event notifications to subsequent chip modules that need to execute tasks, such as the graphics processor 102 or the animation acceleration engine 103, to trigger the execution of corresponding tasks. The hardware interfaces integrated in the graphics processor 102 and the animation acceleration engine 103 and connected to the task scheduler 104 can send event notifications to each other. When the software issues a task, the event notification and the corresponding task are configured into the hardware interfaces integrated in the graphics processor 102 and the animation acceleration engine 103 and connected to the task scheduler 104. The event notifications between the task scheduler 104 and the graphics processor 102 and the animation acceleration engine 103 can be achieved through a message bus or an internal chip line connection, etc.
[0055] The display subsystem module 105 (DSS) is a hardware module responsible for fetching pixel data from the internal memory 106 and sending it to a display peripheral, such as an LCD / OLED display or a monitor. The display subsystem module 105 hardware can fetch pixel data, perform color conversion, compositing, and other pixel operations. The display subsystem module 105 hardware can also be responsible for encoding raw pixel data into a standard display signal, such as HDMI or MIPIDPI, or a display signal format defined by DP / eDP.
[0056] The internal memory 106 is a power-off volatile memory that loses its stored content when power is off, and can also be referred to as memory or main memory. The internal memory 106 in this application includes readable and writable running memory, which is used to temporarily store operation data in the processor 101, the graphics processor 102, and the animation effect acceleration engine 103, and interact with external memory or other external memory, and can be used as a temporary data storage medium for an operating system or other programs running. For example, an operating system running on the processor 101 transfers data needed for operation from the internal memory 106 to the processor 101 for operation, and the processor 101 transmits the result after the operation is completed.
[0057] The internal memory 106 can include one or more of a dynamic random access memory (DRAM), a static random access memory (SRAM), a synchronous dynamic random access memory (SDRAM), and the like. Among them, the DRAM includes a double data rate synchronous dynamic random memory (DDR SDRAM) for short, DDR, a second generation double data rate synchronous dynamic random memory (DDR2), a third generation double data rate synchronous dynamic random memory (DDR3), a fourth generation low power double data rate synchronous dynamic random memory (Low Power Double Data Rate 4, LPDDR4), and a fifth generation low power double data rate synchronous dynamic random memory (Low Power Double Data Rate 5, LPDDR5), and the like.
[0058] It can be understood that the structure of the electronic device in FIG. 1 is only some exemplary embodiments provided by the embodiments of the present application, and the structure of the electronic device in the embodiments of the present application includes but is not limited to the above implementation manner.
[0059] The software architecture of an electronic device provided by the embodiments of the present application is described below.
[0060] FIG. 2 illustrates a software architecture of an electronic device according to an embodiment of the disclosure.
[0061] The software system of the electronic device can employ a layered architecture, an event-driven architecture, a microkernel architecture, a microservices architecture, or a cloud architecture. As shown in FIG. 2, the software architecture is taken as an example of a layered architecture to illustrate the software structure of the electronic device.
[0062] The layered architecture divides the software into several layers, each of which has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the software system is divided into four layers, from top to bottom, the application layer, the framework layer, the hardware abstraction layer, and the kernel layer.
[0063] The application layer can include a series of application packages.
[0064] As shown in FIG. 2, the application packages can include applications such as desktop, status bar, settings, call, navigation, WLAN, Bluetooth, music, video, short message, etc.
[0065] The framework layer provides application programming interfaces (APIs) and programming frameworks for the applications of the application layer. The framework layer includes some pre-defined functions.
[0066] As shown in FIG. 2, the framework layer can include a window manager, a content provider, a view system, a UI library, a render service, a memory allocation API, etc.
[0067] The window manager is used to manage window programs. The window manager can obtain the size of the display screen, determine whether there is a status bar, lock the screen, and capture the screen, etc.
[0068] The content provider is used to store and obtain data, and make the data accessible to the application programs. The data can include videos, images, audios, dialed and received calls, browsing history and bookmarks, phonebook, etc.
[0069] The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, etc. The view system can be used to build application programs. A display interface can include one or more views. For example, a display interface including a short message notification icon can include a view for displaying text and a view for displaying pictures.
[0070] The UI library is a commonly used UI component library that can help designers and developers improve work efficiency and improve design professionalism and quality.
[0071] A render service can be used to render the interface of an application, for example, it can receive a render tree sent by an application and render a corresponding layer based on the render tree. The render service can also control the composition of multiple layers, etc.
[0072] It should be noted that the render service is a software functional module, and in different embodiments or systems, it corresponds to modules with different names, for example, in the Android system, the render service corresponds to the Surface Flinger service of Android; in the Harmony OS Next, the render service corresponds to the Render Service service of the Harmony OS Next.
[0073] The hardware abstraction layer (HAL) is an interface layer between the operating system kernel and the upper layer software, and its purpose is to abstract the hardware. The hardware abstraction layer is an abstract interface of the device kernel driver, which is used to provide an application programming interface for accessing the underlying device to the higher level Java API framework. The HAL can provide a standard interface to display the device hardware functions to the higher level Java API framework. The HAL includes multiple library modules, such as a camera HAL, an audio HAL, etc. Each library module implements an interface for a specific type of hardware component. When the system framework layer API requires access to the hardware of a portable device, the operating system will load the library module for the hardware component.
[0074] The kernel layer is the layer between hardware and software. The kernel layer at least includes a kernel mode driver (KMD) of a display subsystem, a task scheduler KMD, an animation effect accelerator KMD, and a graphics processor KMD.
[0075] It can be understood that the software structure of the electronic device in FIG. 2 is only some exemplary embodiments provided by the embodiments of the present application, and the software structure of the electronic device in the embodiments of the present application includes but is not limited to the above implementation manners.
[0076] Referring to FIG. 3, FIG. 3 is a schematic diagram of an interface generation apparatus provided by the embodiments of the present application. The interface generation apparatus 20 can include a processor 201, a graphics processor 202, and an animation effect accelerator 203. The processor 201 in FIG. 3 can include part or all of the functions of the processor 101 in FIG. 1; the graphics processor 202 in FIG. 3 can include part or all of the functions of the graphics processor 102 in FIG. 1; and the animation effect accelerator 203 in FIG. 3 can include part or all of the functions of the animation effect accelerator 103 in FIG. 1. The processor 201, the graphics processor 202, and the animation effect accelerator 203 can be connected through a bus.
[0077] The processor 201 is configured to determine a first task.
[0078] Specifically, the first task can be used to instruct to render a to-be-displayed interface of the current electronic device. The first task can include a plurality of subtasks, and the plurality of subtasks can include a first subtask and a second subtask. The first subtask includes a first graphic rendering task, and the first graphic rendering task can be used to instruct to render a clear layer. The second subtask includes an animation effect processing task, and the animation effect processing task can be used to instruct to render a layer after animation effect processing.
[0079] Optionally, the processor 201 can run a rendering service and a plurality of application programs. The rendering service can generate a target rendering tree based on a current to-be-displayed interface of the plurality of application programs. The target rendering tree records all information for generating a frame interface of the plurality of application programs. The target rendering tree includes a plurality of rendering nodes, and each rendering node in the plurality of rendering nodes can include a rendering attribute and a drawing instruction list. Optionally, the plurality of application programs can be foreground application programs.
[0080] Optionally, the rendering service can generate the first task based on the target rendering tree, and the first task is used to instruct to render the target rendering tree to obtain the to-be-displayed interface.
[0081] Optionally, the rendering service can divide the first task into the first subtask and the second subtask according to a task type. The first subtask is used to instruct to render a clear layer. The second subtask is used to instruct to render a layer after animation effect processing.
[0082] Optionally, the rendering service can divide the target rendering tree into multiple rendering subtrees, each of the multiple rendering subtrees can correspond to a subtask in the first task. As shown in FIG. 4, FIG. 4 is a schematic diagram of dividing a target rendering tree into multiple rendering subtrees according to an embodiment of the present application. The rendering service can divide the target rendering tree into multiple rendering subtrees. It is assumed that the main node of the target rendering tree is interface 1, two applications, application 1 and application 2, need to be displayed on the interface 1, the application 1 includes rendering nodes 1.1, 1.2, 1.3 and 1.4, and the application 2 includes rendering nodes 2.1 and 2.2. For the display effect of the interface, the layers rendered by the rendering nodes 1.2, 1.3 and 1.4 need to be processed with animation effects, such as round corner processing and / or blur processing, and the layers rendered by the rendering nodes 1.1, 2.1 and 2.2 do not need to be processed with animation effects, and only need to be rendered into clear layers. Then, the rendering nodes 1.2, 1.3 and 1.4 can be divided into a rendering subtree, and the other rendering nodes can be divided into another rendering subtree. The rendering service can divide the first task into a first subtask and a second subtask according to the type of the task, the first subtask can be used to instruct rendering of the rendering subtree 2, and the second subtask can be used to instruct rendering of the rendering subtree 1.
[0083] Optionally, the rendering service can obtain the target rendering tree according to multiple rendering trees respectively generated by multiple application programs, wherein one application program corresponds to one rendering tree. As shown in FIG. 5, FIG. 5 is a schematic diagram of determining a target rendering tree according to an embodiment of the present application. The processor 201 runs multiple application programs, each of the multiple application programs can render one rendering tree. It is assumed that the processor 201 currently runs the application 1 and the application 2, the application 1 can generate the rendering tree 1 according to the current content to be displayed, the rendering tree 1 can include multiple rendering nodes, such as the rendering nodes 1.1, 1.2, 1.3 and 1.4, and the application 2 can generate the rendering tree 2 according to the current content to be displayed, the rendering tree 2 can include multiple rendering nodes, such as the rendering nodes 2.1 and 2.2. The rendering service can obtain the rendering tree 1 and the rendering tree 2, and then fuse the rendering tree 1 and the rendering tree 2 to obtain the target rendering tree. In the embodiment of the present application, the application programs do not need to be independently rendered, but are uniformly rendered by the rendering service, so as to improve the rendering efficiency of the interface.
[0084] The graphics processor 202 is configured to obtain the first subtask and perform graphics rendering based on the first subtask to obtain a first layer.
[0085] Specifically, the first layer includes at least one image. When the processor 201 determines the first task, the first subtask in the first task can be allocated to the graphics processor 202 for processing. The graphics processor 202 can be a dedicated graphics processing chip. The graphics processor 202 rendering is to accelerate the rendering of graphics by using the graphics processor 202 accelerator. After starting the graphics processor 202 rendering, the graphics processor 202 can obtain the first subtask and perform graphics rendering based on the first subtask to obtain a clear layer, i.e., the first layer. In this way, the interface display speed can be improved, and the burden of the processor 201 can be reduced.
[0086] The animation effect accelerator 203 is configured to obtain an animation effect processing task in the second subtask and perform animation effect processing based on the animation effect processing task to obtain a second layer.
[0087] Specifically, the animation effect processing includes at least one of blur processing or round corner processing. The blur processing can be understood as a processing of reducing the definition of an image, such as Gaussian blur processing of the image to obtain a blurred image of the image. The UI design of the electronic device can use a blur effect a lot, for example, control center drop-down, notification center drop-down, desktop application startup, etc. The round corner processing can be understood as replacing the sharp corner edge in the image with a circular arc shape to form a design shape with soft edges. The electronic device can use a round rectangle a lot in the interactive control to obtain a better human eye effect. The second layer includes at least one image. When the processor 201 determines the first task, the second subtask in the first task can be allocated to the animation effect accelerator 203 for processing. The animation effect accelerator 203 can be a dedicated animation effect processing chip. The animation effect accelerator 203 is used to accelerate the generation of graphic animation effects. After starting the animation effect accelerator 203 animation effect acceleration, the animation effect accelerator 203 can obtain the second subtask and perform animation effect generation of graphics based on the second subtask to obtain an image after animation effect processing, i.e., the second layer. In this way, the interface display speed can be improved, and the burden of the processor 201 and the graphics processor 202 can be reduced.
[0088] For example, as shown in FIG. 6, which is a schematic diagram of a working process of an interface generation apparatus provided in an embodiment of the present application, the processor 201 can run a rendering service, an application program 1 and an application program 2. The application program 1 can generate a rendering tree 1, and the application program 2 can generate a rendering tree 2. The rendering service can acquire the rendering tree 1 and the rendering tree 2 respectively, and generate a target rendering tree based on the rendering tree 1 and the rendering tree 2. Further, the rendering service can determine a first task, a first subtask and a second subtask in the first task based on the target rendering tree. Next, the processor 201 can assign the first subtask to the graphics processor 202 for processing, and assign the second subtask to the animation effect accelerator 203 for processing. The graphics processor 202 acquires the first subtask, and generates a first layer based on a graphics rendering task in the first subtask, the first layer can include at least one image. The animation effect accelerator 203 acquires the second subtask, and generates a second layer based on an animation effect processing task in the second subtask, the second layer can include at least one image. In other words, the rendering service can split all the controls that need to be rendered to different layers based on the properties of the controls and the hardware capabilities, including foreground layers, background layers, video layers, etc. The rendering service can assign the layers that need to be accelerated by the animation effect to the hardened animation effect accelerator 203 for processing, and configure the animation effect accelerator 203 to write the results after processing to an intermediate layer. The rendering service can assign the layers that can be directly rendered to the graphics processor 202 for rendering. The rendering service can assign the tasks that need to be accelerated by the animation effect after the graphics processor 202 renders to the animation effect accelerator 203, and the animation effect accelerator 203 writes the processed layers to the specified layers. In the present application, the processor 201, the graphics processor 202 and the animation effect accelerator 203 work together to render the interface, which can improve the interface display speed and reduce the burden of the processor 201 and the graphics processor 202.
[0089] In some embodiments, referring to FIG. 7, which is a schematic diagram of another interface generation apparatus provided in an embodiment of the present application, the interface generation apparatus 20 can further include a display subsystem 204, which is configured to receive the first layer and the second layer, and combine the first layer and the second layer into a to-be-displayed image.
[0090] Specifically, the display subsystem 204 is a hardware module, which can acquire multiple layers at the same time, and perform online superposition on the multiple layers to generate a to-be-displayed image, and then send the to-be-displayed image to a display peripheral for display, so as to display a final dynamic effect interactive screen on the screen. In the prior art, the graphics processor 202 needs to superimpose multiple layers, and then the display subsystem 204 sends a single layer to the display peripheral for display, which increases the power consumption of the graphics processor 202 and also reduces the memory read-write power consumption. In the embodiment of the present application, the display subsystem 204 can acquire multiple layers at the same time, and then perform online superposition on the multiple layers to obtain a to-be-displayed image, so as to reduce the power consumption of the graphics processor 202.
[0091] For example, as shown in FIG. 8, which is a schematic diagram of layer superposition provided by an embodiment of the present application, it is assumed that the graphics processor 202 is used to render a clear main interface and a clear folder window interface, i.e., a first layer, which includes two images. The main interface can include icons of multiple application programs, such as a clock, a calendar, a gallery, a memo, a setting, etc. The folder window interface can include application icons of a smart home, a recording, and an application market, etc. The animation effect accelerator 203 is used to perform a round corner processing and a background blur processing on the folder 1 window in the main interface to obtain a second layer, which includes one image. The background of the folder 1 window in the image is blurred, and the edge of the folder 1 window is rounded. After the graphics processor 202 generates the first layer and the animation effect accelerator 203 generates the second layer, the display subsystem 204 can acquire the first layer and the second layer at the same time, and perform online fusion on the first layer and the second layer to obtain a to-be-displayed image. Further, the display subsystem 204 can send the to-be-displayed image to the screen, and then display the to-be-displayed image on the screen of the electronic device. Since the folder 1 window is blurred and rounded, the user can obviously notice that the folder 1 stores multiple applications.
[0092] In some embodiments, the animation effect processing task is used to indicate a to-be-processed layer; and the animation effect accelerator 203 is specifically configured to perform animation effect processing on the to-be-processed layer based on the animation effect processing task to obtain a second layer.
[0093] Specifically, the to-be-processed layer can be a layer stored in the memory. The animation effect processing task in the second subtask can be used to indicate the to-be-processed layer. The animation effect accelerator 203 can obtain the second subtask, and can read the to-be-processed layer stored in the memory based on the animation effect processing task in the second subtask, and perform animation effect processing, such as corner rounding processing and / or blur processing, on the to-be-processed layer. In the embodiments of the present application, the processor 201, the graphics processor 202 and the animation effect accelerator 203 cooperatively render the interface. The processor 201 determines the first task (i.e., the interface generation task) and the first subtask and the second subtask in the first task. The first subtask is used to indicate that a clear layer is rendered, and the second subtask is used to indicate that a layer after animation effect processing is rendered. Further, the first subtask can be executed by the graphics processor 202, and the second subtask can be executed by the animation effect accelerator 203, that is, the graphics processor 202 only needs to execute a graphics rendering task and does not need to execute an animation effect processing task, and the graphics processor 202 and the animation effect accelerator 203 can work in parallel, so that not only the work burden of the processor 201 and the graphics processor 202 can be reduced, but also the interface generation efficiency can be improved.
[0094] Optionally, the animation effect accelerator 203 can include a rounded corner generator (RCG) and a layer superposition operator (OV). The RCG operator can generate an alpha mask with different parameter configurations through a hardening algorithm, and cooperate with the OV operator in the animation effect accelerator 203 to realize layer-level rounded corner processing.
[0095] Optionally, the RCG operator configures the parameters of the rounded corner curve by software, calculates and performs anti-aliasing processing to obtain an alpha mask, and the alpha mask only includes the alpha value of the rounded corner transition area. For example, as shown in FIG. 9, which is a schematic diagram of a rounded corner processing provided in an embodiment of the present application, the OV operator can superimpose the alpha mask and the layer that needs to be rounded to realize the transparency effect of the rounded corner area. In the embodiments of the present application, the rounded corner generator is integrated in the animation effect accelerator 203, which can quickly generate a rounded corner mask, and cooperate with the OV operator to efficiently and lowly powerfully realize the layer rounded corner function.
[0096] Optionally, the animation effect accelerator 203 can include a down sampling operator (Down Scale) and an up sampling operator (Up Scale). The animation effect accelerator 203 can perform down sampling on the layer based on the down sampling operator, and perform up sampling on the layer based on the up sampling operator, to perform blur processing on the layer, avoid the problem of large calculation amount of using a blur algorithm to perform blur processing on the layer, and improve the efficiency of performing blur processing on the layer.
[0097] In some embodiments, the second subtask further comprises a second graphics rendering task; the graphics processor 202 is further configured to: acquire the second graphics rendering task in the second subtask, and perform graphics rendering based on the second graphics rendering task to obtain a third layer; and the animation effect accelerator 203 is specifically configured to: perform animation effect processing on the third layer based on the animation effect processing task to obtain the second layer.
[0098] Specifically, the second subtask can include a second graphics rendering task and an animation effect acceleration task. The second graphics rendering task can be used to instruct to render a clear layer, i.e., a third layer. After the graphics processor 202 performs graphics rendering based on the second graphics rendering task to obtain the third layer, the animation effect accelerator 203 can acquire the third layer and perform animation effect processing, such as corner processing and / or blur processing, on the third layer to obtain the second layer. In the embodiments of the present application, the processor 201, the graphics processor 202 and the animation effect accelerator 203 work together to render the interface. The processor 201 determines the first task (i.e., the interface generation task) and the graphics rendering task and the animation effect acceleration processing task included in the first task. Further, the graphics processor 202 can be used to execute the graphics rendering task, and the animation effect accelerator 203 can be used to execute the animation acceleration processing task, i.e., the graphics processor 202 only needs to execute the graphics rendering task and does not need to execute the animation effect processing task, and the graphics processor 202 and the animation effect accelerator 203 can work in parallel, so as to not only reduce the work burden of the processor 201 and the graphics processor 202, but also improve the interface generation efficiency.
[0099] Optionally, the display subsystem 204 can be configured to receive the first layer, the second layer and the third layer, and combine the first layer, the second layer and the third layer into a to-be-displayed image.
[0100] Optionally, as shown in FIG. 10, FIG. 10 is a schematic diagram of another layer superposition provided by an embodiment of the present application. It is assumed that the graphics processor 202 is used to render a clear folder window interface, i.e., a first layer, which includes an image. The folder window interface can include application icons of a smart home, an audio recording, an application store, etc. The memory can store a third layer, which can be a layer after the main interface is blurred once. The main interface can include icons of multiple application programs, such as a clock, a calendar, a gallery, a memo, a setting, etc. The animation effect accelerator 203 is used to perform a round corner processing and a background blurring processing on the third layer, i.e., the folder 1 window in the main interface, to obtain a second layer, which includes an image. The image includes a folder 1 window, the background of which is blurred, and the edge of which is rounded. After the first layer, the second layer and the third layer are obtained, the display subsystem 204 can simultaneously acquire the first layer, the second layer and the third layer, and perform an online fusion on the first layer, the second layer and the third layer to obtain a to-be-displayed image. Further, the display subsystem 204 can send the to-be-displayed image to the screen, and then display the to-be-displayed image on the screen of the electronic device. Since the folder 1 window is blurred and rounded, and the background is blurred, the user can obviously notice the content in the folder 1.
[0101] In some embodiments, referring to FIG. 11, FIG. 11 is a working flow diagram of another interface generation apparatus provided by an embodiment of the present application. The interface generation apparatus 20 further includes a task scheduler 205. The processor 201 is further configured to send a first dependency relationship to the task scheduler 205, the first dependency relationship being used to indicate a dependency relationship between executing a second graphics rendering task in the second subtask and an animation effect processing task. The task scheduler 205 is configured to schedule the graphics processor 202 to execute the second graphics rendering task and schedule the animation effect accelerator 203 to execute the animation effect processing task according to the first dependency relationship.
[0102] Specifically, the task scheduler 205 can be a hardware module configured to schedule the graphics processor 202 and the animation effect accelerator 203. The processor 201 can send a first dependency relationship to the task scheduler 205. Further, the task scheduler 205 can store the first dependency relationship after receiving the first dependency relationship. The task scheduler 205 can schedule the graphics processor 202 to perform a second graphics rendering task to obtain a third layer and schedule the animation effect accelerator 203 to perform an animation effect processing task to obtain a second layer based on the first dependency relationship. In the embodiments of the present application, the graphics processor 202 and the animation effect accelerator 203 do not need to be scheduled by the processor 201, which avoids the problems of long execution time, heavy load, high complexity, and the like required for the processor 201 to issue tasks, thereby improving the task issuing speed and the interface generation efficiency.
[0103] For example, the task scheduler 205 can receive event notifications sent by the graphics processor 202 or the animation effect accelerator 203 according to the configured task dependency relationship rules, and send corresponding event notifications to chip modules, such as the graphics processor 202 or the animation effect accelerator 203, which need to perform subsequent tasks, to trigger the execution of corresponding tasks. The graphics processor 202 and the animation effect accelerator 203 can internally integrate hardware interfaces that are connected to the task scheduler 205, and can send event notifications to each other. The processor 201 can configure event notifications and corresponding tasks into the hardware interfaces that are internally integrated in the graphics processor 202 and the animation effect accelerator 203 and connected to the task scheduler 205 when issuing tasks. The event notifications between the task scheduler 205 and the graphics processor 202 and the animation effect accelerator 203 can be achieved through a message bus or a chip internal circuit connection, and are not limited to the description in the foregoing. The definition and implementation of the task dependency relationship rules by the task scheduler 205 have various forms, as long as the above-mentioned processes can be implemented, which are within the scope of the present application, and the specific task dependency description and the implementation of the task scheduler 205 are not limited.
[0104] In some embodiments, the interface generation apparatus 20 includes a chip.
[0105] Specifically, the interface generation apparatus 20 includes a chip, and compared with the conventional interface generation apparatus, the animation effect accelerator 203 is added, and the processor 201, the graphics processor 202, and the animation effect accelerator 203 cooperatively render an interface to improve the interface rendering efficiency.
[0106] For example, as shown in FIG. 12, which is a flowchart of an interface generation device according to an embodiment of the present application, the rendering service obtains the attributes of all the layers to be processed, or obtains the attributes of each node according to the rendering tree, and the relevant attributes include blur, rounded corners, layer order and superposition between nodes, etc. The rendering service constructs a task according to the layer attributes and the support capability of the hardware, and parses the task dependency. The rendering service calls the AAE driver development kit (DDK) and the GPU DDK to respectively construct the task distributed to the AAE and the GPU. The rendering service configures the task dependency to the TS through the TS DDK. The rendering service submits the task to the AAE and the GPU, and waits for the AAE / GPU to complete. The AAE and the GPU hardware execute the task, and are scheduled by the TS hardware, and return a hardware interrupt to the CPU after the task is completed. The rendering service calls the DSS to configure the DSS to send all the layers online to the display, and finally displays the desired display screen on the screen.
[0107] Specifically, taking the Harmony OS Next operating system as an example, the following is described. The Harmony OS Next operating system is an open source next generation operating system designed and developed by Huawei for mobile terminals (including mobile phones, watches, PCs, etc.). The Harmony OS Next operating system adopts a unified rendering architecture, and all application UI interaction spaces and rendering operations are submitted to a rendering tree (Render Service) for unified rendering. The Render Service obtains the current Render Tree that needs to be rendered and the window and its attribute information that needs to be blurred or rounded at each frame; the Render Service and the AAE UMD interface interact to perform bidirectional negotiation or the Render Service splits the Render Tree into different rendering sub-trees based on the specifications and capabilities of the AAE chip, referred to as Sub-Render Tree. The Render Service splits the Render Tree based on the optimal chip specifications and capabilities, divides the render node that can be rendered into one buffer into the same Sub-Render Tree, and divides the render node that can be rendered in parallel into different rendering tasks, i.e., different Sub-Render Trees. Taking window blurring as an example, the rendering of the blurred area does not affect the rendering of the uppermost window, so the background area can be split into a Sub-Render Tree and the upper window can be split into another Sub-Render Tree. Next, the Render Service traverses each Sub-Render Tree to convert the Sub-Render Tree into a draw operation (Draw Op) that needs to be drawn, and different Sub-Render Trees can be traversed in parallel. The Render Service analyzes the dependency relationship between rendering tasks, calls the GPU DDK to build a GPU task corresponding to the Draw Op of the graphics rendering task, and calls the AAE DDK to build an AAE task that needs to be blurred or rounded. Then, the Render Service configures the dependency relationship of different tasks to the TS and submits the built tasks to the GPU and AAE for execution. Then, the TS can receive the event notification sent by the GPU or the AAE according to the configured task dependency relationship rule, and send the corresponding event notification to the chip module that needs to execute the task next, such as the GPU or the AAE, to trigger the execution of the corresponding task; the hardware interface integrated in the GPU and the AAE and connected to the TS can send event notifications to each other. The software configures the event notification and the corresponding task into the hardware interface integrated in the GPU and the AAE and connected to the TS when issuing the task.Next, the Render Service submits the final rendered multiple layers to the Display HAL layer interface for display by the DSS KMD configured to the chip module DSS. Upon arrival of the display frame synchronization signal, the chip DSS module superimposes and displays the multiple layers online to the screen, and finally displays the dynamic effect picture on the screen. Among them, the AAE chip module can integrate a downscaling (Down Scale) operator, an upscaling (Up Scale) operator, a blur operator, a color gamut conversion (CSC) operator, a ToneMaping / Inverse Tone Maping operator, a rounded corner generation operator (RCG), a layer superimposition operator (OV), a color enhancement operator (CE), RDMA, WDMA, and on-chip RAM, etc. The RCG operator of the AAE can generate an alpha mask through a hardening algorithm, and cooperate with the OV operator in the AAE to realize layer-level rounded corner processing. The AAE can integrate multiple identical operators and multiple pipes, thereby supporting concurrent execution of multiple tasks; the linkage relationship of the operators in the AAE can be dynamically configured between different tasks, thereby realizing more flexible functions. Furthermore, the AAE can share the on-chip RAM with the DSS, or share data through the System Cache. Furthermore, when the software calculates that the AAE throughput capacity exceeds the data rate required by the DSS display, the software can configure the AAE to notify the DSS that it can display after processing N rows of data of a single layer (instead of complete buffer data) through the hardware scheduler TS, so that the data processed by the AAE and the layer data read by the DSS display can be efficiently transferred through the on-chip storage, thereby reducing the display delay and saving the DDR bandwidth in the entire process.
[0108] Optionally, the present application is not limited to the Harmony OS Next system, but can also be used in the Android system. In the prepare phase of each frame of the Surface Flinger (rendering service), the layers to be superimposed and blurred and the rounded corner layers are marked for AAE processing by calling the HWC interface, and then multiple layers are configured for GPU or DSS display. After the AAE and the GPU perform processing on the layers, multiple layers are configured for DSS, DSS superimposes and displays multiple layers online for display, and the expected display frame is displayed on the screen.
[0109] In summary, compared with the conventional interface generation apparatus, the animation effect accelerator 203 is added in the present application, and the processor 201, the graphic processor 202 and the animation effect accelerator 203 cooperatively render the interface to improve the interface rendering efficiency. In the conventional technology, the processor 201 directly issues the interface generation task to the graphic processor 202 for execution, and the graphic processor 202 needs to execute both the graphic rendering task and the animation effect processing task. The whole process of the animation effect processing is complex, the number of instructions executed by the processor 201 and the graphic processor 202 is large, the power consumption is high, and the performance risk is large. Therefore, in the present application, the processor 201 determines the first task (i.e. the interface generation task) and the first subtask and the second subtask in the first task. The first subtask is used to instruct to render a clear layer, and the second subtask is used to instruct to render a layer after animation effect processing. Further, the first subtask can be executed by the graphic processor 202, and the second subtask can be executed by the animation effect accelerator 203, that is, the graphic processor 202 only needs to execute the graphic rendering task without executing the animation effect processing task, and the graphic processor 202 and the animation effect accelerator 203 can work in parallel, so as to not only reduce the work burden of the processor 201 and the graphic processor 202, but also improve the interface generation efficiency.
[0110] Please refer to FIG. 13, which is a flowchart of an interface generation method provided by an embodiment of the present application. An interface generation method is provided by the embodiment of the present application, which can be applied to the above-mentioned interface generation apparatus, and the detailed description is as follows.
[0111] Step S301: determining a first task by a processor.
[0112] Specifically, the first task includes a first subtask and a second subtask, wherein the first subtask includes a first graphic rendering task; and the second subtask includes an animation effect processing task.
[0113] Step S302: performing graphic rendering based on the first subtask by a graphic processor to obtain a first layer.
[0114] Step S303: performing animation effect processing based on the animation effect processing task in the second subtask by an animation effect accelerator to obtain a second layer.
[0115] The animation effect processing includes at least one of blur processing or round corner processing.
[0116] In some embodiments, the animation effect processing task is used to instruct a to-be-processed layer; and the animation effect processing based on the animation effect processing task in the second subtask by the animation effect accelerator to obtain the second layer includes: performing animation effect processing on the to-be-processed layer by the animation effect accelerator based on the animation effect processing task to obtain the second layer.
[0117] In some embodiments, the second subtask further includes a second graphics rendering task; the method further includes: obtaining, by the graphics processor, the second graphics rendering task in the second subtask, and performing graphics rendering based on the second graphics rendering task to obtain a third layer; performing, by the animation effect accelerator, animation effect processing based on the animation effect processing task in the second subtask to obtain the second layer, including: performing, by the animation effect accelerator, animation effect processing on the third layer based on the animation effect processing task to obtain the second layer.
[0118] In some embodiments, the interface generation apparatus further includes a task scheduler; the method further includes: sending, by the processor, the first dependency relationship to the task scheduler, the first dependency relationship being used to indicate a dependency relationship of performing the second graphics rendering task and the animation effect processing task in the second subtask; scheduling, by the task scheduler, the graphics processor to perform the second graphics rendering task and scheduling the animation effect accelerator to perform the animation effect processing task according to the first dependency relationship.
[0119] In some embodiments, the interface generation apparatus further includes a display subsystem; the method further includes: receiving, by the display subsystem, the first layer and the second layer, and compositing the first layer and the second layer into a to-be-displayed image.
[0120] Embodiments of the present application provide an electronic device, including any of the above interface generation apparatuses and a memory; the memory is used to store computer program codes, the computer program codes include computer instructions, and the interface generation apparatus invokes and runs the computer instructions.
[0121] The present application provides a computer storage medium, which stores a computer program, and the computer program is executed by the above interface generation apparatus to implement any of the above interface generation methods.
[0122] The present application provides a chip system, which includes the above interface generation apparatus, and is used to support the electronic device to implement the functions involved in the above interface generation methods, for example, to generate or process the information involved in the above interface generation methods. In a possible design, the chip system further includes a memory, and the memory is used to save necessary program instructions and data of the electronic device. The chip system can include a chip, or include a chip and other discrete devices.
[0123] The present application provides a computer program product, which includes instructions, and when the computer program is executed by a computer, the computer is caused to execute the method in any of the above second aspects.
[0124] In the above embodiments, the description of each embodiment is focused on, and the part not described in detail in a certain embodiment can be referred to the relevant description of other embodiments.
[0125] It should be noted that, for the foregoing method embodiments, in order to simply describe, they are all described as a series of action combinations, but those skilled in the art should know that the present application is not limited to the order of the actions described, because according to the present application, some steps can be performed in other order or at the same time. Secondly, those skilled in the art should know that the embodiments described in the specification all belong to preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0126] In several embodiments provided by the present application, it should be understood that the disclosed device can be implemented by other means. For example, the device embodiments described above are only illustrative, for example, the division of the above units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed each other can be through some interface, indirect coupling or communication connection between the devices or units, which can be electrical or other forms.
[0127] The units described as separate components above can or can not be physically separated, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed on multiple network units. According to actual needs, part or all of the units can be selected to achieve the purpose of the embodiment scheme.
[0128] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of software functional unit.
[0129] The integrated unit described above, if realized in the form of a software function unit and sold or used as an independent product, can be stored in a computer-readable storage medium. Based on such understanding, the technical solutions of the present application essentially or say the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server or a network device, etc., and specifically can be a processor in the computer device) to execute all or part of the steps of the above-mentioned methods of various embodiments of the present application. Among them, the aforementioned storage medium can include: a U disk, a mobile hard disk, a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, abbreviated as: ROM) or a random access memory (Random Access Memory, abbreviated as: RAM) and various program code storage media.
[0130] The above-described embodiments are only used to illustrate the technical solutions of the present application, not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacements for part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. An interface generation device, characterized in that: include: The processor is configured to: determine a first task; the first task includes a first subtask and a second subtask; wherein the first subtask includes a first graphics rendering task; and the second subtask includes an animation effect processing task; A graphics processor, configured to: obtain the first subtask, and perform graphics rendering based on the first subtask to obtain a first layer; An animation effect accelerator is used to: obtain the animation effect processing task in the second subtask, and perform animation effect processing based on the animation effect processing task to obtain a second layer; wherein the animation effect processing includes at least one of blur processing or rounded corner processing.
2. The device according to claim 1, characterized in that The animation effect processing task is used to indicate the layer to be processed; The animation effect accelerator is specifically configured to: perform the animation effect processing on the to-be-processed layer based on the animation effect processing task to obtain the second layer.
3. The device according to claim 1, wherein: The second subtask also includes a second graphics rendering task; The graphics processor is further configured to: obtain the second graphics rendering task in the second subtask, and perform graphics rendering based on the second graphics rendering task to obtain a third layer; The animation effect accelerator is specifically configured to: perform the animation effect processing on the third layer based on the animation effect processing task to obtain the second layer.
4. The device according to claim 3, characterized in that The interface generation device also includes a task scheduler; The processor is further configured to: send a first dependency relationship to the task scheduler, where the first dependency relationship is used to indicate a dependency relationship between executing the second graphics rendering task and the animation effect processing task in the second subtask; The task scheduler is configured to schedule the graphics processor to execute the second graphics rendering task and schedule the animation effect accelerator to execute the animation effect processing task according to the first dependency relationship.
5. The device according to any one of claims 1 to 4, characterized in that: The interface generating device further includes: The display subsystem is configured to receive the first layer and the second layer, and synthesize the first layer and the second layer into an image to be displayed.
6. The device according to any one of claims 1 to 5, characterized in that: The interface generating device includes a chip.
7. A method for generating an interface, characterized in that: include: Determining a first task by a processor; the first task includes a first subtask and a second subtask, wherein the first subtask includes a first graphics rendering task; and the second subtask includes an animation effect processing task; Performing graphics rendering based on the first subtask by the graphics processor to obtain a first layer; Animation effect processing is performed by the animation effect accelerator based on the animation effect processing task in the second subtask to obtain a second layer; wherein the animation effect processing includes at least one of blur processing or rounded corner processing.
8. The method according to claim 7, wherein: The animation effect processing task is used to indicate a layer to be processed; and performing animation effect processing based on the animation effect processing task in the second subtask by the animation effect accelerator to obtain a second layer includes: The animation effect accelerator performs the animation effect processing on the layer to be processed based on the animation effect processing task to obtain the second layer.
9. The method according to claim 7, wherein: The second subtask also includes a second graphics rendering task; and the method further includes: Obtaining, by the graphics processor, the second graphics rendering task in the second subtask, and performing graphics rendering based on the second graphics rendering task to obtain a third layer; The performing animation effect processing based on the animation effect processing task in the second subtask by the animation effect accelerator to obtain a second layer includes: The animation effect accelerator performs the animation effect processing on the third layer based on the animation effect processing task to obtain the second layer.
10. The method according to claim 9, wherein: The interface generation device further includes a task scheduler; the method further includes: Sending, by the processor, a first dependency relationship to the task scheduler, where the first dependency relationship is used to indicate a dependency relationship between executing the second graphics rendering task and the animation effect processing task in the second subtask; The task scheduler schedules the graphics processor to execute the second graphics rendering task and schedules the animation effect accelerator to execute the animation effect processing task according to the first dependency relationship.
11. The method according to any one of claims 7 to 10, wherein: The interface generation device further includes a display subsystem; the method further includes: The first layer and the second layer are received through the display subsystem, and the first layer and the second layer are synthesized into an image to be displayed.
12. An electronic device, characterized in that: The device comprises a device as claimed in any one of claims 1 to 6 and a memory; the memory is used to store computer program code, the computer program code includes computer instructions, and the device calls and runs the computer instructions.
Citation Information
Patent Citations
Display picture generation method and related device
CN110941413A
Interface display method and device and electronic equipment
CN113407283A
Virtual reality application task processing method and device and virtual reality system
CN117112165A
Interface generation method and electronic equipment
CN117806745A
Image generation method and apparatus, electronic device, and storage medium
WO2023138020A1