Wallpaper rendering method, electronic equipment and storage medium

By preloading and blending wallpaper textures, the problems of multi-threaded competition and unsmooth loading during wallpaper switching are solved, achieving a smooth transition and a highly fluid wallpaper switching effect.

CN121900867APending Publication Date: 2026-04-21GREAT WALL MOTOR CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GREAT WALL MOTOR CO LTD
Filing Date
2026-01-07
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

In existing technologies, switching between multiple wallpaper types involves multi-threaded contention, leading to unsmooth loading and frequent issues such as lag and black screens.

Method used

By preloading the textures of the adjacent wallpapers of the currently displayed wallpaper, and upon receiving a switching operation, the preloaded textures are mixed with the currently displayed textures to generate a continuous sequence of intermediate frames, thus achieving a smooth transition.

Benefits of technology

It eliminates loading delays and lag during wallpaper switching, improving the smoothness of the visuals and the instant feedback of user operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121900867A_ABST
    Figure CN121900867A_ABST
Patent Text Reader

Abstract

The invention discloses a wallpaper rendering method, electronic equipment and a storage medium, and belongs to the technical field of visualization. Comprising the following steps: pre-loading a first texture of adjacent wallpaper of current display wallpaper; in response to the wallpaper switching operation, combining the first texture with a second texture of the currently displayed wallpaper to obtain an intermediate frame picture sequence transited from the currently displayed wallpaper to a target wallpaper, the target wallpaper being a wallpaper switched by the indication of the wallpaper switching operation in the adjacent wallpaper; and displaying the intermediate frame picture sequence until the switching to the target wallpaper is completed. The adjacent wallpaper resources are prepared in advance by utilizing preloading, and the transition animation is generated through the combined texture, so that delay caused by real-time loading is avoided, smooth transition and seamless connection of wallpaper switching are realized, and visual experience and operation fluency of a user during wallpaper switching are effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of visualization technology, and in particular to a wallpaper rendering method, electronic device, and storage medium. Background Technology

[0002] With the increasing prevalence and performance improvements of intelligent vehicle infotainment systems, users' demand for personalized device experiences is growing. Wallpapers, as the most intuitive and frequently encountered visual element in the user interface, have evolved from traditional static images to a variety of complex forms, including dynamic videos, interactive effects, and multi-time-switching. These diverse wallpaper formats greatly enhance the visual appeal of the device and the user's interactive enjoyment.

[0003] However, current mainstream mobile and in-vehicle system wallpaper engines still suffer from numerous technical bottlenecks in their underlying architecture and rendering mechanisms, making it difficult to meet the stringent requirements of increasingly complex wallpaper types for smoothness, stability, and power consumption. The relevant technologies mainly suffer from the following deficiencies: Current wallpaper presentation formats in mobile devices and in-vehicle systems primarily fall into the following categories: static images, simple video wallpapers, and linear effects displays. These traditional wallpaper engines generally suffer from the following problems: different wallpaper types (static images, videos, interactive videos, multi-segment videos, time-based wallpapers, etc.) often require their own independent rendering logic; the cost of integrating new wallpaper types is high; there is a large amount of repetitive code; and multi-threaded competition during switching between multiple wallpaper types leads to unsmooth loading, causing frequent stuttering and black screens during wallpaper switching, resulting in wallpaper rendering errors, screen flickering, or crashes. Summary of the Invention

[0004] This application provides a wallpaper rendering method, electronic device, and storage medium to at least solve the problems of multi-threaded competition and unsmooth loading during wallpaper switching, which leads to frequent lag and black screens during wallpaper switching in related technologies.

[0005] In a first aspect, this application provides a wallpaper rendering method, the method comprising: Preload the first texture of the adjacent wallpaper to the currently displayed wallpaper; In response to the wallpaper switching operation, the first texture is combined with the second texture of the currently displayed wallpaper to obtain an intermediate frame sequence of images transitioning from the currently displayed wallpaper to the target wallpaper. The target wallpaper is the wallpaper that is switched by the wallpaper switching operation among the adjacent wallpapers. The sequence of intermediate frames is displayed until the transition to the target wallpaper is complete.

[0006] The above technical solution preloads the target wallpaper texture data of the adjacent positions of the currently displayed wallpaper into memory before the user triggers a switching command, ensuring the immediate readiness of rendering resources. When a wallpaper switching operation is received, instead of performing a simple screen replacement, the preloaded first texture is mixed with the currently displayed second texture to generate a series of continuous and smoothly transitioning intermediate frame sequences, which are then continuously displayed. This eliminates the loading delays and screen stutters caused by real-time resource reading, decoding, and transmission in traditional switching methods, achieving a seamless connection and smooth transition from the current wallpaper to the target wallpaper. This significantly improves the smoothness and detail of the visual image and enhances the system's ability to provide immediate feedback to user operations. Secondly, this application provides an electronic device, which includes one or more processors and one or more memories, wherein at least one piece of program code is stored in the one or more memories, and the program code is loaded and executed by the one or more processors to implement the operations performed by the wallpaper rendering method.

[0007] Thirdly, this application also provides a computer-readable storage medium storing at least one piece of program code, which is loaded and executed by a processor to implement the operations performed by the wallpaper rendering method.

[0008] Fourthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of any of the above-described wallpaper rendering methods. Attached Figure Description

[0009] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.

[0010] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0011] Figure 1 A flowchart illustrating a wallpaper rendering method provided in this application embodiment. Figure 1 ; Figure 2 A flowchart illustrating a wallpaper rendering method provided in this application embodiment. Figure 2 ; Figure 3 A flowchart illustrating a wallpaper rendering method provided in this application embodiment. Figure 3 ; Figure 4 A flowchart illustrating a wallpaper rendering method provided in this application embodiment. Figure 4 ; Figure 5 A flowchart illustrating a wallpaper rendering method provided in this application embodiment. Figure 5 ; Figure 6 A flowchart illustrating a wallpaper rendering method provided in this application embodiment. Figure 6 ; Figure 7 This is a schematic diagram of the structure of a wallpaper rendering device provided in an embodiment of this application; Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0012] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.

[0013] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.

[0014] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0015] In order to illustrate the technical solutions provided in the embodiments of this application, some terms involved in the embodiments of this application will be introduced below.

[0016] Texture: This typically refers to the representation of image data (such as wallpaper images) in the memory of a graphics processing unit. It is a fundamental element used to draw images in the rendering pipeline, containing information such as color and transparency.

[0017] Rendering: The process of converting model data into a visual image using computer programs.

[0018] The application scenarios of the technical solutions provided in the embodiments of this application are described below.

[0019] The technical solutions provided in this application can be widely applied to terminals with display screens and interactive functions, such as smartphones, tablets, laptops, smartwatches, in-vehicle central control displays, and smart TVs. The application scenarios of this application embodiment will be described in detail below using a smartphone as an example.

[0020] Application Scenario 1: Switching lock screen or desktop wallpaper on mobile devices In daily smartphone use, users frequently change wallpapers on the lock screen or home screen. For example, when the screen is locked, users might want to swipe left or right to view or switch to the next favorite wallpaper. In this scenario, if a traditional real-time loading method is used, it often takes time to read the image data of the next wallpaper from memory, decode it, and generate the texture. This can cause noticeable lag, loading icons, or even a black screen after the user swipes, greatly disrupting the smoothness of the interaction. Using the technical solution of this application, the smartphone system can pre-load the texture data (first texture) of the previous and next wallpapers adjacent to the current wallpaper in the background before the user performs any operation. When the user's finger makes a swipe movement on the screen (wallpaper switching operation), the system can respond immediately, using the pre-loaded first texture and the currently displayed second texture to synthesize an intermediate frame sequence in real time, presenting a smooth swiping transition animation on the screen. Users do not perceive any loading delay; the wallpaper switching action is responsive and smooth, significantly improving the user experience.

[0021] Application Scenario 2: Wallpaper Settings / Preview Interface In the "Wallpaper" settings of a mobile phone system or the "Set as Wallpaper" preview interface of a gallery app, users typically need to quickly swipe through multiple candidate wallpapers to decide which one to use. Due to the large number and high resolution of the candidate images, the data loading is substantial. If reloading is required every time a swipe is made, the browsing experience would be poor. Applying the technical solution of this application, when a user pauses to preview a wallpaper, the device has already loaded the adjacent wallpapers before and after that wallpaper into a dual texture pool. When the user swipes left or right to view adjacent wallpapers, the device quickly renders the intermediate transition image based on the prepared texture data, achieving "instant preview" of the wallpaper, helping users select their favorite wallpaper more efficiently and enjoyably.

[0022] Application Scenario 3: In-vehicle Intelligent Cockpit System On the intelligent central control screen of a car, users may switch between different theme wallpapers based on their mood or driving mode. In-vehicle systems have high requirements for response speed and stability, and screen freezes that could distract the driver are unacceptable. The technical solution in this application, through a combination of pre-loading mechanisms and efficient rendering, ensures that the central control screen maintains extremely high smoothness and stability when switching wallpapers. Simultaneously, through visual optimization techniques such as non-linear displacement, it enhances the technological and premium feel of the in-vehicle display system.

[0023] In summary, the wallpaper rendering method and apparatus provided in this application are applicable to any application scenario that requires wallpaper switching to be triggered by touch or other means, and has high requirements for the smoothness, immediacy and visual effects of the switching animation.

[0024] After introducing the implementation environment and application scenarios of the embodiments of this application, the technical solutions provided by the embodiments of this application are described below. (See also...) Figure 2 Taking a terminal with display processing capabilities as the executing entity as an example, the method includes the following steps.

[0025] Step 101: Preload the first texture of the wallpaper adjacent to the currently displayed wallpaper.

[0026] A resource preloading task runs in the background. Based on the currently displayed wallpaper, it retrieves a list of preset wallpapers and determines the preceding or following wallpaper in logical order as the adjacent wallpaper. Then, it calls the image decoding interface to pre-decode the static image resource of the adjacent wallpaper and upload it to the graphics processor's memory, forming a first texture that can be directly accessed by the rendering pipeline. This step ensures that the target wallpaper's data is ready when the user does not trigger a switching operation.

[0027] Step 102: In response to the wallpaper switching operation, combine the first texture with the second texture of the currently displayed wallpaper to obtain an intermediate frame sequence of images transitioning from the currently displayed wallpaper to the target wallpaper.

[0028] The wallpaper switching operation refers to the user-initiated interaction of changing the currently displayed wallpaper. The target wallpaper is the wallpaper that the user is switching to from among the adjacent wallpapers, as indicated by the wallpaper switching operation. The intermediate frame sequence refers to a series of continuous frames generated during the transition phase of the wallpaper switching. These continuous frames simulate a smooth movement or deformation animation effect between the current wallpaper (second texture) and the target wallpaper (first texture) by interpolating or combining the image data, until the target wallpaper completely covers the screen. In this embodiment, the user's wallpaper switching operation (such as a left or right swipe gesture) is captured by a touchscreen sensor or input monitoring component. In response to the wallpaper switching operation, the preloaded first texture is extracted, and the second texture corresponding to the wallpaper currently displayed on the screen is obtained. According to the direction indicated by the switching operation (e.g., swiping left to switch to the next image), the specific target wallpaper is determined from the adjacent wallpapers. Then, the first texture and the second texture are combined and drawn in the same frame buffer using the rendering engine. For example, based on the displacement of the user's finger swipe, the vertex positions of the first texture and the second texture in the screen coordinate system are calculated and set in real time, so that the first texture gradually moves into the visible area of ​​the screen, while the second texture gradually moves out, thereby generating an intermediate frame sequence containing continuous dynamic changes.

[0029] Step 103: Display the sequence of intermediate frames until the switch to the target wallpaper is complete.

[0030] The calculated sequence of intermediate frames is submitted to the display screen for refresh according to the frame rate requirements. The rendering status is continuously monitored. When it is detected that the display area of ​​the first texture in the intermediate frame sequence completely covers the screen display area, or when the user's finger leaves the screen and the animation transition ends, meeting preset conditions, it is determined that the switch to the target wallpaper has been completed. At this point, the rendering operation of the second texture is stopped, and the target wallpaper is officially set as the new currently displayed wallpaper, thus ending the entire switching process.

[0031] This embodiment achieves seamless and smooth transitions with zero-latency response during wallpaper switching by combining a preloading mechanism with dynamic texture rendering technology. Specifically, the method preloads the texture data (first texture) of adjacent wallpapers into memory before a switching operation is triggered. Upon receiving a wallpaper switching command, it immediately performs coordinate mapping and blending calculations on the first texture and the texture of the currently displayed wallpaper (second texture) within the same rendering pipeline, generating a continuously changing sequence of intermediate frames. This process effectively avoids the computational blockage and screen lag caused by real-time reading and decoding of large-resolution image files in traditional solutions. Its advantages include completely eliminating loading delays and screen stuttering during wallpaper switching, ensuring a high frame rate and smoothness, while enhancing visual continuity through smooth intermediate frame animations, thereby significantly improving the responsiveness of user operations and the overall comfort of the visual experience.

[0032] It should be noted that steps 101-103 above are a simplified description of the wallpaper rendering method provided in the embodiments of this application. The wallpaper rendering method provided in the embodiments of this application will be described in more detail below with some examples.

[0033] In some embodiments, see Figure 2 Taking a terminal with display processing capabilities as the executing entity as an example, the wallpaper rendering method also includes the following steps.

[0034] Step 201: Determine the sub-renderer to be used to render the target wallpaper.

[0035] The unified parent renderer is a high-level rendering management component responsible for managing global rendering resources and interfaces. It typically maintains public resources such as the texture pool and defines interface specifications for subclass inheritance to coordinate resource calls between different child renderers, ensuring the uniformity and efficiency of resource allocation. Child renderers are concrete execution components that inherit from the unified parent renderer and are used to implement specific wallpaper drawing tasks. They obtain the necessary texture resources through the interfaces provided by the unified parent renderer and execute specific rendering operations according to the specific wallpaper switching instructions (such as displacement parameters). When the terminal detects a wallpaper switching instruction, it determines or instantiates a specific child renderer from the maintained rendering component library based on the current application scenario or wallpaper type. Child renderers are pre-configured to inherit from the unified parent renderer in the system, meaning they possess the standard interface specifications defined by the parent renderer. Through this inheritance relationship, child renderers can communicate with the unified parent renderer using this interface, thereby accessing the underlying data resources centrally managed by the unified parent renderer. Specifically, the child renderer successfully obtains the first texture, which is loaded, cached, and maintained by the unified parent renderer, by calling the interface. The first texture is the image data of the target wallpaper that needs to be displayed on the screen.

[0036] Step 202: Render the target wallpaper using a sub-renderer to display the switched target wallpaper.

[0037] After the sub-render successfully acquires the first texture, the terminal uses it to perform specific drawing tasks. The sub-render processes the acquired first texture according to preset rendering logic and draws it into the screen's display buffer. Through the sub-render's rendering operation, the target wallpaper's image data is converted into a visual image signal, which is then output to the display screen for display, thus presenting the switched target wallpaper on the user interface.

[0038] This embodiment employs an inheritance architecture, specifically designating a child renderer to inherit the unified parent renderer interface. This interface allows the child renderer to directly call the first texture centrally managed by the unified parent renderer, and then perform specific drawing operations through the child renderer. This decouples the rendering logic from texture resource management, enabling the child renderer to access and reuse texture data held by the unified parent renderer across components, completing the rendering output of the target wallpaper without needing to load it itself. This design effectively improves the reuse rate and management efficiency of rendering resources, reduces code coupling in different wallpaper rendering scenarios, facilitates unified maintenance and expansion of different types of wallpaper rendering logic, and ensures the security and consistency of resource calls.

[0039] In some embodiments, see Figure 3 In response to a wallpaper switching operation, the first texture is combined with the second texture of the currently displayed wallpaper to obtain a sequence of intermediate frames transitioning from the currently displayed wallpaper to the target wallpaper, including: Step 301: In response to the wallpaper switching operation, obtain the sliding displacement parameters corresponding to the wallpaper switching operation through the sub-renderer.

[0040] In this embodiment, the input layer continuously monitors touch events on the touchscreen. When it detects that the trajectory of a user's finger pressing and moving matches a preset wallpaper switching gesture (e.g., a horizontal swipe), the touch event is transmitted in real time to the sub-render responsible for the current interface. Upon receiving the event, the sub-render calculates the difference between the real-time coordinates of the touch point in the screen coordinate system and the initial coordinates of the press, thereby obtaining precise sliding displacement parameters. These parameters include not only the physical distance of the slide (pixel value) but also the direction vector of the slide (e.g., negative for left and positive for right) to accurately represent whether the user intends to switch the current wallpaper to the previous or subsequent wallpaper.

[0041] Step 302: Based on the sliding displacement parameters, determine the first position offset and the second position offset. The first position offset corresponds to the first texture, and the second position offset corresponds to the second texture.

[0042] Using a pre-defined mapping algorithm, the acquired sliding displacement parameters are converted into texture coordinate transformations required for rendering. Specifically, the sub-renderer calculates the screen displacement that the currently displayed wallpaper (corresponding to the second texture) should undergo as the finger moves, i.e., the second position offset, based on the screen resolution and texture size. Simultaneously, it calculates the displacement required for the target wallpaper (corresponding to the first texture) to enter the screen to achieve a smooth transition effect, i.e., the first position offset. Typically, the first and second position offsets have a specific numerical correlation (e.g., equal in size, opposite in direction, or proportional to the screen width), thereby ensuring that the two textures maintain a relatively close visual connection during movement, such as a seamless stitching effect.

[0043] Step 303: Based on the first position offset and the second position offset, render and combine the first texture and the second texture in the same display area to obtain an intermediate frame sequence of images transitioning from the current display wallpaper to the target wallpaper.

[0044] Under the instructions of the sub-renderer, the graphics processing unit performs compositing operations within each frame's rendering cycle. The sub-renderer constructs rendering instructions, binding the first and second textures to different samplers, and applying the derived first and second position offsets to transform their respective vertex coordinates. During rendering, the second texture gradually moves out of the visible area according to the second position offset, while the first texture synchronously moves in from the edge of the visible area (such as the right or left side) according to the first position offset. Using double buffering technology, the image data of these two textures are synthesized in real time within the same display area, generating a series of continuously changing intermediate frame sequences. These intermediate frame sequences are refreshed at a high frame rate (such as 60fps or 120fps), thus creating a smooth visual persistence effect in the human eye, perfectly presenting the dynamic transition from the currently displayed wallpaper to the target wallpaper.

[0045] This embodiment obtains the sliding displacement parameters corresponding to the wallpaper switching operation through a sub-renderer, and determines the first position offset corresponding to the first texture and the second position offset corresponding to the second texture based on these parameters. Then, it renders and combines the first texture and the second texture in the same display area according to these two offsets. This achieves the technical effect of dynamically adjusting the position of the two wallpaper textures in real time according to the user's sliding operation and generating a continuous transition screen. This texture combination method driven by displacement parameters ensures that the switching animation can accurately follow the user's gesture interaction, ensuring the smoothness and continuity of the wallpaper switching process, thereby significantly improving the responsiveness of the user operation and the overall visual experience.

[0046] In some embodiments, the specific implementation process of preloading the first texture of the adjacent wallpaper of the currently displayed wallpaper includes detailed resource construction and loading steps, as follows: First, a double texture pool is constructed using a unified parent renderer. This pool contains two storage units: one for storing the textures of the preceding wallpaper and the other for storing the textures of the following wallpaper. This step performs the resource pool construction operation, which is led and implemented by the unified parent renderer in the system architecture. The unified parent renderer is responsible for initializing and configuring a dedicated double texture pool in video memory or system memory. The double texture pool is strictly designed at the underlying level to contain two independent and functionally distinct storage units. Specifically, these two storage units have different orientations: one unit is specifically allocated for storing the texture data of the preceding wallpaper in the logical order; the other unit is specifically allocated for storing the texture data of the following wallpaper in the logical order. This dual-storage-unit architecture is designed to ensure that the system can simultaneously accommodate the user's dual-directional switching needs, whether left or right.

[0047] The textures of adjacent wallpapers are loaded into a dual texture pool to preload the first texture of the adjacent wallpapers of the currently displayed wallpaper. The adjacent wallpapers include the preceding wallpaper and the following wallpaper. The texture of the preceding wallpaper is loaded into one storage unit, and the texture resources of the following wallpaper are loaded into another storage unit.

[0048] After the dual texture pool is constructed, the loading and filling of texture resources continues, thus substantially completing the preloading task. Based on the identifier of the currently displayed wallpaper, all its adjacent wallpapers are retrieved and identified from the preset wallpaper queue. These adjacent wallpapers logically include the aforementioned preceding and following wallpapers. Subsequently, a background loading mechanism is initiated, decoding the image file corresponding to the preceding wallpaper to generate texture data, and accurately loading and storing it in the storage unit of the dual texture pool used to store the preceding wallpaper texture. Simultaneously, the image resource corresponding to the following wallpaper is also decoded and its texture generated, accurately loaded and stored in the other storage unit of the dual texture pool used to store the following wallpaper texture resource. Through this series of refined loading operations, the textures of the adjacent wallpapers on both sides of the current wallpaper are stored in their respective storage units, thus efficiently achieving the preloading processing of the first texture of the adjacent wallpapers of the currently displayed wallpaper. This ensures that regardless of which adjacent wallpaper the user chooses to switch to, the system can directly obtain texture data from the corresponding storage unit, guaranteeing a smooth switching experience.

[0049] This embodiment achieves the technical effect of parallel preloading and centralized management of bidirectional adjacent texture resources of the current wallpaper by constructing a dual texture pool with two storage units for storing the previous and subsequent wallpaper textures respectively, using a unified parent renderer. Adjacent previous and subsequent wallpaper textures are loaded into their corresponding storage units. This dual texture pool structure design ensures that the required target textures are pre-stored in the corresponding storage units regardless of whether the user switches forward or backward, effectively avoiding resource loss problems that may be caused by unidirectional preloading, ensuring the instant response capability and screen smoothness of bidirectional switching operations, thereby improving the user experience when switching wallpapers.

[0050] In some embodiments, see Figure 4 The specific implementation process for obtaining the sliding displacement parameters in response to wallpaper switching operations includes: Step 401: In response to the wallpaper switching operation, capture the sliding displacement of the wallpaper switching operation.

[0051] In this embodiment, the input subsystem continuously monitors the user's touch interaction behavior. When it detects that the user's finger is sliding on the screen surface, and the trajectory characteristics of the slide meet the preset wallpaper switching gesture trigger conditions (e.g., the sliding direction is horizontal), it will immediately respond to the wallpaper switching operation. During the sliding process, the touch sensor will collect the coordinate data of the touch point in real time at a high-frequency sampling rate. It captures the starting coordinate point of the user's finger press and the real-time coordinate point of the finger at the current moment, and calculates the difference between the real-time coordinate point and the starting coordinate point in the screen coordinate system to accurately obtain the actual sliding displacement of the user's finger on the screen. This sliding displacement can be a specific pixel value or a displacement amount containing a direction vector, used to intuitively reflect the distance and direction of the user's slide.

[0052] Step 402: Determine the scroll distance based on the current wallpaper based on the sliding displacement.

[0053] After acquiring the original swipe displacement, the data is processed according to the wallpaper switching interaction logic to determine the scroll distance based on the current wallpaper. The captured swipe displacement is mapped to a movement command in the wallpaper view layer, that is, the logical distance that the current wallpaper needs to move is calculated. Specifically, the electronic device calculates the scroll distance that the current wallpaper should move based on the direction and magnitude of the swipe displacement, combined with a preset following algorithm. This scroll distance represents the offset of the currently displayed wallpaper image relative to its original stationary position. For example, when the user swipes a certain distance to the left, the current wallpaper should be calculated to shift to the left by a specific logical distance, thus providing accurate motion data for subsequent image composition.

[0054] Step 403: Determine the sliding displacement parameters based on the scrolling distance, screen width, and screen scaling ratio.

[0055] To ensure the wallpaper switching effect adapts to different screen sizes and user-customized display settings, a comprehensive calculation is performed combining hardware parameters and system configuration to determine the final sliding displacement parameters. First, the current device's screen width is read, representing the total number of physical pixels in the horizontal direction of the display area. Simultaneously, the current screen scaling ratio is obtained, which may be used to adjust the wallpaper's display size or adapt to different screen densities. Then, these three parameters are used for calculation: typically, the system normalizes the scroll distance using the screen width to obtain a ratio of the switching progress (e.g., the percentage of the screen width to the sliding displacement). This ratio is then multiplied by the screen scaling ratio to correct visual discrepancies caused by resolution differences or scaling settings. Through this composite calculation based on scroll distance, screen width, and screen scaling ratio, high-precision sliding displacement parameters are ultimately determined. These parameters accurately guide the rendering engine to generate smooth and expected transition animations on different devices and display environments.

[0056] This embodiment achieves the technical effect of accurately translating the user's intuitive touch gestures into rendering control parameters adapted to specific screen hardware attributes and system display settings by capturing the user's sliding displacement in real time when triggering wallpaper switching operations, calculating the logical scrolling distance of the current wallpaper based on the displacement, and further considering the screen width and screen scaling ratio. This dynamic calibration mechanism, which combines screen size and scaling ratio, can effectively offset the deviations caused by differences in screen resolution of different devices and user-defined scaling modes on transition animations, ensuring that the wallpaper switching screen maintains the accuracy of the displacement ratio and a smooth visual follow-up on terminals of different specifications, thereby significantly improving the display consistency of the system in multiple scenarios and the user's interactive experience.

[0057] In some embodiments, see Figure 5 Based on the sliding displacement parameters, the first position offset and the second position offset are determined. The specific implementation process includes: Step 501: Determine the nonlinear displacement factor based on the scrolling distance and screen width of the sliding displacement parameters.

[0058] The nonlinear displacement factor is used to indicate the nonlinear mapping relationship between the sliding displacement and the first and second position offsets during the wallpaper switching operation. In this embodiment, the obtained sliding displacement parameters are first analyzed to extract the scrolling distance, which represents the actual physical quantity of the user's finger sliding on the screen. Simultaneously, the screen width parameter of the current display device is used as the calculation benchmark. To improve the visual quality of the animation and avoid stiff linear movement, a preset nonlinear algorithm is used to process the scrolling distance and screen width. Specifically, the relative value of the scrolling distance with respect to the screen width is calculated and input into a nonlinear transformation function to obtain a nonlinear displacement factor. This nonlinear displacement factor is not a fixed coefficient but a dynamic value that changes with the sliding displacement. It defines a complex nonlinear mapping relationship between the sliding displacement and the final position offset. This mapping relationship means that the wallpaper's movement speed or distance does not simply increase uniformly with the increase of the finger's sliding displacement, but exhibits a nonlinear dynamic characteristic (e.g., a specific damping or acceleration sensation at the beginning or end of the sliding phase), making the interaction process more in line with human visual habits and physical intuition.

[0059] Step 502: Based on the nonlinear displacement factor, screen scaling ratio and preset magnification, obtain the first position offset and the second position offset.

[0060] The preset magnification is used to represent the magnitude of change in the first and second position offsets. In this embodiment, after determining the nonlinear displacement factor, the final displacement is calculated by further combining the device's display configuration and animation adjustment parameters. First, the current screen scaling ratio is obtained. This ratio is used to adjust the baseline size of the wallpaper image to ensure that the wallpaper display logic remains consistent on screens with different resolutions (such as low-resolution or high-resolution screens). Simultaneously, a preset magnification is read. This preset magnification is an adjustable parameter preset by the system, and its function is to characterize and control the magnitude of change in the first and second position offsets. For example, a higher preset magnification means that even if the finger slides a small distance, the wallpaper will produce a larger displacement, resulting in a more sensitive or visually impactful responsive effect; conversely, a lower preset magnification produces a more stable and smooth transition effect. Finally, the nonlinear displacement factor, screen scaling ratio, and preset magnification are comprehensively calculated (e.g., by weighted multiplication), and the first and second position offsets are determined based on the calculation results. These two offsets precisely indicate the exact distance the current wallpaper and the target wallpaper move on the screen, thus ensuring that the wallpaper switching animation has both a non-linear dynamic aesthetic and can adapt to screen characteristics and meet preset amplitude requirements.

[0061] This embodiment first calculates a nonlinear displacement factor based on the scrolling distance and screen width of the sliding displacement parameters to characterize the nonlinear mapping relationship between the sliding displacement and the offset. Then, it combines this nonlinear displacement factor, the screen scaling ratio, and a preset multiplier specifically used to adjust the change amplitude to finally determine the first and second position offsets. This achieves the technical effect of transforming the user's simple linear sliding operation into nonlinear wallpaper displacement control with specific dynamic characteristics, and flexibly adjusting the movement amplitude according to screen attributes. This nonlinear mapping, combined with the adaptation of the screen scaling ratio and the flexible adjustment of the preset multiplier, makes the wallpaper switching animation present natural dynamic effects such as acceleration, deceleration, or damping that conform to human visual habits. At the same time, it ensures the consistency of display under different device screen specifications, thereby greatly enriching the visual expressiveness of the switching animation and significantly improving the smoothness, responsiveness, and immersive experience of user operation.

[0062] In some embodiments, the specific implementation process of combining the first texture and the second texture of the currently displayed wallpaper in the same rendering area based on the first position offset and the second position offset to obtain the intermediate frame sequence of the transition from the currently displayed wallpaper to the target wallpaper is detailed below: Step A: Determine the vertex coordinates of the first texture and the second texture based on the first position offset and the second position offset.

[0063] In this embodiment, the graphics processing module first obtains the first position offset for the first texture (i.e., the target wallpaper texture to be switched to) and the second position offset for the second texture (i.e., the wallpaper texture currently displayed on the screen), calculated in the aforementioned steps. The system internally stores the original mesh model data of these two textures in their default static state. The original mesh model data includes the original coordinates (usually the four corner points of a quadrilateral) of several key vertices defining the boundary of the texture rectangle. To achieve a dynamic movement effect, the first and second position offsets are used as displacement vectors and applied to the corresponding original vertex coordinates. Specifically, through vector addition, the first position offset is superimposed on the original vertex coordinates of the first texture to calculate the new vertex coordinates that the first texture should present at the current moment; similarly, the second position offset is superimposed on the original vertex coordinates of the second texture to calculate the new vertex coordinates of the second texture at the current moment. This process ensures that the position of each vertex of each texture is accurately mathematically positioned according to the user's swiping operation, providing geometric spatial information for subsequent image rendering.

[0064] Step B: Based on the vertex coordinates of the first texture and the second texture, render and combine the first texture and the second texture of the currently displayed wallpaper in the same display area to obtain an intermediate frame sequence that transitions from the currently displayed wallpaper to the target wallpaper.

[0065] In this embodiment, after determining the real-time vertex coordinates of the two textures, the rendering engine of the electronic device (e.g., a graphics pipeline based on OpenGL ES or Vulkan) begins to perform drawing and compositing operations. The system submits the new vertex coordinates of the first and second textures calculated in step A, along with the corresponding texture image data (pixel information), to the graphics processing unit (GPU). Within the same rendering area (i.e., the graphics buffer or canvas of the current screen), the GPU simultaneously maps the first and second textures to the screen coordinate system for rasterization processing based on the spatial positions specified by these vertex coordinates. Since the vertex coordinates of the two textures have changed relative to each other according to their respective offsets, they will exhibit a specific spatial arrangement state within the rendering area (e.g., partial overlap, side-by-side connection, or relative movement of one in and one out). The rendering engine combines these two textures within the same area to generate the composite image at each instant. As the user's swiping operation continues, the above vertex coordinate calculation and rendering compositing process is executed cyclically at high frequency (e.g., 60 times per second), and a new composite image is generated for each frame based on the latest offset. This series of continuously generated composite images in chronological order constitutes a sequence of intermediate frames that smoothly transition from the currently displayed wallpaper to the target wallpaper, thus achieving a smooth and continuous wallpaper switching animation effect.

[0066] This embodiment calculates the vertex coordinates of the first and second textures based on the first and second position offsets, and synchronously renders and combines the two textures within the same rendering area according to these vertex coordinates to generate an intermediate frame sequence. This achieves the transformation of abstract displacement data into specific geometric position changes of textures in screen space, and ensures a smooth spatial transition between the current wallpaper and the target wallpaper on the same canvas. This real-time rendering and compositing method based on vertex coordinates can control the relative position and superposition relationship of textures in each frame, effectively avoiding screen tearing, jumps, or misalignments during the switching process, thereby ensuring the continuity and realism of the visual transition, and significantly improving the delicacy, smoothness, and user visual interaction experience of the wallpaper switching animation.

[0067] In some embodiments, see Figure 6 The process involves displaying a sequence of intermediate frames until the switch to the target wallpaper is complete. The specific implementation process includes: Step 601: Display the sequence of intermediate frames.

[0068] In this embodiment, the display subsystem takes over the intermediate frame sequence generated by the aforementioned rendering steps and outputs it frame by frame to the screen display panel for playback in chronological order. During this process, a continuous dynamic visual image is presented on the screen, allowing the user to intuitively observe the relative movement of the first texture (i.e., the target wallpaper) and the second texture (i.e., the current wallpaper) on the screen according to their respective displacement parameters. The display process of this intermediate frame sequence constitutes the main body of the wallpaper switching animation. Through high-frequency image refresh (such as 60Hz or higher), a smooth transition visual effect is formed in the human eye, achieving a gradual visual guidance from the current wallpaper to the target wallpaper. This process constitutes a smooth transition animation, allowing the user to intuitively perceive that the current wallpaper is gradually moving out of the field of view, while the target wallpaper is gradually moving into the field of view.

[0069] Step 602: When the display area of ​​the first texture in the intermediate frame sequence covers the screen display area, the current wallpaper corresponding to the first texture is determined as the target wallpaper.

[0070] In this embodiment, while continuously displaying the intermediate frame sequence, a real-time status monitoring mechanism runs in the background. Through a graphics processing interface, it dynamically acquires the geometric attributes of the first texture in each frame and calculates the actual display area of ​​the first texture in the screen coordinate system. Through the graphics processing unit or related calculation logic, it determines in real time whether the current rendering boundary of the first texture has completely contained the physical display area boundary of the screen. A real-time geometric comparison or collision detection is performed between the display area of ​​the first texture and the physical screen display area of ​​the device. Once it is detected that the projection area of ​​the first texture on the screen has completely covered or filled the entire screen display area (i.e., the target wallpaper image has completely filled the entire screen without revealing any background or remnants of the original wallpaper), it is immediately determined that the transition condition has been met and the critical condition for switching has been achieved. At this point, the wallpaper state corresponding to the first texture is updated to the current wallpaper at the logical level, thus officially confirming that the target wallpaper has taken over the screen display rights.

[0071] Step 603: Stop the rendering operation of the second texture and display the first texture in full screen to complete the switching of the target wallpaper.

[0072] After confirming that the first texture completely covers the screen, a final rendering cleanup and state locking operation is performed to optimize system performance and ensure the final stability of the image. First, a command is sent to the graphics rendering engine to immediately stop all subsequent rendering operations on the second texture (i.e., the original current wallpaper), removing the second texture from the rendering pipeline and scene graph to release occupied graphics memory and computing resources. Next, the first texture undergoes final display settings, forcing its display mode to full-screen, locking its vertex coordinates to precisely match the screen's boundary dimensions, and removing any dynamic displacement parameters. At this point, there are no more animation changes on the screen; instead, the entire target wallpaper is statically displayed, marking the complete end of the wallpaper switching process.

[0073] This embodiment achieves seamless transitions from dynamic animations to static wallpaper displays and timely release of rendering resources by detecting in real time whether the display area of ​​the first texture completely covers the screen display area during the display of intermediate frame sequence, and immediately stopping the rendering operation of the second texture and locking the first texture to full-screen display upon confirmation of coverage. This automatic determination of the switching endpoint based on area coverage not only ensures that the target wallpaper can completely and stably occupy the screen at the moment of switching, avoiding visual defects such as screen flickering, ghosting, or display misalignment, but also effectively reduces the system's graphics processing burden and power consumption by timely eliminating the rendering calculation of invalid textures, thereby significantly improving the visual smoothness of wallpaper switching, system operating efficiency, and user experience.

[0074] This application provides a wallpaper rendering device that achieves smooth wallpaper switching through modular hardware or software collaboration. Specifically, as... Figure 7 As shown, the device includes a preloading module 701, a combination processing module 702, and a display control module 703.

[0075] Preload module 701 is used to preload the first texture of the adjacent wallpaper of the currently displayed wallpaper.

[0076] The preloading module 701, as the data preparation unit of the device, is primarily responsible for acquiring graphics resources in advance. When in normal operation and displaying the currently shown wallpaper, the preloading module 701 initiates a monitoring mechanism in the background. Based on the current wallpaper's index position in the system wallpaper queue, it searches for and locates several adjacent wallpapers before and after that position. Once these adjacent wallpapers are identified, the preloading module 701 immediately reads the corresponding image data from the storage medium, performs necessary decoding and processing, and renders it into a format that the graphics processing unit can directly call, thus preloading the first texture of these adjacent wallpapers. By pre-caching these first textures in video memory or high-speed memory, the preloading module 701 ensures that the target image data is ready when the user initiates a switching request, eliminating the delay caused by real-time loading.

[0077] The combination processing module 702 is used to combine the first texture with the second texture of the currently displayed wallpaper in response to the wallpaper switching operation to obtain an intermediate frame sequence of images transitioning from the currently displayed wallpaper to the target wallpaper, where the target wallpaper is the wallpaper that is switched by the wallpaper switching operation among the adjacent wallpapers.

[0078] The combined processing module 702 is the processing and computing center of the device, responsible for responding to user interaction commands and generating dynamic images. When the touch layer or sensor detects a wallpaper switching operation triggered by the user (such as a finger swiping left or right on the screen), the combined processing module 702 is activated and begins operation. This module first parses the attributes of the switching operation (such as swipe direction, swipe speed, or swipe displacement), and based on these attributes, accurately selects the wallpaper that matches the user's operation intent from multiple first textures provided by the preloading module 701 as the target wallpaper. Subsequently, the combined processing module 702 acquires the wallpaper data currently displayed on the screen as the second texture, and performs coordinate transformations, layer blending, or occlusion calculations on the first and second textures based on the real-time parameters of the switching operation. Through this series of complex graphics operations, the combined processing module 702 generates a series of continuously changing image data, thus obtaining a sequence of intermediate frames that reflects the smooth transition from the currently displayed wallpaper to the target wallpaper.

[0079] The display control module 703 is used to display the sequence of intermediate frames until the switching to the target wallpaper is completed.

[0080] The display control module 703 is responsible for converting the generated intermediate frame sequence into visual feedback visible to the user. This module is connected to the display's driver layer, receives the intermediate frame sequence from the combination processing module 702, and controls the screen to render these frames one by one at a preset refresh rate (e.g., 60Hz or 120Hz). During the display process, the display control module 703 continuously monitors the animation's playback progress, ensuring that each frame is accurately presented on the screen, thus creating a smooth dynamic visual effect. This display process continues until the intermediate frame sequence finishes playing, or until the target wallpaper has completely covered the screen display area. At this point, the display control module 703 determines that the switching process has ended, stops displaying the transition animation, and locks the screen state to full-screen display of the target wallpaper, thus completing the wallpaper switching operation.

[0081] In some embodiments, the combination processing module 702 of the device further refines the rendering process. Specifically, the device 700 first determines a sub-render specifically responsible for drawing the image to be displayed. This sub-render is designed in software architecture to inherit the interface specification of a unified parent renderer, meaning it possesses standardized calling capabilities. When rendering is required, the sub-renderer does not directly hold or manage texture data, but instead sends a request to the unified parent renderer through the inherited interface. Upon receiving the request, the unified parent renderer provides the sub-renderer with the first texture it manages (i.e., the texture resource of the target wallpaper). Finally, the device 700 controls the sub-renderer to perform specific drawing operations using the acquired first texture, thereby displaying the switched target wallpaper on the screen.

[0082] In some embodiments, the combination processing module 702 of the device 700 is configured to generate animation in response to a user's swipe input. When the device 700 detects a wallpaper switching operation, the combination processing module 702 obtains the swipe displacement parameters corresponding to the operation through an internally integrated or associated sub-renderer. The swipe displacement parameters reflect information such as the distance or speed of the user's swipe. After obtaining the swipe displacement parameters, the device 700 performs calculations based on these parameters to derive two key displacement amounts: a first position offset related to the target wallpaper to be displayed, and a second position offset related to the currently displayed wallpaper. Finally, the device 700 uses these two calculated position offsets to render the first texture and the second texture within the same display area, and causes the first texture and the second texture to move or combine relative to each other in space, thereby generating an intermediate frame sequence that can represent the transition from the current wallpaper to the target wallpaper.

[0083] In some embodiments, the preloading module 701 of the device 700 is configured to construct a specific storage structure using a unified parent renderer. Specifically, the preloading module 701 constructs a dual-texture pool in memory by invoking the functions of the unified parent renderer. This dual-texture pool is logically divided into two independent storage units, one dedicated to storing the textures of the preceding wallpapers and the other dedicated to storing the textures of the following wallpapers. During the preloading phase, the device loads the image data of adjacent wallpapers (including preceding and following wallpapers) into this dual-texture pool. Specifically, during loading, the device writes the textures of the preceding wallpapers into the first storage unit and the texture resources of the following wallpapers into the second storage unit, thereby achieving the preloading of the first texture of the adjacent wallpapers for the currently displayed wallpaper.

[0084] In some embodiments, the device 700 employs a displacement-based parameter calculation method when processing user input. When the device 700 responds to a user's wallpaper switching operation, the input capture unit captures the sliding displacement generated by the operation in real time, i.e., the physical distance the finger or touch point moves on the screen. Then, based on this sliding displacement, the device calculates and determines the scrolling distance based on the current wallpaper viewpoint using an internal algorithm. Finally, the device combines the scrolling distance with the screen's hardware attributes—screen width and the current screen scaling—to derive a sliding displacement parameter through mathematical calculations. This parameter is used to subsequently drive the wallpaper's movement effect.

[0085] In some embodiments, the device 700 introduces nonlinear mapping logic when calculating the specific value of wallpaper movement. First, based on the scroll distance and screen width in the sliding displacement parameters, a nonlinear displacement factor is determined through a specific calculation function. This factor defines a nonlinear correspondence between the user's sliding displacement and the actual movement distance of the wallpaper (i.e., offset), resulting in a non-uniform movement effect (e.g., easing in and easing out). After determining this factor, the device performs joint calculations with the screen scaling ratio and a preset multiplier (a coefficient used to adjust the magnitude of the movement). Through the calculation of these three variables, the device ultimately obtains a first position offset and a second position offset used to control texture movement, thereby controlling the magnitude of wallpaper changes during the switching process.

[0086] In some embodiments, the combination processing module 702 employs a vertex coordinate-based processing method when generating intermediate frames. First, it acquires calculated first and second position offsets. Based on these offsets, the device determines the specific vertex coordinates of the first texture (target wallpaper) and the second texture (current wallpaper) in screen space through geometric calculations. These vertex coordinates define the positions of the four corners of the two textures, determining their shape and position on the screen. Finally, based on these determined vertex coordinates, the first and second textures are rendered and combined within the same display area, causing them to overlap or connect according to their calculated positional relationship, thereby obtaining an intermediate frame image transitioning from the current display wallpaper to the target wallpaper.

[0087] In some embodiments, the display control module 703 is configured to monitor the termination conditions of the switching process and perform cleanup operations. The display control module 703 is first responsible for playing the intermediate frame sequence. During playback, it detects the screen status in real time, specifically determining whether the display area of ​​the first texture (target wallpaper) in the intermediate frame sequence has completely covered the device's screen display area. Once the coverage is determined to be complete, it confirms that the current image corresponding to the first texture is the final target wallpaper to be displayed. Then, it performs a termination action: immediately stops all rendering operations for the second texture (original wallpaper) to release resources, and simultaneously sets the first texture to full-screen display mode, thereby visually and logically completing the switch to the target wallpaper.

[0088] It should be noted that the wallpaper rendering device provided in the above embodiments is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the computer device can be divided into different functional modules to complete all or part of the functions described above. In addition, the wallpaper rendering device and the wallpaper rendering method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.

[0089] This application also provides an electronic device. Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.

[0090] Typically, an electronic device 800 includes one or more processors 801 and one or more memories 802.

[0091] Processor 801 may include one or more processing cores, such as a quad-core processor, a hexa-core processor, etc. Processor 801 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). Processor 801 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 801 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, processor 801 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.

[0092] The memory 802 may include one or more computer-readable storage media, which may be non-transitory. The memory 802 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in the memory 802 are used to store at least one computer program, which is executed by the processor 801 to implement the wallpaper rendering method provided in the method embodiments of this application.

[0093] Those skilled in the art will understand that Figure 8 The structure shown does not constitute a limitation on the electronic device 800, and may include more or fewer components than shown, or combine certain components, or use different component arrangements.

[0094] In addition, the apparatus provided in the embodiments of this application may specifically be a chip, component or module. The chip may include a connected processor and a memory. The memory is used to store instructions. When the processor calls and executes the instructions, the chip can execute a wallpaper rendering method provided in the above embodiments.

[0095] This embodiment also provides a computer-readable storage medium storing computer program code. When the computer program code is run on a computer, the computer executes the above-described method steps to implement a wallpaper rendering method provided in the above embodiment.

[0096] This embodiment also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned steps to implement a wallpaper rendering method provided in the above embodiment.

[0097] In this embodiment, the device, computer-readable storage medium, computer program product, or chip are all used to execute the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods provided above, and will not be repeated here.

[0098] Through the above description of the embodiments, those skilled in the art will understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0099] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another apparatus, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0100] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A wallpaper rendering method, characterized in that, The method includes: Preload the first texture of the adjacent wallpaper to the currently displayed wallpaper; In response to a wallpaper switching operation, the first texture is combined with the second texture of the currently displayed wallpaper to obtain an intermediate frame sequence that transitions from the currently displayed wallpaper to the target wallpaper, wherein the target wallpaper is the wallpaper that is switched by the wallpaper switching operation among the adjacent wallpapers; The sequence of intermediate frames is displayed until the switching to the target wallpaper is complete.

2. The method according to claim 1, characterized in that, The method further includes: A child renderer is determined for rendering the target wallpaper. The child renderer is configured to inherit the interface of the unified parent renderer, and the child renderer calls the first texture managed by the unified parent renderer through the interface. The target wallpaper is rendered using the sub-renderer to display the switched target wallpaper.

3. The method according to claim 2, characterized in that, In response to the wallpaper switching operation, the first texture is combined with the second texture of the currently displayed wallpaper to obtain an intermediate frame sequence for the transition from the currently displayed wallpaper to the target wallpaper, including: In response to a wallpaper switching operation, the sliding displacement parameters corresponding to the wallpaper switching operation are obtained through the sub-renderer; Based on the sliding displacement parameters, a first position offset and a second position offset are determined, wherein the first position offset corresponds to the first texture and the second position offset corresponds to the second texture; Based on the first position offset and the second position offset, the first texture and the second texture are combined in the same display area to obtain an intermediate frame sequence that transitions from the currently displayed wallpaper to the target wallpaper.

4. The method according to claim 2, characterized in that, The preloading of the first texture of the adjacent wallpaper of the currently displayed wallpaper includes: A dual texture pool is constructed using a unified parent renderer. The dual texture pool contains two storage units: one storage unit is used to store the texture of the preceding wallpaper, and the other storage unit is used to store the texture of the following wallpaper. The textures of the adjacent wallpapers are loaded into the dual texture pool to preload the first texture of the adjacent wallpapers of the currently displayed wallpaper. The adjacent wallpapers include the preceding wallpaper and the following wallpaper. The texture of the preceding wallpaper is loaded into one storage unit, and the texture resources of the following wallpaper are loaded into another storage unit.

5. The method according to claim 3, characterized in that, The step of responding to a wallpaper switching operation by obtaining the corresponding sliding displacement parameters through a sub-renderer includes: In response to wallpaper switching operations, capture the sliding displacement of the wallpaper switching operation; Based on the sliding displacement, determine the scroll distance based on the current wallpaper; Based on the scrolling distance, screen width, and screen scaling ratio, the sliding displacement parameters corresponding to the wallpaper switching operation are obtained through the sub-renderer.

6. The method according to claim 3, characterized in that, Determining the first position offset and the second position offset based on the sliding displacement parameters includes: Based on the scrolling distance and screen width of the sliding displacement parameters, a nonlinear displacement factor is determined. The nonlinear displacement factor is used to indicate the nonlinear mapping relationship between the sliding displacement and the first position offset and the second position offset during the wallpaper switching operation. Based on the nonlinear displacement factor, screen scaling ratio, and preset magnification, a first position offset and a second position offset are obtained. The preset magnification is used to represent the range of change of the first position offset and the second position offset.

7. The method according to claim 3, characterized in that, The step of combining the first texture and the second texture in the same display area based on the first position offset and the second position offset to obtain an intermediate frame sequence for the transition from the currently displayed wallpaper to the target wallpaper includes: Based on the first position offset and the second position offset, determine the vertex coordinates of the first texture and the second texture; Based on the vertex coordinates of the first texture and the second texture, the first texture and the second texture of the currently displayed wallpaper are combined in the same display area to obtain an intermediate frame sequence that transitions from the currently displayed wallpaper to the target wallpaper.

8. The method according to claim 1, characterized in that, The process of displaying the intermediate frame sequence until the switch to the target wallpaper is completed includes: Display the intermediate frame sequence; When the display area of ​​the first texture in the intermediate frame sequence covers the screen display area, the current wallpaper corresponding to the first texture is determined as the target wallpaper; Stop rendering the second texture and display the first texture in full screen to complete the switching of the target wallpaper.

9. An electronic device, characterized in that, The electronic device includes: Memory, used to store executable program code; A processor is configured to call and run the executable program code from the memory, causing the electronic device to perform the wallpaper rendering method as described in any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one piece of program code, which is loaded by a processor and executed as the wallpaper rendering method according to any one of claims 1 to 8.