A rendering optimization method based on virtual texture atlas

By dividing the window visual area and creating a virtual texture picture album in the multi-window display scene of Android applications, the non-essential overhead in the existing technology is solved, efficient rendering optimization is achieved, and user experience is improved.

CN118535271BActive Publication Date: 2024-11-08北京麟卓信息科技有限公司
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202410885269.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-03
Publication Date
2024-11-08
Estimated Expiration
2044-07-03

AI Technical Summary

Technical Problem

In the multi-window display scenario of Android applications, the prior art cannot effectively distinguish between covered and non-covered window areas, resulting in non-essential CPU and memory overhead and affecting the user experience.

Method used

By calculating the visual area of ​​the non-topped Android application window on the desktop system and dividing it into sub-regions, creating a virtual texture picture set and a graphics buffer, only the texture data of the visual area is transmitted, and sub-renders are rendered using Vulkan batch command or OpenGL order Texture, optimize the rendering process.

Benefits of technology

It effectively reduces the overhead of CPU, memory and video memory, improves the rendering fluency of application windows, and achieves efficient refresh rendering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118535271B_ABST
    Figure CN118535271B_ABST
Patent Text Reader

Abstract

The present invention discloses a rendering optimization method based on a virtual texture atlas. When an application window on a desktop system side changes, a visible area of ​​a non-top Android application window is obtained and divided into sub-areas. After a virtual texture atlas for storing the sub-areas is created for the Android application window, an Android application compatible service is notified. The Android application compatible service redistributes the visible area according to the layers of the Android application window and updates the sub-areas. When the Android application is refreshed, the texture corresponding to the updated sub-area is sent to the desktop system side. The desktop system side updates the virtual texture atlas according to the texture of the sub-area, and completes the rendering of the Android application window in the form of the virtual texture atlas. When only the visible area data is transmitted, refresh rendering of the Android application when used in a multi-window display scene in the desktop system is realized, effectively reducing the overhead of the CPU, memory or video memory, and improving the smoothness of the application window rendering.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of computer software development, and in particular relates to a rendering optimization method based on a virtual texture atlas. Background Art

[0002] When using Android applications in a desktop system, an Android compatible environment is usually used. In the actual use of Android applications, multiple Android application windows are often displayed on the desktop at the same time. The content displayed in the Android application window is generated by the Android application compatible service and the refresh data is sent to the Android application display unit, and finally the display operation is performed by the Android application display unit. When there are many windows displayed at the same time, the amount of data that the Android application compatible service needs to refresh is large, and the transmission data between the Android application compatible service and the Android application display unit is also large, which will increase the overhead of the CPU, memory, video memory, etc., and thus affect the user experience. The existing Android compatible environment usually passes the rendering data synthesized by SurfaceFlinger as a texture to the Android application display unit on the desktop system side, and then the desktop system uses a graphics interface, such as OpenGL, OpenGL ES, Vulkan, etc., to fully render the texture into the Android application window on the desktop system side.

[0003] In actual situations, multiple application windows including Android applications and desktop applications displayed simultaneously on the desktop often overlap. However, the display mechanism of the desktop system determines that there can only be one pinned application window at any time. The covered window part of the non-pinned application window does not need to be rendered at the normal refresh rate, and the existing Android compatible environment cannot distinguish this situation, resulting in unnecessary CPU and memory or video memory overhead. Summary of the invention

[0004] In view of this, the present invention provides a rendering optimization method based on a virtual texture atlas, which realizes efficient refresh rendering when an Android application is used in a multi-window display scene in a desktop system.

[0005] The present invention provides a rendering optimization method based on a virtual texture atlas, which specifically includes the following steps:

[0006] Step 1, when the application window changes, the desktop system calculates the visible area of ​​all non-top Android application windows, and divides the visible area into multiple sub-areas; if the Android application window does not have a virtual texture atlas, a virtual texture atlas and its corresponding graphics buffer are created for it, otherwise the virtual texture atlas and its corresponding graphics buffer are updated according to the current visible area, wherein the virtual texture atlas contains multiple sub-textures, the virtual texture atlas corresponds to the visible area, and the sub-area corresponds to the sub-texture; the sub-area and its corresponding Android application window ID are sent to the Android application compatible service;

[0007] Step 2, the Android application compatible service traverses all Android application window IDs, obtains the layers of the Android application windows corresponding to each Android application window ID, and executes step 3 if multiple layers are included, otherwise executes step 4;

[0008] Step 3, define the part of the sub-region that overlaps with other sub-regions as an intersection sub-region, and define the part other than the intersection sub-region as a non-intersection sub-region; record the area of ​​the top-level layer contained in the intersection sub-region and the non-intersection sub-region as the first area, record the ratio of the first area to the area of ​​the corresponding intersection sub-region or non-intersection sub-region as the first area ratio, form an adjacent combination region by the intersection sub-region and its adjacent non-intersection sub-region, record the area of ​​the top-level layer contained in the adjacent combination region as the second area, record the ratio of the second area to the area of ​​the adjacent combination region as the second area ratio, select the adjacent combination region with the largest second area ratio as the core sub-region; re-divide the visible area with the core sub-region, the intersection sub-region and the non-intersection sub-region other than the adjacent combination region as sub-regions; merge each layer into the same graphics buffer according to transparency;

[0009] Step 4: Send the sub-areas corresponding to all Android application window IDs and their corresponding textures to the desktop system end;

[0010] Step 5: The desktop system copies the corresponding texture of the sub-area to the virtual texture atlas of the Android application window according to the position of the sub-area; renders the sub-texture in the virtual texture atlas, and completes the rendering operation of the Android application window.

[0011] Furthermore, the virtual texture atlas is created in the following manner: the size of the virtual texture atlas is determined according to the size and position of the Android application window, the width and height of the virtual texture atlas are respectively n times the width and height of the Android application window, and n is a power of 2.

[0012] Furthermore, the visible area is obtained by obtaining the size and position of the Android application window, and calculating the coordinates of the visible area of ​​the Android application window according to the Z-Order of all application windows in the desktop and the sizes and positions of all application windows.

[0013] Furthermore, the graphics buffer in step 1 is updated only when the size of the Android application window changes.

[0014] Furthermore, the method of re-dividing the visible area in step 3 is: selecting the adjacent combined area with the largest second area ratio as the first core sub-area, selecting the adjacent combined area with the largest second area ratio from the adjacent combined areas that do not overlap with the first core sub-area as the second core sub-area, and re-dividing the visible area with the first core sub-area, the second core sub-area, and the intersection sub-area and non-intersection sub-area other than these two core sub-areas as sub-areas.

[0015] Furthermore, the execution method of rendering the sub-textures in the virtual texture atlas in step 5 is: executing using Vulkan batch processing commands.

[0016] Furthermore, the execution method of rendering the sub-textures in the virtual texture atlas in step 5 is: using OpenGL to render the sub-textures sequentially. Beneficial Effects

[0017] The present invention obtains the visible area of ​​a non-top Android application window and divides it into sub-areas when an application window on a desktop system side changes, creates a virtual texture atlas for the Android application window for storing the sub-areas, and then notifies the Android application compatible service, which redistributes the visible area and updates the sub-areas according to the layers of the Android application window. When the Android application is refreshed, the texture corresponding to the updated sub-area is sent to the desktop system side, which updates the virtual texture atlas according to the texture of the sub-area, and completes the rendering of the Android application window in the form of the virtual texture atlas, thereby realizing refresh rendering of the Android application when it is used in a multi-window display scene in the desktop system while only transmitting the visible area data, effectively reducing the overhead of the CPU, memory or video memory, and improving the smoothness of the application window rendering. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 The first division schematic diagram of the visible area obtained by using the rendering optimization method based on the virtual texture atlas provided by the present invention.

[0019] Figure 2 The second division diagram of the visible area obtained by using the rendering optimization method based on the virtual texture atlas provided by the present invention. DETAILED DESCRIPTION

[0020] The present invention is described in detail below with reference to the accompanying drawings and with reference to the embodiments.

[0021] Texture Atlas merges multiple small texture images into one large texture image to reduce the number of state changes during rendering, thereby improving rendering efficiency and reducing resource consumption.

[0022] The present invention provides a rendering optimization method based on a virtual texture atlas, whose core idea is: when the application window on the desktop system side changes, the visible area of ​​the non-top Android application window is obtained and divided into sub-areas, a virtual texture atlas for saving the sub-areas is created for the Android application window and the Android application compatible service is notified, the Android application compatible service redivides the visible area according to the layers of the Android application window to update the sub-areas, and when the Android application is refreshed, the texture corresponding to the updated sub-area is sent to the desktop system side, the desktop system side updates the virtual texture atlas according to the texture of the sub-area, and completes the rendering of the Android application window in the form of a virtual texture atlas.

[0023] The present invention provides a rendering optimization method based on a virtual texture atlas, which specifically includes the following steps:

[0024] Step 1, the desktop system monitors the size and position of the application window, and when the application window changes, calculates the visible area of ​​all non-top Android application windows, and divides the visible area into multiple sub-areas, the combination of these sub-areas can completely cover the entire visible area; if there is no virtual texture atlas for the Android application window, create a virtual texture atlas and its corresponding graphics buffer for it, otherwise update the virtual texture atlas and its corresponding graphics buffer according to the current visible area, wherein the virtual texture atlas contains multiple sub-textures, the virtual texture atlas corresponds to the visible area, and the sub-area corresponds to the sub-texture one by one; the size, coordinates and corresponding Android application window ID of the sub-area are sent to the Android application compatible service.

[0025] In addition, the pinned Android application window does not need to be modified and can be processed using the existing method.

[0026] The method for calculating the visible area of ​​all non-top Android application windows is: obtaining the size and position of the Android application window, and calculating the coordinates of the visible area of ​​the Android application window according to the Z-Order sorting of all application windows in the desktop and the size and position of all application windows.

[0027] Specifically, the visible area can be divided into multiple rectangular sub-areas, generally up to four sub-areas, and then the coordinates of each sub-area relative to the left vertex of the Android application window and the size of each sub-area are calculated. For example, application window 1 is located at the bottom layer of application window 2. When the specific position relationship is as follows Figure 1 As shown, the visible area of ​​the application window 1 can be divided into three sub-areas as shown in the figure. Figure 2As shown, the visible area of ​​the application window 1 can be divided into four sub-areas as shown in the figure.

[0028] In the present invention, the change of the application window includes the change of the size and / or position of the application window.

[0029] In the present invention, by creating a virtual texture atlas for the Android application window, it is achieved that the refresh of the Android application can be completed by only rendering the sub-textures in the virtual texture atlas. Since the virtual texture atlas is used, only one texture needs to be created when refreshing, and the refresh of the sub-texture can be completed without switching the context. This can effectively avoid the synchronization problem caused by refreshing multiple textures in sequence when rendering one frame, and at the same time improve the rendering efficiency.

[0030] In order to better adapt to the optimization requirements of the graphics card, the present invention can create a virtual texture atlas in the following way: determine the size of the virtual texture atlas according to the size and position of the Android application window, the width and height of the virtual texture atlas are n times the width and height of the Android application window, respectively, and n is a power of 2.

[0031] In order to further improve rendering efficiency, the present invention updates the graphics buffer corresponding to the virtual texture atlas only when the size of the Android application window changes.

[0032] Step 2: The Android application compatible service traverses all Android application window IDs, obtains the layers of the Android application windows corresponding to each Android application window ID, and executes step 3 if it contains multiple layers, otherwise executes step 4.

[0033] Step 3: Divide all sub-regions again according to the positional relationship between all sub-regions, define the overlapping part of each sub-region with other sub-regions as intersection sub-regions, and define the part of each sub-region other than the intersection sub-region as non-intersection sub-regions; calculate the area of ​​the top-level layer contained in each intersection sub-region and each non-intersection sub-region, record it as the first area, record the ratio of the first area to its corresponding intersection sub-region or non-intersection sub-region as the first area ratio, form an adjacent combination region by the intersection sub-region and its adjacent non-intersection sub-region, calculate the area of ​​the top-level layer contained in each adjacent combination region as the second area, record the ratio of the second area to the area of ​​the adjacent combination region as the second area ratio, select the adjacent combination region with the largest second area ratio as the core sub-region; re-divide the visible area with the core sub-region and the intersection sub-region and non-intersection sub-region other than the adjacent combination region as sub-regions, and update the coordinates of the sub-regions with the new division; merge each layer into the same graphics buffer according to the transparency.

[0034] Among them, the method of re-dividing the visible area can also be: selecting the adjacent combined area with the largest second area ratio as the first core sub-area, selecting the adjacent combined area with the largest second area ratio from the adjacent combined areas that do not overlap with the first core sub-area as the second core sub-area, and re-dividing the visible area with the first core sub-area, the second core sub-area, and the intersection sub-area and non-intersection sub-area other than these two core sub-areas as sub-areas.

[0035] The present invention uses an Android application compatible service to merge each layer into the same graphics buffer according to transparency, which further improves the rendering efficiency compared to the prior art method of transmitting each layer and transparency information to the desktop system and then completing the merged rendering by the desktop system.

[0036] Step 4: Send the coordinates of each sub-area corresponding to all Android application window IDs and their corresponding textures to the desktop system end.

[0037] Step 5: The desktop system copies the received texture to the virtual texture atlas of the Android application window according to the coordinates of each sub-area corresponding to the Android application window ID; renders the sub-textures in each virtual texture atlas to complete the rendering operation of each Android application window.

[0038] In order to further improve rendering efficiency, the present invention can use Vulkan batch processing commands to perform the operation of rendering multiple textures at one time, instead of the OpenGL operation of sequentially rendering sub-textures. Example

[0039] In this implementation, a rendering optimization method based on a virtual texture atlas provided by the present invention is adopted to achieve rendering optimization of application windows in a desktop system by modifying the Android application compatibility service, specifically including:

[0040] S1. The desktop system monitors the changes in the size and position of the Android application window, recalculates the visible area of ​​the non-top Android application window when a change occurs, and transmits the relevant information of the visible area to the Android application compatible service.

[0041] For example, for a non-top Android application window, denoted as appWindow, obtain the size appWindowSize and position of the current window of appWindow, calculate the coordinates of the visible area of ​​appWindow according to the Z-Order sorting of all application windows on the desktop and the sizes and positions of all windows; divide the visible area into multiple rectangular sub-areas, and send the size and coordinates of each sub-area to the Android application compatibility service through RPC.

[0042] S2. Re-adjust or divide the visible area in the Android application compatible service by modifying the SurfaceFlinger of the Android system, obtain the layer of the Android application window, and execute S3 if it contains multiple layers, otherwise execute S4.

[0043] An Android application window may contain multiple layers, for example, a SurfaceView layer in addition to the standard layers.

[0044] S3. Re-divide the visible area according to the overlapping relationship of each sub-area in the visible area, and divide it into: the intersection rectangle is recorded as A1, A2..., An and the rectangle without the intersection is recorded as B1, B2..., Bm; for the layer layer at the top layer, calculate the size of the layer in each An and Bm, calculate the size of the layer in the rectangle formed by different combinations of An and any adjacent Bx, and select the layer with the largest area as the optimal combination for re-division; and merge each layer into a graphics buffer according to the transparency.

[0045] S4. Each sub-area of ​​the current visible area corresponds to a texture, and when refreshing each frame, only the texture corresponding to the sub-area is sent to the desktop system end.

[0046] S5. The desktop system creates a virtual texture atlas for each Android application window. When refreshing each frame, it only needs to modify the corresponding sub-texture content and render the sub-texture of the virtual texture atlas to complete the refreshing of the Android application window. Specifically:

[0047] S5.1. If the size of the Android application window changes, or the virtual texture atlas has not been generated, the size of the virtual texture atlas is determined according to the application window, that is, the width and height are both twice the width and height of the Android application window; a new graphics buffer large enough is created in the memory to accommodate the virtual texture atlas. The sample code is as follows:

[0048] / / Determine the width and height of the virtual texture atlas

[0049] int atlasWidth = twice the width of the Android application window;

[0050] int atlasHeight = twice the height of the Android application window;

[0051] / / Create a new texture ID for the virtual texture atlas

[0052] GLuint atlasTextureID;

[0053] glGenTextures(1, &atlasTextureID);

[0054] glBindTexture(GL_TEXTURE_2D, atlasTextureID);

[0055] / / Initialize the virtual texture atlas with empty data

[0056] glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, atlasWidth, atlasHeight, 0,GL_RGBA, GL_UNSIGNED_BYTE, NULL);

[0057] / / Set some basic texture parameters, such as filtering method

[0058] glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);

[0059] glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);

[0060] glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);

[0061] glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);

[0062] S5.2. Copy each received texture into the virtual texture atlas: Determine the position of each texture in the virtual texture atlas according to the visible areas determined above, and copy them to the corresponding positions of the virtual texture atlas. The sample code is as follows:

[0063] / / Assume there is already a list of texture IDs

[0064] std::vector <gluint>textureIDs;

[0065] / / Traverse all textures and "paste" them into the virtual texture atlas

[0066] for (GLuint textureID : textureIDs) {

[0067] / / Bind each individual texture

[0068] glBindTexture(GL_TEXTURE_2D, textureID);

[0069] / / Read texture data

[0070] / / This assumes that the size and format of each texture is known. In practice, you may need to query this information first.

[0071] GLubyte* data = new GLubyte[ / *pixel data size of texture* / ];

[0072] glGetTexImage(GL_TEXTURE_2D, 0, GL_RGBA, GL_UNSIGNED_BYTE, data);

[0073] / / Copy the texture data to the specified location of the virtual texture atlas

[0074] / / Here you need to maintain a position variable to ensure that each texture is copied to a non-overlapping space

[0075] glTexSubImage2D(GL_TEXTURE_2D, 0, / *x offset* / , / *y offset* / , / *texture width* / , / *texture height* / , GL_RGBA, GL_UNSIGNED_BYTE, data);

[0076] }

[0077] / / Finally, generate the virtual texture atlas

[0078] glGenerateMipmap(GL_TEXTURE_2D);

[0079] S5.3. Render the sub-texture corresponding to each visible area in turn.

[0080] Fragment Shader

[0081] #version 330 core

[0082] out vec4 FragColor;

[0083] in vec2 TexCoord;

[0084] uniform sampler2D textureAtlas;

[0085] uniform vec4 subTextureInfo; / / x, y are the starting coordinates of the sub-texture, z, w are the width and height of the sub-texture

[0086] void main()

[0087] {

[0088] vec2 atlasCoord = subTextureInfo.xy + TexCoord *subTextureInfo.zw;

[0089] FragColor = texture(textureAtlas, atlasCoord);

[0090] }

[0091] In addition, the Vulkan batch command mechanism is used to render multiple textures at once. The sample code is as follows, where textureCount is the number of textures to be rendered, descriptorPool and descriptorSetLayout are pre-created descriptor pools and descriptor set layouts, and textureImageViews and textureSampler are arrays containing texture image views and samplers. This code dynamically allocates and updates multiple descriptor sets, each for a texture. Then, it binds and uses these descriptor sets to draw each texture during the rendering process.

[0092] / / Assume that device, commandBuffer, descriptorSetLayout, pipelineLayout have been initialized correctly

[0093] std::vector <vkdescriptorset>descriptorSets(textureCount);

[0094] for (size_t i = 0; i < textureCount; ++i) {

[0095] VkDescriptorSetAllocateInfo allocInfo{};

[0096] allocInfo.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO;

[0097] allocInfo.descriptorPool = descriptorPool;

[0098] allocInfo.descriptorSetCount = 1;

[0099] allocInfo.pSetLayouts = &descriptorSetLayout;

[0100] if (vkAllocateDescriptorSets(device, &allocInfo, &descriptorSets[i]) != VK_SUCCESS) {

[0101] throw std::runtime_error("failed to allocate descriptorsets!");

[0102] }

[0103] VkDescriptorImageInfo imageInfo{};

[0104] imageInfo.imageLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL;

[0105] imageInfo.imageView = textureImageViews[i];

[0106] imageInfo.sampler = textureSampler;

[0107] VkWriteDescriptorSet descriptorWrite{};

[0108] descriptorWrite.sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET;

[0109] descriptorWrite.dstSet = descriptorSets[i];

[0110] descriptorWrite.dstBinding = 0;

[0111] descriptorWrite.dstArrayElement = 0;

[0112] descriptorWrite.descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER;

[0113] descriptorWrite.descriptorCount = 1;

[0114] descriptorWrite.pImageInfo = &imageInfo;

[0115] vkUpdateDescriptorSets(device, 1, &descriptorWrite, 0, nullptr);

[0116] }

[0117] vkCmdBindPipeline(commandBuffer, VK_PIPELINE_BIND_POINT_GRAPHICS,graphicsPipeline);

[0118] for (size_t i = 0; i < textureCount; ++i) {

[0119] vkCmdBindDescriptorSets(commandBuffer, VK_PIPELINE_BIND_POINT_GRAPHICS, pipelineLayout, 0, 1, &descriptorSets[i], 0, nullptr);

[0120] / / Record draw commands here (eg, vkCmdDraw orvkCmdDrawIndexed)

[0121] vkCmdDraw(commandBuffer, vertexCount, 1, 0, 0);

[0122] }

[0123] In summary, the above are only preferred embodiments of the present invention and are not intended to limit the protection scope of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.< / vkdescriptorset> < / gluint>

Claims

1. A rendering optimization method based on virtual texture atlas, It is characterized in that The specific steps include: Step 1, when the application window changes, the desktop system calculates the visible area of ​​all non-top Android application windows, and divides the visible area into multiple sub-areas; if the Android application window does not have a virtual texture atlas, a virtual texture atlas and its corresponding graphics buffer are created for it, otherwise the virtual texture atlas and its corresponding graphics buffer are updated according to the current visible area, wherein the virtual texture atlas contains multiple sub-textures, the virtual texture atlas corresponds to the visible area, and the sub-area corresponds to the sub-texture; the sub-area and its corresponding Android application window ID are sent to the Android application compatible service; Step 2, the Android application compatible service traverses all Android application window IDs, obtains the layers of the Android application windows corresponding to each Android application window ID, and executes step 3 if multiple layers are included, otherwise executes step 4; Step 3, define the part of the sub-region that overlaps with other sub-regions as an intersection sub-region, and define the part other than the intersection sub-region as a non-intersection sub-region; record the area of ​​the top-level layer contained in the intersection sub-region and the non-intersection sub-region as the first area, record the ratio of the first area to the area of ​​the corresponding intersection sub-region or non-intersection sub-region as the first area ratio, form an adjacent combination region by the intersection sub-region and its adjacent non-intersection sub-region, record the area of ​​the top-level layer contained in the adjacent combination region as the second area, record the ratio of the second area to the area of ​​the adjacent combination region as the second area ratio, select the adjacent combination region with the largest second area ratio as the core sub-region; re-divide the visible area with the core sub-region, the intersection sub-region and the non-intersection sub-region other than the adjacent combination region as sub-regions; merge each layer into the same graphics buffer according to transparency; Step 4: Send the sub-areas corresponding to all Android application window IDs and their corresponding textures to the desktop system end; Step 5: The desktop system copies the texture corresponding to the sub-region to the virtual texture atlas of the Android application window according to the position of the sub-region; renders the sub-texture in the virtual texture atlas, and completes the rendering operation of the Android application window; The virtual texture atlas is created in the following manner: the size of the virtual texture atlas is determined according to the size and position of the Android application window, the width and height of the virtual texture atlas are respectively n times the width and height of the Android application window, and n is a power of 2.

2. The rendering optimization method according to claim 1, It is characterized in that The visible area is obtained by obtaining the size and position of the Android application window, and calculating the coordinates of the visible area of ​​the Android application window according to the Z-Order sorting of all application windows in the desktop and the sizes and positions of all application windows.

3. The rendering optimization method according to claim 1, It is characterized in that The graphics buffer in step 1 is updated only when the size of the Android application window changes.

4. The rendering optimization method according to claim 1, It is characterized in that The method of re-dividing the visible area in step 3 is: selecting the adjacent combined area with the largest second area ratio as the first core sub-area, selecting the adjacent combined area with the largest second area ratio from the adjacent combined areas that do not overlap with the first core sub-area as the second core sub-area, and re-dividing the visible area with the first core sub-area, the second core sub-area, and the intersection sub-area and non-intersection sub-area other than these two core sub-areas as sub-areas.

5. The rendering optimization method according to claim 1, It is characterized in that The execution method of rendering the sub-textures in the virtual texture atlas in step 5 is: executing using Vulkan batch processing commands.

6. The rendering optimization method according to claim 1, It is characterized in that The execution method of rendering the sub-textures in the virtual texture atlas in step 5 is: using OpenGL to render the sub-textures sequentially.

Citation Information

Patent Citations

  • Method, apparatus and device for realizing batch rendering

    CN107045437A

  • Texture atlas and texture atlas wait set creating method and device and equipment

    CN107194982A

  • Window display method and device, equipment and storage medium

    CN114168239A

  • Window display method and device, electronic equipment and storage medium

    CN115546410A

  • Multi-window rendering optimization method based on virtual sub-layers

    CN117234657A