Dynamic wallpaper switching display method and related device
By generating transition animations, the problem of abrupt screen transitions during live wallpaper switching is solved, achieving a more natural transition effect and improving the user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-30
- Publication Date
- 2026-04-07
AI Technical Summary
When switching live wallpapers, existing technology causes noticeable jumps in the screen content, affecting the user's visual experience.
By acquiring frame images of the first and second live wallpapers, a transition animation is generated and played during the switching process to achieve a smooth transition.
It achieves a smooth and natural transition effect during the switching of live wallpapers, improving the user experience.
Smart Images

Figure CN121807415A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of terminal technology, and in particular to a method and related apparatus for switching and displaying dynamic wallpapers. Background Technology
[0002] Live wallpapers have become an important element for beautifying and personalizing mobile device interfaces. Users can set different live wallpapers for different scenarios through wallpaper apps, allowing them to switch between them accordingly. These live wallpapers can be videos or animations. However, when switching live wallpapers, the content of two live wallpapers may differ significantly. Therefore, there is a noticeable jump in the screen content between the end of one live wallpaper and the start of another. This sudden change makes the live wallpaper switching process appear abrupt and jarring, affecting the user's visual experience. Therefore, how to achieve a smoother and more natural transition effect when switching live wallpapers is a problem that urgently needs to be solved. Summary of the Invention
[0003] To address the aforementioned issues, this application provides a method for switching live wallpapers, which enables a smoother and more natural transition effect when switching live wallpapers.
[0004] In a first aspect, embodiments of this application provide a method for switching and displaying dynamic wallpapers, applied to electronic devices, characterized in that the method includes:
[0005] Play the first live wallpaper and get N frames of the first wallpaper image in the first live wallpaper. The N frames of the first wallpaper image include the last frame of the first live wallpaper image. The last frame of the wallpaper image is frame i, and N is an integer greater than 0.
[0006] Get the M frames of the second wallpaper image of the second live wallpaper. The M frames of the second wallpaper image include the first frame of the second live wallpaper image. The first frame of the wallpaper image is frame i, and M is an integer greater than 0.
[0007] Generate a transition animation based on N frames of the first wallpaper image and M frames of the second wallpaper image;
[0008] The program switches from playing the first live wallpaper to playing a transition animation, and then plays the second live wallpaper after the transition animation finishes.
[0009] In the above solution, before switching from playing the first live wallpaper to playing the second live wallpaper, a transition animation is generated based on N frames of the first live wallpaper and M frames of the second live wallpaper. After playing this transition animation, the second live wallpaper is then played. This design achieves a smooth transition when switching from the first live wallpaper to the second live wallpaper. This makes the switching process between the first and second live wallpapers smoother, achieving a natural transition effect, effectively avoiding sudden jumps in screen content, and improving the user experience of operating electronic devices.
[0010] Optionally, the step of obtaining the M frames of the second live wallpaper image is performed before the step of playing the first live wallpaper. By obtaining the M frames of the second live wallpaper image in advance before playing the first live wallpaper, it is possible to avoid the first and second live wallpapers being loaded simultaneously, which helps to save computing resources of electronic devices.
[0011] Alternatively, the step of obtaining the M-frames of the second live wallpaper image can be performed during the playback of the first live wallpaper. By obtaining the M-frames of the second live wallpaper image during the playback of the first live wallpaper, the utilization efficiency of system resources can be improved, seamless switching of live wallpapers can be achieved, and the smoothness of the user experience can be enhanced.
[0012] Optionally, M equals N. The number of first and second wallpaper images used to generate the transition animation is equal, which allows for easy blending. Each frame of the first wallpaper image can be assigned a corresponding second wallpaper image, resulting in a better blending effect for the transition animation.
[0013] Optionally, play the first live wallpaper, including:
[0014] In response to the user's first action, the first interface is displayed, and the first live wallpaper is played on the first interface.
[0015] The first action triggers the display of the first interface; that is, the first action can trigger the playback of the first live wallpaper. This controlled playback of the first live wallpaper allows the user to view the complete live wallpaper.
[0016] Optionally, the playback may switch from playing the first live wallpaper to playing a transition animation, and after the transition animation finishes playing, play the second live wallpaper, including:
[0017] When the first interface is displayed, in response to the user's second operation, the second interface is displayed, showing a transition animation that switches from playing the first live wallpaper to playing the second interface.
[0018] The second operation triggers the electronic device to switch from displaying the first interface to displaying the second interface. Since a transition animation plays before switching from playing the first live wallpaper to playing the second live wallpaper, the playback of this transition animation is controlled by the user's second operation. In other words, the user triggers the playback of the transition animation, making it easier for the user to observe the process and improving the user experience.
[0019] Optionally, the user's second action includes at least one of the following:
[0020] Screen off triggers the operation;
[0021] Screen-on trigger operation;
[0022] Screen lock trigger operation;
[0023] Screen unlocking operation.
[0024] Optionally, the first interface and the second interface are different interfaces; wherein, the first interface is one of the three: lock screen interface, desktop interface, and always-on screen interface, and the second interface is another of the three: lock screen interface, desktop interface, and always-on screen interface. The dynamic wallpaper switching display method of this application embodiment can be applied to the problem of dynamic wallpaper transition when switching between various interfaces.
[0025] Optionally, the first interface is the lock screen interface, the second interface is the desktop interface, the first live wallpaper is the lock screen live wallpaper, and the second live wallpaper is the desktop live wallpaper.
[0026] Alternatively, the first screen can be the desktop screen, the second screen can be the lock screen screen, the first live wallpaper can be the desktop live wallpaper, and the second live wallpaper can be the lock screen live wallpaper.
[0027] Alternatively, the first screen is the always-on display, the second screen is the lock screen, the first live wallpaper is the always-on live wallpaper, and the second live wallpaper is the lock screen live wallpaper.
[0028] Alternatively, the first screen can be the lock screen, the second screen can be the always-on screen, the first live wallpaper can be the lock screen live wallpaper, and the second live wallpaper can be the always-on screen live wallpaper.
[0029] Optionally, the playback may switch from playing the first live wallpaper to playing a transition animation, and after the transition animation finishes playing, play the second live wallpaper, including:
[0030] In response to the user's second action, a transition animation is played on the first screen;
[0031] After the transition animation finishes playing, the second live wallpaper will be displayed on the first screen.
[0032] Responding to the user's second action, a transition between the first and second live wallpapers can be achieved within the same primary screen. Specifically, after the first live wallpaper finishes playing on the first screen, a transition animation will play first, followed by the second live wallpaper. This achieves a natural transition between different live wallpapers on the same screen. Furthermore, the second action triggers the playback of the transition animation, making it easier for the user to observe the transition process and improving the user experience.
[0033] Optionally, the user's second action can be a screen tap, a screen-on trigger, or a wallpaper switching action. Users can tap the screen to switch between different live wallpapers, allowing them to choose their preferred one. Alternatively, a screen-on trigger can automatically switch the live wallpaper after the screen is turned on. Another option is a wallpaper switching control, which users can activate to switch wallpapers.
[0034] Optionally, a transition animation is generated based on N frames of the first wallpaper image and M frames of the second wallpaper image, including:
[0035] Perform texture conversion processing on N frames of the first wallpaper image to obtain at least one frame of the first wallpaper texture;
[0036] Perform texture conversion processing on the M-frame second wallpaper image to obtain at least one frame of second wallpaper texture;
[0037] The transition animation is obtained by blending and rendering at least one frame of the first wallpaper texture and at least one frame of the second wallpaper texture.
[0038] By converting the first and second wallpaper images into wallpaper textures before blending them, the blending of the first and second wallpaper images can be achieved with less computational resources when creating transition animations. Furthermore, blending the first and second wallpaper textures allows for easier control of the blending process, enabling more natural transition animations.
[0039] Optionally, the N-frame first wallpaper image is the last frame image of the first live wallpaper, and the M-frame second wallpaper image is the first frame image of the second live wallpaper.
[0040] By selecting the last frame of the first live wallpaper and blending it with the first frame of the second live wallpaper, transition animations can be created at a lower cost.
[0041] Optionally, at least one frame of the first wallpaper texture and at least one frame of the second wallpaper texture are mixed and rendered to obtain a transition animation, including:
[0042] Get the first wallpaper texture from the last frame of the first live wallpaper;
[0043] Get the second wallpaper texture from the first frame image of the second live wallpaper.
[0044] Obtain the target frame number for playing the transition animation, and determine the target number of rendering times based on the target frame number;
[0045] The first and second wallpaper textures are subjected to mixed rendering processing with a target number of rendering passes to obtain the transition animation.
[0046] To create a transition animation based on two static images, the target number of frames for the transition animation can be determined first. Then, by blending the first wallpaper texture of the last frame of the first live wallpaper and the second wallpaper texture of the first frame of the second live wallpaper with the target number of frames, a transition animation that meets the requirements of the live wallpaper transition can be created with relatively low computational resources. Furthermore, by changing the blending effect of the first and second wallpaper textures, a natural transition animation can be easily created.
[0047] Optionally, obtain N frames of the first wallpaper image from the first live wallpaper, including:
[0048] The first media decoder decodes the first live wallpaper to obtain N frames of the first wallpaper image, and then stores the N frames of the first wallpaper image into the first image data cache.
[0049] Obtain the M-frame image of the second live wallpaper, including:
[0050] The second live wallpaper is decoded by the second media decoder to obtain the M-frame second wallpaper image, and the M-frame second wallpaper image is stored in the second image data cache by the second media decoder.
[0051] The first live wallpaper is decoded using a first media decoder, and the second live wallpaper is decoded using a second media decoder. This allows the live wallpaper switching display method of this embodiment to be applied to conventional live wallpaper types, improving the applicability of the solution.
[0052] Optionally, a transition animation is generated based on N frames of the first wallpaper image and M frames of the second wallpaper image, including:
[0053] The first image data texture processor reads N frames of first wallpaper images from the first image data cache, performs texture conversion processing on the N frames of first wallpaper images to obtain at least one frame of first wallpaper texture, and stores the at least one frame of first wallpaper texture in the first texture storage space.
[0054] The second image data texture processor reads M frames of second wallpaper images from the second image data cache, performs texture conversion processing on the M frames of second wallpaper images to obtain at least one frame of second wallpaper texture, and stores the at least one frame of second wallpaper texture in the second texture storage space;
[0055] By calling the rendering pipeline of the 3D graphics processing library, at least one frame of the first wallpaper texture in the first texture storage space and at least one frame of the second wallpaper texture in the second texture storage space are mixed and rendered to generate a transition animation.
[0056] The 3D graphics processing library performs blended rendering of at least one frame of the first wallpaper texture and at least one frame of the second wallpaper texture, resulting in smoother and more seamless live wallpaper transitions. Furthermore, the 3D graphics processing library supports single-wallpaper service operation, enabling the fusion of multiple stored static wallpaper texture frames within a single wallpaper service. Since only one wallpaper service is running, it effectively reduces the resource consumption of electronic devices during wallpaper transitions and avoids malfunctions caused by asynchronous multiple wallpaper services.
[0057] Optionally, by invoking the rendering pipeline of the 3D graphics processing library, at least one frame of the first wallpaper texture in the first texture storage space and at least one frame of the second wallpaper texture in the second texture storage space are blended and rendered to generate a transition animation, including:
[0058] Get the target frame number of the transition animation;
[0059] The system calls a 3D graphics processing library to read the first wallpaper texture of the target frame number from the first texture storage space, and to read the second wallpaper texture of the target frame number from the second texture storage space.
[0060] The first and second wallpaper textures of the target frame number are blended and rendered to generate a transition animation.
[0061] The first and second wallpaper textures of the target frame number are obtained by a 3D graphics processing library and then mixed. Because multiple frames of different wallpaper textures are mixed, the transition animation generated by the 3D graphics processing library can be made smoother and more natural.
[0062] In a second aspect, an electronic device includes: at least one processor; at least one memory, comprising the processor and the memory;
[0063] The memory is used to store programs that enable the electronic device to perform the methods provided in any of the above embodiments, and to store data related to implementing the methods provided in any of the above embodiments; the processor is configured to execute the programs stored in the memory.
[0064] Thirdly, a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the method provided in any of the above embodiments.
[0065] Fourthly, a computer program product includes a computer program or computer instructions stored in a computer-readable storage medium, wherein a processor of an electronic device reads the computer program or computer instructions from the computer-readable storage medium, and the processor executes the computer program or computer instructions to cause the electronic device to perform the method provided in any of the above embodiments.
[0066] Understandably, the beneficial effects achieved by the electronic device of the second aspect, the computer-readable storage medium of the third aspect, and the computer program product of the fourth aspect provided above can be referred to with reference to the beneficial effects of the first aspect and any of its possible design embodiments, which will not be repeated here. Attached Figure Description
[0067] The accompanying drawings are used to provide a further understanding of the technical solutions of this application and constitute a part of the specification. They are used together with the embodiments of this application to explain the technical solutions of this application and do not constitute a limitation on the technical solutions of this application.
[0068] Figure 1A This is a schematic diagram of the desktop interface of an electronic device provided in one embodiment of this application;
[0069] Figure 1B This is a schematic diagram of the lock screen interface of an electronic device provided in one embodiment of this application;
[0070] Figure 1C This is a schematic diagram of the always-on screen interface of an electronic device provided in one embodiment of this application;
[0071] Figure 2 This is a schematic diagram of a live wallpaper provided in one embodiment of this application;
[0072] Figure 3 This is a schematic diagram illustrating the dynamic wallpaper switching scenario using related technologies;
[0073] Figure 4 This is a schematic diagram illustrating a scenario where an electronic device enters the desktop from the lock screen according to an embodiment of this application;
[0074] Figures 5A to 5D This is an interface diagram of an environment-adaptive desktop wallpaper scene provided in one embodiment of this application;
[0075] Figure 6 This is a schematic diagram illustrating an application scenario of switching between a first live wallpaper and a second live wallpaper, provided in one embodiment of this application.
[0076] Figure 7 This is a schematic diagram of an electronic device structure provided in one embodiment of this application;
[0077] Figure 8 This is a schematic diagram of the system software architecture of an electronic device provided in one embodiment of this application;
[0078] Figure 9 This is a flowchart illustrating the initialization process of a single wallpaper service according to an embodiment of this application;
[0079] Figure 10 This is a schematic diagram illustrating the relationship between a video and animation production application and a wallpaper application provided in one embodiment of this application;
[0080] Figure 11 This is a schematic diagram illustrating the workflow of a single wallpaper service performing a dynamic wallpaper switching method according to an embodiment of this application;
[0081] Figure 12 This is a system architecture diagram for performing dynamic wallpaper switching according to an embodiment of this application;
[0082] Figure 13 This is a schematic diagram illustrating the workflow of a dual-wallpaper service performing a dynamic wallpaper switching method according to an embodiment of this application;
[0083] Figure 14 This is an interactive diagram illustrating the initialization of components involved in a dynamic wallpaper switching display method provided in one embodiment of this application;
[0084] Figure 15 This is an interactive schematic diagram illustrating the actual dynamic wallpaper switching and display process of a dynamic wallpaper switching and display method provided in one embodiment of this application;
[0085] Figure 16 This is a schematic diagram illustrating the interaction between the image data texture processor and the media decoder;
[0086] Figure 17 This is a schematic diagram illustrating the switching process from lock screen live wallpaper to desktop live wallpaper according to another embodiment of this application;
[0087] Figure 18 It corresponds Figure 17 A flowchart illustrating the process of switching from a lock screen live wallpaper to a desktop live wallpaper;
[0088] Figure 19 This is an interactive schematic diagram illustrating the actual dynamic wallpaper switching process of another embodiment of the dynamic wallpaper switching display method provided in this application. Detailed Implementation
[0089] 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, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0090] In this article, the term "and / or" is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone.
[0091] The terms "first" and "second," etc., used in the specification and claims of this application are used to distinguish different objects, not to describe a specific order of objects. For example, "first target object" and "second target object," etc., are used to distinguish different target objects, not to describe a specific order of target objects.
[0092] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0093] In the description of the embodiments in this application, unless otherwise stated, "multiple" means two or more. For example, multiple processing units means two or more processing units; multiple systems means two or more systems.
[0094] When an electronic device is in the unlocked state, it displays an unlock screen, which can be as follows: Figure 1A The screen shown can be the desktop interface or other interfaces where the user can perform operations (such as the running interface of any application on the electronic device, the system settings interface of the electronic device, etc.). On the unlock screen, if the electronic device detects that the user has pressed the power button, or if no user operation is detected for an extended period, the electronic device will switch from the unlocked state to the locked screen state. In the locked screen state, the electronic device can display different interfaces, such as... Figure 1B The lock screen interface shown Figure 1C The screen shown is either off or completely blank (meaning the electronic device screen displays nothing). Figure 1CThe always-on display shown can also be called an AOD (Always-on Display) interface. AOD allows the CPU to control specific pixels on the screen to light up without illuminating the entire display, such as to display the time, incoming calls, messages, battery information, push notifications, etc. On the other hand, always-on display illuminates the entire screen, using the CPU to control all the pixels to display information. Because some areas in an AOD interface can remain constantly lit, these areas can display personalized elements (e.g., ...). Figure 1C (The clock wallpaper shown) or information elements (such as...) Figure 1C (The time and date shown).
[0095] The type of interface displayed on an electronic device when it's locked depends on the user's settings. For example, if the user has enabled an always-on display feature in the lock screen application, the electronic device will display the always-on display when locked. In other feasible scenarios, the electronic device can also display different interfaces sequentially while locked, such as transitioning from the lock screen to the always-on display and then from the always-on display back to the screen-off state.
[0096] In scenarios where electronic devices can turn off the screen, the user can click the power button. For example, in one possible triggering scenario, the electronic device detects a user clicking the power button to request screen off while displaying the desktop interface. The electronic device can then first display something like... Figure 1B The lock screen interface shown, and then the following is displayed: Figure 1C The screen-off interface is shown. When an electronic device displays the screen-off interface, if the device does not detect user interaction for an extended period, it will turn off the screen (i.e., switch from the screen-off interface to the screen-off state). Alternatively, if the electronic device detects no user nearby while displaying the screen-off interface, it will turn off the screen. In other feasible triggering scenarios, screen-off can also be achieved through one-click screen locking, timeout screen-off, etc.
[0097] In scenarios where an electronic device's screen is on, the device can transition from a screen-off state to the desktop. For example, if an electronic device detects a user pressing the power button to request screen activation while the screen is off, it can first display something like... Figure 1B The screen shown is the lock screen interface. After the electronic device detects that the user has performed a swipe-up unlock operation, the electronic device switches from the lock screen state to the unlock state, displaying the following: Figure 1A The desktop interface shown.
[0098] In scenarios where electronic devices are in a screen-off state, the device can transition from a screen-off state to a screen-off interface. In one feasible triggering scenario, when the electronic device detects a nearby user while in a screen-off state (e.g., by detecting the user picking up the device, detecting the user lightly touching the device, or displaying the screen-off interface by tracking the user's eye gaze using a camera), it can switch from a screen-off state to displaying a screen-off interface. Figure 1C The screen-off interface is shown below. In another feasible triggering scenario, if the electronic device detects a user's trigger operation while the screen is off, it can switch from the off state to displaying an interface like the one shown. Figure 1C The screen shown is the always-on display. The trigger action can be a user clicking the power button or other methods, such as double-tapping the screen or picking up the electronic device. The electronic device can detect the double-tap action via the screen or by detecting the user picking up the device via a gyroscope sensor.
[0099] In another application scenario for electronic devices where the screen is on, the device can transition from a screen-off interface to the desktop. For example, when the electronic device is displaying a screen-off interface and detects that the user has pressed the power button to request screen activation, the device can first display something like... Figure 1B The screen shown is the lock screen interface. After the electronic device detects that the user has performed a swipe-up unlock operation, the electronic device switches from the lock screen state to the unlock state and displays the following: Figure 1A The desktop interface shown.
[0100] In the various interfaces displayed on electronic devices, wallpaper applications can set corresponding wallpapers for different interfaces. These wallpapers can be user-defined, such as users setting specific wallpapers for these interfaces via a wallpaper app. Alternatively, the wallpaper application can automatically assign different wallpapers to these interfaces, for example, assigning wallpapers based on default settings. Or, the wallpaper application can randomly assign wallpapers to these interfaces. Or, the wallpaper application can automatically set the wallpaper based on the user's current context. These wallpapers can be live wallpapers. Live wallpapers can be understood as dynamic images or animations. For example, a wallpaper application can configure a live wallpaper for the always-on display (e.g., ...). Figure 1C The dynamic always-on display clock shown can be configured with a live wallpaper (e.g., a dynamic always-on display clock) in the lock screen interface. Figure 1B The animation of the virtual character running shown can be used to configure a live wallpaper on the desktop interface (e.g., a virtual character running). Figure 1A (An animation showing a virtual character waiting for a train at a station).
[0101] For live wallpapers, each frame is displayed sequentially; the first frame is shown first, and the last frame is shown last. Taking a lock screen live wallpaper as an example, the frames are displayed sequentially on the lock screen to create a dynamic effect. For example... Figure 2 In the lock screen interface shown (a), the live wallpaper is an animation of a virtual character running. The electronic device displays the various image frames of this running animation sequentially on the lock screen, with each frame displaying a different movement of the virtual character (e.g., ...). Figure 2 The continuous motion of the virtual character raising their hand in a greeting is used to play the live wallpaper on the lock screen.
[0102] Live wallpapers can be the same on different screens of an electronic device. For example, a user can set the same live wallpaper for the lock screen and desktop using a wallpaper app. Alternatively, live wallpapers can also be different for different screens. For instance, a user can configure different live wallpapers for different display screens using a wallpaper app. In one wallpaper setting scenario, a user selects one live wallpaper as the lock screen and another as the desktop live wallpaper. This sets different live wallpapers for the lock screen and desktop. After setting these up, in a scenario where the electronic device is on, the device displays the lock screen and plays the lock screen live wallpaper. Then, when the device detects the user's swipe-to-unlock action, it switches from lock screen to unlock, displays the desktop, and plays the desktop live wallpaper. This involves switching between the two live wallpapers (specifically, switching between the lock screen live wallpaper and the desktop live wallpaper).
[0103] The above examples illustrate the switching of live wallpapers from the lock screen to the desktop. In reality, live wallpaper switching may occur during any of the interface transitions mentioned earlier. For instance, we can refer to the live wallpaper before the switch as the first live wallpaper and the live wallpaper after the switch as the second live wallpaper. The process of switching live wallpapers is then called switching from the first live wallpaper to the second live wallpaper. In the scenario of entering the desktop from the lock screen, the first live wallpaper is the lock screen live wallpaper, and the second live wallpaper is the desktop live wallpaper.
[0104] In another scenario where an electronic device's screen is on, the device displays an always-on screen and plays a live wallpaper. Upon detecting a user pressing the power button to request screen activation, the device displays a lock screen and plays a live wallpaper. It's clear that during the transition from the always-on screen to the lock screen, the live wallpaper switches between the always-on and lock screens. Furthermore, the switching order can change. For example, in addition to switching between the lock screen and the home screen, the live wallpaper can also switch between the home screen and the lock screen. Different live wallpapers can also switch between each other; these examples will not be elaborated upon here.
[0105] As mentioned above, electronic devices may need to change live wallpapers when switching between different interfaces. In addition, electronic devices can also change live wallpapers within the same interface. For example, a wallpaper app can set more than two live wallpapers for the current interface; after one live wallpaper finishes playing on the current interface, another lock screen live wallpaper will then play. Furthermore, electronic devices can also respond to user actions (such as tapping the screen) to switch between different live wallpapers within the same interface. For example, if a user is not satisfied with the live wallpaper displayed on the current lock screen, they can tap the wallpaper switch control on the screen to switch to another live wallpaper, resulting in a switch between the two live wallpapers.
[0106] In other scenarios where live wallpaper switching occurs, the switching can also be displayed in other applications. For example, in the settings interface of a wallpaper application, a preview screen for setting a live wallpaper needs to be displayed. In this preview screen, users can choose from various personalized live wallpapers. When the user selects a new live wallpaper, the content displayed in the preview screen will also change. For example, it might switch from the currently playing live wallpaper to the new live wallpaper selected by the user.
[0107] As mentioned above, in various scenarios involving live wallpaper switching, the content of the two live wallpapers to be switched between may differ significantly. For example, the live wallpaper before the switch might be an animation of the ocean, while the live wallpaper after the switch might be an animation of a forest. Therefore, during the transition from the end of one live wallpaper to the start of another, the visual content will change abruptly. This sudden change makes the live wallpaper switching process appear abrupt and jarring, negatively impacting the user's visual experience.
[0108] The following combination Figure 3 Taking the scenario of an electronic device entering the desktop from the lock screen as an example, this illustrates potential problems during the live wallpaper switching process. Figure 3 As shown, when the electronic device is displaying a screen-off interface, after detecting a user's action to turn on the device (e.g., the user clicking the power button), the electronic device displays the lock screen interface a, and then... Figure 3During the time periods T1 to T3, the live wallpaper a100 is played on the lock screen interface a. Lock screen interface a displays three frames during T1 to T3, showing an animation of a virtual character running and raising their hand to wave. Then, at time T4, the electronic device detects the user's swipe-to-unlock action on the lock screen and switches from lock to unlock in response. During the time periods T5 to T7, the electronic device displays desktop interface b and plays desktop live wallpaper b100. Desktop interface b displays three frames during T5 to T7, showing an animation of a virtual character waiting at a bus stop and raising their hand to signal to the bus driver. It should be noted that, for ease of display, the live wallpapers a100 and b100 are shown as three frames; the actual number of frames displayed can be determined based on the total duration of the animation and the mobile device's screen refresh rate.
[0109] As can be seen, at moment T4, when a user swipes up to unlock the device from the lock screen, the content displayed on the electronic device changes abruptly from the last frame of the lock screen live wallpaper a100 at moment T4 to the first frame of the desktop live wallpaper b100 at moment T5. Because the content of the last frame of the lock screen live wallpaper a100 and the first frame of the desktop live wallpaper b100 differs significantly, the visual content jumps noticeably. For example, in moment T5, the user will observe that the virtual character who was running suddenly shrinks, and the virtual character abruptly changes from running to standing, while a bus stop sign suddenly appears on the screen. It is evident that the transition from the lock screen live wallpaper a100 to the desktop live wallpaper b100 involves a significant jump in content. This sudden change makes the live wallpaper switching process appear abrupt and jarring, affecting the user's visual experience. Therefore, how to achieve a smoother and more natural transition effect when switching live wallpapers is a problem that urgently needs to be solved.
[0110] The following combination Figure 4 Taking the scenario of an electronic device entering the desktop from the lock screen as an example, this application illustrates the application scenario of the dynamic wallpaper switching display method in this embodiment. It should be noted that... Figure 4The illustration shows only one scenario of live wallpaper switching. The live wallpaper switching display method provided in this application can also be applied to any live wallpaper switching scenario. For example, the live wallpaper switching between the always-on display and the lock screen as mentioned above, or the live wallpaper switching within the same display, etc., are not limited in this application. We use the live wallpaper before the update as the first live wallpaper and the updated live wallpaper as the second live wallpaper. For example, in the scenario of entering the desktop from the lock screen, the first live wallpaper is the lock screen live wallpaper, and the second live wallpaper is the desktop live wallpaper. In addition, in the scenario of entering the lock screen from the desktop, the first live wallpaper is the desktop live wallpaper, and the second live wallpaper is the lock screen live wallpaper. For the scenario of entering the lock screen from the always-on display, the first live wallpaper is the always-on display live wallpaper, and the second live wallpaper is the lock screen live wallpaper. Conversely, in the scenario of entering the always-on display from the lock screen, the first live wallpaper is the lock screen live wallpaper, and the second live wallpaper is the always-on display live wallpaper. And so on.
[0111] like Figure 4 As shown in this embodiment, when the user turns on the screen of the electronic device from the screen-off state, it enters the lock screen state. During the time period T1 to T3, the lock screen interface a is displayed on the screen of the electronic device, and the lock screen live wallpaper a100 is played in the lock screen interface a. The playback process of the lock screen live wallpaper a100 is described in reference to... Figure 3 The relevant embodiments will not be repeated here. Before or during the playback of the lock screen live wallpaper a100, the electronic device can pre-acquire M frames of the second live wallpaper (where M is an integer greater than 0). For example, it can acquire the first few frames of the desktop live wallpaper to prepare for creating mixed animation effects. For example, the electronic device can acquire the first few frames of the desktop live wallpaper in the screen-off state (for example, acquire the first frame of the desktop live wallpaper). On the other hand, in order to create mixed animation effects, the electronic device can also acquire N frames of the first live wallpaper (where N is an integer greater than 0) during or after the playback of the lock screen live wallpaper a100. For example, it can acquire the last few frames of the lock screen live wallpaper after the playback of the lock screen live wallpaper a100 (for example, acquire the last frame of the lock screen live wallpaper).
[0112] It should be noted that the M-frames of the second live wallpaper can be images of consecutive frames or non-consecutive frames from the second live wallpaper, for example, images extracted from every other frame of the second live wallpaper for blending. The M-frames of the second live wallpaper must include at least the first frame of the second live wallpaper, because the first frame is the first frame used to create the blended animation. Similarly, the N-frames of the first live wallpaper can also be images of consecutive or non-consecutive frames, and must also include the last frame of the first live wallpaper, which is also the first frame used to create the blended animation. This allows the transition animation played when switching from the first live wallpaper to the second live wallpaper to better connect with both the first and second live wallpapers. In one embodiment, the live wallpaper is saved as a video file. Since a video file generally includes i-frames (Intra-coded pictures), P-frames (Predictive-coded Pictures), and B-frames (Bidirectionally predicted pictures), the transition animation is designed to seamlessly integrate with the first and second live wallpapers. Since the i-frame, as a keyframe of the dynamic wallpaper, records the image data required to display the image, in order to better achieve the transition animation, one embodiment summarizes that at least the last frame of the first dynamic wallpaper is an i-frame, and at least the first frame of the second dynamic wallpaper is an i-frame. Of course, all N frames of the first wallpaper and M frames of the second wallpaper can be i-frames, or some can be i-frames; this application does not limit this. When we only use the last frame of the first dynamic wallpaper and the first frame of the second dynamic wallpaper to create a mixed animation effect, M = N = 1. In other embodiments, M can also be set to equal N, and both M and N are greater than 1.
[0113] After the live wallpaper a100 finishes playing, at time T4, the electronic device detects the user's swipe-up unlock action on the lock screen. In response, the device switches from lock to unlock. Instead of immediately accessing the desktop, the device merges the last few frames of the live wallpaper with the first few frames of the desktop live wallpaper to create a gradient animation. During the time interval T5 to T7, the device plays this transition animation. Specifically, the transition animation is displayed sequentially, for example, three blended frames are displayed during T5 to T7. These three blended frames are all composed of the last frame of the live wallpaper and the first frame of the desktop live wallpaper, but with different blending ratios.
[0114] Specifically, for the mixed image at time T5, the terminal displays both images of a virtual character running and a virtual character waiting for a bus. The running image has lower transparency, while the waiting image has higher transparency. Users will perceive that the higher the image transparency, the less noticeable the image; when the transparency is 100%, the image is completely invisible. In other words, at time T5, the user can more clearly observe the running image, achieving a smooth transition from the content displayed in T4.
[0115] For the mixed image at time T6, the transparency of the image of the virtual character running and the transparency of the image of the virtual character waiting for the bus are basically the same. However, for the mixed image at time T7, the transparency of the image of the virtual character running is higher, while the transparency of the image of the virtual character waiting for the bus is lower, making the image of the virtual character waiting for the bus more easily perceived by the user. During the time period from T8 to T10, the electronic device displays desktop interface b, and plays desktop live wallpaper b100 on desktop b. The playback process of desktop live wallpaper b100 is described in [reference needed]. Figure 3 The relevant embodiments will not be described in detail here. At this point, the electronic device has completed the switching between the lock screen live wallpaper and the desktop live wallpaper. Specifically, the low-transparency image of the virtual characters waiting for the bus in time T7 allows for a smooth transition with the content displayed on the desktop in time T8.
[0116] It can be seen that, relative to Figure 3 In this embodiment, the wallpaper switching mode directly switches from the last frame of the lock screen live wallpaper to the first frame of the desktop live wallpaper. After playing the desktop live wallpaper, a mixed animation of two lock screen live wallpapers and the desktop live wallpaper is played first, and then the last lock screen live wallpaper is played. This makes the switching process between the lock screen live wallpaper and the desktop live wallpaper smoother, achieves a natural transition effect, and effectively avoids sudden changes in screen content.
[0117] Figure 4In the illustrated embodiment, the electronic device acquires the first frame image of the desktop live wallpaper and the last frame image of the lock screen live wallpaper and mixes them to obtain a mixed image. The two images are mixed multiple times to form a transition animation. Since the degree of mixing varies at different times (e.g., the lock screen live wallpaper image is more obvious in T5, while the desktop live wallpaper image is more obvious in T7), the transition animation can achieve a smooth transition between the lock screen live wallpaper and the desktop live wallpaper. In another embodiment, the first N frames of the desktop live wallpaper and the last N frames of the lock screen live wallpaper can also be acquired and mixed, where N is an integer greater than 2. For example, for the first mixed image, the electronic device can acquire the Nth frame from the end of the lock screen live wallpaper and mix it with the first frame image of the desktop live wallpaper. For the second mixed image, the electronic device can acquire the (N-1)th frame from the end of the lock screen live wallpaper and mix it with the second frame image of the desktop live wallpaper, and so on, until the mixed transition display of N frames of live wallpaper images is completed (i.e., the transition animation is played).
[0118] Figure 4 This demonstrates how to switch between live wallpapers from the lock screen to the home screen. Since electronic devices not only switch from the lock screen to the home screen, but also from the home screen to the lock screen, for example, when the device is displaying the home screen and the user presses the power button, or after a prolonged period of inactivity, the device will switch from the home screen to the lock screen. The process of switching from a live wallpaper on the home screen to a live wallpaper on the lock screen can be found in [reference needed]. Figure 4 The implementation shown only differs in the method of triggering wallpaper switching. Figure 4 In the T4 timeframe, the user's swipe to unlock the screen is replaced by detecting the user pressing the power button. Depending on the settings, different trigger scenarios can occur. For example, after the electronic device detects that the user has pressed the one-click lock screen control, the device switches from displaying the desktop interface to displaying the lock screen interface, playing a corresponding transition animation during the switch.
[0119] Besides the lock screen and desktop interface, the dynamic wallpaper switching display method of this application embodiment can be applied to switching between other interfaces, and these switching methods can all be referred to. Figure 4 The implementation shown only requires modifying the switching trigger conditions between different interfaces. For example, in the scenario of switching between the desktop interface and the always-on display, after the electronic device plays the desktop live wallpaper, it first plays the corresponding transition animation between the desktop live wallpaper and the always-on display live wallpaper, and then plays the always-on display live wallpaper after entering the always-on display.
[0120] The live wallpaper switching display method provided in this application embodiment can also be applied to switching between different live wallpapers on the same interface. For example, the method for switching between different live wallpapers on the same interface can also refer to... Figure 4 The implementation shown describes how to switch the live wallpaper displayed on the interface while keeping the interface unchanged. The switching can be automatic, such as automatically switching to the next live wallpaper after the previous one finishes playing. Alternatively, it can be manual, such as playing the next live wallpaper after the user taps the screen of the electronic device. Switching live wallpapers within the same interface can also be applied to scenarios where the live wallpaper is not currently applied, such as displaying a preview of the live wallpaper switching effect in the wallpaper application's preview interface. Other methods include... Figure 4 The relevant steps shown are implemented.
[0121] The dynamic wallpaper switching display method provided in this application is not only applicable to switching between different interfaces, but also to switching between different dynamic wallpapers on the same interface. When the interface remains unchanged, it can be referred to... Figure 4 The illustrated implementation switches the live wallpapers displayed on the interface. The switching method can be automatic, such as automatically switching to the next live wallpaper after one has finished playing. The switching method can also be manual, such as playing the next live wallpaper in response to a user tapping the screen. Furthermore, this method is also applicable to scenarios where the interface itself does not apply live wallpapers, such as displaying a preview of the live wallpaper switching effect in a wallpaper application preview interface. In these scenarios, this method can be adopted. Figure 4 The steps in the illustrated embodiment achieve a smooth dynamic wallpaper switching effect.
[0122] Wallpaper apps allow users to set different wallpapers for various interfaces. These wallpapers can be set by the user through the app or automatically configured by the app. In one application scenario, a wallpaper app can update the live wallpaper in real time based on the user's or electronic device's location. For example, a mobile device can determine the user's location using a satellite positioning system, and the wallpaper app can set the target interface's wallpaper to a live wallpaper related to the user's current location. For instance, if the app detects that the user is at a bus stop, it can configure a live wallpaper of a virtual character waiting at the bus stop for the target interface. The target interface can be the desktop interface, lock screen interface, or always-on screen interface, etc. Besides location, mobile devices can also identify the user's scene through other methods and then set wallpapers corresponding to the scene. In some embodiments, a wallpaper app can set only one interface's live wallpaper to change with the user's scene, while other interfaces have default or user-selected live wallpapers. For example, the wallpaper app can set the lock screen live wallpaper to a user-selected live wallpaper that does not change with the user's scene. The desktop live wallpaper can be set to update with the user's scene. In another embodiment, the wallpaper application can set the live wallpapers for each interface to update according to the user's scenario. For example, when the application detects that the user is running, the currently lit screen displays an animation of a virtual character running. When the user is waiting for a bus at a station, the currently lit screen displays an animation of a virtual character waiting for a bus at a station. These interfaces can be any interface on the mobile device. Besides automatically configuring live wallpapers based on the user's scenario, the wallpaper application can also automatically set the wallpapers for each interface in other ways. For example, it can determine appropriate live wallpapers based on weather, time, season, and trending news, and recommend or automatically configure live wallpapers for each interface to the user. The automatic live wallpaper configuration function of the wallpaper application can be a default function, such as automatically enabling the function after setting a wallpaper theme. Alternatively, the automatic live wallpaper configuration function of the wallpaper application can be optional for the user. For example, the wallpaper application can have an option for the user to enable or disable it.
[0123] For example, refer to Figures 5A to 5D The diagram shown is a scenario illustration of the dynamic wallpaper switching display method of this application applied to an environment-adaptive dynamic wallpaper.
[0124] like Figure 5A In one scenario shown, a user is waiting for a train at a station. The electronic device's lock screen live wallpaper is an animation of a virtual character running; the wallpaper application on the device is set to dynamically update based on the user's current location. For example... Figure 5AAs shown, since the user is not using the electronic device while waiting for the bus, the device switches from the lock screen to the off screen. At this time, the electronic device is in an unused state, with ample idle computing resources, allowing the wallpaper application to easily execute the environmentally adaptive live wallpaper step in the background. Specifically, the electronic device determines the user's location via satellite positioning, identifying the location as a bus station. The wallpaper application then downloads a desktop live wallpaper adapted to the user's current scene from the wallpaper server, such as an animation of a virtual character waiting for a bus at a station. Besides downloading from the wallpaper server, the wallpaper application can also search its local wallpaper library for a matching live wallpaper, or create a matching live wallpaper based on the user's scene. After the desktop live wallpaper is determined, the wallpaper application loads the first frame of the live wallpaper to prepare for subsequent transition animation playback. In this embodiment, the wallpaper application updates the live wallpaper while the electronic device is off, rather than when it is unlocked, to avoid the update process interfering with the user's normal use of the electronic device, which could cause a lag or stuttering experience. Since users have no need to use their phones when the screen is off, updating the live wallpaper in this state has minimal impact on the user experience. Similarly, the live wallpaper can also be updated when the electronic device's screen is off. However, when the electronic device's performance is sufficient, the live wallpaper can also be updated in real time when the electronic device is unlocked, and this application embodiment does not limit this.
[0125] After the user waited for and boarded the vehicle, they began using their mobile phone. While the electronic device was displaying a screen-off interface, the system detected the user pressing the power button to request screen activation. At this point, the electronic device displayed... Figure 5B The lock screen interface shown displays a live wallpaper (such as the virtual character running animation mentioned above). During this process, the wallpaper application captures the last frame of the live wallpaper.
[0126] When the electronic device detects that the user has performed a swipe-to-unlock operation, the wallpaper application creates and displays an image based on the last frame of the lock screen live wallpaper and the first frame of the desktop live wallpaper. Figure 5C The transition animation shown is a gradient blending effect. Figure 5C In the image, electronic devices display gradual transition animations of virtual characters running and boarding vehicles. These transition animations make the switch from lock screen live wallpaper to desktop live wallpaper smoother. The implementation method of these gradual transition animations can be found in [reference needed]. Figure 4 The description of the related embodiments shown will not be repeated here.
[0127] After the transition animation finishes, the electronic device displays the unlock screen, and as shown... Figure 5D As shown, the desktop live wallpaper displays a virtual character waiting for a train at a station. Then, if the user turns the electronic device's screen off and then on again, the lock screen live wallpaper transitions to the new desktop live wallpaper when the phone is unlocked. For example, it transitions from the animation of the virtual character waiting for a train at a station to the animation of the virtual character actually riding the train. It's clear that as the user's scene changes, the live wallpaper on the interface also updates accordingly. The specific implementation process is the same as the live wallpaper switching process mentioned above, and will not be repeated here.
[0128] above Figures 5A to 5D The example demonstrates a live wallpaper switching scenario between the lock screen and the desktop. In this scenario, the lock screen wallpaper and desktop wallpaper can be different live wallpapers. In some wallpaper application scenarios, users can set the lock screen wallpaper and desktop wallpaper to be the same live wallpaper through a wallpaper application. In these cases, the lock screen live wallpaper and desktop live wallpaper are a continuous video. For example, an animation of a virtual character running is playing on the lock screen. When the user swipes up to unlock the device, the electronic device switches from the lock screen to the desktop. The animation of the virtual character running on the lock screen is not interrupted or restarted. The electronic device then plays a continuous animation from the lock screen to the desktop. The screen elements change from lock screen elements to desktop elements. Specifically, for example, in addition to the virtual character running animation, the lock screen may display elements such as time, date, and weather. Some embodiments may also include elements to prompt the user to unlock the electronic device, such as displaying the words "Swipe up to unlock". When a user swipes up to unlock the device from the lock screen, the animation of a running virtual character continues uninterrupted, but the elements displayed on the screen change. At this point, the user perceives a transition from the lock screen to the home screen. Specifically, upon switching from the lock screen to the home screen, the font and position of the time and date display change; for example, the font size decreases and the display position shifts upwards. Additionally, application icons appear on the screen. Because the live wallpaper animation remains uninterrupted during this process (e.g., the running motion of the virtual character is continuous), the live wallpaper doesn't change during the switch from the lock screen to the home screen; the transition is very smooth and fluid, without any abruptness for the user.
[0129] In another embodiment, in addition to setting the lock screen wallpaper and desktop wallpaper to the same live wallpaper, users can also set the desktop wallpaper to be a frame of the lock screen wallpaper through the wallpaper application. That is, the lock screen is a live wallpaper, and the desktop wallpaper is a static wallpaper and a frame of the live wallpaper.
[0130] The following is an example illustrating this situation. For instance, the current live wallpaper playing on the lock screen is an animation of a virtual character running. When the user swipes up to unlock on the lock screen, the animation of the running character is interrupted, and the current frame of the animation at the time of swiping to unlock becomes the static wallpaper on the desktop. Since the desktop wallpaper is the last frame of the live wallpaper on the lock screen, there is a smooth transition when the lock screen switches to the desktop. In some embodiments, if the user does not unlock quickly from the lock screen, or if the live wallpaper animation is short, the animation may finish playing before the user unlocks. In this case, the lock screen will remain on the last frame of the live wallpaper. If the user then swipes up to unlock again from the lock screen, the last frame of the live wallpaper will be displayed as the static wallpaper on the desktop. In other embodiments, the static wallpaper on the desktop can be fixed to the last frame of the live wallpaper. This way, the user has already swiped up to unlock on the lock screen before the live wallpaper animation finishes playing. The lock screen will then wait for the live wallpaper animation to finish playing before switching to the desktop.
[0131] In other words, the same live wallpaper can be set on multiple screens. Therefore, the live wallpaper will not change according to the change of screen, but will be changed in other ways, such as the user clicking the screen to change the live wallpaper.
[0132] Reference Figures 5A to 5D The diagram shown is a schematic representation of another scenario of the dynamic wallpaper switching display method according to an embodiment of this application. Figure 4 Unlike the live wallpaper switching method shown, the live wallpaper switching method in this embodiment is not a switch between the lock screen live wallpaper and the desktop live wallpaper, but a switch between two live wallpapers on the same interface.
[0133] It should be noted that the live wallpaper mentioned below can refer to either a live wallpaper that plays continuously on the lock screen and desktop, or it can refer only to a live wallpaper that plays on the lock screen.
[0134] The following describes a scenario where two live wallpapers switch on the lock screen. Referring to the scenario shown in Figure 5 above, the wallpaper application can implement an environment-adaptive live wallpaper function. For example, when the electronic device detects that the user is moving at a speed of 5 km / h, the live wallpaper updates to an animation of a virtual character running. When the electronic device detects that it is at a station, the live wallpaper updates to an animation of a virtual character waiting for a train at the station. This involves switching between two live wallpapers. For easy distinction, we will use the live wallpaper before the update as the first live wallpaper and the live wallpaper after the update as the second live wallpaper.
[0135] As can be seen, switching between the first and second live wallpapers will also result in the same problem as the switch from lock screen live wallpaper to desktop live wallpaper described in the above embodiments. For example, switching directly from the first live wallpaper to the second live wallpaper without transition will cause the user to feel abrupt. The reasons for these problems can be directly referred to the relevant descriptions in the foregoing embodiments, and will not be repeated here.
[0136] The following first explains the application scenarios for switching between the first and second live wallpapers. (Refer to...) Figure 6 As shown, during time periods T1 to T3, the electronic device screen displays lock screen interface a, and the first live wallpaper a200 is played on lock screen interface a. Then, at time T4, due to the user not unlocking the device for an extended period, or the user actively pressing the power button, the screen switches to screen-off interface c. Screen-off interface c is a full-screen AOD display interface. (Refer to...) Figure 6 As shown, the first live wallpaper a200 is played or a frame of the first live wallpaper a200 is displayed in the always-on screen c. After the first live wallpaper a200 finishes playing during the time period T1 to T3 (the animation of the virtual character running with his hand constantly raising), the screen automatically enters the always-on screen c, which displays the last frame of the first live wallpaper a200 (the virtual character's hand is raised to its highest position).
[0137] To ensure smooth operation of the electronic device, the wallpaper app updates the second live wallpaper (a300) after the screen is off (e.g., after entering the always-on display). For example, the wallpaper app generates a new live wallpaper based on the user's current scene. If the user moves to a train station after turning off the screen, the wallpaper app can generate a live wallpaper that matches the current scene. Another example is generating a second live wallpaper (a300) based on the user's location at the station, showing a virtual character waiting for a train.
[0138] When a user presses the power button 610 of their electronic device while waiting for a ride (at time T5) or lights up the screen using other methods (such as facial recognition, eye tracking, or raise-to-wake), the screen-off interface c at time T5 still displays the first live wallpaper a200 or its last frame. If the second live wallpaper a300 were to start playing immediately, the user would perceive a choppy wallpaper transition, creating an abrupt feeling. Therefore, during the time period T6 to T8 after the screen is turned on, the screen switches from the off interface c back to the lock screen a, displaying a transition animation. This transition animation merges the first live wallpaper a200 (a virtual character running) with the second live wallpaper a300 (a virtual character waiting at a station). Through this animation, the transition from the first live wallpaper a200 to the second live wallpaper a300 is smooth. After the transition animation finishes, the second live wallpaper a300 plays on the lock screen a during the time period T9 to T11. After the second live wallpaper a300 finishes playing, the lock screen a displays the last frame of the second live wallpaper a300. When the user slides up to unlock the device on the lock screen at time T12, the screen of the electronic device will switch from the lock screen a to the desktop screen b at time T13, and the desktop screen b will also display the last frame of the second live wallpaper a300. The user will not experience any abruptness in this process. It is evident that as the user's environment changes, the live wallpaper on the screen will also change accordingly. The specific implementation process is the same as the live wallpaper switching process mentioned above, and will not be repeated here.
[0139] Combination Figures 4 to 6 This application provides a method and related apparatus for switching and displaying live wallpapers, which can solve problems such as abrupt transitions and poor visual effects during live wallpaper switching in related technologies. The method and apparatus display a mixed animation effect by acquiring the last few frames of the previous live wallpaper and the first few frames of the next live wallpaper. After the previous live wallpaper finishes playing, the mixed animation effect of the two live wallpapers is played first, followed by the next live wallpaper. This method achieves a smoother and more natural transition during live wallpaper switching, effectively avoiding sudden changes in screen content. Furthermore, this gradual transition method effectively improves the user's visual experience, thereby significantly enhancing the user experience.
[0140] Reference Figure 7 As shown, Figure 7 This is a schematic diagram illustrating the structure of an electronic device according to an embodiment of this application. The electronic device 100 can be a smart device such as a mobile phone or tablet, and is not specifically limited here. Figure 7As shown, the electronic device 100 may include a processor 1010, internal memory 1021, power management module 1041, battery 1042, antenna 1, antenna 2, mobile communication module 1050, wireless communication module 1060, sensor module 1080, button 1090, motor 1091, indicator 1092, camera 1093, display screen 1094, etc. The sensor module 1080 may include a pressure sensor 1080A, gyroscope sensor 1080B, accelerometer sensor 1080C, distance sensor 1080D, proximity sensor 1080E, fingerprint sensor 1080F, touch sensor 1080G, and ambient light sensor 1080H, etc.
[0141] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0142] The processor 1010 may include one or more processing units. For example, the processor 1010 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors.
[0143] The controller can generate operation control signals based on the instruction opcode and timing signals to complete the control of instruction fetching and execution.
[0144] Furthermore, the processor 1010 is also used to retrieve instructions from the memory to implement the dynamic wallpaper switching display method provided in the embodiments of this application, and to proceed according to the retrieved instructions... Furthermore, it is understood that the interface connection relationships between the modules illustrated in the embodiments of this application are merely illustrative and do not constitute a structural limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.
[0145] The wireless communication function of electronic device 100 can be implemented through antenna 1, antenna 2, mobile communication module 1050, wireless communication module 1060, modem processor and baseband processor, etc.
[0146] The mobile communication module 1050 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to electronic devices 100.
[0147] The wireless communication module 1060 can provide a wireless communication solution for use in the electronic device 100. The wireless communication module 1060 can be one or more devices integrating at least one communication processing module. The wireless communication module 1060 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering on the electromagnetic waves, and then sends the processed signal to processor 1010. The wireless communication module 1060 can also receive signals to be transmitted from processor 1010, perform frequency modulation and amplification on them, and then convert them into electromagnetic waves for radiation via antenna 2.
[0148] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 1050, and antenna 2 is coupled to wireless communication module 1060, so that electronic device 100 can communicate with networks and other devices through wireless communication technology.
[0149] Electronic device 100 can perform shooting functions through ISP, camera 1093, video codec, GPU, display screen 1094 and application processor.
[0150] The software system of electronic device 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This application embodiment uses the layered architecture Android system as an example to exemplify the software structure of electronic device 100.
[0151] Figure 8 This is a schematic diagram of the system software architecture of the electronic device 100 according to an embodiment of this application. The layered architecture divides the software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the Application Layer, the Application Framework Layer, the System Libraries Layer, and the Kernel Layer. The Android runtime is located between the Application Framework Layer and the System Libraries Layer.
[0152] The application layer can include a series of application packages (Android application packages, APKs). For example... Figure 8 As shown, the application package can include applications such as camera, gallery, video, music, navigation, calendar, map, call, WLAN, Bluetooth, SMS, themes, video and animation creation, wallpaper, system UI (System User Interface, systemUI), and desktop.
[0153] The system user interface (SystemUI) provides the basic display interface for electronic devices. Examples include the status bar at the top of the screen, the navigation bar at the bottom of the screen, the quick settings bar in the drop-down menu, the notification bar, the lock screen, the volume control dialog box, and the screenshot display interface. The system user interface includes the lock screen application, which manages and displays the core components of the lock screen interface, providing the main entry point for users to interact with it.
[0154] The launcher is the core component responsible for managing and displaying the desktop interface, providing users with the primary entry point for interacting with the desktop. Its main functions include managing and organizing application icons, supporting the addition and display of widgets, providing an application drawer to access all installed applications, integrating search functionality, offering customization options (such as changing grid size, adjusting icon size, and selecting themes), supporting gesture controls, and providing intelligent application recommendations.
[0155] Video and animation creation applications are used to create live wallpapers. These applications can create live wallpapers based on triggered events or download them from wallpaper servers. For example, they can create or download live wallpapers based on weather, time, or trending news. Alternatively, they can create or download live wallpapers based on the scene the electronic device is in. For instance, if the application detects that the mobile device is at a train station, it generates a live wallpaper of a virtual character waiting for a train. If it detects that the mobile device is on a train, it generates a live wallpaper of a virtual character riding the train. The live wallpapers generated by video and animation creation can be saved as video files to video storage space.
[0156] Wallpaper applications are used to manage and set wallpapers for electronic devices (e.g., lock screen wallpapers, desktop wallpapers, or always-on wallpapers). Wallpapers can include static wallpapers and live wallpapers. This application primarily focuses on live wallpapers. Wallpaper applications can access storage space for storing live wallpapers or obtain the storage location of live wallpapers, and set these live wallpapers as the live wallpapers for the corresponding interfaces. In some embodiments, wallpaper applications can access video files of live wallpapers generated by video and animation production applications, and set these videos as the live wallpapers for the corresponding interfaces. Wallpaper applications provide wallpaper preview, selection, and application functions, allowing users to customize wallpaper display parameters, such as playback speed and looping mode. Furthermore, wallpaper applications can also implement automatic wallpaper switching functions, automatically changing the wallpaper for each interface based on time, location, or other user-defined conditions.
[0157] It is understood that video creation applications, wallpaper applications, and systemUI applications can exist independently or as part of any application in the application layer. For example, the wallpaper service module can exist in the theme application. This application embodiment does not specifically limit this.
[0158] The application framework layer provides the application programming interface (API) and programming framework for applications. The application framework layer includes some predefined functions. For example... Figure 8 As shown, the application framework layer may include a theme framework module, a wallpaper layer manager, a wallpaper management service (WallpaperManagerService), a texture model (Texture Model), a power manager (PowerManager), a media player (MediaPlayer), a media decoder (MediaCodec), an image data cache controller (Surfaceholder), an image data view browser (GLSurfaceView), and an image data texture processor (SurfaceTexture).
[0159] The power manager is responsible for managing power and common phone functions, such as triggering screen on / off, brightness adjustment, low power mode, and keeping the CPU awake. The power manager includes an always-on display (AOD) service and a power management service (PowerManagerService). The power management service manages the standby state and wake-up of the electronic device, while the always-on display (AOD) service (which can be a DreamService) manages the always-on display functionality. When a user enters a screen-off trigger operation while the electronic device is on (e.g., pressing the power button), the power management service controls the electronic device to enter standby mode and turn off the screen. Generally, the screen goes black immediately after the electronic device is turned off. However, for electronic devices with AOD enabled, the always-on display (AOD) service detects whether the user has performed a screen-off unlock operation (e.g., pressing the power button while the screen is off). If the user has performed a screen-off unlock operation, the always-on display (AOD) service calls the wallpaper management service (described in detail later) to display the always-on wallpaper, such as the always-on display clock mentioned earlier. When a user enters a screen-on trigger operation while the electronic device is on (e.g., pressing the power button again), the power management service controls the electronic device to enter the lock screen interface while the screen is on. At this point, the power management service will invoke the wallpaper management service to display a live wallpaper on the lock screen, such as the live wallpaper of a virtual character running mentioned earlier. Additionally, the power management service will detect whether the user is performing any further unlocking operations on the electronic device. If it detects that the user has unlocked the electronic device (e.g., swiping to unlock on the lock screen), the power management service will control the electronic device to enter the unlock screen and invoke the wallpaper management service to display a live wallpaper on the desktop, such as the live wallpaper of a user waiting for a train at a station mentioned earlier.
[0160] The theme framework module offers users a variety of wallpaper themes to choose from. Each theme contains multiple wallpapers. Users can select a theme and then choose wallpapers from within that theme. For example, a landscape theme might include wallpapers like Landscape 1, Landscape 2, and so on. Users can select a theme and then choose wallpapers from within that theme. These wallpapers can be imported during initialization or created by the video and animation production applications mentioned above. In cases where wallpapers are created using animation production applications, users can choose not to select wallpapers from a theme, but instead directly display a desktop wallpaper that matches their current environment.
[0161] The Wallpaper Layer Manager manages the wallpaper layers of the electronic device 100. It works closely with the Wallpaper Management Service to ensure that wallpapers are displayed at the correct layer. The previous examples displayed a single static or dynamic wallpaper (static wallpapers include a clock when the screen is off, dynamic wallpapers include a running character), but multiple wallpapers can also be displayed in layers. For example, a wallpaper of blue sky and white clouds can be overlaid with a wallpaper of a bird. This layered display of wallpapers is managed by the Wallpaper Layer Manager. The Wallpaper Layer Manager handles the properties of the wallpaper window, such as size and display order, and also manages the display of elements above the wallpaper (such as desktop icons).
[0162] The wallpaper management service includes a wallpaper engine, which manages the operation and switching of wallpapers, and provides an interface for manipulating wallpapers to the outside world through a wallpaper server class. As mentioned earlier, displaying the always-on wallpaper, lock screen wallpaper, and desktop wallpaper are all achieved by calling the wallpaper management service.
[0163] An image data texture processor (SurfaceTexture) is used to convert image frames in a live wallpaper into textures that can be directly used by a 3D graphics processing library. The image data texture processor can convert the image frames of the live wallpaper into textures so that the 3D graphics processing library, mentioned below, can proportionally blend the textures of different live wallpapers to form a transition animation when the live wallpaper changes display. Therefore, this embodiment of the disclosure uses an image data texture processor to convert the image frames of the live wallpaper, obtaining converted textures, which are then placed in a dedicated storage space. When creating the transition animation when the live wallpaper changes display, the 3D graphics processing library retrieves the last few frames of the converted texture of the live wallpaper before the change, and the first few frames of the converted texture of the live wallpaper after the change, from the dedicated storage space. These textures are then proportionally blended to obtain the transition animation when the wallpaper changes display. The number of image data texture processors is determined by the number of live wallpapers that need to be blended. Figure 8 As shown, the system software architecture in this embodiment includes a first image data texture processor and a second image data texture processor. The first image data texture processor is used to process the texture transformation of the live wallpaper before switching (e.g., processing the lock screen live wallpaper). The second image data texture processor is used to process the texture transformation of the live wallpaper after switching (e.g., processing the desktop live wallpaper). The system software architecture can be configured with more image data texture processors as needed, which will not be elaborated here.
[0164] A media decoder is used for decoding media data. For video data, it must be decoded by the media decoder before it can be displayed correctly. The data acquired by the image data texture processor mentioned above needs to be data decoded by the media decoder. The media decoder retrieves the live wallpaper video file to be decoded from the video storage space and decodes the live wallpaper video file to obtain at least one frame of image (each frame can also be called an image frame of the live wallpaper). The media decoder then converts the decoded image frames of the live wallpaper into textures. This texture is ultimately used by the 3D graphics processing library to generate the live wallpaper that is finally displayed on the electronic device, or to generate the transition animation displayed when the live wallpaper changes display. Figure 8 The application framework layer shown has two media decoders: a first media decoder and a second media decoder. The first media decoder processes the video file corresponding to the live wallpaper before the switch, and the second media decoder processes the video file corresponding to the live wallpaper after the switch. In practice, the application framework layer can be configured with the appropriate number of media decoders based on the number of live wallpaper video files that need to be decoded. For example, when switching between three live wallpapers, three media decoders can be configured.
[0165] The image data cache (Surface) provides a canvas for the application layer to draw and render the user interface, and also acts as a bridge between the application layer and the system runtime. In this embodiment, the image data cache is used to store image frames decoded by the media decoder. The video files of the live wallpaper (e.g., desktop live wallpaper video files, lock screen live wallpaper video files, etc.) are first decoded by the media decoder, and the decoded image frames (e.g., desktop wallpaper image frames, lock screen wallpaper image frames) are stored in the image data cache. The image data texture processor reads the image frames in the image data cache and converts them into textures (e.g., desktop wallpaper textures, lock screen wallpaper textures). This differs from image data caches in related technologies, where the cached image frames are directly used for displaying the live wallpaper. In this embodiment, they must be decoded by the media decoder and converted into textures by the image data texture processor before the transition animation between live wallpapers can be rendered. In one embodiment, the number of image data caches in the application framework layer is the same as the number of media decoders; for example, a first image data cache and a second image data cache are provided in the application framework layer. The first image data cache is used to store the live wallpaper image frames decoded by the first media decoder. The second image data cache is used to store the live wallpaper image frames decoded by the second media decoder.
[0166] The image data cache controller (SurfaceHolder) is the management interface for the image data cache, responsible for controlling the lifecycle of the image data cache and providing access methods to the image data cache. In this embodiment of the disclosure, when rendering transition animations between dynamic wallpapers in a 3D graphics processing library, the type of transition animation and the number of frames of the transition animation are controlled by the image data cache controller.
[0167] The SurfaceView, an image data view browser, manages the rendering of textures by the 3D graphics library. Specific rendering parameters for transition animations between live wallpapers, such as the blending ratio of the live wallpaper textures before and after the transition, are determined by the SurfaceView. In other words, the image data cache controller sends overall control parameters, such as the type of transition animation, to the SurfaceView, which then determines the specific rendering parameters for texture rendering by the 3D graphics library.
[0168] A texture model guides the 3D image processing library on how to bind, apply, and render textures. The texture model manages the visual properties and detail rendering of 3D object surfaces. It defines how to accurately map 2D image data to 3D geometric surfaces and controls the texture hierarchy, size, and display order. In embodiments of this disclosure, the image data cache controller sends overall control parameters to the image data view browser, which in turn sends specific rendering parameters to the texture model, which then guides the 3D image processing library in texture rendering.
[0169] In addition, the application framework layer may also include a window manager, content provider, view system, phone manager, resource manager, notification manager, etc. Figure 8 (Not shown in the image).
[0170] The window manager is used to manage windowed applications. It can obtain the screen size, determine if a status bar is present, lock the screen, and capture screenshots. The content provider stores and retrieves data, making that data accessible to applications. This data can include video, images, audio, made and received phone calls, browsing history and bookmarks, phone books, etc.
[0171] A view system includes visual controls, such as controls for displaying text and controls for displaying images. View systems can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text notification icon could include views for displaying text and views for displaying images.
[0172] The phone manager is used to provide communication functions for electronic device 100. For example, it manages call status (including connection and disconnection).
[0173] The file explorer provides applications with various resources, such as localized strings, icons, images, layout files, video files, and more.
[0174] The notification manager allows applications to display notifications in the status bar. Notifications can disappear automatically after a short pause, requiring no user interaction. Notifications can be used to announce download completion, message alerts, etc. Notifications can appear as icons or scrolling text in the top status bar, such as notifications from background applications, or as dialog boxes on the screen.
[0175] The Android runtime resides between the application framework layer and the system runtime libraries, comprising the core libraries and the virtual machine. The Android runtime is responsible for the scheduling and management of the Android system. The core libraries consist of two parts: one part contains the functionalities that Java needs to call, and the other part comprises the Android core libraries. The application layer and application framework layer run within the virtual machine. The virtual machine executes the Java files from the application layer and application framework layer into binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.
[0176] A system runtime library can include multiple functional modules. For example, a media library, a 3D graphics processing library (e.g., OpenGL), etc.
[0177] The media library supports playback and recording of various commonly used audio and video formats, as well as static image files. In this embodiment, the image data texture processor converts the dynamic wallpaper image frames into textures, which can be stored in the media library's dedicated storage space for use by the 3D graphics processing library when generating transition animations for dynamic wallpaper switching. The media library supports various audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0178] The 3D graphics processing library is used to perform 3D graphics drawing, image rendering, compositing, and layer processing based on image textures. In this embodiment, the image data texture processor calls the 3D graphics processing library to proportionally blend the dynamic wallpaper texture before and after the display switch to generate a transition animation, reducing abruptness when the dynamic wallpaper switches displays.
[0179] The kernel layer is the layer between hardware and software. The kernel layer includes at least the display driver, camera driver, audio driver, sensor driver, and touchscreen driver.
[0180] The following combination Figure 7The schematic diagram of the electronic device shown and Figure 8 The system software architecture shown is for Figure 4 The scenario of an electronic device entering the desktop from the lock screen is described below, along with the execution process of the electronic device. It should be noted that the following is only one scenario of live wallpaper switching; this application embodiment is not limited to this scenario. The live wallpaper switching process in any of the scenarios mentioned above can be referred to in the following description.
[0181] In one embodiment, a user can set both a lock screen live wallpaper and a desktop live wallpaper through a wallpaper application. After setting these wallpapers, they are saved in a designated path on the electronic device. In another embodiment, a user can set an environment-adaptive desktop wallpaper as described above through the wallpaper application. When this function is activated, if the electronic device detects a change in the user's environment, it generates a new desktop live wallpaper using a video and animation creation application and saves it to a designated path on the electronic device (e.g., in the video storage space mentioned above). Then, the wallpaper application initializes a wallpaper management service. This service creates a wallpaper engine and an image data cache controller, and configures an image data view browser that matches the screen size of the electronic device. The image data view browser creates a texture model and an image data texture processor based on the wallpaper engine's configuration. To ensure smooth switching between the lock screen and desktop live wallpapers, a first and a second image data texture processor are configured. The first image data texture processor processes the image frames of the lock screen live wallpaper and generates its texture. The second image data texture processor processes the image frames of the desktop live wallpaper and generates its texture. Accordingly, the first media decoder, the second media decoder, the first image data cache, and the second image data cache mentioned above were also set up.
[0182] When the power management service detects a user's screen-off trigger operation, it sends a screen-off trigger command to the image data cache controller via the systemUI. The image data cache controller instructs the second media decoder to decode the first few frames of the live wallpaper, and under the control of the second image data texture processor, converts the decoded data into a wallpaper texture and stores it in the graphics processor's video memory. For example, it stores it in the second texture storage space corresponding to the second image data texture processor within the video memory. The number of images decoded by the second media decoder can be set according to the requirements of the transition animation. For example, it can be set based on the playback duration of the transition animation and the desired effect of the gradient transition. For instance, the second media decoder can decode only the first frame of the live wallpaper.
[0183] After the first few frames of the desktop live wallpaper have been decoded, the image data view browser informs the image data cache controller that it is ready to play the transition animation.
[0184] When the power management service detects a user's screen-on trigger operation, it sends a screen-on trigger command to the image data cache controller via the systemUI. The image data cache controller then instructs the first media decoder to decode the lock screen live wallpaper. Under the control of the first image data texture processor, the decoded image frames of the lock screen live wallpaper are converted into textures and stored in the graphics processor's video memory. For example, they are stored in the first texture storage space corresponding to the first image data texture processor within the video memory. Then, the first image data texture processor calls the texture rendering interface of the 3D graphics processing library through the texture model, causing the 3D graphics processing library to read the texture from the first texture storage space and render the lock screen live wallpaper on the lock screen interface.
[0185] When the power management service detects the user's unlock trigger operation, it sends an unlock trigger command to the image data cache controller through the systemUI. At this time, the graphics processor's video memory stores the lock screen wallpaper texture and the desktop wallpaper texture (specifically, the lock screen wallpaper texture is stored in the first texture storage space and the desktop wallpaper texture is stored in the second texture storage space).
[0186] The image data cache controller calls the motion effects interface to pass overall control parameters to the image data view browser. The image data view browser determines specific rendering parameters such as the texture blending ratio and fade-in / fade-out order for the lock screen wallpaper and desktop wallpaper based on these overall control parameters. The image data view browser then calls the texture rendering interface of the 3D graphics processing library through the texture model to read the textures of the last few frames of the lock screen wallpaper and the previous few frames of the desktop wallpaper from the graphics processor's memory. The 3D graphics processing library performs blending processing according to the rendering parameters and then renders the images on the screen, playing the transition animation when switching between the lock screen live wallpaper and the desktop live wallpaper.
[0187] After the transition animation completes, the image data view browser instructs the image data cache controller to play the live wallpaper. At this point, the image data cache controller instructs the second media decoder to decode the live wallpaper and, under the control of the second image data texture processor, converts the decoded image frames into textures and stores them in the graphics processor's video memory. For example, it stores them in the second texture storage space corresponding to the second image data texture processor within the video memory. Then, the second image data texture processor calls the texture rendering interface of the 3D graphics processing library through the texture model, causing the 3D graphics processing library to read the textures in the second texture storage space and render the live wallpaper on the desktop interface.
[0188] The live wallpaper switching display method described in the above embodiments displays a mixed animation effect by acquiring the last few frames of the lock screen live wallpaper and the first few frames of the desktop live wallpaper. After the lock screen live wallpaper finishes playing, the mixed animation effect of the desktop live wallpaper and the lock screen live wallpaper is played first, followed by the desktop live wallpaper. This method achieves a smoother and more natural transition during live wallpaper switching, effectively avoiding sudden changes in screen content. Furthermore, this gradual transition method effectively enhances the user's visual experience, thereby significantly improving the overall user experience.
[0189] In one embodiment of this application, a single wallpaper service can be used to achieve the following: Figure 8 The above describes a method for switching live wallpapers. In other words, only one wallpaper service is needed to perform this method.
[0190] See Figure 9 As shown below, the following explains how to initialize the relevant execution modules of the live wallpaper switching display method using a single wallpaper service. First, the wallpaper application creates a wallpaper engine and an image data cache controller through the wallpaper management server. Then, an image data view browser is created. The image data view browser creates two external texture IDs, for example, a first texture ID corresponding to the lock screen live wallpaper and a second texture ID corresponding to the desktop live wallpaper. After creating the texture IDs, corresponding texture storage space can be allocated in the graphics processor's video memory based on the texture IDs. For example, a first texture storage space corresponding to the first texture ID and a second texture storage space corresponding to the second texture ID can be allocated in the graphics processor's video memory. Then, the image data view browser creates corresponding image data texture processors based on the texture IDs. For example, a first image data texture processor corresponding to the first texture ID and a second image data texture processor corresponding to the second texture ID. After creating the image data texture processors, each image data texture processor creates a corresponding image data cache. For example, the first image data texture processor creates a first image data cache, and the second image data texture processor creates a second image data cache. Then, the image data cache controller creates a media decoder. This can involve the image data cache controller creating a new media decoder and sending image data cache reference information to the media decoder, making it the media decoder for the corresponding image data texture processor. For example, a first media decoder is created as the producer of a first image data cache, and a second media decoder is created as the producer of a second image data cache. It should be noted that... Figure 9 The various functional modules in the introduction Figure 8 The system software architecture shown has been described in detail and will not be repeated here.
[0191] See Figure 10As shown, the system software architecture initialized through a single wallpaper service can be based on... Figure 10 The software architecture shown is divided into two parts: a single wallpaper service initialization system software architecture and a live wallpaper display architecture. The live wallpaper display architecture is used to display live wallpapers in various interfaces, while the multi-wallpaper transition display architecture is used to implement transition effects during live wallpaper switching. Both the live wallpaper display architecture and the multi-wallpaper transition display architecture under the single wallpaper service obtain the materials for playing live wallpapers and creating transition animations from the video storage space. These materials can be the live wallpaper video files mentioned above.
[0192] Figure 10 The document also presents a video and animation creation application, which, as mentioned above, can generate live wallpapers that match the user's environment in real time. In another embodiment, these live wallpapers are not generated but downloaded from a server. The video and animation creation application may include a live wallpaper download module. This module can download live wallpapers that match the user's environment from the server. For example, the live wallpaper download module can save the video files of the lock screen live wallpaper and the desktop live wallpaper to a video storage space for use by the live wallpaper display architecture or multi-wallpaper transition display architecture.
[0193] The following is combined with Figure 11 ,illustrate Figure 10 The working process of the display architecture of the single wallpaper service in [the context of the application]. For ease of understanding, Figure 11 China and Israel Figure 4 The process of switching from a lock screen live wallpaper to a desktop live wallpaper is described below. In practice, this can be applied to switching between any live wallpapers.
[0194] See Figure 11 As shown, after the electronic device enters the screen-off state, the second media decoder decodes the desktop live wallpaper video file in the video storage space to obtain the image frame of the desktop live wallpaper. The second media decoder stores this image frame in the second image data cache. The second image data texture processor converts the image frame in the second image data cache into a desktop wallpaper texture that can be directly used by the 3D graphics processing library rendering pipeline. The second image data texture processor stores this desktop wallpaper texture in the corresponding second texture storage space in the graphics processor's video memory.
[0195] When the electronic device's screen is turned on, it enters the lock screen interface. The first media decoder decodes the lock screen live wallpaper video file in the video storage space to obtain the lock screen live wallpaper image frame. The first media decoder stores this image frame in the first image data cache. The first image data texture processor converts the lock screen live wallpaper image frame into a lock screen wallpaper texture that can be directly used by the 3D graphics processing library rendering pipeline. The first image data texture processor caches this lock screen wallpaper texture in the first texture storage space. At this time, the lock screen live wallpaper is displayed by the aforementioned live wallpaper display framework. Specifically, the first image data texture processor reads the lock screen wallpaper texture from the first texture storage space by calling the 3D graphics processing library and renders it onto the lock screen interface through the rendering pipeline, thus realizing the playback of the lock screen live wallpaper video file.
[0196] When an electronic device detects that a user has performed an unlock operation on the lock screen (e.g., swiping up to unlock), it begins to display an animation transitioning from the lock screen live wallpaper to the desktop live wallpaper. The rendering pipeline of the 3D graphics processing library retrieves the last few frames of texture from the lock screen live wallpaper from the first texture storage space and the first few frames of texture from the desktop live wallpaper from the second texture storage space. These textures are then blended proportionally and rendered onto the screen of the electronic device to achieve the display of the multi-wallpaper transition animation.
[0197] After the transition animation finishes playing, the electronic device displays the desktop interface. Simultaneously, the second media decoder continues decoding the live wallpaper video file in the video storage space, obtaining the live wallpaper image frame. The second media decoder stores this image frame in the second image data cache. The second image data texture processor converts the live wallpaper image frame into a desktop wallpaper texture that can be directly used by the 3D graphics processing library's rendering pipeline. The second image data texture processor caches this desktop wallpaper texture in the second texture storage space. At this point, the aforementioned live wallpaper display framework displays the live wallpaper. Specifically, the second image data texture processor reads the desktop wallpaper texture from the second texture storage space by calling the 3D graphics processing library and renders it onto the desktop interface through the rendering pipeline, thus enabling the playback of the live wallpaper video file. This completes the switch from lock screen live wallpaper to desktop live wallpaper.
[0198] It needs to be reiterated above. Figure 11 The previous description focused on switching from a lock screen live wallpaper to a desktop live wallpaper. However, the live wallpaper switching solution in this application can be applied to switching live wallpapers and the switching order between any two interfaces. Figure 11In the illustrated live wallpaper switching scheme, the first media decoder, the first image data cache, the first image data texture processor, and the first texture storage space are used to process the lock screen live wallpaper video file before the switch. Conversely, the second media decoder, the second image data cache, the second image data texture processor, and the second texture storage space are used to process the lock screen live wallpaper video file after the switch.
[0199] For example, consider the scenario where the desktop video switches to the lock screen video. In this scenario, Figure 11 The first media decoder shown decodes not the lock screen live wallpaper, but the desktop live wallpaper. This is because, in this scenario, the live wallpaper before the switch is the lock screen live wallpaper. Correspondingly, the switch from the desktop live wallpaper to the lock screen live wallpaper is triggered not by the user's unlocking action, but by the user's locking action on the electronic device.
[0200] The switching principle of live wallpapers is similar when switching between different interfaces. For example, when switching from an always-on live wallpaper to a lock screen live wallpaper, the first media decoder processes the always-on live wallpaper video file, while the second media decoder processes the desktop live wallpaper video file. The switching condition for the two live wallpapers is that the electronic device detects a user input command to turn on the screen. Similar live wallpaper switching between different interfaces can be referred to the above description; further comparisons will not be repeated here.
[0201] For switching between different live wallpapers on the same interface, you can also refer to... Figure 11 The processing method is illustrated below. For example, switching between two live wallpapers on the lock screen. The first media processor processes the live wallpaper video file before the switch, and the second media processor processes the live wallpaper video file after the switch. The triggering conditions vary depending on the user's or mobile terminal system settings; for example, clicking the space on the screen to change the wallpaper triggers the switch. The live wallpaper switching display method provided in this application can be applied to switching between any live wallpapers, and will not be elaborated upon here.
[0202] See Figure 12 The system architecture diagram shown illustrates the process of switching live wallpapers. It's evident that all system modules used in the live wallpaper switching process operate within a single wallpaper service. Specifically, the first media decoder, second media decoder, first image data cache, second image data cache, first image data texture processor, and second image data texture processor required for live wallpaper switching all run within a single wallpaper service. Performing live wallpaper switching within a single wallpaper service offers advantages such as lower resource consumption and avoidance of failures caused by asynchronous operations across multiple services.
[0203] To more clearly illustrate the above advantages, another possible implementation of the live wallpaper switching display method in this application is described below. In this implementation, the switching between live wallpapers is accomplished using a dual wallpaper service.
[0204] See Figure 13 The wallpaper switching service flowchart shown below illustrates that the process first requires creating two independent wallpaper services, such as a lock screen wallpaper service and a desktop wallpaper service, both inheriting from the same wallpaper service class. Each wallpaper service creates its own wallpaper engine. The wallpaper engine is the program and rules that implement the wallpaper service. The lock screen wallpaper service creates its lock screen wallpaper engine. The desktop wallpaper service creates its desktop wallpaper engine. These wallpaper engines inherit from the same wallpaper engine class. Then, within their respective wallpaper engines, wallpaper resources are initialized, and the display and update logic for the wallpapers is set.
[0205] In the wallpaper service, an image data cache controller is used to manage the wallpaper rendering process. The image data cache controller provides an abstract interface that controls the size and format of the image data cache. Through the image data cache controller, the image data cache can be configured to manage the display and updating of wallpapers. Then, the image data cache controller retrieves data from the corresponding wallpaper service's image data cache and passes it to the decoder for decoding. After decoding the data in the image data cache, the decoder stores the decoded data in the image data cache's buffer queue. Then, the image data compositing service module (SurfaceFlinger) reads the data from the buffer queue for wallpaper display.
[0206] Specifically, in the lock screen wallpaper service, under the control of the lock screen wallpaper engine, the dynamic image of the lock screen wallpaper enters the first image data cache configured by the first image data cache controller. The first image data cache controller retrieves the dynamic images stored in the first image data cache frame by frame and hands them over to the first media decoder for decoding processing. After decoding the frame data in the first image data cache, the first media decoder stores the decoded frame data in the buffer queue of the decoded image data cache. Then, the data in the buffer queue is read by the first image data cache controller and handed over to the lock screen image data synthesis service module for displaying the lock screen wallpaper. In the desktop wallpaper service, under the control of the desktop wallpaper engine, the dynamic image of the desktop wallpaper enters the second image data cache configured by the second image data cache controller. The second image data cache controller retrieves the dynamic images stored in the second image data cache frame by frame and hands them over to the second media decoder for decoding processing. After decoding the frame data in the second image data cache, the second media decoder stores the decoded frame data in the buffer queue of the second image data cache. Then, the data in the buffer queue is read by the desktop image data synthesis service module and handed over to the desktop image data synthesis service module for displaying the desktop wallpaper.
[0207] exist Figure 13 In the illustrated scheme, when the lock screen wallpaper needs to be displayed, the lock screen wallpaper service operates, displaying the live lock screen wallpaper through the cooperation of the first image data cache controller, the first image data cache, the first media decoder, and the lock screen image data synthesis service module. When the lock screen wallpaper needs to be switched to the desktop wallpaper, the lock screen wallpaper service and the desktop wallpaper service operate simultaneously, transitioning the lock screen wallpaper to the desktop wallpaper through the cooperation of the first image data cache controller, the first image data cache, the first media decoder, and the lock screen image data synthesis service module, as well as the cooperation of the second image data cache controller, the second image data cache, the second media decoder, and the desktop image data synthesis service module. When the desktop wallpaper needs to be displayed, the desktop wallpaper service operates, displaying the live desktop wallpaper through the cooperation of the second image data cache controller, the second image data cache, the second media decoder, and the desktop image data synthesis service module.
[0208] Figure 12 The single wallpaper service shown implements the method of switching and displaying dynamic wallpapers. Figure 13 The main differences between the two wallpaper options shown are as follows.
[0209] first, Figure 12 It only offers a single wallpaper service, while Figure 13 It has two wallpaper management services. Because... Figure 13The system has two wallpaper management services, one for displaying lock screen live wallpapers and the other for displaying desktop live wallpapers. When a transition animation needs to be added between the lock screen and desktop live wallpapers, both wallpaper management services need to work simultaneously for a period of time. The result rendered on the screen is a fusion of portions of the lock screen and desktop live wallpapers.
[0210] because Figure 12 Since there's only one wallpaper service, two image data texture processors (a first image data texture processor and a second image data texture processor) are needed to generate corresponding wallpaper textures for the lock screen live wallpaper and the desktop live wallpaper, respectively. Then, the 3D graphics processing library rendering pipeline merges the textures of the later frames of the lock screen live wallpaper and the earlier frames of the desktop live wallpaper to obtain the transition animation when switching between the lock screen and desktop live wallpapers. In a single wallpaper management service, the 3D graphics processing library proportionally merges the textures of the two converted live wallpapers to achieve a smooth transition between the lock screen and desktop live wallpapers.
[0211] In addition, Figure 13 In this system, the image data cache is directly controlled by the image data cache controller. The wallpaper image data stored within is decoded by the media decoder and then directly used for playback. However, in... Figure 12 In this process, the image data cache is controlled by the image data texture processor. Furthermore, the wallpaper image frames stored in the image data cache, after being decoded by the media decoder, are converted into corresponding wallpaper textures by the image data texture processor before being rendered by the 3D graphics processing library rendering pipeline. Figure 13 In the process, the image data synthesis service module completes the rendering of the lock screen wallpaper and desktop wallpaper, but... Figure 12 In this process, the 3D graphics processing library rendering pipeline renders the lock screen wallpaper and desktop wallpaper. As mentioned above, the 3D graphics processing library rendering pipeline can proportionally blend the lock screen wallpaper texture and desktop wallpaper texture to obtain a transition animation, thereby achieving a smooth transition effect between the lock screen live wallpaper and the desktop live wallpaper. Since the 3D graphics processing library rendering pipeline can render transition animations by rendering textures, it can also render the lock screen live wallpaper or desktop live wallpaper independently. Therefore, Figure 12 In this system, the 3D graphics processing library rendering pipeline is used to render the lock screen live wallpaper and the desktop live wallpaper.
[0212] because Figure 13In the illustrated method of switching live wallpapers, two wallpaper services operate simultaneously when switching from one live wallpaper to another, creating a dynamic effect. This method not only increases system resource consumption but may also lead to increased power consumption and memory usage. Furthermore, multiple wallpaper services are difficult to synchronize; a failure in one service typically causes another to fail as well.
[0213] and Figure 13 In the illustrated method for switching and displaying live wallpapers, multiple live wallpapers can be switched and displayed using only one wallpaper service, since image textures can be proportionally blended through a single wallpaper service. Therefore, this embodiment cleverly utilizes the feature of a 3D graphics processing library that can achieve dynamic display by rendering textures. An image texture processor converts live wallpaper image frames into image textures and stores them in a texture storage space. The 3D graphics processing library finds the last few frames of the live wallpaper texture before switching and the first few frames of the live wallpaper texture after switching from the texture storage space. It then blends these last few frames of the live wallpaper texture before switching and the first few frames of the live wallpaper texture after switching to obtain a transition animation. This makes the live wallpaper switching smoother. By applying a 3D graphics processing library to blend multiple stored static wallpaper texture frames within a single wallpaper service, and by running only one wallpaper service, the resource consumption of electronic devices during wallpaper switching can be effectively reduced, and malfunctions caused by asynchronous multiple wallpaper services can be avoided.
[0214] The following provides a detailed description of the live wallpaper switching display method according to embodiments of this application, using specific examples. The live wallpaper switching display method of the embodiments of this application can be applied to switching between any live wallpapers, but for ease of understanding, the following will use specific examples... Figure 4 The process of switching from the lock screen live wallpaper to the desktop live wallpaper is described below.
[0215] Reference Figure 14 Figure 14 This diagram illustrates the interaction of initializing components involved in the dynamic wallpaper switching display method according to an embodiment of this application. (The previously described...) Figure 9 It is also an initialization flowchart related to the live wallpaper switching display method, but Figure 9 The description focuses on the components and general process involved in the initialization. Figure 14 The interaction diagram is a more detailed interaction flowchart. Figure 14 The dynamic wallpaper switching display method involved is applied to electronic devices such as mobile phones and tablets. Electronic devices include... Figure 8The system software architecture shown includes a wallpaper application, an image data cache controller, a wallpaper engine, an image data view browser, a first image data texture processor, a second image data texture processor, a texture model, a first media decoder, a second media decoder, a 3D graphics processing library, and a screen. Figure 12 In this context, the method for switching the display of the live wallpaper may include:
[0216] Step 1401: In response to receiving the operation to set the wallpaper application, initialize and set the wallpaper application.
[0217] In some embodiments, the electronic device allows users to configure the wallpaper application through its initial settings interface, such as selecting and setting a desired live wallpaper. Users can select from a list of preset live wallpapers or a local repository (e.g., ...). Figure 8 Select a live wallpaper from the video storage space shown to use as the wallpaper for the corresponding interface, such as a lock screen live wallpaper or a desktop live wallpaper.
[0218] In some embodiments, users can enable the scene-adaptive wallpaper feature through a wallpaper application. As mentioned earlier, the scene-adaptive wallpaper feature refers to adaptively changing the desktop wallpaper according to the user's environment. For example, if the user is at a train station, the desktop live wallpaper changes to a live wallpaper of a virtual character waiting for a train at the station. After the user enables the scene-adaptive wallpaper feature through the wallpaper application, the electronic device can detect the user's environment in real time and dynamically change the live wallpaper of the current settings interface according to the environment, such as changing the desktop live wallpaper.
[0219] In some embodiments, users can enable scene-adaptive wallpaper functionality through a wallpaper application. Scene-adaptive wallpaper functionality automatically selects a live wallpaper that matches the user's current scene. Scenes can include work, leisure, sleep, exercise, etc. For example, if a user is sleeping, the live wallpaper on the corresponding screen might change to a live wallpaper of crickets chirping in a field. Or, if a user is exercising, the live wallpaper on the corresponding screen might change to a live wallpaper of a group of people cheering. When a user enables scene-adaptive wallpaper functionality through a wallpaper application, they can set live wallpapers for different scenes using the application. After setting these settings, the electronic device can detect the user's current scene in real time and display a live wallpaper that matches that scene.
[0220] In some embodiments, users can also set the live wallpaper switching function through the wallpaper application. For example, users can activate the live wallpaper switching function through the initialization settings interface. In addition, in some embodiments, users can also set the overall control parameters for live wallpaper switching through the wallpaper application. These overall control parameters include transition type and transition time. Transition type refers to the transition type when switching from the lock screen live wallpaper to the desktop live wallpaper, including uniform transition, gradually accelerating transition, and gradually decelerating transition. Uniform transition means the lock screen live wallpaper changes to the desktop live wallpaper at a uniform speed. Gradually accelerating transition means the lock screen live wallpaper initially changes at a slower speed, and as time passes, the transition to the desktop live wallpaper becomes faster and faster. Gradually decelerating transition means the lock screen live wallpaper initially changes at a faster speed, and as time passes, the transition to the desktop live wallpaper becomes slower and slower.
[0221] The transition time refers to the time it takes for the lock screen live wallpaper to transition to the desktop live wallpaper. This transition time cannot be set too short. If it's too short, the gradual transition won't be visible, making the change from lock screen to desktop live wallpaper abrupt. The transition time also cannot be set too long. If it's too long, the desktop live wallpaper will take too long to appear, affecting the user's normal desktop operation. When a user clicks on the wallpaper application on their electronic device, an interface for setting overall control parameters appears. Users can set overall control parameters such as transition type and transition time on this interface. These overall control parameters ultimately affect the generated transition animation.
[0222] Step 1402: The wallpaper application creates an image data cache controller.
[0223] In some embodiments, after the user initializes the wallpaper application, the application creates a wallpaper management service that inherits from the wallpaper management service class. This service is used for wallpaper management across various interfaces, such as lock screen and desktop wallpaper management. The wallpaper management service class is an abstraction of all wallpaper management services and represents a common attribute of all services. The wallpaper application can define specific wallpaper management services within this class. Then, an image data cache controller is created through the wallpaper management service. This controller manages the entire rendering process for both lock screen and desktop live wallpapers.
[0224] In some embodiments, the wallpaper application also sends overall control parameters to the image data cache controller via the wallpaper management service. The specific content and function of the overall control parameters have been explained in step 1401 above and will not be repeated here.
[0225] Step 1403: The wallpaper application creates a wallpaper engine.
[0226] In some embodiments, the wallpaper application defines a wallpaper engine class that inherits from `WallpaperService.Engine` in the wallpaper management service. The wallpaper engine class is an abstraction of the properties of all wallpaper engines and represents the common characteristics of all wallpaper engines. This wallpaper engine class includes the core logic and drawing code for the wallpaper. Simultaneously, developers instantiate the wallpaper engine class into a wallpaper engine by overriding the `onCreateEngine()` method of the wallpaper service class. The `onCreateEngine()` method is responsible for instantiating and returning a custom engine object, thus creating the wallpaper engine. This wallpaper engine is used to implement functions such as wallpaper drawing, updating, and lifecycle management.
[0227] Step 1404: The wallpaper engine creates an image data view browser and initializes it.
[0228] In some embodiments, the wallpaper engine creates a blank image data view browser (GLSurfaceView) instance as the area component for rendering the live wallpaper in this disclosure embodiment. For example, it serves as the area component for rendering both lock screen and desktop live wallpapers. After creation, the wallpaper engine configures the image data view browser instance. In some embodiments, the wallpaper engine configures the rendering size of the image data view browser instance according to the image size of the live wallpaper to be displayed. In other embodiments, the rendering size is configured according to the screen size of the electronic device to achieve a full-screen live wallpaper display effect. In other embodiments, the user can customize the rendering size of the image data view browser instance, which may not be consistent with the image size of the live wallpaper or the screen size. In still other embodiments, the rendering size of the image data view browser instance is set to be consistent with the size of a specific area on the screen of the electronic device. For example, the lock screen interface includes two parts: one part is for playing lock screen and desktop live wallpapers, and the other part is an area for displaying static text or patterns, such as an area for displaying static patterns and slogans for holidays. Since the live wallpaper is played only in the section used to play the lock screen live wallpaper and the desktop live wallpaper, the rendering size of the image data view browser instance only needs to be consistent with the size of that section used to play the lock screen live wallpaper and the desktop live wallpaper.
[0229] Additionally, during the creation of the image data view browser, the wallpaper engine passes the image data cache controller identifier it obtains from the wallpaper management service to the newly created image data view browser. This allows the image data view browser to locate the corresponding image data cache controller based on the identifier and accept its management for rendering the live wallpaper.
[0230] Step 1405: Configure the rendering parameters of the texture model in the image data view browser.
[0231] The texture model guides the 3D graphics processing library on how to bind, apply, and render textures. In this step, the image data view browser configures specific rendering parameters for the texture model. In some embodiments, these rendering parameters include one or more of the following: 3D graphics processing library version information, rendering mode, and rendering configuration. In some embodiments, the rendering parameters include the blending ratio of the pre-switch and post-switch live wallpaper textures. Only after obtaining this blending ratio can the 3D graphics processing library proportionally blend the pre-switch and post-switch live wallpaper textures to generate the transition animation from the pre-switch to the post-switch live wallpaper.
[0232] In other embodiments, specific rendering parameters include the version information of the 3D graphics processing library (OpenGL). For example, the version of the 3D graphics processing library set using the setEGLContextClientVersion() method in the image data view browser is typically set to version 2 or version 3. Different versions of the 3D graphics processing library invoked will result in different rendering effects.
[0233] In some embodiments, the rendering parameters further include configuring the rendering mode of the 3D graphics processing library, wherein the rendering mode includes a continuous rendering mode (RENDERMODE_CONTINUOUSLY) and an on-demand rendering mode (RENDERMODE_WHEN_DIRTY). In on-demand rendering mode, the 3D graphics processing library performs a rendering once when it receives a rendering request(). In continuous rendering mode, the onDrawFrame() function, which enables the rendering pipeline of the 3D graphics processing library, is automatically called periodically, thus enabling continuous rendering. Different rendering modes also affect the final rendering effect. For example, in this embodiment, the rendering mode is set to on-demand rendering mode. By setting the on-demand rendering mode, rendering can be performed by calling back the application only when the electronic device needs to render, which can achieve lower power consumption compared to continuous rendering mode.
[0234] In some embodiments, rendering parameters also include renderer configuration for the 3D graphics library. A renderer is the interface used by the 3D graphics library to render textures. Renderer configuration includes a renderer class and renderer invocation methods. Therefore, configuring a renderer includes configuring the renderer class and configuring the renderer invocation methods. The renderer class is a common property of all renderers, reflecting the common characteristics of all renderers. The renderer invocation methods are methods for invoking the renderer; they instantiate the renderer class into a renderer. Invocation methods include onSurfaceCreated(), onSurfaceChanged(), and onDrawFrame(), where onSurfaceCreated() is used to initialize the OpenGL environment, onSurfaceChanged() is called when the geometry of the rendering surface changes (e.g., a change in screen orientation), onDrawFrame() is used to reconfigure the size of the image data view browser and its associated rendering objects, and onDrawFrame() defines the renderer's rendering mode, such as continuous rendering mode or on-demand rendering mode.
[0235] Step 1406: The texture model initializes the 3D graphics processing library.
[0236] In some embodiments, the texture model initializes the model-view-projection (MVP) matrix of the 3D graphics processing library, a core component of 3D graphics rendering. Specifically, the model matrix defines the position, rotation, and scaling of objects in 3D space; the view matrix simulates the position and orientation of the camera; and the projection matrix defines the view volume, determining which objects will be rendered onto the screen. Initializing the texture model involves creating texture objects, loading texture data, and setting texture parameters.
[0237] In other embodiments, the texture model also initializes the texture vertex data and shaders of the 3D graphics processing library. Specifically, the texture model creates a Vertex Array Object (VAO) and a Vertex Buffer Object (VBO) to store and manage the texture vertex data. The texture vertex data typically includes normalized vertex coordinates and their corresponding texture coordinates. The texture model colors the texture corresponding to the texture vertex data by creating and compiling the shader programs of the 3D graphics processing library, where the shader programs define how to process the vertex data and how to calculate the final color of each pixel.
[0238] Step 1407: The wallpaper engine sends the instance information of the image data view browser to the image data cache controller.
[0239] In some embodiments, the wallpaper engine obtains instance information of the created image data view browser and sends this instance information to the image data cache controller. The instance information is used in the next step to send application information from the image data cache controller to the image data view browser.
[0240] Step 1408: The image data cache controller sends its own reference information to the image data view browser based on the instance information of the image data view browser.
[0241] In this step, since the image data cache controller obtains the instance information of the image data view browser from the wallpaper engine, it can communicate with the image data view browser based on this instance information. Specifically, the image data cache controller sends its own reference information to the image data view browser based on the instance information. This reference information is used by the image data view browser in subsequent steps when it returns the image data cache address. For example, the image data cache controller will obtain the corresponding image data view browser instance based on the previously received reference information. Then, the image data cache controller creates an object containing its own reference. This object may be the image data cache controller itself, or a proxy object containing the necessary interfaces of the image data cache controller, for better encapsulation and security. Next, the image data cache controller calls methods provided by the image data view browser, such as `setSurfaceController()` or `setControllerReference()`, passing this object containing its own reference as a parameter to the image data view browser.
[0242] Step 1409: The image data view browser creates the first texture ID and the second texture ID.
[0243] Specifically, the data view browser creates a first texture ID and a second texture ID. A texture ID is an integer identifier assigned by the 3D graphics processing library to uniquely identify a texture object. For example, a texture ID of 0001 is assigned to the texture generated for lock screen live wallpaper 1, texture ID 0002 is assigned to the texture generated for lock screen live wallpaper 2, texture ID 0003 is assigned to the texture generated for desktop live wallpaper 1, and so on. By creating different texture IDs and using them as indexes for the image data cache controller, the advantages include at least two aspects: First, it helps the 3D graphics processing library find the storage location of the texture corresponding to the live wallpaper when rendering it (e.g., its storage location in the graphics processor's video memory). Different live wallpapers result in different textures. Therefore, different texture IDs correspond to different live wallpapers. Each live wallpaper has a corresponding first image data texture processor during rendering. Under the control of the image data cache controller, the live wallpaper is converted into the corresponding texture and rendered by the 3D graphics processing library. Therefore, the storage location of the texture corresponding to the live wallpaper can be quickly found through the texture ID. Secondly, it allows the 3D graphics processing library to find the different textures corresponding to the two live wallpapers by using different texture IDs when rendering the transition animation between the two live wallpapers, and then blend them proportionally to obtain the transition animation when the two live wallpapers switch, thus achieving a smooth transition when the live wallpapers change.
[0244] Step 1410: The image data view browser creates a first image data texture processor based on the first texture ID.
[0245] In some embodiments, the image data view browser creates a first image data texture processor corresponding to the lock screen live wallpaper under the image data cache controller. Specifically, the image data cache controller calls the constructor of the image data texture processor to create an instance of the image data texture processor and assigns the previously generated first texture ID as an index to the image data texture processor, making it the first image data texture processor. The first image data texture processor is used to convert lock screen wallpaper image frames into lock screen wallpaper textures. Additionally, in the graphics processor's video memory, there is a dedicated storage space for storing textures converted by the first image data texture processor, such as a first texture storage space. Subsequent textures converted by the first image data texture processor can then be automatically stored in the lock screen texture storage space.
[0246] In some embodiments, the image data cache controller further configures the detection functionality of the first image data texture processor. Specifically, the image data cache controller can create a detector object for an interface, which contains a concrete implementation of the `onFrameAvailable` method. In the `onFrameAvailable` method, the image data cache controller typically executes a `requestRender()` call to trigger a new round of rendering. This mechanism ensures that the system can update the rendering promptly whenever a new image frame becomes available.
[0247] Step 1411: The first image data texture processor creates the first image data cache.
[0248] The first image data cache is used to store lock screen wallpaper image frames decoded by the first media decoder. In some embodiments, the first image data texture processor calls its internal methods, such as `createSurface()`, to initialize a new image data cache object. During this process, the first image data texture processor acts as the provider of the underlying first image data cache, ensuring that the newly created first image data cache can directly exchange data with the first image data texture processor. After creation, the first image data texture processor initializes the first image data cache, including setting the initial transformation matrix and configuring the buffer exchange strategy. In some embodiments, the first image data texture processor also registers a callback interface for the newly created first image data cache to detect lifecycle events of the first image data cache, such as creation completion, size change, or destruction.
[0249] Step 1412: The first image data texture processor passes the address information of the first image data cache it created to the image data view browser.
[0250] In some embodiments, the first image data texture processor sends the address information of the newly created first image data cache to the image data view browser through a previously established communication mechanism, such as a callback interface or a message queue. This allows the image data view browser to further send the address of the first image data cache to the image data cache controller.
[0251] Step 1413: The image data view browser sends the address of the first image data cache to the image data cache controller based on the reference information of the image data cache controller.
[0252] In step 1408 above, the image data cache controller sends its own reference information to the image data view browser. Therefore, in this step, the image data view browser can communicate with the image data cache controller based on the aforementioned application information, for example, sending the address of the first image data cache to the image data cache controller. This enables the image data cache controller to effectively manage and operate the first image data cache. Since the entire process of rendering the live wallpaper and the transition animation during live wallpaper switching is under the control of the image data cache controller, it is necessary to send the reference information of the image data cache to the image data cache controller. After obtaining the reference to the first image data cache, the image data cache controller can pass the reference to the first image data cache to other modules of the electronic device.
[0253] Step 1414: The first image data texture processor passes the first texture ID to the texture model.
[0254] In some embodiments, the first image data texture processor sends the first texture ID to the texture model through a predefined interface or method call. The method for passing this index may be that the first image data texture processor encapsulates the first texture ID in a dedicated data object and then passes this data object to the texture model. This object may also contain other relevant information, such as texture size, format, or creation timestamp metadata.
[0255] Step 1415: The texture model creates the first texture storage space corresponding to the first texture ID.
[0256] After the texture model obtains the texture ID, it can allocate a lock screen texture storage space in the graphics processor's memory based on the first texture ID. This allows textures subsequently converted by the first image data texture processor to be automatically stored in the lock screen texture storage space. The 3D graphics processing library can locate the lock screen texture storage space corresponding to the first texture ID and render the textures within that space.
[0257] Step 1416: The image data view browser creates a second image data texture processor based on the second texture ID.
[0258] In some embodiments, the image data view browser creates a second image data texture processor under the image data cache controller. The detailed creation steps in this step are similar to those in step 1410 for creating the first image data texture processor, and can be found in the corresponding description above.
[0259] Step 1417: The second image data texture processor creates a second image data cache.
[0260] The second image data cache is used to store the desktop wallpaper image frames decoded by the second media decoder. The detailed creation steps are similar to step 1411, and can be found in the corresponding description above.
[0261] Step 1418: The second image data texture processor passes the address information of the created second image data cache to the image data view browser.
[0262] This step is similar to the execution process of step 1412 mentioned above, and can be referred to the corresponding description above.
[0263] Step 1419: The image data view browser sends the address of the second image data cache to the image data cache controller based on the reference information of the image data cache controller.
[0264] This step is similar to the execution process of step 1413 mentioned above, and you can refer to the corresponding description above.
[0265] Step 1420: The second image data texture processor passes the second texture ID to the texture model.
[0266] This step is similar to the execution process of step 1414 mentioned above, and you can refer to the corresponding description above.
[0267] Step 1421: The texture model creates the second texture storage space corresponding to the second texture ID.
[0268] This step is similar to the execution process of step 1415 mentioned above, and you can refer to the corresponding description above.
[0269] It should be noted that in the above embodiments, although the first image data texture processor is created first and then the second image data texture processor is created, that is, steps 1410 to 1415 are performed before steps 1416 to 1421, this is only one optional implementation. In some embodiments, the second image data texture processor can be created first and then the first image data texture processor can be created, that is, steps 1416 to 1421 are executed first, and then steps 1410 to 1415 are executed. In some embodiments, the first image data texture processor and the second image data texture processor can also be created simultaneously, that is, steps 1410 to 1416 to 1421 are executed synchronously.
[0270] Step 1422: The image data view browser configures the view and projection matrix of the 3D graphics processing library.
[0271] In some embodiments, the image data view browser first obtains the size (e.g., width and height) of the live wallpaper (e.g., lock screen live wallpaper or desktop live wallpaper) through a reference to the image data cache controller. Then, based on the obtained live wallpaper size, the image data view browser calls the `onSurfaceChanged()` method to configure the orthographic projection settings of the 3D graphics library to prevent stretching of the live wallpaper during rendering. Furthermore, the image data view browser configures the view matrix and viewing direction of the 3D graphics library, and sets the viewport size and position of the 3D graphics library to achieve appropriate display effects.
[0272] Step 1423: The image data cache controller creates a first media decoder based on the address of the first image data cache, and creates a second media decoder based on the address of the second image data cache.
[0273] In some embodiments, the image data cache controller creates a first media decoder and a second media decoder. The first media decoder corresponds to the live wallpaper before the switch, and the second media decoder corresponds to the live wallpaper after the switch.
[0274] For the scenario of switching from a lock screen live wallpaper to a desktop live wallpaper: The first media decoder is used to decode the image frames of the lock screen live wallpaper. The second media decoder is used to decode the image frames of the desktop live wallpaper. The image data cache controller sends the address of the first image data cache to the first media decoder so that the first media decoder can store the decoded image frames of the lock screen live wallpaper into the first image data cache. The image data cache controller sends the address of the second image data cache to the second media decoder so that the second media decoder can store the decoded image frames of the desktop live wallpaper into the second image data cache.
[0275] In combination Figure 14 After detailing the initialization process of the components involved in the dynamic wallpaper switching display method of this disclosure embodiment, the following is in conjunction with... Figure 15 This document details the actual dynamic wallpaper switching process of the dynamic wallpaper switching display method according to embodiments of the present disclosure. Figure 15 The components involved and Figure 14 Compared to the previous version, it lacks a wallpaper app and wallpaper engine, but adds a power manager, because actual live wallpaper switching is often linked to the power button being turned on and off, requiring the power manager's actions. For example... Figure 15 As shown, in one embodiment, the dynamic wallpaper switching display method may include:
[0276] Step 1501: The power manager receives a screen-off trigger operation.
[0277] In some embodiments, when a user inputs a screen-off trigger operation while the electronic device's screen is on, the screen will turn off. The screen-off trigger operation can be pressing the power button or performing a specific gesture on the screen, such as double-tapping an empty area or swiping from the edge of the screen towards the center. In some embodiments, for electronic devices with voice recognition capabilities, the screen-off trigger operation can be a user's voice command, such as "turn off the screen" or "sleep." For electronic devices with a light sensor, the screen-off trigger operation can be placing the electronic device in a sealed object (such as a pocket). For electronic devices with an orientation sensor, the screen-off trigger operation can be turning the electronic device face down (e.g., face down), and so on.
[0278] Step 1502: The power manager sends a hibernation command to the image data cache controller.
[0279] As mentioned earlier, the power manager includes a screen-off management service and a power management service. When the screen-off management service detects a user's screen-off trigger, it turns off the screen. Simultaneously, the power management service sends a hibernation command to the image data cache controller via a predefined communication channel, informing the controller that the screen is currently off. A hibernation command is an instruction that instructs the electronic device to enter hibernation mode. In hibernation mode, most components in the electronic device are inactive, waiting for the power management service to wake them up before resuming operation.
[0280] Step 1503: The image data cache controller instructs the second media decoder to load the desktop live wallpaper.
[0281] When an electronic device's screen goes out, it essentially means the device enters a sleep state. Later, when the screen is turned back on, displaying the lock screen, the device remains in sleep mode, with only a few components active. Only after the device is successfully unlocked from the lock screen does most of its components resume operation, and the workflow resumes. The wallpaper displayed when the workflow resumes should be the same one that was displayed when the workflow was interrupted, to maintain wallpaper continuity. Therefore, when the screen goes out, the image data cache controller needs to record the state of the live wallpaper at that time to ensure continued display of the live wallpaper when the device resumes operation, and to render the transition animation when switching from the lock screen live wallpaper to the home screen live wallpaper.
[0282] Therefore, in some embodiments, the image data cache controller, in response to a sleep command sent by the screen-off management function, instructs the second media decoder to load the live wallpaper displayed when the screen is off for further decoding. For example, the image data cache controller can send the storage address of the live wallpaper to the second media decoder, instructing the second media decoder to retrieve the live wallpaper from that storage address for decoding. In this embodiment, since the second media decoder decodes the live wallpaper displayed when the screen is off, the live wallpaper displayed after the electronic device's screen is turned on and successfully unlocked will also be the live wallpaper displayed when the electronic device was in the screen-off state.
[0283] In other embodiments, in the environment-adaptive desktop wallpaper scenario described above, the live wallpaper may change as the user's environment changes. Video and animation production applications generate new live wallpapers that change according to the user's environment. The image data cache controller detects new live wallpapers generated by the video and animation production applications in real time, and stores them in the storage space address where live wallpapers are stored after generation. Then, the image data cache controller instructs a second media decoder to reload the live wallpaper from this storage space address to reflect the change in the live wallpaper.
[0284] Step 1504: The second media decoder reads the desktop live wallpaper video file from the storage space storing the desktop live wallpaper and decodes the first N frames of the desktop wallpaper image in the desktop live wallpaper video file.
[0285] In some embodiments, the second media decoder reads the dynamic desktop wallpaper video file from the corresponding video storage space according to the storage space address of the stored dynamic desktop wallpaper. This video file may be compressed using video encoding standards such as H.264 or H.265. Therefore, the second media decoder can decode the video file using video decoding standards such as H.264 or H.265 to obtain the first N frames of the decoded dynamic desktop wallpaper image (where N is a positive integer greater than 1). In one embodiment, to save computing resources, only the first frame of the dynamic desktop wallpaper video file can be decoded. These decoded dynamic desktop wallpaper image frames are used to render the transition animation when the lock screen dynamic wallpaper switches to the dynamic desktop wallpaper.
[0286] Step 1505: The second media decoder stores the decoded desktop wallpaper image frame into the second image data cache.
[0287] In some embodiments, as described in the initialization process above, after the second media decoder is created, the image data cache controller sends a reference to the second image data cache to the second media decoder. Therefore, the second media decoder is able to store the decoded desktop wallpaper image frames into the second image data cache. Specifically, the second media decoder can store the decoded desktop wallpaper image frames into the image data cache queue within the second image data cache.
[0288] In some embodiments, the second media decoder stores the first N frames of the live wallpaper video file into a second image data cache. The second media decoder stores the first frame of the live wallpaper video file into the second image data cache only when decoding the first frame. In other embodiments, one frame of the first N frames can be selected and stored in the second image data cache; the selection rule can be either the earliest frame or the frame with the best quality. In still other embodiments, the second media decoder can also perform a fusion process (e.g., weighted fusion) on the first N frames to obtain the target wallpaper image, and then store the target wallpaper image into the second image data cache.
[0289] Step 1506: The second image data cache sends the decoded desktop wallpaper image frame to the second image data texture processor.
[0290] In some embodiments, the second image data cache actively sends the desktop wallpaper image frame to the second image data texture processor. Alternatively, the second image data texture processor can retrieve the desktop wallpaper image frame from the second image data cache.
[0291] Step 1507: The second image data texture processor converts the desktop wallpaper image frame into a desktop wallpaper texture and stores it in the second texture storage space.
[0292] like Figure 16As shown, in some embodiments, the image data texture processor includes a queue discovery interface, namely the onFrameAvailable() interface. The image data texture processor is a consumer of the image data cache queue. The image data texture processor uses the queue discovery interface to identify whether a new decoded image frame has entered the image data cache queue. When the media decoder puts a decoded image frame of a live wallpaper into the image data cache queue, the queue discovery interface recognizes this and generates a callback notification, instructing the image data texture processor to convert the newly entered decoded image frame of the live wallpaper in the image data cache queue into a texture that can be directly processed by the 3D graphics processing library, and place it in the desktop texture storage space corresponding to the texture ID in the graphics processor's video memory. For example, in step 1507, when the second media decoder puts a decoded image frame of the desktop live wallpaper into the queue of the second image data cache, the queue discovery interface recognizes this and generates a callback notification, instructing the second image data texture processor to convert the newly entered desktop live wallpaper image frame in the second image data cache queue into a desktop wallpaper texture that can be directly processed by the 3D graphics processing library, and place it in the second texture storage space corresponding to the second texture ID in the graphics processor's video memory.
[0293] Step 1508: The second image data texture processor informs the image data view browser that the desktop wallpaper texture conversion has been completed.
[0294] Step 1509: Inform the image data cache controller that the transition animation is ready to play, based on the reference information of the image data cache controller.
[0295] like Figure 14 As described in step 1408, the image data cache controller has already sent its own reference information to the image data view browser based on the instance information of the image data view browser during the initialization step. Therefore, the image data view browser can communicate with the image data cache controller based on the reference information of the image data cache controller, including informing the image data cache controller that it is ready to play the transition animation.
[0296] In some embodiments, when the second image data texture processor converts the decoded image frames of the desktop live wallpaper in the second image data cache queue into textures that can be processed by the 3D graphics processing library, a texture ready callback, namely the OnFrameAvailableListener callback, is triggered. Upon receiving the texture ready callback, the image data view browser confirms that the textures of the first few frames of the decoded image frames of the desktop live wallpaper (because only the first few frames of the desktop live wallpaper's image textures are needed for the transition animation generation) are ready for rendering and display. Subsequently, the image data view browser notifies the image data cache controller through a predefined interface or message mechanism that it is ready to play the transition animation.
[0297] Step 1510: The power manager receives a screen-on trigger operation.
[0298] In some embodiments, when a user inputs a screen-on trigger operation while the electronic device is in a screen-off state, the power manager detects this and controls the electronic device's screen to light up and then enter the lock screen interface. The screen-on trigger operation input by the user can be at least one of the following: pressing the power button; double-tapping the screen; picking up the electronic device; saying a preset wake-up word; sensing a fingerprint in the fingerprint sensing area on an electronic device equipped with a fingerprint sensor, etc.
[0299] As mentioned earlier, full-screen AOD mode may also result in a screen-off lock screen even when the screen is off. In some embodiments, if the user performs a screen-on trigger operation on the electronic device while it is in a screen-off lock screen state, the electronic device will switch from a low-brightness screen-off lock screen interface to a high-brightness screen-on lock screen interface.
[0300] Step 1511: The power manager sends a wake-up command to the image data buffer controller.
[0301] In some embodiments, when the power management service in the power manager detects a user's screen-on trigger operation, the power management service sends a wake-up command to the image data cache controller through a predefined communication channel to inform the image data cache controller that the current screen is on and displaying the lock screen interface. The wake-up command is an instruction to notify the image data cache controller to prepare for wallpaper display control when the screen is on.
[0302] Step 1512: The image data cache controller instructs the first media decoder to load the lock screen live wallpaper.
[0303] This step is similar to the execution process of step 1503 mentioned above, and you can refer to the corresponding description above.
[0304] Step 1513: The first media decoder reads the lock screen live wallpaper video file from the storage space storing the lock screen live wallpaper and decodes the lock screen live wallpaper video file.
[0305] This step is similar to the execution process of step 1504 mentioned above, and you can refer to the corresponding description above.
[0306] Step 1514: The first media decoder stores the decoded lock screen wallpaper image frame into the first image data cache.
[0307] This step is similar to the execution process of step 1505 mentioned above, and you can refer to the corresponding description above.
[0308] Step 1515: The first image data cache sends the decoded lock screen wallpaper image frame to the first image data texture processor.
[0309] This step is similar to the execution process of step 1506 mentioned above, and can be referred to the corresponding description above.
[0310] Step 1516: The first image data texture processor converts the lock screen wallpaper image frame into a lock screen wallpaper texture and stores it in the first texture storage space.
[0311] This step is similar to the execution process of step 1507 mentioned above, and you can refer to the corresponding description above.
[0312] Step 1517: The first image data texture processor calls the texture rendering interface to instruct the texture model to render the lock screen wallpaper texture.
[0313] Figure 16 The texture rendering interface shown, namely the onDrawFrame() interface, is an interface located between the image data texture processor and the texture model. It is used by the image data texture processor to call the texture model to complete the rendering.
[0314] In some embodiments, after converting the decoded image frame of the lock screen live wallpaper into a texture, the first image data texture processor sends its index (first texture ID) to the texture model. Specifically, the first image data texture processor triggers the execution of the texture rendering interface by calling `requestRender()`. `requestRender()` requests a single rendering operation, triggering the call to the texture rendering interface. Unlike continuous rendering mode, where the texture rendering interface is called periodically, in on-demand rendering mode, the first image data texture processor uses `requestRender()` to trigger the texture rendering interface, ensuring it is only called when needed. Since the index of the first image data texture processor (lock screen texture ID) is already reflected in `requestRender()`, the texture model obtains the index of the first image data texture processor through this call. Because the texture converted from the decoded image frame of the lock screen live wallpaper is stored in the first texture storage space corresponding to the first texture ID in the graphics processor's video memory, the texture converted from the decoded image frame of the lock screen live wallpaper can be found in this way, completing the rendering.
[0315] Step 1518: The texture model calls the 3D graphics processing library rendering pipeline to render the lock screen wallpaper texture.
[0316] In some embodiments, after receiving a call to the texture rendering interface, the texture model renders the lock screen wallpaper texture in the lock screen texture storage space through the rendering pipeline of the 3D graphics processing library.
[0317] Step 1519: The 3D graphics processing library obtains the lock screen wallpaper texture from the first texture space.
[0318] When the texture model calls the rendering pipeline of the 3D graphics processing library, it informs the 3D graphics processing library of the texture ID corresponding to the lock wallpaper texture to be rendered (such as the first texture ID mentioned above). The 3D graphics processing library then reads the first texture storage space corresponding to the first texture ID from the graphics processor's video memory. The 3D graphics processing library then retrieves the lock screen wallpaper texture from the first texture storage space.
[0319] Step 1520: The 3D graphics processing library renders the lock screen wallpaper texture and displays the live wallpaper on the screen. The 3D graphics processing library sequentially performs vertex shading, primitive assembly, rasterization, and fragment shading to render the lock screen wallpaper texture as a part of the live wallpaper for display on the lock screen interface. Note that the 3D graphics processing library renders the lock screen wallpaper texture as a part of the live wallpaper, not the entire live wallpaper. As mentioned earlier, the decoded image frames of the live wallpaper are entered into the first image data buffer one frame at a time and rendered frame by frame by the texture rendering interface. Therefore, the texture of the frames stored in the first texture storage space alone may not be enough to render all the animations of the live wallpaper; continuous refreshing via the refresh interface in step 1521 is required to complete the rendering.
[0320] Step 1521: The first image data texture processor clears the lock screen live wallpaper image frames in the first image data cache, and repeatedly decodes the next N frames of the lock screen live wallpaper video file, continuing to execute steps 1513 to 1520 until the last frame of the lock screen live wallpaper is displayed on the lock screen interface.
[0321] like Figure 16 As shown, the first image data texture processor may also include a refresh interface, namely the updateTexture interface, which refreshes the first image data cache queue so that the decoded image frames of the newly generated lock screen live wallpaper by the first media decoder can enter the first image data cache queue.
[0322] The above describes respectively Figure 16 The functions of the queue discovery interface, texture rendering interface, and refresh interface are described. The combined working process of the queue discovery interface, texture rendering interface, and refresh interface is summarized as follows: Figure 16As shown, the first media decoder decodes the image frames of the lock screen live wallpaper, obtaining the decoded image frames, and places them into the first image data cache queue. The queue discovery interface detects a newly arrived decoded image frame of the lock screen live wallpaper and triggers a texture rendering interface callback. Under the texture rendering interface callback, the first image data texture processor converts the newly arrived decoded image frame of the lock screen live wallpaper into a texture and places it into the lock screen texture storage space. Additionally, in response to this callback, the first image data texture processor calls the lock screen rendering pipeline of the 3D graphics processing library through the texture rendering interface to render the texture in the lock screen texture storage space under the first image data cache controller and display it on the lock screen interface. Then, the refresh interface is called to refresh the first image data cache queue, ensuring that once the first media decoder generates a new decoded image frame of the lock screen live wallpaper, the decoded image frame immediately enters the first image data cache queue. Then, through the continuous discovery of the queue discovery interface, the continuous notification of rendering of the texture rendering interface, and the continuous triggering of queue refresh by the refresh interface, all image frames of the lock screen live wallpaper can generate textures and be rendered by the 3D graphics processing library, and finally the lock screen live wallpaper is displayed on the lock screen interface.
[0323] In some embodiments, before executing step 1521, the first image data texture processor needs to determine whether the lock screen wallpaper texture currently rendered by the texture model is the last image frame of the lock screen live wallpaper. If it is not the last image frame, then step 1521 is executed to clear the first image data cache so that the first image data cache can store the new lock screen wallpaper image frame decoded by the first media decoder (for example, returning to step 1513 where the first media decoder retrieves the next lock screen live wallpaper image frame from the storage space storing the lock screen live wallpaper and decodes it). If the lock screen wallpaper texture currently rendered by the texture model is the last image frame of the lock screen live wallpaper, then step 1513 is not returned, but the processor waits to execute step 1522.
[0324] Step 1522: The power manager receives the unlock operation.
[0325] In some embodiments, when a user unlocks an electronic device from its lock screen, the device unlocks and switches to the home screen. Unlocking operations include, but are not limited to, the following: swiping up or entering a gesture to unlock the device; entering a preset numeric, alphanumeric, or pattern password on the lock screen; for devices equipped with a fingerprint sensor, pressing a finger against the fingerprint recognition area; for devices supporting facial recognition, scanning the user's face against the scanning frame on the screen; and for devices supporting voice assistants, speaking a preset voice command or password phrase, etc.
[0326] Step 1523: The power manager sends an unlock command to the image data cache controller.
[0327] In some embodiments, the power management service in the power manager sends an unlock command onCommand:android.wallpaper.keyguardgoingaway to the image data cache controller. The main purpose of this command is to notify the electronic device to enter the working state, start the switching from the lock screen live wallpaper to the desktop live wallpaper, and display the desktop live wallpaper.
[0328] Step 1524: The image data cache controller sends overall control parameters to the image data view browser.
[0329] In one embodiment, the image data cache controller indicates the currently required overall control parameters to the image data view browser by calling the motion effects interface. The specific content and function of the overall control parameters have already been explained in step 1401 and will not be repeated here. The overall control parameters may include the transition type and transition time of the transition animation.
[0330] Step 1525: The image data view browser configures the specific rendering parameters of the texture model according to the overall control parameters.
[0331] Specific rendering parameters may include the texture blending and fade-in / fade-out settings mentioned above. Texture blending refers to the ratio of the lock screen wallpaper texture or desktop wallpaper texture used in the transition animation. Since the transition animation may contain several frames, the texture blending in each frame is different. For ease of explanation, the desktop wallpaper texture ratio is used as the texture blending in the following description. However, those skilled in the art will understand that the lock screen wallpaper texture ratio can also be used as the texture blending.
[0332] As described above, in some embodiments, the lock screen texture storage space stores the textures of each frame of lock screen image data, and the desktop texture storage space stores the textures of each frame of desktop image data. Finally, the 3D graphics processing library extracts the textures of the last few frames of lock screen image data and the textures of the first few frames of desktop image data for blending. For example, when blending the textures of the last 5 frames of lock screen image data and the textures of the first 5 frames of desktop image data, each frame has a texture blending degree. That is, for the first frame of the last 5 frames of lock screen image data and the first frame of the first 5 frames of desktop image data, there is a texture blending degree for desktop image data; for the second frame of the last 5 frames of lock screen image data and the second frame of the first 5 frames of desktop image data, there is a texture blending degree for desktop image data…
[0333] The image data view browser renders the texture model by calling the `requestRender()` function of the 3D graphics processing library. Specifically, the `mix` function in the 3D graphics processing library is used to blend two textures. In the fragment shader, the GLSL `mix` function is used to blend the two textures: `FragColor = mix(texture1Color, texture2Color, mixValue)`. Here, `texture1` corresponds to the first image data buffer controller, and `texture2` corresponds to the second image data buffer controller. In the shader, `texture1Color` corresponds to the color value of the lock screen texture, `texture2Color` corresponds to the color value of the desktop texture, and `mixValue` is the texture blending value of the desktop image data. By setting `mixValue`, the final rendered texture can be determined. Specifically, the formula for calculating `mixValue` is: `FragColor = texture1Color * (1 - mixValue) + texture2Color * mixValue`. For example, in the example of mixing the last four frames of lock screen image data and the first four frames of desktop image data, for the first frame, mixValue is set to 0.2, that is, the mixing weight of the lock screen texture is 0.8, the mixing weight of the desktop texture is 0.2, and the ratio of the lock screen texture to the desktop texture in the first frame is 0.8:0.2; for the second frame, mixValue is set to 0.4, that is, the mixing weight of the lock screen texture is 0.6, the mixing weight of the desktop texture is 0.4, and the ratio of the lock screen texture to the desktop texture in the first frame is 0.6:0.4; for the third frame, mixValue is set to 0.6, that is, the mixing weight of the lock screen texture is 0.4, the mixing weight of the desktop texture is 0.6, and the ratio of the lock screen texture to the desktop texture in the first frame is 0.4:0.6; for the fourth frame, mixValue is set to 0.8, that is, the mixing weight of the lock screen texture is 0.2, the mixing weight of the desktop texture is 0.8, and the ratio of the lock screen texture to the desktop texture in the first frame is 0.2:0.8.
[0334] In one embodiment, texture blending is determined based on the transition type and transition time in the overall control parameters.
[0335] First, based on the transition time and the duration of each frame, the target number of frames in the transition animation can be determined. For example, if the transition time is 200ms and each frame lasts 50ms, the number of frames in the transition animation is 200ms / 50ms = 4.
[0336] Next, based on the frame number and transition type in the transition animation, the texture blending degree for each frame can be determined. If the transition type is a uniform transition, it requires that the texture blending degree of the desktop texture follows an arithmetic progression from the first to the fourth frame. For example, the texture blending degree of the desktop texture in the first to the fourth frame can be set to 0.2, 0.4, 0.6, and 0.8, respectively. If the transition type is a gradually accelerating transition, it requires that the difference between two adjacent texture blending degrees in the queue of desktop texture blending degrees gradually increases from the first to the fourth frame. For example, the texture blending degree of the desktop texture in the first to the fourth frame can be set to 0.1, 0.2, 0.4, and 0.7, respectively. If the transition type is a gradually decelerating transition, it requires that the difference between two adjacent texture blending degrees in the queue of desktop texture blending degrees gradually decreases from the first to the fourth frame. For example, the texture blending degree of the desktop texture in the first to the fourth frame can be set to 0.7, 0.4, 0.2, and 0.1, respectively.
[0337] Fade-in / fade-out settings refer to which of the lock screen dynamic textures and desktop dynamic textures fades out (with a gradually decreasing ratio) and which fades in (with a gradually increasing ratio) during a transition animation. For example, in the example above where the texture blending degree of the desktop texture in the first to fourth frames is set to 0.2, 0.4, 0.6, and 0.8 respectively, the desktop dynamic texture's ratio gradually increases, while the lock screen dynamic texture's ratio gradually decreases; therefore, the lock screen texture fades out and the desktop texture fades in. If the texture blending degree of the desktop texture in the first to fourth frames is set to 0.8, 0.6, 0.4, and 0.2 respectively, the desktop dynamic texture's ratio gradually decreases, while the lock screen dynamic texture's ratio gradually increases; therefore, the lock screen texture fades in and the desktop texture fades out.
[0338] In some embodiments, the lock screen texture storage space stores only the last frame texture of the lock screen live wallpaper, and the desktop texture storage space stores only the first frame texture of the desktop live wallpaper. To generate a transition animation, the target frame number for playing the transition animation can be obtained, and the target number of rendering iterations can be determined based on the target frame number to form a multi-frame mixed texture image. In the multi-frame mixed texture image, the texture blending degree between different frames can be set differently. For example, if the transition animation is set to render four times, the 3D graphics processing library needs to repeatedly blend the last frame texture of the lock screen live wallpaper and the first frame texture of the desktop live wallpaper four times to form a four-frame mixed texture image, where each rendering has a texture blending degree. For example, in the first rendering, the mixValue is set to 0.2, meaning the blend weight of the lock screen texture is 0.8, the blend weight of the desktop texture is 0.2, and the ratio of the lock screen texture in the last frame to the desktop texture in the first frame is 0.8:0.2; for the second rendering, the mixValue is set to 0.4, meaning the blend weight of the lock screen texture is 0.6, the blend weight of the desktop texture is 0.4, and the ratio of the lock screen texture in the last frame to the desktop texture in the first frame is 0.6:0.4; for the third rendering, the mixValue is set to 0.6, meaning the blend weight of the lock screen texture is 0.4, the blend weight of the desktop texture is 0.6, and the ratio of the lock screen texture in the last frame to the desktop texture in the first frame is 0.4:0.6; for the fourth rendering, the mixValue is set to 0.8, meaning the blend weight of the lock screen texture is 0.2, the blend weight of the desktop texture is 0.8, and the ratio of the lock screen texture in the last frame to the desktop texture in the first frame is 0.2:0.8. By repeatedly rendering the same texture with different texture blending levels, multi-frame blended texture images with slight visual differences are generated. Although these image frames are rendered based on the same desktop wallpaper texture and lock screen wallpaper texture, the adjustment of texture blending levels creates a continuous visual change effect. By repeatedly rendering the same texture with different texture blending levels, a transition animation with a continuous visual change effect is generated. The 3D graphics processing library rendering pipeline only needs to read the desktop wallpaper texture data and lock screen wallpaper texture data once to play the transition animation. This not only reduces the processing complexity of the 3D graphics processing library, but also reduces the computational resources occupied by playing transition animations on electronic devices.
[0339] Step 1526: Call the 3D graphics processing library to perform hybrid rendering based on the rendering parameters.
[0340] In some embodiments, after receiving a call to the texture rendering interface, the texture model performs blended rendering of the lock screen wallpaper texture in the first texture storage space and the desktop wallpaper texture in the second texture storage space through the rendering pipeline of the 3D graphics processing library. The texture model calls the 3D graphics processing library according to the rendering parameters, including informing the 3D graphics processing library of the first texture ID and the second texture ID that need to be blended, as well as the rendering parameters mentioned in step 1525 above. For example, determining the target number of frames for the transition animation based on the transition time.
[0341] Step 1527: The 3D graphics processing library obtains the lock screen wallpaper texture of the target frame number from the first texture space and the desktop wallpaper texture of the target frame number from the second texture space according to the rendering parameters.
[0342] The 3D graphics processing library obtains the lock screen wallpaper texture with the target frame number from the first texture space and the desktop wallpaper texture with the target frame number from the second texture space, based on the rendering parameters mentioned above (such as determining the target frame number of the transition animation based on the transition time).
[0343] Step 1528: The 3D graphics processing library performs blended rendering of the lock screen wallpaper texture and the desktop wallpaper texture, and displays the transition animation on the screen.
[0344] The 3D graphics processing library retrieves textures from the first texture storage space, starting from the end according to the determined target frame number in the aforementioned transition animation, and retrieves textures from the second texture storage space, starting from the beginning according to the determined target frame number in the aforementioned transition animation. The 3D graphics processing library blends the textures retrieved from the first texture storage space and the textures retrieved from the second texture storage space according to the aforementioned texture blending degree, performs multi-frame rendering, obtains the transition animation, and displays it on the screen. In one embodiment, the 3D graphics processing library obtains the last frame texture of the dynamic wallpaper texture from the first texture storage space and the first frame texture of the desktop dynamic wallpaper from the second texture storage space, and performs repeated rendering and blending of these two frames textures at the target frame number. The specific implementation process is described in step 1525 above, and will not be repeated here.
[0345] Step 1529: The image data view browser sends feedback to the image data cache controller that the transition animation playback is complete.
[0346] In some embodiments, after the transition animation finishes playing, the image data view browser sends a notification to the image data cache controller indicating that the transition animation has finished playing, thus instructing the image data cache controller to control the display of the desktop live wallpaper.
[0347] Step 1530: The image data cache controller instructs the second media decoder to load the desktop live wallpaper.
[0348] Step 1531: The second media decoder reads the desktop live wallpaper video file from the storage space storing the desktop live wallpaper and decodes the desktop live wallpaper video file.
[0349] Step 1532: The second media decoder stores the decoded desktop wallpaper image frame into the second image data cache.
[0350] Step 1533: The second image data cache sends the decoded desktop wallpaper image frame to the second image data texture processor.
[0351] Step 1534: The second image data texture processor converts the desktop wallpaper image frame into a desktop wallpaper texture and stores it in the second texture storage space.
[0352] Step 1535: The second image data texture processor calls the texture rendering interface to instruct the texture model to render the desktop wallpaper texture.
[0353] Step 1536: The texture model calls the 3D graphics processing library rendering pipeline to render the desktop wallpaper texture.
[0354] Step 1537: The 3D graphics processing library obtains the desktop wallpaper texture from the second texture space.
[0355] Step 1538: The 3D graphics processing library renders the desktop wallpaper texture and displays the live wallpaper on the screen.
[0356] Step 1539: The first image data texture processor clears the desktop live wallpaper image frames in the first image data cache, and repeatedly decodes the next N frames of the desktop live wallpaper video file, continuing to execute steps 1531 to 1538 until the last frame of the desktop live wallpaper is displayed on the desktop interface.
[0357] In another embodiment of the dynamic wallpaper switching display process of this application, for Figure 15 The step 1524 shown can be implemented in the following alternative ways:
[0358] The image data cache controller obtains overall control parameters, including the difference between the N frames after the lock screen wallpaper texture and the N frames before the desktop wallpaper texture, as well as the duration of the dynamic wallpaper.
[0359] The greater the difference between the N frames following the lock screen wallpaper texture and the N frames preceding the desktop wallpaper texture, the more distinct the difference between the two frames. In this case, more frames of transition animation are needed to avoid a jarring transition. Conversely, the smaller the difference between the N frames following the lock screen wallpaper texture and the N frames preceding the desktop wallpaper texture, the smaller the difference between them. In this case, fewer frames of transition animation are needed to achieve a smooth transition. Therefore, the degree of difference between the N frames following the lock screen wallpaper texture and the N frames preceding the desktop wallpaper texture determines the number of frames in the transition animation. The texture blending degree in each frame is related to the number of frames in the transition animation; therefore, the degree of difference between the N frames following the lock screen wallpaper texture and the N frames preceding the desktop wallpaper texture determines the texture blending degree.
[0360] In one embodiment, the difference between the last N frames of the lock screen wallpaper texture and the first N frames of the desktop wallpaper texture can be calculated by averaging the differences of the frames with corresponding sequence numbers. For example, the difference between the last three frames of the lock screen wallpaper texture and the first three frames of the desktop wallpaper texture can be calculated as follows: calculate the difference between the first frame of the last three frames of the lock screen wallpaper texture and the first frame of the first three frames of the desktop wallpaper texture; calculate the difference between the second frame of the last three frames of the lock screen wallpaper texture and the second frame of the first three frames of the desktop wallpaper texture; calculate the difference between the third frame of the last three frames of the lock screen wallpaper texture and the third frame of the first three frames of the desktop wallpaper texture; average the three calculated differences to obtain the difference between the last N frames of the lock screen wallpaper texture and the first N frames of the desktop wallpaper texture.
[0361] In one embodiment, the difference between two texture frames can be calculated by calculating the difference in texture color values at the same location in the two texture frames and averaging the difference in texture color values at each location. For example, when calculating the difference between the first frame of the last three frames of the lock screen wallpaper texture and the first frame of the first three frames of the desktop wallpaper texture, we can calculate the difference between the texture color value at position (0,0) in the first frame of the last three frames of the lock screen wallpaper texture and the texture color value at position (0,0) in the first frame of the first three frames of the desktop wallpaper texture. Then, we can calculate the difference between the texture color value at position (0,1) in the first frame of the last three frames of the lock screen wallpaper texture and the texture color value at position (0,1) in the first frame of the first three frames of the desktop wallpaper texture. Then, we can calculate the difference between the texture color value at position (0,2) in the first frame of the last three frames of the lock screen wallpaper texture and the texture color value at position (0,2) in the first frame of the first three frames of the desktop wallpaper texture, and so on. After obtaining the texture color value differences for all positions, we can average these texture color value differences to obtain the difference between the first frame of the last three frames of the lock screen wallpaper texture and the first frame of the first three frames of the desktop wallpaper texture.
[0362] Additionally, the duration of a live wallpaper can also determine the number of frames in the transition animation. If the live wallpaper itself lasts for a long time, a relatively long transition animation between live wallpapers is acceptable, and more frames can be used in the transition animation. If the live wallpaper itself lasts for a short time, a relatively long transition animation between live wallpapers is unacceptable, and fewer frames can be used in the transition animation.
[0363] In one embodiment, the duration of the live wallpaper can be calculated as the average of the duration of the lock screen live wallpaper and the duration of the desktop live wallpaper. In another embodiment, the duration of the live wallpaper can be calculated as a weighted average of the durations of the lock screen live wallpaper and the desktop live wallpaper. In this embodiment, different weights can be assigned to the durations of the lock screen live wallpaper and the desktop live wallpaper.
[0364] Accordingly, for Figure 15 Step 1525 can be replaced by the following alternatives:
[0365] The image data viewer configures specific rendering parameters for the texture model based on the difference between the lock screen wallpaper texture in the last N frames and the desktop wallpaper texture in the first N frames, as well as the duration of the dynamic wallpaper. These specific rendering parameters include texture blending and fade-in / fade-out settings.
[0366] First, the image data viewer can determine the number of frames in the transition animation based on the difference between the N frames after the lock screen wallpaper texture and the N frames before the desktop wallpaper texture, as well as the duration of the live wallpaper.
[0367] As mentioned earlier, the greater the difference between the N frames following the lock screen wallpaper texture and the N frames preceding the desktop wallpaper texture, the greater the difference between the two. Therefore, the number of frames in the transition animation needs to be set higher to reduce abrupt transitions. The number of frames in the transition animation is an increasing function of this difference. Furthermore, the longer the duration of the live wallpaper, the more frames are needed in the transition animation; the number of frames in the transition animation is an increasing function of the live wallpaper's duration.
[0368] In one embodiment, a first score can be determined based on the difference between the last N frames of the lock screen wallpaper texture and the first N frames of the desktop wallpaper texture, a second score can be determined based on the duration of the live wallpaper, and the sum, average or weighted average of the first score and the second score can be calculated, and the number of frames in the transition animation can be determined according to the calculation results.
[0369] When determining the first score based on the difference between the lock screen wallpaper texture in the last N frames and the desktop wallpaper texture in the first N frames, a lookup table or a formula can be used. Table 1 below shows a correspondence between the difference and the first score.
[0370] Difference First score 80-100% 5 60%-80% 4 40%-60% 3 20%-40% 2 0-20% 1
[0371] Table 1
[0372] As can be seen from Table 1, the greater the degree of difference, the larger the first score, and the first score is an increasing function of the degree of difference.
[0373] Formula 1 below shows a formula for calculating the first score based on the degree of difference.
[0374] S1 = c·H (Formula 1)
[0375] Where S1 is the first score, c is the degree of difference, and H is a fixed constant.
[0376] When H = 5, if c = 80%, the first score S1 = 80% * 5 = 4; if c = 20%, the first score S1 = 20% * 5 = 1. It is evident that the greater the similarity, the larger the first score; the first score is an increasing function of the similarity.
[0377] When determining the second score based on the duration of the live wallpaper, a lookup table or formula can be used. Below...
[0378] Table 2 shows a correspondence between the duration of a live wallpaper and a second score.
[0379] Live wallpaper duration Second score 500ms or more 5 100-500ms 4 30-100ms 3 5-30ms 2 Less than 5ms 1
[0380] Table 2
[0381] As can be seen from Table 1, the longer the duration of the live wallpaper, the larger the second score, and the second score is an increasing function of the duration of the live wallpaper.
[0382] Formula 2 below shows a formula for calculating the second fraction based on the duration of the live wallpaper.
[0383] S2=d·T / T0 Formula 1
[0384] Where S2 is the second score, T is the duration of the live wallpaper, T0 is the standard duration, and d is a fixed parameter.
[0385] When d = 5 and T0 = 500ms, if T = 100ms, the second fraction S2 = 5·100 / 500 = 1. The longer the duration of the live wallpaper, the larger the second fraction; the second fraction is an increasing function of the live wallpaper's duration.
[0386] After obtaining the first and second scores, the sum, average, or weighted average of the first and second scores can be calculated to determine the number of frames in the transition animation.
[0387] Next, based on the number of frames in the transition animation and the type of transition, the texture blending degree of each frame can be determined.
[0388] In another embodiment of the dynamic wallpaper switching display process of this application, for Figure 15 The step 1524 shown can be implemented in the following alternative ways:
[0389] The image data cache controller obtains overall control parameters, including the difference between the N frames after the lock screen wallpaper texture and the N frames before the desktop wallpaper texture, and the average difference between two adjacent frames in the lock screen wallpaper texture.
[0390] The concept and calculation method of the difference between the lock screen wallpaper texture in the last N frames and the desktop wallpaper texture in the first N frames have been explained above, so they will not be repeated here.
[0391] In one embodiment, the average difference between two adjacent frames in a lock screen wallpaper texture can be calculated by calculating the difference between each pair of adjacent frames in the lock screen wallpaper texture and then averaging the calculated differences between each pair of adjacent frames. For example, if the lock screen wallpaper texture has 5 frames, the difference between the first and second frames, the second and third frames, the third and fourth frames, and the fourth and fifth frames can be calculated, and these differences can be averaged to obtain the average difference.
[0392] In one embodiment, the difference between two adjacent frames in a lock screen wallpaper texture can be calculated by calculating the difference in texture color values at the same position in the two adjacent frames and averaging the differences in texture color values at each position. For example, when calculating the difference between the first and second frames of a lock screen wallpaper texture, the difference between the texture color value at position (0,0) in the first frame and the texture color value at position (0,0) in the second frame can be calculated, then the difference between the texture color values at position (0,1) in the first frame and the texture color values at position (0,1) in the second frame can be calculated, then the difference between the texture color values at position (0,2) in the first frame and the texture color values at position (0,2) in the second frame can be calculated, and so on. After obtaining the differences in texture color values at all positions, these differences are averaged to obtain the difference between the first and second frames of the lock screen wallpaper texture.
[0393] Accordingly, for Figure 15 Step 1525 can be replaced by the following alternatives:
[0394] The image data view browser configures specific rendering parameters for the texture model based on the difference between the N frames after the lock screen wallpaper texture and the N frames before the desktop wallpaper texture, as well as the average difference between two adjacent frames in the lock screen wallpaper texture. The specific rendering parameters include texture blending and fade-in / fade-out settings.
[0395] First, the image data view browser can determine the number of frames in the transition animation based on the difference between the N frames after the lock screen wallpaper texture and the N frames before the desktop wallpaper texture, as well as the average difference between two adjacent frames in the lock screen wallpaper texture.
[0396] Generally, the greater the difference between the N frames following the lock screen wallpaper texture and the N frames preceding the desktop wallpaper texture, the more distinct the transition between the two is. This means a larger number of frames are needed to smoothly transition from the lock screen live wallpaper to the desktop live wallpaper. The number of frames in the transition animation is an increasing function of the difference between the N frames following the lock screen wallpaper texture and the N frames preceding the desktop wallpaper texture.
[0397] Since the transition is from a lock screen live wallpaper to a desktop live wallpaper, the greater the average difference between two adjacent frames in the lock screen live wallpaper, the more acceptable it is to users for the transition animation to show a larger difference between adjacent frames. Therefore, a smaller number of frames can be set in the transition animation. Thus, the number of frames in the transition animation is a decreasing function of the average difference between two adjacent frames in the lock screen wallpaper texture.
[0398] In one embodiment, the number of frames in the transition animation can be obtained by dividing the difference between the last N frames of the lock screen wallpaper texture and the first N frames of the desktop wallpaper texture by the average difference between two adjacent frames in the lock screen wallpaper texture.
[0399] Figure 17 The present disclosure provides a summary of the process from displaying the lock screen live wallpaper to displaying the transition animation, and finally to displaying the desktop live wallpaper. Figure 17 The three overall display stages mentioned above are shown. Figure 18 The general process of its implementation is illustrated, including the electronic device transitioning from a screen-on state to a screen-off state, acquiring the desktop live wallpaper from the last screen-on state, decoding the saved desktop live wallpaper using a second media decoder and performing texture conversion using a second image data texture processor, playing the unlock live wallpaper, generating and playing a transition animation, and finally playing the desktop live wallpaper. For a detailed explanation, please refer to the above. Figures 14 to 15 As already described in detail, I will not repeat it here.
[0400] The following is Figure 6 The scenario shown illustrates the switching between two live wallpapers on the lock screen, demonstrating another implementation process for the live wallpaper switching display method.
[0401] and Figure 4 Unlike the live wallpaper switching method shown, the live wallpaper switching method in this embodiment is not a switch between lock screen live wallpaper and desktop live wallpaper, but a switch between two live wallpapers of the same type.
[0402] The initialization steps of each system module in the dynamic wallpaper switching display method are as follows: Figure 14 The methods and steps shown are similar and will not be repeated here.
[0403] The following is combined with Figure 19 This section describes the actual dynamic wallpaper switching and display process of the dynamic wallpaper switching and display method according to embodiments of this disclosure. It includes:
[0404] Step 1901: The power manager receives a screen lock operation.
[0405] In some embodiments, when a user performs a lock screen operation on the desktop interface of an electronic device, the electronic device will switch from the desktop lock screen to the lock screen interface. Lock screen operations include, but are not limited to, the following: pressing the power button, entering a gesture to unlock the electronic device; for devices with lock screen controls on the desktop (such as a virtual lock screen switch button), the user triggers the lock screen control; for devices that support voice assistants, speaking a preset voice command or password phrase, etc.
[0406] In some embodiments, when a user locks the electronic device, the display screen is triggered to play the first live wallpaper (e.g., by performing step 2302 mentioned below). Alternatively, the display screen can be triggered to play the second live wallpaper during the desktop display phase. For example, when a user switches from an application to the desktop state, the first live wallpaper begins to play. When the first live wallpaper is playing, locking the electronic device will not terminate the playback of the first live wallpaper, but will only change the elements displayed on the screen, such as displaying the time, weather, battery level, etc., corresponding to the lock screen interface.
[0407] Step 1902: The power manager sends a screen lock command to the image data cache controller.
[0408] Figure 19 Steps 1930 to 1912 implement the playback of the first dynamic wallpaper. For details on how these steps are implemented, please refer to [link / reference needed]. Figure 15 The relevant embodiments of steps 1510 to 1521 are described, and will not be repeated here.
[0409] Step 1913: The power manager controls the electronic device to enter the screen-off display state.
[0410] In this step, the power manager controls the electronic device to be in a screen-off display state. In some embodiments, the power manager may enter the screen-off display state in response to a user's screen-off trigger operation. In another embodiment, the screen-off display state may be entered automatically after all image frames of the first live wallpaper have finished playing, at which time the screen-off interface still displays the last image frame of the first live wallpaper. The first texture storage space also stores the texture of the last frame of the first live wallpaper.
[0411] Figure 19 Steps 1914 to 1921 load the second dynamic wallpaper. For details on how these steps are implemented, please refer to [link / reference needed]. Figure 15 The relevant embodiments of steps 1502 to 1509 are described, and will not be repeated here.
[0412] Step 1922: The power manager receives a screen-on trigger operation.
[0413] Step 1923: The power manager sends a wake-up command to the image data buffer controller.
[0414] Figure 19 Steps 1914 to 1929 implement the transition animation after the first and second dynamic wallpapers are rendered together. For details on the implementation steps, please refer to [link / reference needed]. Figure 15 The relevant embodiments of steps 1524 to 1529 are described, and will not be repeated here.
[0415] Figure 19 Steps 1930 to 1939 implement the playback of the second dynamic wallpaper. For details on how to implement these steps, please refer to [link / reference needed]. Figure 15 The relevant embodiments of steps 1530 to 1539 are described, and will not be repeated here.
[0416] This application provides a method for switching dynamic wallpapers. By using a single wallpaper management service, two image data texture processors, two media decoders corresponding to the two image data texture processors, and a 3D graphics processing library, a smooth switching between a first and a second dynamic wallpaper is achieved. This method pre-decodes the image frames of the first and second dynamic wallpapers using the media decoders, and then converts the decoded image frames into textures using the corresponding image data texture processors, storing them in dedicated storage space. Within the single wallpaper management service, the 3D graphics processing library proportionally blends the image frame textures. Therefore, this embodiment of the application reduces abrupt transitions from lock screen dynamic wallpaper to desktop dynamic wallpaper by proportionally blending the later frames of the lock screen wallpaper texture with the earlier frames of the desktop wallpaper texture using the 3D graphics processing library. Simultaneously, the adoption of a single-service architecture effectively reduces system resource consumption and power consumption.
[0417] This application also provides a computer-readable storage medium storing a processor-executable computer program, which, when executed by a processor, is used to implement the dynamic wallpaper switching display method described above.
[0418] This application also provides a computer program product, including a computer program or computer instructions, which are stored in a computer-readable storage medium. The processor of the electronic device reads the computer program or computer instructions from the computer-readable storage medium and executes the computer program or computer instructions, causing the electronic device to perform the dynamic wallpaper switching display method described above.
[0419] In this embodiment, the electronic device, computer storage medium, or computer program product is used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can be referred to the beneficial effects of the corresponding method provided above, and will not be repeated here.
[0420] 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.
[0421] In the several 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 device, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0422] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0423] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0424] Any content in the various embodiments of this application, as well as any content in the same embodiment, can be freely combined. Any combination of the above content is within the scope of this application.
[0425] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0426] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
Claims
1. A method for switching and displaying dynamic wallpapers, applied to electronic devices, characterized in that, The method includes: Play the first live wallpaper and obtain N frames of the first wallpaper image in the first live wallpaper, wherein the N frames of the first wallpaper image include the last frame of the first live wallpaper image, the last frame of the wallpaper image is frame i, and N is an integer greater than 0; Obtain M frames of the second wallpaper image of the second live wallpaper, wherein the M frames of the second wallpaper image include the first frame of the second live wallpaper image, the first frame of the wallpaper image is frame i, and M is an integer greater than 0; A transition animation is generated based on the N frames of the first wallpaper image and the M frames of the second wallpaper image; The program switches from playing the first live wallpaper to playing the transition animation, and after the transition animation finishes playing, it plays the second live wallpaper.
2. The method according to claim 1, characterized in that, The step of obtaining the M-frame second wallpaper image of the second live wallpaper is performed before the step of playing the first live wallpaper; Alternatively, the step of obtaining the M-frame second wallpaper image of the second live wallpaper is performed during the playback of the first live wallpaper.
3. The method according to claim 1, characterized in that, M is equal to N.
4. The method according to claim 1, characterized in that, The playback of the first dynamic wallpaper includes: In response to the user's first action, a first interface is displayed, and the first live wallpaper is played on the first interface.
5. The method according to claim 4, characterized in that, The step of switching from playing the first live wallpaper to playing the transition animation, and then playing the second live wallpaper after the transition animation has finished playing, includes: When the first interface is displayed, in response to a second user action, a second interface is displayed, in which a transition animation is shown that switches from playing the first live wallpaper to playing the first live wallpaper.
6. The method according to claim 5, characterized in that, The user's second action includes at least one of the following: Screen off triggers the operation; Screen-on trigger operation; Screen lock trigger operation; Screen unlocking operation.
7. The method according to claim 5, characterized in that: The first interface and the second interface are different interfaces; wherein, the first interface is one of the three: lock screen interface, desktop interface, and always-on screen interface, and the second interface is another of the three: lock screen interface, desktop interface, and always-on screen interface.
8. The method according to claim 5, characterized in that, The first interface is the lock screen interface, the second interface is the desktop interface, the first live wallpaper is the lock screen live wallpaper, and the second live wallpaper is the desktop live wallpaper; Alternatively, the first interface is the desktop interface, the second interface is the lock screen interface, the first live wallpaper is the desktop live wallpaper, and the second live wallpaper is the lock screen live wallpaper; Alternatively, the first interface is an always-on screen interface, the second interface is a lock screen interface, the first live wallpaper is an always-on screen live wallpaper, and the second live wallpaper is a lock screen live wallpaper; Alternatively, the first interface may be a lock screen interface, the second interface may be an always-on screen interface, the first live wallpaper may be a lock screen live wallpaper, and the second live wallpaper may be a always-on screen live wallpaper.
9. The method according to claim 5, characterized in that: The step of switching from playing the first live wallpaper to playing the transition animation, and then playing the second live wallpaper after the transition animation has finished playing, includes: In response to the user's second action, the transition animation is played on the first interface; After the transition animation finishes playing, the second live wallpaper is played on the first interface.
10. The method according to claim 9, characterized in that: The user's second action is a screen tap, a screen-on trigger, or a wallpaper switching action.
11. The method according to any one of claims 1 to 10, characterized in that: The step of generating a transition animation based on the N frames of the first wallpaper image and the M frames of the second wallpaper image includes: The N frames of the first wallpaper images are subjected to texture conversion processing to obtain at least one frame of the first wallpaper texture; The M frames of the second wallpaper image are subjected to texture conversion processing to obtain at least one frame of the second wallpaper texture; The transition animation is obtained by performing a blended rendering process on at least one frame of the first wallpaper texture and at least one frame of the second wallpaper texture.
12. The method according to claim 11, characterized in that: The N-frame first wallpaper image is the last frame of the first live wallpaper, and the M-frame second wallpaper image is the first frame of the second live wallpaper.
13. The method according to claim 12, characterized in that: The step of performing a mixed rendering process on at least one frame of the first wallpaper texture and at least one frame of the second wallpaper texture to obtain the transition animation includes: Get the first wallpaper texture from the last frame of the first live wallpaper; Get the second wallpaper texture from the first frame image of the second live wallpaper; Obtain the target number of frames for playing the transition animation, and determine the target number of rendering times based on the target number of frames; The first wallpaper texture and the second wallpaper texture are subjected to mixed rendering processing with a target number of renderings to obtain the transition animation.
14. The method for switching and displaying a live wallpaper according to any one of claims 1 to 10, wherein obtaining N frames of the first wallpaper image in the first live wallpaper comprises: The first live wallpaper is decoded by the first media decoder to obtain N frames of first wallpaper images in the first live wallpaper, and the N frames of first wallpaper images are stored in the first image data cache by the first media decoder. The process of obtaining the M-frame second wallpaper image of the second dynamic wallpaper includes: The second live wallpaper is decoded by the second media decoder to obtain the M-frame second wallpaper image of the second live wallpaper, and the M-frame second wallpaper image is stored in the second image data cache by the second media decoder.
15. The method according to claim 14, characterized in that: The step of generating a transition animation based on the N frames of the first wallpaper image and the M frames of the second wallpaper image includes: The first image data texture processor reads the N frames of first wallpaper images from the first image data cache, performs texture conversion processing on the N frames of first wallpaper images to obtain at least one frame of first wallpaper texture, and stores the at least one frame of first wallpaper texture in the first texture storage space. The second image data texture processor reads the M frames of the second wallpaper images from the second image data cache, performs texture conversion processing on the M frames of the second wallpaper images to obtain at least one frame of the second wallpaper texture, and stores the at least one frame of the second wallpaper texture in the second texture storage space; The transition animation is generated by calling the rendering pipeline of the 3D graphics processing library to perform mixed rendering of at least one frame of the first wallpaper texture in the first texture storage space and at least one frame of the second wallpaper texture in the second texture storage space.
16. The method according to claim 15, characterized in that: The step of generating the transition animation by calling the rendering pipeline of the 3D graphics processing library to perform mixed rendering of at least one frame of the first wallpaper texture in the first texture storage space and at least one frame of the second wallpaper texture in the second texture storage space includes: Obtain the target frame number of the transition animation; The system calls a 3D graphics processing library to read the first wallpaper texture of the target frame number from the first texture storage space, and to read the second wallpaper texture of the target frame number from the second texture storage space. The first wallpaper texture and the second wallpaper texture of the target frame number are mixed and rendered to generate the transition animation.
17. An electronic device comprising: At least one processor and at least one memory; The memory is used to store programs that enable the electronic device to perform the methods provided in any one of claims 1 to 16, and to store data involved in implementing the methods in any one of claims 1 to 16; the processor is configured to execute the programs stored in the memory.
18. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed on a computer, cause the computer to perform the method as described in any one of claims 1 to 16.
19. A computer program product comprising a computer program or computer instructions stored in a computer-readable storage medium, wherein a processor of an electronic device reads the computer program or computer instructions from the computer-readable storage medium, and the processor executes the computer program or computer instructions to cause the electronic device to perform the method as described in any one of claims 1 to 16.