Interface generation device 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 interface generation of electronic devices is solved, and more efficient interface generation and reduced power consumption are achieved.
Patent Information
- Application Number
- CN202410420835.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-08
- Publication Date
- 2025-10-17
AI Technical Summary
Existing electronic devices require a large amount of processor and memory resources when generating application program interfaces, resulting in increased power consumption and reduced interface generation efficiency.
An animation effect accelerator is introduced to work with the processor and graphics processor to share the animation effect processing task. The graphics processor only performs graphics rendering tasks, the animation effect accelerator performs animation effect processing, and the task scheduler schedules the task execution order.
It reduces the workload of the processor and graphics processor, improves the efficiency of interface generation, and reduces power consumption.
Smart Images

Figure CN120803570A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer, and particularly relates to an interface generation device and an interface generation method. BACKGROUND
[0002] With the development of electronic technology, more and more electronic devices participate in the daily life of users. Moreover, with the resolution, size and other parameters of the screen of the electronic device being higher and higher, more and more contents can be displayed on the electronic device. However, before the electronic device displays the interface of an application program, the processor computing resource and the memory storage resource need to be spent 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 processor computing resource and memory storage resource to render and generate the interface of multiple application programs or multiple windows, which increases the power consumption of the processor and reduces the interface generation efficiency.
[0003] Therefore, how to provide an interface generation device and an interface generation method to improve the interface generation efficiency is an urgent problem to be solved. SUMMARY
[0004] Embodiments of the present application provide an interface generation device and an interface generation method to improve the interface generation efficiency.
[0005] In a first aspect, an embodiment of the present application provides an interface generation device, 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 acquire the first subtask and perform graphic rendering based on the first subtask to obtain a first layer; and an animation effect accelerator configured to acquire 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.
[0006] 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.
[0007] 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.
[0008] 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.
[0009] 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.
[0010] 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 together. 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.
[0011] 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 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.
[0012] 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.
[0013] 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.
[0014] 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.
[0015] In some embodiments, the interface generation apparatus comprises a chip.
[0016] 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.
[0017] 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.
[0018] 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.
[0019] 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.
[0020] 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.
[0021] 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.
[0022] In a third aspect, an embodiment of the present application provides an electronic device, comprising 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 comprise computer instructions, and the apparatus invokes and runs the computer instructions.
[0023] 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.
[0024] In a fifth aspect, the present application provides a chip system, which comprises 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 comprises a memory, and the memory is used to save necessary program instructions and data of the electronic device. The chip system can comprise a chip, or can comprise the chip and other discrete devices.
[0025] In a sixth aspect, the present application provides a computer program product, which comprises 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
[0026] Figure 1 FIG. 1 is a structural schematic diagram of an electronic device provided by an embodiment of the present application.
[0027] Figure 2 FIG. 2 is a software architecture of an electronic device provided by an embodiment of the present application.
[0028] Figure 3 FIG. 3 is a schematic diagram of an interface generation apparatus provided by an embodiment of the present application.
[0029] Figure 4A schematic diagram of dividing a target rendering tree into multiple rendering sub-trees is provided for an embodiment of the present application.
[0030] Figure 5 A schematic diagram of determining a target rendering tree is provided for an embodiment of the present application.
[0031] Figure 6 A schematic diagram of a working process of an interface generation apparatus is provided for an embodiment of the present application.
[0032] Figure 7 A schematic diagram of another interface generation apparatus is provided for an embodiment of the present application.
[0033] Figure 8 A schematic diagram of layer superimposition is provided for an embodiment of the present application.
[0034] Figure 9 A schematic diagram of a round corner processing is provided for an embodiment of the present application.
[0035] Figure 10 A schematic diagram of another layer superimposition is provided for an embodiment of the present application.
[0036] Figure 11 A schematic diagram of a working process of another interface generation apparatus is provided for an embodiment of the present application.
[0037] Figure 12 A schematic diagram of a flow of an interface generation apparatus is provided for an embodiment of the present application.
[0038] Figure 13 A schematic diagram of a flow of an interface generation method is provided for an embodiment of the present application. DETAILED DESCRIPTION
[0039] The embodiments of the present application will be described below with reference to the accompanying drawings.
[0040] 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 to describe a particular sequential or chronological order. Furthermore, the terms "comprises", "comprising", "includes", "including", "has", "having" and the like are intended to cover a non-exclusive inclusion, such that any process, method, system, product, or apparatus that includes a series of steps or units are not limited to the listed steps or units, but can optionally include other not-listed steps or units, or can further include other steps or units inherent to the process, method, product, or apparatus.
[0041] Reference to“an embodiment” herein means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase“in one embodiment” in various places in the specification are not necessarily all referring to the same embodiment, nor are they necessarily all referring to a common embodiment, or an embodiment that is independent of other embodiments. One of ordinary skill in the art will readily recognize from the disclosure herein, that embodiments of the present application can be combined with embodiments of the other applications.
[0042] The term“user interface (UI)” in the embodiments of the present application refers to 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 for computer operation displayed in a graphical 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 on a display screen of the electronic device.
[0043] 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.
[0044] As a medium interface for interaction and information exchange between an application and a user, the electronic device needs to generate an interface of a 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.
[0045] That is, before refreshing the content displayed on the screen each time, the electronic device needs to generate an interface of a foreground application for the application to present the newly generated interface of the application to the user when the screen is refreshed.
[0046] 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 of one or more applications, synthesize the interfaces, and then obtain the synthesized interface displayed on the screen.
[0047] First, an exemplary electronic device provided in the embodiments of the present application is introduced.
[0048] See Figure 1 , Figure 1 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application, the electronic device may include but is not limited to various types of smart display devices such as smart phones, smart wearable devices (such as smart watches), tablet computers, personal digital assistants, etc. The electronic device may have a built-in chip or chipset or a circuit board equipped with a chip or chipset, and the chip or chipset or the circuit board equipped with a chip or chipset can work under the necessary software drive. The chip or chipset or the circuit board equipped with a chip or chipset may 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. Furthermore, it may also include Figure 1 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 may be connected via a bus.
[0049] It is understood that the structures illustrated in the embodiments of the present application do not constitute specific limitations on the electronic device. In other embodiments of the present application, the electronic device may include more or fewer components than shown, or combine or separate certain components, or arrange the components differently.
[0050] 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 to control multiple hardware or software components connected to the processor 101, and can process various data and perform operations. The processor 101 can store external memory ( Figure 1The instructions or data stored in the internal storage (not shown) are loaded into the internal memory 106, and the instructions or data that need to be operated are sent to the processor 101 for operation. After the operation is completed, the processor 101 temporarily stores the results in the internal memory 106, and stores the instructions or data that need to be stored for a long time in 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 repeatedly used 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 multiple application programs, and the multiple application programs can be foreground application programs. Each of the multiple application programs running on the processor 101 can generate a rendering tree, and the Render Service can fuse the multiple rendering trees to obtain a target rendering tree, and then divide the target rendering tree according to the display layer order to obtain multiple rendering sub-trees, and then render. In the embodiments of the present application, the generation efficiency of the interface can be improved through unified rendering.
[0051] The graphic processor 102 (Graphic Process Unit, GPU) is a microprocessor specially used for performing drawing operation in 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 multiple rendering sub-trees in parallel to obtain multiple 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 limited in the present application.
[0052] 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.
[0053] 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.
[0054] 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.
[0055] The internal memory 106, which is usually a power-off volatile memory that loses its stored content when power is off, 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. It can be used as a temporary data storage medium for the operating system or other programs running at the moment. For example, the operating system running on the processor 101 transfers the data needed for operation from the internal memory 106 to the processor 101 for operation, and then the processor 101 transmits the result after the operation is completed.
[0056] 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), etc. Among them, the DRAM includes a double data rate synchronous dynamic random access memory (DDR SDRAM) for short, DDR, a second-generation double data rate synchronous dynamic random access memory (DDR2), a third-generation double data rate synchronous dynamic random access memory (DDR3), a fourth-generation low-power double data rate synchronous dynamic random access memory (Low Power Double Data Rate 4, LPDDR4), and a fifth-generation low-power double data rate synchronous dynamic random access memory (Low Power Double Data Rate 5, LPDDR5), etc.
[0057] It can be understood that, Figure 1 The structure of the electronic device in the above embodiment is only some exemplary implementations 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 implementations.
[0058] The software architecture of an electronic device provided by the embodiments of the present application is introduced below.
[0059] Figure 2 An example illustrates a software architecture of an electronic device provided in embodiments of the present application.
[0060] 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 Figure 2 shown, taking the layered architecture as an example of the software architecture, the software architecture of the electronic device is illustrated.
[0061] 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.
[0062] The application layer can include a series of application packages.
[0063] As Figure 2 shown, the application packages can include desktop, status bar, settings, call, navigation, WLAN, Bluetooth, music, video, short message, and other application programs.
[0064] The framework layer provides application programming interfaces (APIs) and programming frameworks for the application programs of the application layer. The framework layer includes some pre-defined functions.
[0065] As Figure 2 shown, the framework layer can include a window manager, a content provider, a view system, a UI library, a rendering service, a memory allocation API, and the like.
[0066] 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 take screenshots, etc.
[0067] The content provider is used to store and obtain data, and make the data accessible to application programs. The data can include videos, images, audio, dialed and received calls, browsing history and bookmarks, phone books, and the like.
[0068] The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and the like. 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.
[0069] 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.
[0070] The render service is used to render the application interface. For example, it can receive the render tree sent by the application and then render the corresponding layer based on the render tree. The rendering service can also control the compositing of multiple layers.
[0071] It should be noted that the rendering service is a software functional module, which corresponds to modules with different names in different embodiments or systems. For example, in the Android system, the rendering service corresponds to Android's Surface Flinger service; in Harmony OS Next, the rendering service corresponds to Harmony OS Next's Render Service.
[0072] The Hardware Abstraction Layer (HAL) is an interface layer between the operating system kernel and upper-level software. Its purpose is to abstract the hardware. The HAL is an abstract interface driven by the device kernel, used to implement an application programming interface that provides access to the underlying device to higher-level Java API frameworks. The HAL provides a standard interface that exposes device hardware capabilities to higher-level Java API frameworks. The HAL consists of multiple library modules, such as the Camera HAL and the Audio HAL. Each library module implements an interface for a specific type of hardware component. When the system framework API requests access to the portable device's hardware, the operating system loads the library module for that hardware component.
[0073] The kernel layer is the layer between hardware and software. The kernel layer includes at least the kernel mode driver (KMD) of the display subsystem, the task scheduler KMD, the animation accelerator KMD, and the graphics processor KMD.
[0074] It is understandable that Figure 2 The software structure of the electronic device in the embodiment of the present application is only some exemplary implementation methods provided in the embodiments of the present application. The software structure of the electronic device in the embodiment of the present application includes but is not limited to the above implementation methods.
[0075] See Figure 3 , Figure 3 This is a schematic diagram of an interface generation device provided in an embodiment of the present application. The interface generation device 20 may include a processor 201, a graphics processor 202, and an animation effect accelerator 203. Figure 3 The processor 201 may include the above Figure 1 Part or all of the functions of the processor 101 in; Figure 3 The graphics processor 202 may include the above Figure 1 Some or all of the functionality of the graphics processor 102; Figure 3 The animation effect accelerator 203 may include the aboveFigure 1 The processor 201, the graphics processor 202 and the animation effect accelerator 203 can be connected through a bus.
[0076] The processor 201 is configured to determine a first task.
[0077] 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 sub-tasks, and the plurality of sub-tasks can include a first sub-task and a second sub-task. The first sub-task includes a first graphic rendering task, and the first graphic rendering task can be used to instruct to render a clear layer. The second sub-task 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.
[0078] 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.
[0079] Optionally, the rendering service can generate a 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.
[0080] Optionally, the rendering service can divide the first task into the first sub-task and the second sub-task according to a task type. The first sub-task is used to instruct to render a clear layer. The second sub-task is used to instruct to render a layer after animation effect processing.
[0081] Optionally, the rendering service can divide the target rendering tree into a plurality of rendering sub-trees, and each rendering sub-tree in the plurality of rendering sub-trees can correspond to a sub-task in the first task. For example, as shown in FIG. 2, the target rendering tree can be divided into a rendering sub-tree 1, a rendering sub-tree 2 and a rendering sub-tree 3. Figure 4 Figure 4 A schematic diagram provided by an embodiment of the present application for dividing a target rendering tree into multiple rendering sub-trees. The rendering service can divide the target rendering tree into multiple rendering sub-trees. Assuming that the main node of the target rendering tree is interface 1, two applications need to be displayed on interface 1, namely application 1 and application 2. Application 1 includes rendering node 1.1, rendering node 1.2, rendering node 1.3, and rendering node 1.4. Application 2 includes rendering node 2.1 and rendering node 2.2. For the display effect of the interface, the layers rendered by rendering node 1.2, rendering node 1.3, and rendering node 1.4 need to be processed with animation effects, such as corner processing and / or blur processing. The layers rendered by rendering node 1.1, rendering node 2.1, and rendering node 2.2 do not need to be processed with animation effects and only need to be rendered into clear layers. Then, rendering node 1.2, rendering node 1.3, and rendering node 1.4 can be divided into a rendering sub-tree, and the other rendering nodes can be divided into another rendering sub-tree. The rendering service can divide the first task into a first sub-task and a second sub-task according to the task type, and the first sub-task can be used to instruct rendering of rendering sub-tree 2, and the second sub-task can be used to instruct rendering of rendering sub-tree 1.
[0082] Optionally, the rendering service can obtain the target rendering tree according to multiple rendering trees generated by multiple application programs respectively, wherein one application program corresponds to one rendering tree. For example, Figure 5 as shown, Figure 5 A schematic diagram provided by an embodiment of the present application for determining a target rendering tree. The processor 201 runs multiple application programs. Each application program in the multiple application programs can render a rendering tree. Assuming that the processor 201 currently runs application 1 and application 2. Application 1 can generate rendering tree 1 according to the current content to be displayed. Rendering tree 1 can include multiple rendering nodes, such as rendering node 1.1, rendering node 1.2, rendering node 1.3, and rendering node 1.4. Application 2 can generate rendering tree 2 according to the current content to be displayed. Rendering tree 2 can include multiple rendering nodes, such as rendering node 2.1 and rendering node 2.2. The rendering service can obtain rendering tree 1 and rendering tree 2, and then fuse rendering tree 1 and 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, thereby improving the rendering efficiency of the interface.
[0083] The graphics processor 202 is configured to obtain the first sub-task and perform graphics rendering based on the first sub-task to obtain the first layer.
[0084] 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 the graphics processor 202 rendering is started, 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.
[0085] 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.
[0086] 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 the animation effect accelerator 203 animation effect acceleration is started, 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.
[0087] For example, as shown in FIG. 2B, the first task includes a first subtask and a second subtask. The first subtask is allocated to the graphics processor 202 for processing, and the second subtask is allocated to the animation effect accelerator 203 for processing. Figure 6 Figure 6 A working flow diagram of an interface generation apparatus provided by an embodiment of the present application is shown in the figure. The processor 201 can run a rendering service, an application 1 and an application 2. The application 1 can generate a rendering tree 1, and the application 2 can generate a rendering tree 2. The rendering service can obtain 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 the processor 201 can assign the second subtask to the animation effect accelerator 203 for processing. The graphics processor 202 obtains 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 obtains 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.
[0088] In some embodiments, referring to Figure 7 , Figure 7 Another schematic diagram of an interface generation apparatus provided by an embodiment of the present application is shown in the figure. 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.
[0089] Specifically, the display subsystem 204 is a hardware module, which can simultaneously acquire multiple layers, 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 simultaneously acquire multiple layers, 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.
[0090] For example, as shown in FIG. 2, Figure 8 Figure 8 FIG. 2 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 simultaneously acquire the first layer and the second layer, 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.
[0091] 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.
[0092] 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 embodiment 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 processed by animation effect 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.
[0093] 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 corner rounding processing.
[0094] Optionally, the RCG operator is configured with a parameter of a rounded corner curve by software, and an alpha mask is calculated by hardware and subjected to anti-aliasing processing. The alpha mask only includes alpha values of a rounded corner transition region. For example, as shown in Figure 9 Figure 9 is a schematic diagram of a corner rounding processing provided by the embodiment of the present application. The OV operator can superimpose the alpha mask and a layer that needs to be rounded to implement a transparent effect of a rounded corner region. In the embodiment 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 implement a layer corner rounding function.
[0095] Optionally, the animation effect accelerator 203 can include a down scale operator and an up scale operator. The animation effect accelerator 203 can down scale the layers based on the down scale operator, and up scale the layers based on the up scale operator, to blur the layers, so as to avoid a large calculation amount of blurring the layers by using a blurring algorithm, and improve the efficiency of blurring the layers.
[0096] In some embodiments, the second subtask further includes a second graphic rendering task; the graphic processor 202 is further configured to: acquire the second graphic rendering task in the second subtask, and perform graphic rendering based on the second graphic 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.
[0097] Specifically, the second subtask can include a second graphic rendering task and an animation effect acceleration task. The second graphic rendering task can be used to instruct to render a clear layer, i.e., a third layer. After the graphic processor 202 performs graphic rendering based on the second graphic 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 blurring processing, on the third layer to obtain the second layer. In the embodiments of the present application, the processor 201, the graphic processor 202 and the animation effect accelerator 203 cooperatively render the interface. The processor 201 determines a first task (i.e., an interface generation task) and a graphic rendering task and an animation effect acceleration processing task included in the first task. Further, the graphic processor 202 can be used to execute the graphic rendering task, and the animation effect accelerator 203 can be used to execute the animation effect processing task, i.e., the graphic processor 202 only needs to execute the graphic rendering task, and does not need to execute the animation effect processing task. 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.
[0098] Optionally, the display subsystem 204 can be used 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.
[0099] Optionally, as shown in FIG. 8, the display subsystem 204 can be used 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. Figure 10 Figure 10 A schematic diagram of another layer overlay provided in an embodiment of the present application assumes that the graphics processor 202 is configured to render a clear folder window interface, namely the first layer. This first layer includes an image. The folder window interface may include icons for smart home applications, recording applications, and app store applications. A third layer may be stored in the memory. This third layer may be a layer obtained by blurring the main interface. The main interface may include icons for multiple applications, such as a clock, calendar, gallery, memo, and settings. Animation effects accelerator 203 is configured to round the corners and blur the background of the third layer, namely the folder 1 window in the main interface, to obtain a second layer. This second layer includes an image in which the background of the folder 1 window is blurred and the edges of the folder 1 window are rounded. After obtaining the first, second, and third layers, the display subsystem 204 may simultaneously obtain the first, second, and third layers and perform online fusion of the first, second, and third layers to obtain the image to be displayed. Furthermore, the display subsystem 204 can send the image to the screen and then display the image to be displayed on the screen of the electronic device. Since the folder 1 window is blurred and rounded, and the background is blurred, the user can clearly notice the content in folder 1.
[0100] In some embodiments, see Figure 11 , Figure 11 A workflow diagram of another interface generation device provided in an embodiment of the present application, wherein the interface generation device 20 also includes a task scheduler 205; the processor 201 is further used to: send a first dependency relationship to the task scheduler 205, wherein the first dependency relationship is used to indicate the dependency relationship between the second graphics rendering task and the animation effect processing task in the second subtask; the task scheduler 205 is used 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.
[0101] 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.
[0102] 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 rule, and send corresponding event notifications to the 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 be integrated with 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 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 above. The definition and implementation of the task dependency relationship rule 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.
[0103] In some embodiments, the interface generation apparatus 20 includes a chip.
[0104] Specifically, the interface generation apparatus 20 includes a chip, and compared with the traditional 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.
[0105] For example, as shown in FIG. 2, the interface generation apparatus 20 includes a chip, and the chip includes a processor 201, a graphics processor 202, and an animation effect accelerator 203. Figure 12 Figure 12 A flowchart of an interface generation device provided by an embodiment of the present application is shown in the figure. 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 dependency relationship of the task 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. After the task is completed, a hardware interrupt is returned to the CPU. 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.
[0106] 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 construct a GPU task corresponding to the Draw Op of the graphics rendering task, and calls the AAE DDK to construct an AAE task for the 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 constructed 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 rules, 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, so as to support multiple concurrent tasks; the linkage relationship of the operators in the AAE can be dynamically configured between different tasks, so as to realize more flexible functions. Further, the AAE can share the on-chip RAM with the DSS, or share data through the System Cache. Further, 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.
[0107] Optionally, the 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.
[0108] In summary, in the present application, compared with the traditional interface generation device, the animation effect accelerator 203 is added, and the processor 201, the graphics processor 202 and the animation effect accelerator 203 work together to render the interface, so as to improve the interface rendering efficiency. In the traditional technology, the processor 201 directly issues the interface generation task to the graphics processor 202 for execution, and the graphics processor 202 needs to execute both the graphics rendering task and the animation effect processing task. The whole process of animation effect processing is complex, the number of instructions executed by the processor 201 and the graphics 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 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 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.
[0109] Please refer to Figure 13 , Figure 13 A flowchart of an interface generation method provided by an embodiment of the present application is shown. The present application provides an interface generation method, which can be applied to the above-mentioned interface generation device, and the detailed description is as follows.
[0110] Step S301: determining a first task by a processor.
[0111] Specifically, 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.
[0112] Step S302: performing graphics rendering based on the first subtask by a graphics processor to obtain a first layer.
[0113] 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.
[0114] The animation effect processing includes at least one of blur processing or round corner processing.
[0115] In some embodiments, the animation effect processing task is used to indicate the to-be-processed layer; and the animation effect processing is performed on the to-be-processed layer based on the animation effect processing task in the second subtask to obtain the second layer by the animation effect accelerator.
[0116] In some embodiments, the second subtask further includes a second graphics rendering task; and the method further includes: obtaining 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; and performing the animation effect processing based on the animation effect processing task in the second subtask to obtain the second layer by the animation effect accelerator, including: performing the animation effect processing on the third layer based on the animation effect processing task by the animation effect accelerator to obtain the second layer.
[0117] In some embodiments, the interface generation apparatus further includes a task scheduler; and the method further includes: sending, by the processor, a first dependency relationship to the task scheduler, the first dependency relationship being used to indicate a dependency relationship of executing the second graphics rendering task and the animation effect processing task in the second subtask; and scheduling, by the task scheduler, the graphics processor to execute the second graphics rendering task and the animation effect accelerator to execute the animation effect processing task according to the first dependency relationship.
[0118] In some embodiments, the interface generation apparatus further includes a display subsystem; and 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.
[0119] Embodiments of the present application provide an electronic device, including any of the interface generation apparatuses and a memory; the memory is configured to store computer program codes, the computer program codes including computer instructions, and the interface generation apparatus is configured to invoke and run the computer instructions.
[0120] The present application provides a computer storage medium, the computer storage medium storing a computer program, the computer program being executed by the above-mentioned interface generation apparatus to implement any one of the above-mentioned interface generation methods.
[0121] The present application provides a chip system, the chip system including the above-mentioned interface generation apparatus, and being configured to support the electronic device to implement the functions related to the above-mentioned interface generation methods, for example, generating or processing the information related to the above-mentioned interface generation methods. In a possible design, the chip system further includes a memory, and the memory is configured to store necessary program instructions and data of the electronic device. The chip system can include a chip, or can include the chip and other discrete devices.
[0122] The application provides a computer program product, the computer program includes instructions, when the computer program is executed by a computer, causes the computer to execute the method in any one of the second aspect.
[0123] In the above embodiments, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.
[0124] It should be noted that, for the foregoing method embodiments, in order to simply describe, they are all expressed as a combination of a series of actions, but those skilled in the art should know that the application is not limited to the order of the actions described, because according to the application, some steps can be performed in other order or simultaneously. 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 necessary for the application.
[0125] In several embodiments provided by the application, it should be understood that the disclosed device can be implemented by other ways. For example, the device embodiments described above are only schematic, and for example, the division of the units is only a logical function division, and there can be another division way in actual implementation, 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 displayed or discussed mutual couplings or direct couplings or communication connections between different parts can be indirect couplings or communication connections through some interfaces, devices or units, and can be electrical or other forms.
[0126] The units described as separated parts can or can not be physically separated, and the parts displayed as units can or can not be physical units, that is, they can be located in one place, or can be distributed on a plurality of network units. According to actual needs, some or all of the units can be selected to achieve the purpose of the embodiment scheme.
[0127] In addition, each functional unit in each embodiment of the application can be integrated in one processing unit, or each unit can be physically present separately, 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 a software functional unit.
[0128] 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.
[0129] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than 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.