CN111782311B - Rendering method, device, equipment and readable medium - Google Patents

Rendering method, device, equipment and readable medium Download PDF

Info

Publication number
CN111782311B
CN111782311B CN202010394669.9A CN202010394669A CN111782311B CN 111782311 B CN111782311 B CN 111782311B CN 202010394669 A CN202010394669 A CN 202010394669A CN 111782311 B CN111782311 B CN 111782311B
Authority
CN
China
Prior art keywords
target
controls
pixel
storage space
memory
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010394669.9A
Other languages
Chinese (zh)
Other versions
CN111782311A (en
Inventor
张佳骥
王月
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Perfect World Beijing Software Technology Development Co Ltd
Original Assignee
Perfect World Beijing Software Technology Development Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Perfect World Beijing Software Technology Development Co Ltd filed Critical Perfect World Beijing Software Technology Development Co Ltd
Priority to CN202010394669.9A priority Critical patent/CN111782311B/en
Publication of CN111782311A publication Critical patent/CN111782311A/en
Application granted granted Critical
Publication of CN111782311B publication Critical patent/CN111782311B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons

Abstract

The embodiment of the invention provides a rendering method, a rendering device, rendering equipment and a readable medium, wherein the method comprises the following steps: acquiring a hierarchical structure corresponding to a plurality of controls contained in an interface, wherein the hierarchical structure reflects parent-child relations among different controls; determining a control belonging to a target level according to the hierarchical structure, wherein the target level is any one layer in a plurality of levels contained in the hierarchical structure; acquiring pixels corresponding to the controls of the target level; and in one rendering process, rendering the pixels corresponding to the controls of the target level on the corresponding controls. By adopting the invention, the rendering efficiency can be improved and the rendering time can be reduced.

Description

Rendering method, device, equipment and readable medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a rendering method, an apparatus, a device, and a readable medium.
Background
In the process of using the application program by the user, the interface of the application program needs to be rendered, so that the user can view the content displayed in the interface and further perform related interactive operation.
An interface often includes many various controls, and at present, one rendering method is: rendering is performed independently for each control. When the number of the controls is large, the rendering efficiency is low and the time consumption is high.
Disclosure of Invention
The embodiment of the invention provides a rendering method, a rendering device, rendering equipment and a readable medium, which are used for improving rendering efficiency and reducing rendering time.
In a first aspect, an embodiment of the present invention provides a rendering method, where the method includes:
acquiring a hierarchical structure corresponding to a plurality of controls contained in an interface, wherein parent-child relations among different controls are reflected in the hierarchical structure;
determining a control belonging to a target level according to the hierarchy, the target level being any one of a plurality of levels included in the hierarchy;
acquiring pixels corresponding to the controls of the target level;
and in a rendering process, rendering the pixels corresponding to the controls of the target level on the corresponding controls.
In a second aspect, an embodiment of the present invention provides a rendering apparatus, including:
the system comprises an acquisition module, a display module and a display module, wherein the acquisition module is used for acquiring a hierarchical structure corresponding to a plurality of controls contained in an interface, and the hierarchical structure reflects parent-child relationships among different controls;
a determining module, configured to determine, according to the hierarchical structure, a control belonging to a target level, where the target level is any one of multiple levels included in the hierarchical structure;
the acquisition module is used for acquiring pixels corresponding to the controls of the target level;
and the rendering module is used for rendering the pixels corresponding to the controls of the target level on the corresponding controls in one rendering process.
In a third aspect, an embodiment of the present invention provides an electronic device, which includes a processor and a memory, where the memory stores at least one instruction, at least one program, a code set, or a set of instructions, and the at least one instruction, at least one program, a code set, or a set of instructions is loaded and executed by the processor to implement the rendering method in the first aspect.
In a fourth aspect, an embodiment of the present invention provides a computer-readable medium on which at least one instruction, at least one program, a set of codes, or a set of instructions is stored, which is loaded and executed by a processor to implement the rendering method in the first aspect.
By the method provided by the embodiment of the invention, the controls belonging to any one hierarchy can be determined through the hierarchical structures corresponding to the controls in the interface, and for the controls belonging to the same hierarchy, the controls can be rendered at one time through the pixels corresponding to the controls respectively, so that the rendering efficiency can be improved and the rendering duration can be reduced.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a rendering method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of multiple windows in an interface according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an atlas provided in an embodiment of the invention;
FIG. 4 is a flowchart illustrating a process of rendering text on a target control according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a rendering apparatus according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terminology used in the embodiments of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the examples of the present invention and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise, and "a plurality" typically includes at least two.
The words "if", as used herein, may be interpreted as "at … …" or "at … …" or "in response to a determination" or "in response to a detection", depending on the context. Similarly, the phrases "if determined" or "if detected (a stated condition or event)" may be interpreted as "when determined" or "in response to a determination" or "when detected (a stated condition or event)" or "in response to a detection (a stated condition or event)", depending on the context.
In addition, the sequence of steps in each method embodiment described below is only an example and is not strictly limited.
Fig. 1 is a flowchart of a rendering method according to an embodiment of the present invention, where the method may be applied to an electronic device. As shown in fig. 1, the method comprises the steps of:
101. and acquiring a hierarchical structure corresponding to the plurality of controls contained in the interface, wherein the hierarchical structure reflects parent-child relations among different controls.
102. A control belonging to a target level is determined from the hierarchy, the target level being any one of a plurality of levels contained in the hierarchy.
103. And acquiring the pixels corresponding to the controls of the target level.
104. And in one rendering process, rendering the pixels corresponding to the controls of the target level on the corresponding controls.
The interface may be an interface in an application program, and multiple windows may be displayed in the interface, where the multiple windows have a hierarchical relationship, and a window with a higher hierarchy may be displayed by covering a window with a lower hierarchy. Taking a game application as an example, when a user opens the game application, a game basic function window may be displayed, and if a virtual character X is displayed in the game basic function window, when the user clicks the virtual character X, a character panel of the virtual character X is triggered to open, and the character panel may also be used as one window. When the user further performs certain operations, a pop-up message notification window can be triggered. In this example, the level of the game basic function window may be set to be smaller than that of the character panel window, and the level of the character panel window may be set to be smaller than that of the message notification window, and the final display effect can be shown in fig. 2. In fig. 2, the messaging window presented at the highest hierarchical level is presented overlaying all other hierarchical levels.
Based on the above, multiple windows in the same interface have a hierarchical relationship, and at least one control can be arranged in the same window, so that multiple controls belonging to the same interface also have a hierarchical relationship, and the hierarchy corresponding to the control is consistent with the window to which the control belongs. For example, assuming that the controls A1 and A2 are disposed in the window a, the controls B1 and B2 are disposed in the window B, and the window a has a higher level than the window B, the controls A1 and A2 have a higher level than the controls B1 and B2.
In practical application, the hierarchical relationship between different controls in the same interface can be reflected through the hierarchical structure. In order to clearly record the hierarchical relationship between different controls in the interface, a tree structure may be used to describe the hierarchical relationship between different controls in the interface. In the tree structure, the sibling controls may be stored in the same layer of the tree, and the controls in different layers of the tree structure have parent-child relationships.
After the hierarchical structure corresponding to different controls in the interface is obtained, a control of a target level in multiple levels included in the hierarchical structure can be determined, and the target level can be any one of the multiple levels. In practical applications, the entire hierarchical structure can be rendered from the bottom layer to the top layer.
In the process of rendering the control of the target level, the control needs to be rendered through the pixel corresponding to the control of the target level, so that the pixel corresponding to the control of the target level needs to be obtained first. Optionally, the process of obtaining the pixels corresponding to the controls of the target hierarchy may be implemented as: and acquiring pixels corresponding to the controls of the target level from a preset atlas corresponding to the target level.
In practical application, the pixels can be stored in the atlas, and since all the controls of the target level need to be rendered through one rendering process, the pixels corresponding to different controls of the target level can be stored in the same atlas. As shown in FIG. 3, is an illustration of an atlas corresponding to a control of a target level. Each layer in the hierarchical structure corresponds to a respective atlas, an atlas corresponding to a target level may be determined in a plurality of atlases, and a pixel corresponding to each control of the target level may be obtained from the atlas corresponding to the target level.
Because the pixels corresponding to different controls in the target hierarchy are stored in the same atlas, in order to distinguish different controls to which different pixels belong, the pixels can be distinguished through the pixel identifications associated with the controls. For example, there are A, B, C three pixels in the atlas, which belong to 3 different controls respectively, and it is assumed that the pixel associated with control i in the 3 different controls is identified as B, so that the pixel matching with pixel identification B can be found from the atlas through pixel identification B, and control i is rendered through the pixel.
Optionally, the atlas may be a sub-interface corresponding to the target level, the sub-interface includes all pixels corresponding to the controls of the target level, and the process of obtaining the pixels corresponding to the controls of the target level from the preset atlas corresponding to the target level may be implemented as: determining position areas corresponding to the controls of the target level in the sub-interface; and extracting pixels corresponding to the controls of the target level from the position area.
In practical applications, all pixels corresponding to the control of the target level may be combined into a whole graph, and the whole graph may be used as the above-mentioned atlas. As shown in fig. 2, all pixels are stitched together to form a whole figure. When any pixel i of the atlas is used, the position area where the pixel i is located can be found in the atlas, and then an image on the position area is obtained to obtain the pixel i.
It can be understood that, since the location area where the pixel i is located can be found in the atlas, the location areas where all the pixels in the atlas are located need to be recorded in advance, so that when any pixel i is used, the location area where the pixel i is located in the atlas can be determined based on the location areas where all the pixels in the atlas are recorded in advance. Furthermore, the position area where each pixel in the map set is located can be stored in association with the pixel identifier, so that the position area where the corresponding pixel is located can be searched through the pixel identifier. Based on this, a description file may be set for the atlas, in which the identification of each pixel in the atlas and the corresponding location area are recorded.
In the above description, the pixels corresponding to the controls of the target hierarchy are obtained, and after the pixels corresponding to the controls of the target hierarchy are obtained, the pixels corresponding to the controls of the target hierarchy may be rendered on the corresponding controls in one rendering process. And a plurality of controls can be rendered only through one rendering process, so that the rendering efficiency can be improved, and the rendering time can be shortened.
It is mentioned above that a window may include a plurality of controls, for the window, the controls may be rendered by pixels, and if the window includes a control that needs to render text, the non-text type control may be determined first, the part of the controls may be rendered first, then the text type control may be determined, and then the text type control may be rendered, so as to finally complete all rendering processes. How to render the text-type control is described below.
Optionally, for a target control included in the target hierarchy, the content corresponding to the target control is a text, and the process of rendering the text on the target control may be implemented as: determining whether a character texture corresponding to a character exists in a preset storage space; and if the preset storage space has the character texture, acquiring the character texture from the preset storage space.
In practical applications, texts such as "determine", "cancel", etc. may be rendered in the target control by the above-mentioned operation manner. If the text content needs to be rendered in the target control, firstly, the text texture corresponding to the character to be rendered needs to be obtained, so that whether the text texture corresponding to the character to be rendered exists or not can be searched in the preset storage space, and if so, the text texture is obtained from the preset storage space.
It can be understood that, because the text texture corresponding to the text to be rendered can be acquired, it indicates that the text texture corresponding to the text to be rendered can be made and stored in the preset storage space before the text texture is actually acquired.
Optionally, if there is no text texture in the preset storage space, the text texture corresponding to the text is obtained through the font engine. Wherein the font engine may be a freetype font engine.
In practical application, if no text texture exists in the preset storage space, the text to be rendered can be rendered in the null texture set by the font engine to obtain the text texture, and then the text texture is stored in the preset storage space, so that the text texture can be directly obtained from the preset storage space for direct use if the same text needs to be rendered next time. By the method, the character texture can be prevented from being frequently rendered by the font engine, the processing calculation amount of the image can be reduced, and the rendering efficiency can be improved.
If the text textures obtained by rendering through the font engine are stored each time, a large amount of storage space is occupied, and in order to reduce the occupation of the storage space, the text textures with lower utilization rates can be deleted, and more storage space is reserved for the text textures with higher utilization rates or newly rendered text textures. Alternatively, the process of reducing the occupation of the storage space may be implemented as: and if the residual storage space in the preset storage space is lower than the set threshold value, deleting the character textures of which the utilization rates accord with the set conditions from the preset storage space.
The setting condition may be that the usage rate is the lowest, and the setting threshold may be 0. Assuming that 2 text textures are stored, after the 2 text textures are stored in the storage space, if a new text texture needs to be rendered, the new text texture can be covered by the text texture with the lowest utilization rate in the preset storage space.
In summary, in one possible implementation, as shown in fig. 4, the process of rendering the text on the target control can be implemented as: determining whether a character texture corresponding to a character exists in a preset storage space; if the preset storage space has the character texture corresponding to the character, acquiring the character texture from the preset storage space; and if the character texture corresponding to the characters does not exist in the preset storage space, determining whether the residual storage space in the preset storage space is lower than a set threshold value. If the residual storage space in the preset storage space is lower than a set threshold, deleting the character texture with the lowest utilization rate from the preset storage space; and if the residual storage space in the preset storage space is higher than the set threshold, rendering the characters to be rendered into the null texture.
In addition, the resolution used in the application program production is assumed to be the first resolution, and the user may need to stretch the produced interface due to different devices when using the application program, and the interface is displayed through the second resolution. For example, an application is made at a resolution of 1024 × 768 and runs at a resolution of 1920 × 1080, in which case the interface may stretch-fit from a resolution of 1024 × 768 to a resolution of 1920 × 1080. If the text in the interface is stretched, font blurring results. To solve this problem, when rendering the text texture, the text texture may be rendered at a higher resolution, for example, directly at 1920 × 1080, so that the text texture with higher resolution still remains clear under different use conditions.
Optionally, the method provided in the embodiment of the present invention may further include: when the pixel resource needs to be loaded into the resource management system, creating a storage space for storing the target pixel resource in the memory; loading the target pixel resource into the created storage space; and informing the resource management system of the corresponding storage space identifier of the target pixel resource in the memory so that the resource management system calls the target pixel resource.
In practical application, the resource management system can be controlled to dynamically load the pixel resources, rather than loading all the pixel resources to the memory at one time during starting. Therefore, the personalized requirements of uploading the custom head portrait and the custom background and the like by the user can be met, and the storage space of the memory can be saved.
The resource management system can render the control through the pixel resources loaded into the memory. When the control needs to be rendered by using the pixel resource, a piece of storage space can be created in the memory for the target pixel resource which needs to be used currently, and then the target pixel resource is loaded into the created storage space. Then, the resource management system can be informed that the target pixel resource has been loaded into the memory, and what the target pixel resource is loaded by the resource management system and which piece of storage space exists in the memory is informed, so that the resource management system can call the target pixel resource loaded into the memory according to the information.
Because the memory is unstable if different pixel resources stored in the memory are marked by the same identifier, the embodiment of the invention can also acquire the current timestamp, identify the target pixel resource based on the current timestamp, and store the pixel resource marked by the current timestamp into the memory, thereby ensuring the security of the memory.
Optionally, since the pixel resource is dynamically loaded, in order to avoid memory leakage, the loaded pixel resource may be recorded each time the pixel resource is loaded into the memory, so as to obtain record information of the pixel resource loaded in the memory, and when a shutdown operation triggering the resource management system is detected, the storage space in the memory for storing the pixel resource is released according to the record information, and meanwhile, the pixel resource loaded in the memory of the resource management system may be notified that the pixel resource is released. By the mode, after the resource management system is closed, the storage space for storing the pixel resources can be released in time, so that the aim of preventing memory leakage is fulfilled.
The record information may be global data structure management count information, and each time a new pixel resource is loaded into the memory, the record information may record a storage space identifier of the newly loaded pixel resource in the memory, and may also increase the value of the counter by 1.
During the process of using the application program, for example, during the process of using the game application program, there may be some personalized setting requirements, for example, the user wants to upload a local picture as an avatar, a custom background, and the like. If the application program is in the process of running at the moment, the picture resources uploaded by the user can be dynamically loaded and unloaded. Based on this, optionally, a picture adding request triggered by a user may be received, where the picture adding request includes an image to be added to the interface; determining that the image is associated with a target identifier; and adding the image into the interface according to the picture adding request.
After the resources are used up, in response to the triggering of a preset event corresponding to the user, the image can be determined according to the target identifier, and the image is deleted. In practical application, the resources loaded by the count can be managed by using the global data structure and are uniformly unloaded when the application program is closed, so that the safety of the memory is ensured.
The rendering apparatus of one or more embodiments of the present invention will be described in detail below. Those skilled in the art will appreciate that these rendering devices may each be configured using commercially available hardware components through the steps taught by the present solution.
Fig. 5 is a schematic structural diagram of a rendering apparatus according to an embodiment of the present invention, and as shown in fig. 5, the apparatus includes: the device comprises an acquisition module 11, a determination module 12 and a rendering module 13.
The acquiring module 11 is configured to acquire a hierarchical structure corresponding to a plurality of controls included in an interface, where parent-child relationships among different controls are reflected in the hierarchical structure;
a determining module 12, configured to determine, according to the hierarchical structure, a control belonging to a target hierarchical level, where the target hierarchical level is any one of multiple hierarchical levels included in the hierarchical structure;
the obtaining module 11 is configured to obtain pixels corresponding to the controls of the target hierarchy;
and the rendering module 13 is configured to render the pixels corresponding to the respective controls of the target hierarchy onto the corresponding controls in one rendering process.
Optionally, the obtaining module 11 is configured to:
and acquiring pixels corresponding to the controls of the target level from a preset atlas corresponding to the target level.
Optionally, the atlas is a sub-interface corresponding to the target level, and all pixels corresponding to the control of the target level are included in the sub-interface;
the obtaining module 11 is configured to:
determining position areas corresponding to the controls of the target level in the sub-interface;
and extracting pixels corresponding to the controls of the target level from the position area.
Optionally, for a target control included in the target hierarchy, where a content corresponding to the target control is a text, the rendering module 13 is further configured to:
determining whether a character texture corresponding to the character exists in a preset storage space;
and if the character texture exists in the preset storage space, acquiring the character texture from the preset storage space.
Optionally, the obtaining module 11 is further configured to:
and if the character texture does not exist in the preset storage space, acquiring the character texture corresponding to the character through a font engine.
Optionally, the apparatus further comprises a deletion module;
and the deleting module is used for deleting the character textures of which the utilization rates meet set conditions from the preset storage space if the residual storage space in the preset storage space is lower than a set threshold.
Optionally, the apparatus further comprises a response module;
the response module is configured to:
receiving a picture adding request triggered by a user, wherein the picture adding request comprises an image to be added to the interface;
determining that the image is associated with a target identifier;
and adding the image into the interface according to the picture adding request.
Optionally, the response module is further configured to:
responding to the trigger of a preset event corresponding to the user, and determining the image according to the target identification;
and deleting the image.
Optionally, the apparatus further includes a loading module, where the loading module is configured to:
when the pixel resource needs to be loaded into the resource management system, creating a storage space for storing the target pixel resource in the memory;
loading the target pixel resource into the created storage space;
and informing the resource management system of the storage space identifier corresponding to the target pixel resource in the memory so that the resource management system calls the target pixel resource.
Optionally, the loading module is further configured to:
acquiring a current timestamp;
and identifying the target pixel resource based on the current timestamp.
Optionally, the apparatus further comprises a releasing module, configured to:
when the pixel resource is loaded to the memory each time, recording the loaded pixel resource to obtain the record information of the pixel resource loaded in the memory;
when the closing operation of the resource management system is triggered, releasing the storage space for storing the pixel resources in the memory according to the record information;
and informing the resource management system that the pixel resources loaded in the memory are released.
The apparatus shown in fig. 5 may perform the rendering method provided in the foregoing embodiments shown in fig. 1 to fig. 4, and the detailed implementation process and technical effect refer to the description in the foregoing embodiments, which are not described herein again.
In one possible design, the structure of the rendering apparatus shown in fig. 5 may be implemented as an electronic device, as shown in fig. 6, which may include: a processor 91, and a memory 92. Wherein the memory 92 has stored thereon executable code, which when executed by the processor 91, makes the processor 91 at least implement the rendering method as provided in the foregoing embodiments shown in fig. 1 to 4.
Optionally, the electronic device may further include a communication interface 93 for communicating with other devices.
In addition, an embodiment of the present invention provides a computer-readable medium, on which executable codes are stored, and when the executable codes are executed by a processor of an electronic device, the processor is enabled to implement at least the rendering method as provided in the foregoing embodiments shown in fig. 1 to 4.
The system, method and apparatus of the embodiments of the present invention can be implemented as pure software (e.g., a software program written in Java), as pure hardware (e.g., a dedicated ASIC chip or FPGA chip), or as a system combining software and hardware (e.g., a firmware system storing fixed code or a system with a general-purpose memory and a processor), as desired.
Another aspect of the invention is a computer-readable medium having computer-readable instructions stored thereon that, when executed, perform a method of embodiments of the invention.
While various embodiments of the present invention have been described above, the above description is intended to be illustrative, not exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The scope of the claimed subject matter is defined only by the following claims.

Claims (12)

1. A rendering method, comprising:
acquiring a hierarchical structure corresponding to a plurality of controls contained in an interface, wherein the hierarchical structure reflects parent-child relations among different controls;
determining a control belonging to a target level according to the hierarchy, wherein the target level is any one of a plurality of levels contained in the hierarchy;
obtaining pixels corresponding to the controls of the target level, wherein the pixels corresponding to different controls of the target level are stored in the same picture set;
in a rendering process, rendering pixels corresponding to the controls of the target level on the corresponding controls;
when the pixel resource needs to be loaded into the resource management system, creating a storage space for storing the target pixel resource in the memory;
loading the target pixel resource into the created storage space;
informing the resource management system of a storage space identifier corresponding to the target pixel resource in the memory so that the resource management system calls the target pixel resource;
when the pixel resources are loaded into the memory each time, recording the loaded pixel resources to obtain recording information of the pixel resources loaded into the memory, wherein the recording information is global data structure management counting information, the global data structure management counting information comprises storage space identifiers of the loaded pixel resources in the memory and a counting value, and the counting value is used for indicating the number of the pixel resources which are loaded into the memory at present;
when the closing operation of the resource management system is triggered, releasing the storage space for storing the pixel resources in the memory according to the record information;
and informing the resource management system that the pixel resources loaded in the memory are released.
2. The method of claim 1, the obtaining respective pixels for controls of the target hierarchy, comprising:
and acquiring pixels corresponding to the controls of the target level from a preset atlas corresponding to the target level.
3. The method of claim 2, the atlas being a sub-interface corresponding to the target level, all pixels in the sub-interface corresponding to controls of the target level being included;
the obtaining of the pixels corresponding to the controls of the target level from a preset atlas corresponding to the target level includes:
determining position areas corresponding to the controls of the target level in the sub-interface;
and extracting pixels corresponding to the controls of the target level from the position area.
4. The method of claim 1, wherein for a target control contained in the target hierarchy, content corresponding to the target control is text, and rendering the text on the target control comprises:
determining whether a character texture corresponding to the character exists in a preset storage space;
and if the character texture exists in the preset storage space, acquiring the character texture from the preset storage space.
5. The method of claim 4, further comprising:
and if the character texture does not exist in the preset storage space, acquiring the character texture corresponding to the character through a font engine.
6. The method of claim 5, further comprising:
and if the residual storage space in the preset storage space is lower than a set threshold, deleting the character texture of which the utilization rate accords with the set condition from the preset storage space.
7. The method of claim 1, further comprising:
receiving a picture adding request triggered by a user, wherein the picture adding request comprises an image to be added to the interface;
determining that the image is associated with a target identifier;
and adding the image into the interface according to the picture adding request.
8. The method of claim 7, further comprising:
responding to the trigger of a preset event corresponding to the user, and determining the image according to the target identification;
and deleting the image.
9. The method of claim 1, further comprising:
acquiring a current timestamp;
and identifying the target pixel resource based on the current timestamp.
10. A rendering apparatus, comprising:
the system comprises an acquisition module, a display module and a display module, wherein the acquisition module is used for acquiring a hierarchical structure corresponding to a plurality of controls contained in an interface, and the hierarchical structure reflects the parent-child relationship among different controls;
the determining module is used for determining a control belonging to a target level according to the hierarchical structure, wherein the target level is any one of a plurality of levels contained in the hierarchical structure;
the obtaining module is configured to obtain pixels corresponding to respective controls of the target hierarchy, where the pixels corresponding to different controls of the target hierarchy are stored in the same map set;
the rendering module is used for rendering the pixels corresponding to the controls of the target level on the corresponding controls in one rendering process; when the pixel resource needs to be loaded into the resource management system, creating a storage space for storing the target pixel resource in the memory; loading the target pixel resource into the created storage space; informing the resource management system of a storage space identifier corresponding to the target pixel resource in the memory so that the resource management system calls the target pixel resource; when the pixel resources are loaded into the memory each time, recording the loaded pixel resources to obtain recording information of the pixel resources loaded into the memory, wherein the recording information is global data structure management counting information, the global data structure management counting information comprises storage space identifiers of the loaded pixel resources in the memory and a counting value, and the counting value is used for indicating the number of the pixel resources which are loaded into the memory at present; when the closing operation of the resource management system is triggered, releasing the storage space for storing the pixel resources in the memory according to the record information; and informing the resource management system that the pixel resources loaded in the memory are released.
11. An electronic device comprising a processor and a memory, the memory having stored therein at least one instruction, at least one program, set of codes, or set of instructions, which is loaded and executed by the processor to implement the method according to any one of claims 1-9.
12. A computer readable medium having stored thereon at least one instruction, at least one program, set of codes, or set of instructions, which is loaded and executed by a processor to implement the method according to any one of claims 1-9.
CN202010394669.9A 2020-05-11 2020-05-11 Rendering method, device, equipment and readable medium Active CN111782311B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010394669.9A CN111782311B (en) 2020-05-11 2020-05-11 Rendering method, device, equipment and readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010394669.9A CN111782311B (en) 2020-05-11 2020-05-11 Rendering method, device, equipment and readable medium

Publications (2)

Publication Number Publication Date
CN111782311A CN111782311A (en) 2020-10-16
CN111782311B true CN111782311B (en) 2023-01-10

Family

ID=72753641

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010394669.9A Active CN111782311B (en) 2020-05-11 2020-05-11 Rendering method, device, equipment and readable medium

Country Status (1)

Country Link
CN (1) CN111782311B (en)

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7940279B2 (en) * 2007-03-27 2011-05-10 Utah State University System and method for rendering of texel imagery
CN105022758B (en) * 2014-04-29 2019-08-09 高德信息技术有限公司 A kind of text texture management method and apparatus
CN107315646B (en) * 2016-04-27 2021-01-26 北京京东尚科信息技术有限公司 Method and device for controlling data flow between page components
CN108279964B (en) * 2018-01-19 2021-09-10 广州视源电子科技股份有限公司 Method and device for realizing covering layer rendering, intelligent equipment and storage medium
CN108196835A (en) * 2018-01-29 2018-06-22 东北大学 Pel storage and the method rendered in a kind of game engine
CN109646955B (en) * 2018-12-20 2022-06-24 网易(杭州)网络有限公司 Game interface generation method, device and storage medium

Also Published As

Publication number Publication date
CN111782311A (en) 2020-10-16

Similar Documents

Publication Publication Date Title
CN110377264B (en) Layer synthesis method, device, electronic equipment and storage medium
CN110392305B (en) Video static picture detection method, terminal and computer readable storage medium
CN110865753B (en) Application message notification method and device
WO2009049179A1 (en) Method for selectively remoting windows
AU2021229220B2 (en) Image processing method and device
CN108389151B (en) Over-rendering evaluation method and system
CN112149570A (en) Multi-person living body detection method and device, electronic equipment and storage medium
CN110471700B (en) Graphic processing method, apparatus, storage medium and electronic device
US11741648B2 (en) Element rendering method and apparatus, computer readable storage medium, and computer device
CN111782311B (en) Rendering method, device, equipment and readable medium
CN109886864B (en) Privacy mask processing method and device
CN112316437B (en) Resource switching method and device, electronic equipment and storage medium
CN111803956B (en) Method and device for determining game plug-in behavior, electronic equipment and storage medium
US11134180B2 (en) Detection method for static image of a video and terminal, and computer-readable storage medium
CN116342779B (en) Image optimization processing method, device, equipment and storage medium
CN113038141A (en) Video frame processing method and electronic equipment
CN112380940A (en) Processing method and device for high-altitude parabolic monitoring image, electronic equipment and storage medium
CN108989704B (en) Image generation method and device and terminal equipment
CN106204668B (en) Picture decoding method and device
CN110908570B (en) Image processing method, device, terminal and storage medium
CN112395028B (en) Page checking method, device, terminal and storage medium
CN112749769A (en) Graphic code detection method and device, computer equipment and storage medium
CN113934692A (en) File cleaning method and device, storage medium and equipment
CN111292392A (en) Unity-based image display method, apparatus, device and medium
CN111857857A (en) Interface display method, device and equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20201016

Assignee: Beijing Xuanguang Technology Co.,Ltd.

Assignor: Perfect world (Beijing) software technology development Co.,Ltd.

Contract record no.: X2022990000514

Denomination of invention: Rendering method, apparatus, device and readable medium

License type: Exclusive License

Record date: 20220817

EE01 Entry into force of recordation of patent licensing contract
GR01 Patent grant
GR01 Patent grant