Transitional dynamic effect playing method and electronic equipment
By directly contacting the drawing process of sending transition animation after the animation effect playback thread receives the animation effect start notification message, the problem of poor click response of electronic devices when playing the transition animation effect is solved, and faster response time and better user experience are achieved.
Patent Information
- Application Number
- CN202311076331.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-24
- Publication Date
- 2025-03-04
AI Technical Summary
In some scenarios that include playback transitional effects, electronic devices have the problem of poor click response, which leads to lagging in transitional effects display and affecting user experience.
After the animation playback thread receives the animation start notification message, it directly contacts the drawing process of the transition animation without waiting for the Vsync signal to trigger, thereby optimizing the click response delay.
This method can shorten the click response delay of half a Vsync cycle on average, improve user experience and improve the display efficiency of transitional motion.
Smart Images

Figure CN119557022A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of interface switching, and specifically relates to a transition animation playback method and an electronic device. Background Art
[0002] With the development of intelligent technology, users can achieve human-computer interaction with electronic devices through screens. For example, users can click on the application controls on the screen to trigger the application interface switch. When switching interfaces, transition effects can be used to provide better visual effects and make the interface switch smoother and more natural.
[0003] Among them, click response delay is a key indicator for measuring touch experience. For scenes that require transition effects, click response delay refers to the time required from the user inputting the click operation to the electronic device starting to play the transition effect.
[0004] At present, in some scenes including playing transition effects, there is still a problem of poor click response. That is, electronic devices have a problem of lagging in displaying transition effects, which affects the user experience. Summary of the invention
[0005] The present application provides a transition animation playback method and an electronic device, which can optimize the click response delay and provide a better user experience.
[0006] In a first aspect, the present application provides a method for playing a transition animation, which is applied to an electronic device, and the method includes: the electronic device displays a first interface, and the first interface includes a first control; in response to a click operation input by a user on the first control, a drawing operation on a second interface is performed; after completing the drawing operation on the second interface, an animation start notification message is sent to a target animation playback thread, and the animation start notification message is used to notify the target animation playback thread to start the animation drawing operation; in response to the animation start notification message, the target animation playback thread draws a transition animation between the first interface and the second interface; the transition animation includes multiple frames of animation effect pictures; after the display of the multiple frames of animation effect pictures is completed, the electronic device displays the second interface.
[0007] In this way, compared with the solution of triggering the drawing of transition animations through the Vsync signal, the present application can trigger the drawing process of the transition animation after the animation playback thread receives the animation start notification message, without waiting for the trigger of the Vsync signal. This can shorten the click response delay by an average of half a Vsync cycle.
[0008] In one implementable manner, in response to the motion effect start notification message, the target motion effect playback thread draws the transition motion effect between the first interface and the second interface, including: in response to the motion effect start notification message, the target motion effect playback thread draws the first motion effect picture in the multiple frames of motion effect pictures; the first motion effect picture is the first frame of motion effect picture in the multiple frames of motion effect pictures; before drawing the second motion effect picture, a Vsync request signal is sent to the image synthesizer; the second motion effect picture includes the motion effect pictures in the multiple frames of motion effect pictures except the first frame of motion effect picture; in response to the Vsync signal, the target motion effect playback thread draws the second motion effect picture.
[0009] In one implementable manner, in response to the animation start notification message, the target animation playback thread draws the transition animation between the first interface and the second interface, including: in response to the animation start notification message, the target animation playback thread skips the first frame of the multiple frames of animation, and draws the second frame of the multiple frames of animation; wherein the second frame of the animation is the next frame of the first frame of the animation in the multiple frames of animation, and the first frame of the animation is the same as the first interface; before drawing the third animation, a Vsync request signal is sent to the image synthesizer; the third animation includes the animations in the multiple frames of animation except the first frame and the second frame; in response to the Vsync signal, the target animation playback thread draws the third animation.
[0010] In this way, after receiving the animation start notification message, the first frame of the animation screen is skipped, and the second frame of the animation screen is directly drawn and displayed. In addition, the trigger condition for the drawing operation of the second frame of the animation screen is the animation start notification message. In this way, compared with the solution of triggering the drawing of transition animations through Vsync signals, the click response time can be shortened by an average of one and a half Vsync cycles.
[0011] In one implementable manner, the drawing of the second frame of the multiple frames of animation pictures includes: in response to the animation start notification message, obtaining interface drawing data and animation parameters corresponding to the second interface, the animation parameters including the correspondence between the animation playback progress and the animation playback time, and the animation type; determining the animation playback time corresponding to the second frame of the animation picture; determining the animation playback progress corresponding to the second frame of the animation picture based on the animation curve and the animation playback time corresponding to the second frame of the animation picture; determining the interface drawing data corresponding to the second frame of the animation picture based on the interface drawing data corresponding to the second interface, the animation playback progress corresponding to the second frame of the animation picture, and the animation type; and drawing the second frame of the animation picture based on the interface drawing data corresponding to the second frame of the animation picture.
[0012] In this way, based on the interface drawing data and the dynamic effect parameters corresponding to the second interface, the interface drawing data corresponding to each frame of the dynamic effect picture can be determined, so that each frame of the dynamic effect picture can be drawn.
[0013] In one achievable method, before executing the drawing operation on the second interface, the method also includes: in response to a click operation input by a user to the first control, determining the click operation scenario; when the click operation scenario is a launch application scenario, generating drawing information of the second interface, the drawing information includes remote animation indication information; the remote animation indication information is used to indicate that the target animation playback thread is a remote animation playback thread.
[0014] In this way, transition effects can be divided into remote effects and non-remote effects. The animation playback thread of the remote animation can be the desktop launcher, and the animation playback thread of the local animation can be the animation playback thread anim.lf inside the system service, that is, the system default animation thread.
[0015] In one possible implementation, after the drawing operation on the second interface is completed, a motion effect start notification message is sent to the target motion effect playback thread, including: after the drawing operation on the second interface is completed, obtaining the drawing information; determining the target motion effect playback thread based on the drawing information; and sending a motion effect start notification message to the target motion effect playback thread.
[0016] In one achievable manner, determining the target motion effect playback thread based on the drawing information includes: when the drawing information includes the remote motion effect indication information, determining the remote motion effect playback thread as the target motion effect playback thread; when the drawing information does not include the remote motion effect indication information, determining the local motion effect playback thread as the target motion effect playback thread.
[0017] In one achievable manner, the local motion effect playing thread includes a default motion effect playing thread in the system service of the electronic device, and the remote motion effect playing thread includes a desktop launcher.
[0018] In one achievable manner, the first interface is a main interface of the electronic device; or, the first interface is an interface of an application in the electronic device.
[0019] Thus, if the first interface is the main interface of the electronic device, the corresponding click operation scenario is the application startup scenario. If the first interface is the interface of the application in the electronic device, the corresponding click operation scenario is the application in-application click operation scenario.
[0020] In a second aspect, the present application provides a transition animation playback method, which is applied to an electronic device, and the method comprises: the electronic device displays a first interface, the first interface includes a first control; in response to a click operation input by a user on the first control, a drawing operation on the second interface is performed; after completing the drawing operation on the second interface, a motion effect start notification message is sent to a target motion effect playback thread, the motion effect start notification message is used to notify the target motion effect playback thread to start the motion effect playback operation; in response to the motion effect start notification message, a first Vsync request signal is sent to an image synthesizer; the first Vsync request signal is used to request the drawing of a transition animation between the first interface and the second interface; the transition animation includes multiple frames of animation images; in response to the first Vs ync signal, the target animation playback thread skips the first frame of animation in the multiple frames of animation, and draws the second frame of animation in the multiple frames of animation; wherein the second frame of animation is the next frame of animation of the first frame of animation in the multiple frames of animation, and the first frame of animation is the same as the first interface; before drawing the third animation, a second Vsync request signal is sent to the image synthesizer; the third animation includes the animations in the multiple frames of animation except the first frame and the second frame; in response to the second Vsync signal, the target animation playback thread draws the third animation; after the second frame and the third animation are displayed, the electronic device displays the second interface.
[0021] In this way, after receiving the animation start notification message, the first frame of the animation screen is skipped, and the second frame of the animation screen is directly drawn and displayed. In this way, compared with the solution of triggering the drawing of the first frame of the transition animation screen by the Vsync signal, the click response time can be shortened by one Vsync cycle.
[0022] In one implementable manner, in response to the first Vsync signal, the target animation playback thread skips the first animation frame in the multiple animation frames and draws the second animation frame in the multiple animation frames, including: in response to the first Vsync signal, obtaining interface drawing data and animation parameters corresponding to the second interface, the animation parameters including the correspondence between the animation playback progress and the playback time and the animation type; determining the animation playback time corresponding to the second animation frame; determining the animation playback progress corresponding to the second animation frame based on the animation curve and the animation playback time corresponding to the second animation frame; determining the interface drawing data corresponding to the second animation frame based on the interface drawing data corresponding to the second interface, the animation playback progress corresponding to the second animation frame, and the animation type; drawing the second animation frame based on the interface drawing data corresponding to the second animation frame.
[0023] In a second aspect, the present application provides an electronic device, comprising a memory and a processor; the memory and the processor are coupled; the memory is used to store computer program code, the computer program code comprises computer instructions, and when the processor executes the computer instructions, the electronic device executes a method as described in any one of the first aspects.
[0024] In a third aspect, the present application provides a computer program product, comprising a computer program or instructions, which, when executed on a computer, enables the computer to execute the method as described in any one of the first aspects. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0026] Figure 1 A schematic diagram of human factors analysis of response delay provided in an embodiment of the present application;
[0027] Figure 2 An example diagram of a transition effect playback interface provided in an embodiment of the present application;
[0028] Figure 3 A flowchart of a transition effect broadcasting method provided in an embodiment of the present application;
[0029] Figure 4 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;
[0030] Figure 5 A schematic diagram of the software structure of an electronic device provided in an embodiment of the present application;
[0031] Figure 6 A flowchart of another method for broadcasting transition effects provided in an embodiment of the present application;
[0032] Figure 7 A flowchart of a method for determining a motion effect playback thread provided in an embodiment of the present application;
[0033] Figure 8 A flowchart of a method for drawing a dynamic effect picture provided in an embodiment of the present application;
[0034] Fig. 9 An example diagram of a dynamic effect curve provided in an embodiment of the present application;
[0035] Fig.10 A flowchart of another method for broadcasting transition effects provided in an embodiment of the present application;
[0036] Fig.11 A flowchart of another method for broadcasting transition effects provided in an embodiment of the present application;
[0037] Fig.12 A flowchart of another method for broadcasting transition effects provided in an embodiment of the present application;
[0038] Fig.13 A flowchart of another method for broadcasting transition effects provided in an embodiment of the present application;
[0039] Fig.14 A schematic diagram of the structure of a transition effect broadcasting device provided in an embodiment of the present application;
[0040] Fig.15 A schematic diagram of the structure of another transition effect broadcasting device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0041] The technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0042] With the development of touch screen technology, users can achieve human-computer interaction with electronic devices through touch screens. For example, users can input touch operations such as sliding operations and clicking operations through the touch screen, so that the electronic device can make corresponding responses according to the touch operations input by the user.
[0043] Among them, the response delay of the electronic device to the user's touch operation is a key indicator for measuring the touch experience. Response delay refers to the time required for the electronic device to display the interface corresponding to the touch operation on the display screen after receiving the touch operation input by the user. The shorter the response delay of the electronic device to the touch operation, the better the user's touch experience. On the contrary, if the response delay of the electronic device to the touch operation is long, the user will feel that the display is lagging and stuck, affecting the user experience.
[0044] Figure 1 A schematic diagram of human factors analysis of response delay provided in an embodiment of the present application. Figure 1 As shown in the figure, the user's perception threshold for sliding and hand response delay is 10ms, the user's perception threshold for click response delay is 80ms, the average processing cycle of the electronic device's perception system is 100ms, the average duration of a single scan + gaze of the human eye is 230ms, the feedback delay that feels directly controllable is 300ms, the feedback delay that starts to feel delayed is 500ms, and the upper limit of a single scan + gaze of the human eye is 700ms. In other words, if the sliding and hand response delay is greater than 10ms, the user will perceive the sliding and hand response delay. If the click response delay is greater than 80ms, the user will perceive the click response delay. When the playback time of the transition effect is around 100ms to 700ms, the user perceives that the effect is smooth and continuous.
[0045] Therefore, in order to improve the visual experience of users, it is hoped that the response delays of various electronic devices can be shortened as much as possible. For example, the solution provided in the embodiment of the present application is used to optimize the click response delay to shorten the click response delay.
[0046] At present, in some click operation scenarios, the click response delay of electronic devices is relatively large, so further optimization is needed. For example, in some scenarios where a click operation is input in some applications to trigger the switching interface, the click response delay of the electronic device is 96.2ms. For another example, in the scenario where some application controls are clicked to trigger the application startup, the click response delay of the electronic device is 89.75ms.
[0047] Therefore, this application hopes to further optimize the click response delay and improve the user experience.
[0048] In the embodiment of the present application, the click operation scenario includes an application launch scenario and an in-application click operation scenario. The application launch scenario refers to clicking on an application control to trigger a scenario in which the application is launched, that is, in response to a user's click operation on an application control, the electronic device switches from the main interface (also referred to as the desktop, which may include multiple application controls) to the application's application main interface, and the application launch scenario belongs to a cold start scenario. The in-application click operation scenario refers to performing a click operation within the application interface of the application, triggering the electronic device to switch from the current application interface to another application interface of the application, and the in-application click operation scenario belongs to a hot start scenario.
[0049] It can be seen that both the application launch scenario and the in-application click operation scenario involve interface switching. Currently, when switching interfaces, transition effects are used to provide better visual effects, making the interface switching smoother and more natural. Thus, for the click operation scenario, the click response delay refers to the time from when the user inputs the click operation to when the electronic device starts playing the transition effect.
[0050] For example, Figure 2 As shown in (a), the user clicks the video application control on the desktop of the electronic device 100. Figure 2 As shown in (b), (c) and (d), in response to a click operation input by the user, the electronic device first plays a transition effect and then switches the interface to the main interface of the video application. Figure 2 As shown in (b), (c) and (d), the transition effect is a transition effect that gradually enlarges the main interface of the video application until it covers the entire display interface. In this way, the transition effect is used to provide a visual transition effect, making the interface switching smoother and more natural.
[0051] The following takes the in-app click operation scenario as an example to explain the process from the user inputting the click operation to the electronic device starting to play the transition effect.
[0052] Figure 3 This is a flow chart of a transition effect playback method provided in an embodiment of the present application. Figure 3 As shown, the method may include the following steps:
[0053] S201, receiving a click operation input by a user on a first control in a first interface, and generating a click event.
[0054] In some embodiments, the first interface may be an interface in any application in the electronic device, and thus the first control may be any control in any application interface. For example, the first interface is a video search interface in a video application, and the first control is a control corresponding to video A in the video search interface. The click operation scenario in this case is an in-application interface switching scenario, and the in-application interface switching scenario belongs to a hot start scenario.
[0055] S202: Report the point reporting event to the target application.
[0056] When the touch sensor in the screen receives a touch operation, the kernel layer processes the touch operation into a reporting event (including touch coordinates, touch strength, timestamp of the touch operation, and other information). The kernel layer further reports the reporting event to the application framework layer. The application framework layer can parse the information of the reporting event (including: operation type and reporting point position, etc.) and determine the target application based on the current focus, and send the parsed information to the target application. The focus can be the touch point position in the touch operation. The target application is the application running in the foreground of the electronic device or the application corresponding to the touch position in the touch operation. The target application can determine the control corresponding to the click operation based on the parsed information of the reporting event (for example, the reporting point position). The switching interface corresponding to the control can be further determined.
[0057] For example, if the first interface is a video search interface in a video application, and the first control is a control corresponding to video A in the video search interface, the application framework layer can parse out the corresponding target application as a video application based on the reporting event.
[0058] S203, in response to receiving the reporting event, the target application starts a target activity (Activity) and starts drawing the second interface.
[0059] Activity is a component that represents the application interface. It is a part of the Android application and is responsible for managing the interaction between the user and the application. Each Activity corresponds to a user interface and can contain various view and layout elements for displaying information, receiving user input, and performing operations.
[0060] An Activity can be understood as a window of an application where users can interact. It can contain user interface elements such as menus, buttons, text boxes, and interactions with other Activities. By starting different Activities, users can switch between different interfaces and functions within the application.
[0061] In response to receiving the report event, the target application can create and start a new activity, namely the target activity, by calling the system's start activity interface. The target activity refers to the activity corresponding to the second interface. The second interface refers to the interface to which the target switches based on the click operation.
[0062] S204: Pause the Activity corresponding to the first interface.
[0063] After receiving the reporting event, the target application starts a new Activity and pauses the previous Activity. The new Activity is the Activity corresponding to the second interface, and the previous Activity is the Activity corresponding to the first interface. Pausing the previous Activity means that the previous Activity will lose focus and enter a paused state, and stop responding to user input.
[0064] Exemplarily, assuming that the first interface is a video search interface and the second interface is a video detail interface, after receiving the reporting event, the video application starts the Activity corresponding to the video detail interface and pauses the Activity of the video search interface.
[0065] After the target application starts the Activity corresponding to the click operation, it begins to draw the second interface.
[0066] Among them, the drawing process of the second interface mainly includes: starting a new Activity and entering a visible state. Then, further enter the activity state (Activity Resume). In the Activity Resume state, the system will perform drawing operations on the second interface. This process involves steps such as doFrame and finishDrawing. doFrame refers to the drawing process of each frame of the Android system. In the doFrame stage, the system will perform drawing operations on each frame of the second interface, including measuring, laying out, and drawing the interface. finishDrawing refers to the last step of the drawing process, which indicates that the drawing operation has been completed and the transition effect is ready.
[0067] S205, after completing the drawing operation on the second interface, the target application notifies the system server that the animation preparation is complete.
[0068] S206: The system service sends a motion effect start notification message apptransition ready to the motion effect playing thread.
[0069] In some embodiments, the second interface may include one or more frames. Thus, if the second interface includes one frame, after completing the drawing operation on the second interface, the system service sends a motion effect start notification message to the motion effect playback thread. If the second interface includes multiple frames, after completing the drawing operation on the first frame of the multiple frames, the system service sends a motion effect start notification message to the motion effect playback thread. The motion effect start notification message is used to notify the motion effect playback thread to start the motion effect drawing operation.
[0070] S207, after receiving the motion effect start notification message, the motion effect playing thread sends a first vertical synchronization (vertical synchronization, Vsync) request signal to the surface flinger (SF).
[0071] The Vsync signal is a periodic signal, and the Vsync signal period can be set according to the screen refresh rate. For example, when the screen refresh rate is 60Hz, the Vsync signal period is 16.6ms, that is, the electronic device generates a control signal every 16.6ms to trigger the Vsync signal period. For another example, when the screen refresh rate is 90Hz, the Vsync signal period can be 11.1ms, that is, the electronic device generates a control signal every 11.1ms to trigger the Vsync signal period.
[0072] S208: The image synthesizer sends a first Vsync signal to the motion effect playing thread.
[0073] S209, in response to receiving the first Vsync signal, the animation playing thread draws a first frame of animation picture between the first interface and the second interface.
[0074] S210, after completing the drawing operation of the first frame of the dynamic effect picture, the first frame of the dynamic effect picture is displayed on the screen.
[0075] S211, sending a second Vsync request signal to the image synthesizer.
[0076] S212, the image synthesizer sends a second Vsync signal to the motion effect playback thread.
[0077] S213, in response to receiving the second Vsync signal, the animation playing thread starts drawing a second frame of animation picture between the first interface and the second interface.
[0078] S214, after completing the drawing operation of the second frame of the dynamic effect picture, the second frame of the dynamic effect picture is displayed on the screen.
[0079] Repeat the above steps S211 to S214 until the last frame of the dynamic effect picture is drawn and displayed on the screen.
[0080] Among them, the drawn dynamic effect picture can be driven by the display of the kernel layer so that the screen (display) displays the corresponding dynamic effect picture. The embodiment of the present application does not limit the display process of the dynamic effect. For example, the dynamic effect picture can be displayed based on the trigger mechanism of the existing Vsync signal. That is, the screen display refresh process is triggered by the hardware Vsync signal.
[0081] It should be noted that the above embodiment only takes the click operation scenario within the application as an example to exemplify the playback process of the transition animation, and does not limit the playback process of the transition animation. Among them, the playback process of the transition animation of the application startup scenario can refer to the process of the above embodiment. The difference is that: in the application startup scenario, the target application is the desktop launcher, and correspondingly, the desktop launcher does not start a new Activity, but a cold start animation window. In this way, in the above step S205, after completing the drawing operation of the cold start animation window, the desktop launcher notifies the system service (system sever) that the animation preparation is complete.
[0082] In summary, Figure 3 In the transition animation playback method shown, after the animation playback thread receives the animation start notification message, it first requests the Vsync signal from the image synthesizer. After receiving the Vsync signal, the animation playback thread is triggered to start the animation drawing process. In other words, after the animation playback thread receives the animation start notification message, it does not immediately trigger the execution of the animation drawing process, but waits for the triggering of the Vsync signal.
[0083] However, from the receipt of the animation start notification message to the start of the animation drawing process, the worst case requires waiting for a Vsync cycle. The best case is just catching up with a Vsync signal. In this case, the animation drawing process can be started immediately in response to receiving the Vsync signal, but the probability of this situation is extremely low. Usually, from the receipt of the animation start notification message to the start of the animation drawing process, it takes an average of half a Vsync cycle to wait. In this way, from the user's perspective, the transition animation is displayed at least half a Vsync cycle later.
[0084] In addition, in some embodiments, the first frame of the animation drawn in step S209 is exactly the same as the content of the first interface. Therefore, even if the first frame of the animation is updated on the screen, from the user's perspective, the screen does not change at all, that is, the user cannot perceive the change in the user interface.
[0085] Based on the above description, the embodiments of the present application provide three transition effect playback methods to optimize click response.
[0086] The first solution: After the animation playback thread receives the animation start notification message, it can trigger the drawing process of the first frame of the animation without waiting for the trigger of the Vsync signal, thereby optimizing the click response delay. In particular, for the original click response delay of 89.75ms, 96.2ms, etc., which just exceeds 80ms, it is likely to be optimized to within 80ms, so that users cannot perceive the response delay, improving the user experience.
[0087] The second solution: in response to receiving the first Vsync signal, skip the first frame of the dynamic effect screen and directly start the drawing process from the second frame of the dynamic effect screen. In this way, in response to the user's click operation, the display starts directly from the second frame of the dynamic effect screen, and the user can perceive the change of the interface, thereby optimizing the click response delay and improving the user experience.
[0088] The third solution: Combine the first solution with the second solution, that is, after the animation playback thread receives the animation start notification message, it can trigger the execution of the second frame animation screen drawing process. In this way, there is no need to wait for the trigger of the Vsync signal, and the drawing process of the first frame animation screen is skipped, thereby optimizing the click response delay and improving the user experience.
[0089] The transition effect playback method provided in the embodiment of the present application can be applied to any electronic device with a touch screen, such as a mobile phone, a watch, a tablet computer, etc. For example, the specific structure of the electronic device can be found in Figure 4 Schematic diagram of the structure of the electronic device shown.
[0090] like Figure 4 As shown, the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0091] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0092] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (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), etc. Different processing units may be independent devices or integrated into one or more processors.
[0093] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.
[0094] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0095] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0096] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple groups of I2C buses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces. For example: the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 communicates with the touch sensor 180K through the I2C bus interface, thereby realizing the touch function of the electronic device 100.
[0097] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to achieve communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 via the I2S interface to achieve the function of answering a call through a Bluetooth headset.
[0098] The PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface to realize the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
[0099] The UART interface is a universal serial data bus for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is generally used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 through the UART interface to implement the function of playing music through a Bluetooth headset.
[0100] The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the shooting function of the electronic device 100. The processor 110 and the display screen 194 communicate via the DSI interface to implement the display function of the electronic device 100.
[0101] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
[0102] The USB interface 130 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transfer data between the electronic device 100 and a peripheral device. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices, etc.
[0103] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0104] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. While the charging management module 140 is charging the battery 142, it may also power the electronic device through the power management module 141.
[0105] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.
[0106] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
[0107] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0108] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
[0109] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.
[0110] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0111] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).
[0112] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
[0113] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
[0114] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
[0115] ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.
[0116] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
[0117] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
[0118] Video codecs are used to compress or decompress digital videos. The electronic device 100 may support one or more video codecs. Thus, the electronic device 100 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0119] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.
[0120] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.
[0121] The internal memory 121 can be used to store computer executable program codes, which include instructions. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the electronic device 100 by running instructions stored in the internal memory 121, and / or instructions stored in a memory provided in the processor.
[0122] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0123] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.
[0124] The speaker 170A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or listen to a hands-free call through the speaker 170A. A plurality of speakers 170A can be provided in the electronic device 100. For example, a speaker 170A can be provided on the top of the electronic device 100, and a speaker 170A can also be provided on the bottom, and so on.
[0125] The receiver 170B, also called a "receiver", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or voice message, the receiver 170B can be placed close to the human ear to receive the voice. In some embodiments, the speaker 170A and the receiver 170B can also be set as one component, which is not limited in the present application.
[0126] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to microphone 170C to input the sound signal into microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify the sound source, realize directional recording function, etc.
[0127] The earphone interface 170D is used to connect a wired earphone and can be a USB interface 130 or a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.
[0128] The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be set on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 100 detects the touch operation intensity according to the pressure sensor 180A. The electronic device 100 can also calculate the touch position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.
[0129] The gyro sensor 180B can be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., x, y, and z axes) can be determined by the gyro sensor 180B. The gyro sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyro sensor 180B detects the angle of the electronic device 100 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the electronic device 100 through reverse movement to achieve anti-shake. The gyro sensor 180B can also be used for navigation and somatosensory game scenes.
[0130] The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.
[0131] The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip leather case. In some embodiments, when the electronic device 100 is a flip phone, the electronic device 100 can detect the opening and closing of the flip cover according to the magnetic sensor 180D. Then, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, the flip cover can be automatically unlocked.
[0132] The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in all directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device and is applied to applications such as horizontal and vertical screen switching and pedometers.
[0133] The distance sensor 180F is used to measure the distance. The electronic device 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.
[0134] The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light outward through the light emitting diode. The electronic device 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that there is no object near the electronic device 100. The electronic device 100 can use the proximity light sensor 180G to detect that the user holds the electronic device 100 close to the ear to talk, so as to automatically turn off the screen to save power. The proximity light sensor 180G can also be used in leather case mode and pocket mode to automatically unlock and lock the screen.
[0135] The ambient light sensor 180L is used to sense the ambient light brightness. The electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touches.
[0136] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.
[0137] The temperature sensor 180J is used to detect temperature. In some embodiments, the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device 100 reduces the performance of a processor located near the temperature sensor 180J to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to avoid abnormal shutdown of the electronic device 100 due to low temperature. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 performs a boost on the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
[0138] The touch sensor 180K is also called a "touch control device". The touch sensor 180K can be set on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also called a "touch control screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194.
[0139] The bone conduction sensor 180M can obtain a vibration signal. In some embodiments, the bone conduction sensor 180M can obtain a vibration signal of a vibrating bone block of the vocal part of the human body. The bone conduction sensor 180M can also contact the human pulse to receive a blood pressure beat signal. In some embodiments, the bone conduction sensor 180M can also be set in an earphone and combined into a bone conduction earphone. The audio module 170 can parse out a voice signal based on the vibration signal of the vibrating bone block of the vocal part obtained by the bone conduction sensor 180M to realize a voice function. The application processor can parse the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 180M to realize a heart rate detection function.
[0140] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The electronic device 100 may receive key input and generate key signal input related to user settings and function control of the electronic device 100.
[0141] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.
[0142] Indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.
[0143] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to and separated from the electronic device 100 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195. The electronic device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the electronic device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
[0144] The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. In the embodiment of the present invention, the Android system of the layered architecture is taken as an example to exemplify the software structure of the electronic device 100.
[0145] Figure 5 It is a software structure block diagram of the electronic device 100 according to an embodiment of the present application.
[0146] The layered architecture divides the software into several layers, each with clear roles and division of labor. The 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 Android runtime and system library, and the kernel layer.
[0147] The application layer can include a series of application packages.
[0148] like Figure 5 As shown, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, desktop launcher, etc.
[0149] In an embodiment of the present application, in the application startup scenario, the desktop launcher can be used as the animation playback thread.
[0150] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.
[0151] like Figure 5As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, an image synthesizer, and the like.
[0152] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.
[0153] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
[0154] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.
[0155] The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including connecting, hanging up, etc.).
[0156] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0157] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.
[0158] The image synthesizer is used to generate a Vsync signal. The image synthesizer may include a Vsync thread, and the Vsync thread is used to generate a next Vsync signal according to the Vsync signal request.
[0159] Android Runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.
[0160] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.
[0161] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
[0162] The system library may include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), system services, etc.
[0163] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.
[0164] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0165] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0166] A 2D graphics engine is a drawing engine for 2D drawings.
[0167] The system service may include anim.lf, a motion effect playback thread, and the click operation scene in the application may call the anim.lf motion effect playback thread in the system service as the motion effect playback thread. The system service may also be used to send a motion effect start notification message to the motion effect playback thread to notify the motion effect playback thread to start the motion effect drawing operation.
[0168] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.
[0169] In the embodiment of the present application, the drawn dynamic effect picture can be driven by the display of the kernel layer so that the screen (display screen) displays the corresponding dynamic effect picture.
[0170] The following first describes the first click response optimization solution provided in the embodiment of the present application.
[0171] Figure 6 A flowchart of a transition effect playback method provided in an embodiment of the present application is shown in FIG. Figure 6 As shown, the method may include the following steps:
[0172] S301, the system service sends a motion effect start notification message to the motion effect playback thread.
[0173] In the embodiment of the present application, transition effects can be divided into remote effects and non-remote effects (also called near-end effects). Among them, remote effects can be understood as transition effects between different applications, and non-remote effects can be understood as transition effects between different interfaces of the same application. In other words, in the embodiment of the present application, the transition effect of the application startup scene belongs to the remote effect, and the transition effect of the click operation scene within the application belongs to the non-remote effect.
[0174] For remote animations and non-remote animations, the corresponding animation playback threads responsible for executing animation drawing operations may be different. For example, for the application startup scenario (cold start scenario), the remote animation playback thread can be used to execute animation drawing operations; for the in-application click operation scenario (hot start scenario), the local animation playback thread can be used to execute animation drawing operations. Among them, the remote animation playback thread can be the desktop launcher, and the local animation playback thread can be the animation playback thread anim.lf inside the system service, that is, the system default animation thread.
[0175] In this way, if the current click operation scenario is to launch an application scenario, the system service can send an animation start notification message to the desktop launcher to trigger the desktop launcher to perform animation drawing operations. If the current click operation scenario belongs to an in-application click operation scenario, the system service sends an animation start notification message to the animation playback thread anim.lf to trigger the animation playback thread anim.lf to perform animation drawing operations.
[0176] Figure 7 A flowchart of a method for determining a motion effect playback thread provided in an embodiment of the present application. Figure 7 As shown, the following steps may be included:
[0177] S3011: In response to receiving a click operation input by a user to a first control, determining a click operation scenario.
[0178] S3012: When the click operation scenario is a scenario of launching an application program, generating drawing information of the second interface, wherein the drawing information includes remote motion effect indication information.
[0179] In some embodiments, the drawing information of the second interface may be generated during the stage of starting the target Activity. The remote motion effect indication information in the drawing information is used to indicate that the execution subject responsible for the motion effect drawing operation is the remote motion effect playback thread.
[0180] Correspondingly, when the click operation scenario is an in-application click operation scenario, the generated drawing information of the second interface does not include the remote motion effect indication information.
[0181] S3013, after completing the drawing operation on the second interface, obtaining drawing information.
[0182] S3014: Determine whether the drawing information includes remote animation indication information.
[0183] S3015: When the drawing information includes remote motion effect indication information, determine the remote motion effect playback thread as the motion effect playback thread.
[0184] S3016: When the drawing information does not include the remote motion effect indication information, determine the local motion effect playback thread as the motion effect playback thread.
[0185] In this way, if the remote animation indication information is not found in the drawing information, it indicates that the current click operation scenario is to start the application scenario. In this case, a motion effect start notification message can be sent to the remote animation playback thread desktop launcher. If the remote animation indication information can be found in the drawing information, it indicates that the current click operation scenario is an in-application click operation scenario. In this case, a motion effect start notification message can be sent to the near-end animation playback thread anim.lf.
[0186] If the desktop launcher is used as the animation playback thread, the animation can be linked with other application controls on the desktop to improve the user experience.
[0187] S302: After the animation playing thread receives the animation starting notification message, the animation playing thread draws the first frame animation picture between the first interface and the second interface.
[0188] Among them, the steps before the animation playing thread receives the animation start notification message can refer to the description of the above steps S201 to S206, which will not be repeated here.
[0189] In the embodiment of the present application, after the animation playback thread receives the animation start notification message, it is not necessary to send the first Vsync request signal to the image synthesizer, that is, it is not necessary to wait for the first Vsync signal to trigger the drawing operation of the first frame of the animation effect screen. Instead, after the animation playback thread receives the animation start notification message, it directly triggers the drawing operation of the first frame of the animation effect screen. In this way, the animation drawing process can be triggered immediately to display the first frame of the animation effect screen in the transition animation as soon as possible.
[0190] S303, after completing the drawing operation of the first frame of the dynamic effect picture, the first frame of the dynamic effect picture is displayed on the screen.
[0191] S304, the animation playing thread sends a Vsync request signal to the image synthesizer.
[0192] S305, the image synthesizer sends a Vsync signal to the motion effect playback thread.
[0193] S306, in response to receiving the Vsync signal, the animation playing thread draws a second frame of animation picture between the first interface and the second interface.
[0194] S307, after completing the drawing operation of the second frame of the dynamic effect picture, the second frame of the dynamic effect picture is displayed on the screen.
[0195] Repeat the above steps S304 to S306 until the last frame of the dynamic effect picture is drawn and displayed on the screen.
[0196] In the embodiment of the present application, only the drawing of the first frame of the dynamic effect picture does not need to wait for the Vsync signal to be triggered, and the drawing of the second frame of the dynamic effect picture and each frame of the dynamic effect picture after the second frame of the dynamic effect picture still maintains the trigger mechanism of the Vsync signal. In other words, for the second frame of the dynamic effect picture and each frame of the dynamic effect picture after the second frame of the dynamic effect picture, a Vsync request signal needs to be sent to the image synthesizer before each drawing, and when the Vsync signal is received, the drawing of the corresponding dynamic effect picture is triggered.
[0197] Among them, when drawing the previous frame of dynamic effect picture, a Vsync request signal can be sent to the image synthesizer to request to trigger the drawing operation of the next frame of dynamic effect picture. For example, when drawing the first frame of dynamic effect picture, if it is determined that the second frame of dynamic effect picture is included after the first frame of dynamic effect picture, a Vsync request signal is sent to the image synthesizer to request to trigger the drawing operation of the second frame of dynamic effect picture. Correspondingly, when drawing the first frame of dynamic effect picture, if it is determined that there is no dynamic effect picture to be drawn after the first frame of dynamic effect picture, there is no need to send a Vsync request signal to the image synthesizer.
[0198] The following is a further explanation of the drawing process of each frame of the dynamic effect.
[0199] Figure 8 A flow chart of drawing a dynamic effect picture provided in an embodiment of the present application, such as Figure 8 As shown, the following steps may be included:
[0200] S401, in response to receiving a dynamic effect start notification message, obtaining interface drawing data and dynamic effect parameters corresponding to the second interface.
[0201] Animation parameters may include animation curve and animation type.
[0202] The animation curve is used to characterize the corresponding relationship between the animation playback progress and the animation playback time. The animation playback progress can be understood as the display percentage of the animation screen displayed on the user interface relative to the complete second interface. Based on different animation types, the display percentage can be displacement percentage, scaling percentage, display depth percentage, etc.
[0203] For example, Fig. 9 As shown, the horizontal coordinate of the dynamic effect curve can be the dynamic effect playback time T, the vertical coordinate of the dynamic effect curve can be the dynamic effect playback progress value, the dynamic effect playback start time is 0, the dynamic effect playback end time is 200ms, and the dynamic effect playback total duration is 200ms. Based on the dynamic effect curve, the dynamic effect playback progress corresponding to each dynamic effect playback time point within 200ms can be determined.
[0204] For example, the animation playback progress value value can include 0-100, where value = 0 means the display percentage is 0, that is, the user interface does not display the second interface at all, and it is still the interface before switching (the first interface). value = 25 means the display percentage is 25%; value = 50 means the display percentage is 50%; value = 75 means the display percentage is 75%; value = 100 means the display percentage is 100%, that is, the user interface displays the complete second interface.
[0205] Taking the image transformation method of gradually enlarging the second interface as an example, when the animation playback time is 0 (i.e. the starting playback time), the animation playback progress is 0, that is, the content displayed on the user interface is still the first interface; when the animation playback time is 50ms, the animation playback progress is 25, that is, the second interface displayed on the user interface occupies one quarter of the entire user interface; similarly, when the playback time is 200ms, the animation playback progress is 100, that is, the second interface is completely covered in the user interface.
[0206] The electronic device can set different dynamic effect curves according to the types of the interface before switching and the interface after switching, and save the set dynamic effect curves in a local database. In this way, the electronic device can call the corresponding dynamic effect curves according to different interface switching types.
[0207] For example, in a scene where the video search interface switches to the video A details interface, the interface drawing data corresponding to the video A details interface can be obtained, and the motion effect curve corresponding to the process of switching from the video search interface to the video A details interface can be called.
[0208] When displaying the motion effect, the motion effect screen is displayed frame by frame based on the motion effect type such as the image change mode and the image movement direction. For example, the image transformation mode may include one or more superpositions of translation, scaling, rotation, and color gradient. The image movement direction may include movement upward, downward, left, right, upper left, lower left, upper right, lower right, and movement from the center to the surroundings and from the surroundings to the center.
[0209] S402, determining the animation playing time corresponding to the first animation frame.
[0210] S403, determining the motion effect playback progress corresponding to the first frame of the motion effect picture based on the motion effect curve and the motion effect playback time corresponding to the first frame of the motion effect picture.
[0211] Starting from the start time of the animation, one frame of the animation is played every other Vsync cycle until the total duration of the animation reaches 200ms. For example, the first frame of the animation is played at the animation playback time T0, the second frame of the animation is played at the animation playback time T1, and the third frame of the animation is played at the animation playback time T2, where T1 is separated from T0 by one Vsync cycle, and T2 is separated from T0 by two Vsync cycles. Taking the screen refresh rate of 60Hz as an example, T0 is 0ms, T1=16.6ms, and T2=33.2ms.
[0212] Please continue to see Fig. 9 Based on the motion effect curve, the motion effect playback progress corresponding to each motion effect playback time point can be determined. In this way, after determining the motion effect playback time corresponding to each frame of the motion effect screen, the motion effect playback progress corresponding to each frame of the motion effect screen can be determined. For example, the motion effect playback time corresponding to the first frame of the motion effect screen is T0 (0ms), and the motion effect playback progress corresponding to the motion effect playback time T0 is 0, then it can be determined that the motion effect playback progress corresponding to the first frame of the motion effect screen is 0. For another example, the motion effect playback time corresponding to the first frame of the motion effect screen is T1 (16.6ms), and the motion effect playback progress corresponding to the motion effect playback time T1 is 8.3, then it can be determined that the motion effect playback progress corresponding to the second frame of the motion effect screen is 8.3.
[0213] In one possible implementation, the play time corresponding to the first frame of the dynamic effect screen can be determined in the following manner: after the dynamic effect play thread receives the dynamic effect start notification information, it obtains the system time t0 and aligns the system time t0 with the dynamic effect play time 0ms in the dynamic effect curve. In this way, the dynamic effect play progress corresponding to the current system time t0 can be determined to be 0 based on the dynamic effect curve. That is, it is equivalent to determining that the dynamic effect play progress corresponding to the first frame of the dynamic effect screen is 0.
[0214] S404, based on the interface drawing data corresponding to the second interface, the animation playing progress corresponding to the first frame of the animation effect picture, and the animation type, determine the interface drawing data corresponding to the first frame of the animation effect picture.
[0215] S405: Draw the first frame of dynamic effect picture based on the interface drawing data corresponding to the first frame of dynamic effect picture.
[0216] After determining the animation playback progress corresponding to the first animation frame, the interface drawing data corresponding to the first animation frame can be determined based on the interface drawing data corresponding to the second interface, the animation playback progress corresponding to the first animation frame, and the animation type. After obtaining the interface drawing data corresponding to the first animation frame, the first animation frame can be drawn based on the interface drawing data corresponding to the first animation frame.
[0217] It should be noted that the above description is only an example of the drawing process of the first frame of the dynamic effect picture. The drawing process of the second frame of the dynamic effect picture to the last frame of the dynamic effect picture can refer to the description of the drawing process of the first frame of the dynamic effect picture.
[0218] For example, the drawing process of the second frame of the dynamic effect screen can be implemented in the following way: after the dynamic effect playback thread receives the first Vsync signal, it obtains the system time t1 again, and calculates the difference between the current system time t1 and the previous system time t0 (for example, the difference is 16.6ms), and obtains the dynamic effect playback time corresponding to the second frame of the dynamic effect screen. Among them, the interval between the dynamic effect playback time corresponding to the second frame of the dynamic effect screen and the dynamic effect playback time 0ms is the difference between the current system time t1 and the previous system time t0, which is 16.6ms. In this way, the current system time t1 can be aligned to the dynamic effect playback time 16.6ms in the dynamic effect curve, and then the dynamic effect playback progress corresponding to the second frame of the dynamic effect screen can be determined based on the dynamic effect curve and the dynamic effect playback time 16.6ms corresponding to the second frame of the dynamic effect screen. Afterwards, the interface drawing data corresponding to the second frame of the dynamic effect screen can be determined based on the interface drawing data corresponding to the second interface, the dynamic effect playback progress corresponding to the second frame of the dynamic effect screen, and the dynamic effect type. Finally, based on the interface drawing data corresponding to the second frame of the dynamic effect screen, the second frame of the dynamic effect screen is drawn.
[0219] By analogy, each frame of the transition animation can be drawn. The drawing methods corresponding to the third frame of the animation to the last frame of the animation can refer to the drawing process of the second frame of the animation, which will not be repeated here.
[0220] For example, taking the first frame of the animation effect as an example, in the animation effect curve, the progress corresponding to the animation effect playback time of 0ms is 0, so the first frame of the animation effect is the interface content corresponding to the second interface when 0% is displayed. In other words, the content displayed by the first frame of the animation effect is completely different from the second interface and exactly the same as the first interface.
[0221] Taking the second frame of the dynamic effect as an example, assuming that the progress corresponding to the dynamic effect playback time of 16.6ms in the dynamic effect curve is 8.3, then the second frame of the dynamic effect is the interface content corresponding to the second interface when 8.3% is displayed. Taking the image transformation method of gradually enlarging the second interface as an example, the second frame of the dynamic effect is the corresponding screen when the second interface is reduced to 8.3%.
[0222] In this way, based on the interface drawing data corresponding to the second interface, the animation playing progress corresponding to each frame of the animation picture, and the animation type, the interface drawing data corresponding to each frame of the animation picture can be determined. Then, based on the interface drawing data corresponding to each frame of the animation picture, the corresponding animation picture can be drawn.
[0223] It should be noted that the above embodiment is only an example of representing the correspondence between the progress of the animation and the time of the animation through the animation curve, and does not limit this. For example, the correspondence between the progress of the animation and the time of the animation can also be represented by an array, a matrix, etc.
[0224] It should also be noted that the above embodiment only takes the animation playback progress value value of 0-100 as an example for illustrative description. The animation playback progress value value can also be other numerical values. For example, the animation playback progress value value can also be 0-500. In this way, when value = 0, the corresponding animation playback progress is 0%; when value = 100, the corresponding animation playback progress is 100%; when value = 250, the corresponding animation playback progress is 50%; and so on, which will not be repeated here. In other words, the animation playback progress value value in the animation curve can be customized, and this application does not limit this.
[0225] In summary, the first click response optimization solution provided by the embodiment of the present application is that the triggering condition for the drawing operation of the first frame of the dynamic effect screen is the dynamic effect start notification message. Figure 3 The transition effect playing method shown saves the time consumed by step S207 and step S208, so that the click response time can be shortened by half a Vsync cycle on average.
[0226] The second click response optimization solution provided in the embodiment of the present application is described below.
[0227] Fig.10A flowchart of a transition effect playback method provided in an embodiment of the present application is shown in FIG. Fig.10 As shown, the method may include the following steps:
[0228] S501, the system service sends a motion effect start notification message to the motion effect playback thread.
[0229] S502: After receiving the motion effect start notification message, the motion effect playing thread sends a first Vsync request signal to the image synthesizer.
[0230] S503: The image synthesizer sends a first Vsync signal to the motion effect playing thread.
[0231] S504, in response to receiving the first Vsync signal, the animation playing thread draws a second frame of animation picture between the first interface and the second interface.
[0232] S505, after completing the drawing operation on the second frame of the dynamic effect picture, the second frame of the dynamic effect picture is displayed on the screen.
[0233] S506, the motion effect playing thread sends a second Vsync request signal to the image synthesizer.
[0234] S507, the image synthesizer sends a second Vsync signal to the motion effect playback thread.
[0235] S508, in response to receiving the second Vsync signal, the animation playing thread draws a third frame of animation picture between the first interface and the second interface.
[0236] S509, after completing the drawing operation on the third frame of the dynamic effect picture, the third frame of the dynamic effect picture is displayed on the screen.
[0237] Repeat the above steps S506 to S509 until the last frame of the dynamic effect picture is drawn and displayed on the screen.
[0238] Combination Fig. 9 It can be seen from the animation curve shown that the animation playback progress corresponding to the first frame of the transition animation is 0, that is, the first frame of the animation is exactly the same as the first interface. Therefore, even if the first frame of the animation interface has begun to be displayed on the user interface, since the first frame of the animation is exactly the same as the first interface, the user cannot perceive that the transition animation has begun to play. In other words, from the user's perspective, the electronic device has not begun to respond to the click operation.
[0239] Based on this, the second click response optimization solution provided in the embodiment of the present application skips the first frame of the dynamic effect screen and directly starts drawing and displaying from the second frame of the dynamic effect screen. In this way, the first dynamic effect screen updated on the user interface is the second frame of the dynamic effect screen. Figure 3 With the transition effect playing method shown, the user can see the change of the user interface one Vsync cycle in advance, that is, the click response time is shortened by one Vsync cycle.
[0240] Among them, the method of drawing the second frame of dynamic effect screen between the first interface and the second interface can refer to the description of step S401 to step S405. For example, in response to receiving the first Vsync signal, the current system time t0 is obtained, and the current system time t0 is aligned with the dynamic effect playback time 16.6ms in the dynamic effect curve (one Vsync cycle backward from the starting dynamic effect playback time). In other words, it is equivalent to initializing the system time t0 to the dynamic effect playback time corresponding to the second Vsync cycle in the dynamic effect curve. In this way, in response to receiving the first Vsync signal, the determined dynamic effect playback time is the dynamic effect playback time corresponding to the second frame of dynamic effect screen. Then, the dynamic effect playback progress corresponding to the second frame of dynamic effect screen can be determined based on the dynamic effect curve (for example, the dynamic effect playback progress corresponding to the second frame of dynamic effect screen is 8.3). In this way, the first frame of dynamic effect screen can be skipped and the second frame of dynamic effect screen can be directly started.
[0241] As another example, in response to receiving the first Vsync signal, the current system time t0 is obtained, and the time after subtracting one Vsync cycle from the current system time t0 is aligned with the motion effect playback time 0ms in the motion effect curve. In other words, it is equivalent to initializing (t0-16.6ms) as the motion effect playback time corresponding to the first Vsync cycle in the motion effect curve (i.e., the motion effect playback time 0ms). In this way, in response to receiving the first Vsync signal, the determined motion effect playback time is 16.6ms. Then, based on the motion effect curve, the motion effect playback progress corresponding to the motion effect playback time of 16.6ms is determined, which is the motion effect playback progress corresponding to the second frame of the motion effect picture. It can be seen that in response to the first Vsync signal, the first frame of the motion effect picture can be skipped and the second frame of the motion effect picture can be directly drawn.
[0242] It should be noted that the step of drawing the dynamic effect picture based on the dynamic effect playback progress can refer to the description of step S401 to step S405, which will not be repeated here.
[0243] It should also be noted that the same parts of the second click response optimization solution provided in the embodiment of the present application as the first click response optimization solution can refer to the description of the first click response optimization solution, and will not be repeated here. For example, the method for determining the animation playback thread, etc., can refer to the description of the first click response optimization solution.
[0244] The third click response optimization solution provided in the embodiment of the present application is described below.
[0245] Fig.11 A flowchart of a transition effect playback method provided in an embodiment of the present application is shown in FIG. Fig.11 As shown, the method may include the following steps:
[0246] S601, the system service sends a motion effect start notification message to the motion effect playback thread.
[0247] S602: After the animation playing thread receives the animation start notification message, the animation playing thread draws a second frame of animation effect picture between the first interface and the second interface.
[0248] S603, after completing the drawing operation of the first frame of the dynamic effect picture, display the second frame of the dynamic effect picture on the screen.
[0249] S604, the animation playing thread sends a Vsync request signal to the image synthesizer.
[0250] S605, the image synthesizer sends a Vsync signal to the motion effect playback thread.
[0251] S606, in response to receiving the Vsync signal, the animation playing thread draws the third animation frame between the first interface and the second interface.
[0252] S607, after completing the drawing operation on the third frame of the dynamic effect picture, the third frame of the dynamic effect picture is displayed on the screen.
[0253] Repeat the above steps S604 to S607 until the last frame of the dynamic effect picture is drawn and displayed on the screen.
[0254] In this way, the third click response optimization solution provided by the embodiment of the present application skips the first frame of the animation effect screen after receiving the animation start notification message, and directly starts drawing and displaying the second frame of the animation effect screen. In addition, the trigger condition for drawing the second frame of the animation effect screen is the animation start notification message. Figure 3 The transition effect playback method shown in FIG. 1 can shorten the click response time by an average of one and a half Vsync cycles. Figure 6 The transition effect playback method shown can shorten the click response time by one Vsync cycle. Fig.10 The transition animation playing method shown can shorten the click response time by half a Vsync cycle on average.
[0255] Among them, the method of drawing the second frame of dynamic effect screen between the first interface and the second interface can refer to the description of the second click response optimization scheme. For example, in response to receiving the dynamic effect start notification message, the current system time t0 is obtained, and the current system time t0 is aligned with the dynamic effect playback time 16.6ms in the dynamic effect curve (one Vsync cycle backward from the starting dynamic effect playback time). In other words, it is equivalent to initializing the system time t0 to the dynamic effect playback time corresponding to the second Vsync cycle in the dynamic effect curve. In this way, in response to receiving the dynamic effect start notification message, the determined dynamic effect playback time is the dynamic effect playback time corresponding to the second frame of dynamic effect screen. Then, the dynamic effect playback progress corresponding to the second frame of dynamic effect screen can be determined based on the dynamic effect curve (for example, the dynamic effect playback progress corresponding to the second frame of dynamic effect screen is 8.3). In this way, the first frame of dynamic effect screen can be skipped and the second frame of dynamic effect screen can be directly started.
[0256] It should be noted that the third click response optimization scheme provided in the embodiment of the present application is the same as the first and second click response optimization schemes, and the description of the first and second click response optimization schemes can be referred to, and no further description is given here. For example, the method for determining the animation playback thread, etc., can all refer to the description of the first click response optimization scheme.
[0257] Fig.12 This is a flow chart of the transition effect playback method provided in the embodiment of the present application. Fig.12 As shown, the method may include the following steps:
[0258] S701, the electronic device displays a first interface, where the first interface includes a first control.
[0259] In some embodiments, the first interface may be an interface in any application in the electronic device, and thus the first control may be any control in any application interface.
[0260] In some embodiments, the first interface may be a main interface of the electronic device (also referred to as a desktop), and thus the first control may be a control of any application on the desktop.
[0261] S702: In response to a click operation input by the user on the first control, a drawing operation is performed on the second interface.
[0262] S703: After the drawing operation on the second interface is completed, a motion effect start notification message is sent to the target motion effect playing thread, where the motion effect start notification message is used to notify the target motion effect playing thread to start the motion effect drawing operation.
[0263] The specific implementation of steps S701 to S703 may refer to the description of steps S201 to S206 and will not be repeated here.
[0264] S704, in response to the animation start notification message, the target animation playback thread draws a transition animation between the first interface and the second interface; the transition animation includes multiple frames of animation images.
[0265] In one possible implementation, in response to the animation start notification message, the target animation playback thread draws the transition animation between the first interface and the second interface, which can be specifically implemented in the following manner: in response to the animation start notification message, the target animation playback thread draws the first animation picture in multiple frames of animation pictures; the first animation picture is the first frame of animation pictures in multiple frames of animation pictures; before drawing the second animation picture, a Vsync request signal is sent to the image synthesizer; the second animation picture includes the animation pictures in the multiple frames of animation pictures except the first frame of animation pictures; in response to the Vsync signal, the target animation playback thread draws the second animation picture. (For details, please refer to the description of steps S301 to S307, which will not be repeated here)
[0266] In one implementable manner, in response to an animation start notification message, the target animation playback thread draws a transition animation between the first interface and the second interface, which can be specifically implemented in the following manner: in response to an animation start notification message, the target animation playback thread skips the first animation frame in a multi-frame animation screen, and draws the second animation frame in a multi-frame animation screen; wherein the second animation frame is the next animation frame of the first animation frame in the multi-frame animation screen, and the first animation frame is the same as the first interface; before drawing the third animation screen, a Vsync request signal is sent to the image synthesizer; the third animation screen includes the animation screens in the multi-frame animation screen except the first animation frame and the second animation frame; in response to the Vsync signal, the target animation playback thread draws the third animation screen. (For details, please refer to the description of steps S601 to S607, which will not be repeated here)
[0267] In one achievable method, drawing the second frame of a plurality of frames of an animation effect picture can be implemented in the following manner: in response to an animation start notification message, obtaining interface drawing data and animation parameters corresponding to the second interface, the animation parameters including the correspondence between the animation playback progress and the animation playback time, and the animation type; determining the animation playback time corresponding to the second frame of the animation effect picture; determining the animation playback progress corresponding to the second frame of the animation effect picture based on the animation curve and the animation playback time corresponding to the second frame of the animation effect picture; determining the interface drawing data corresponding to the second frame of the animation effect picture based on the interface drawing data corresponding to the second interface, the animation playback progress corresponding to the second frame of the animation effect picture, and the animation type; drawing the second frame of the animation effect picture based on the interface drawing data corresponding to the second frame of the animation effect picture. (For details, please refer to steps S401 to S405 and the description of the second click response optimization scheme, which will not be repeated here)
[0268] In one possible implementation, before executing the drawing operation on the second interface, the process further includes: in response to a click operation input by the user on the first control, determining a click operation scenario; when the click operation scenario is a launch application scenario, generating drawing information of the second interface, the drawing information including remote motion effect indication information; the remote motion effect indication information is used to indicate that the target motion effect playback thread is a remote motion effect playback thread. (For details, please refer to the description of steps S3011 to S3016, which will not be repeated here)
[0269] In one possible implementation, after the drawing operation on the second interface is completed, a motion effect start notification message is sent to the target motion effect playback thread, including: after the drawing operation on the second interface is completed, the drawing information is obtained; based on the drawing information, the target motion effect playback thread is determined; and the motion effect start notification message is sent to the target motion effect playback thread. (For details, please refer to the description of steps S3011 to S3016, which will not be repeated here)
[0270] In one possible implementation, based on the drawing information, determining the target motion effect playback thread includes: when the drawing information includes remote motion effect indication information, determining the remote motion effect playback thread as the target motion effect playback thread; when the drawing information does not include remote motion effect indication information, determining the local motion effect playback thread as the target motion effect playback thread. (For details, please refer to the description of steps S3011 to S3016, which will not be repeated here)
[0271] S705, after the display of multiple frames of dynamic effect images is completed, the electronic device displays the second interface.
[0272] After the transition effect is played, the second interface is displayed on the electronic device. At this point, the interface switching ends.
[0273] Fig.13 Flow chart of another transition effect playing method provided in an embodiment of the present application. Fig.13 As shown, the method may include the following steps:
[0274] S801, the electronic device displays a first interface, where the first interface includes a first control.
[0275] S802: In response to a click operation input by the user on the first control, a drawing operation is performed on the second interface.
[0276] S803: After the drawing operation on the second interface is completed, a motion effect start notification message is sent to the target motion effect playing thread, where the motion effect start notification message is used to notify the target motion effect playing thread to start the motion effect playing operation.
[0277] S804, in response to the animation start notification message, sending a first Vsync request signal to the image synthesizer; the first Vsync request signal is used to request drawing a transition animation between the first interface and the second interface; the transition animation includes multiple frames of animation images.
[0278] S805, in response to the first Vsync signal, the target animation playback thread skips the first animation frame in the multiple animation frames, and draws the second animation frame in the multiple animation frames; wherein the second animation frame is the next animation frame of the first animation frame in the multiple animation frames, and the first animation frame is the same as the first interface.
[0279] S806, before drawing the third dynamic effect picture, sending a second Vsync request signal to the image synthesizer; the third dynamic effect picture includes the dynamic effect pictures except the first frame dynamic effect picture and the second frame dynamic effect picture in the multiple frames of dynamic effect pictures.
[0280] S807, in response to the second Vsync signal, the target animation playing thread draws a third animation picture.
[0281] S808, after the second frame of the dynamic effect picture and the third dynamic effect picture are displayed, the electronic device displays the second interface.
[0282] The above steps S801 to S802 can refer to the description of the second click response optimization solution, which will not be repeated here.
[0283] The various method embodiments described in this document may be independent solutions or may be combined according to internal logic, and these solutions all fall within the protection scope of this application.
[0284] It can be understood that, in the above-mentioned various method embodiments, the methods and operations implemented by the electronic device can also be implemented by components (such as chips or circuits) that can be used in the electronic device.
[0285] The above embodiments introduce the transition effect playback method provided by the present application. It is understandable that, in order to realize the above functions, the electronic device includes a hardware structure and / or software module corresponding to each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.
[0286] Fig.14is a schematic diagram of a transition effect playback device provided in an embodiment of the present application. In one embodiment, the electronic device can Fig.14 The hardware devices shown in the figure implement the corresponding functions. Fig.14 As shown, the device 900 may include: a first display module 901 , a second interface drawing module 902 , a sending module 903 , a dynamic interface drawing module 904 and a second display module 905 .
[0287] A first display module 901, configured to display a first interface, wherein the first interface includes a first control;
[0288] A second interface drawing module 902, configured to execute a drawing operation on a second interface in response to a click operation input by a user on the first control;
[0289] The sending module 903 is used to send a motion effect start notification message to the target motion effect playback thread after completing the drawing operation on the second interface, and the motion effect start notification message is used to notify the target motion effect playback thread to start the motion effect drawing operation;
[0290] The dynamic effect interface drawing module 904 is used for, in response to the dynamic effect start notification message, the target dynamic effect playback thread draws the transition dynamic effect between the first interface and the second interface; the transition dynamic effect includes multiple frames of dynamic effect pictures;
[0291] The second display module 905 is used for the electronic device to display the second interface after the display of the multiple frames of dynamic effect images is completed.
[0292] In one implementable manner, the motion effect interface drawing module 904 is used to respond to the motion effect start notification message, and the target motion effect playback thread draws the first motion effect picture in the multiple frames of motion effect pictures; the first motion effect picture is the first frame of motion effect picture in the multiple frames of motion effect pictures; before drawing the second motion effect picture, a Vsync request signal is sent to the image synthesizer; the second motion effect picture includes the motion effect pictures in the multiple frames of motion effect pictures except the first frame of motion effect picture; in response to the Vsync signal, the target motion effect playback thread draws the second motion effect picture.
[0293] In one implementable manner, the animation interface drawing module 904 is used to respond to the animation start notification message, the target animation playback thread skips the first frame of the multiple frames of animation, and draws the second frame of the multiple frames of animation; wherein the second frame of the animation is the next frame of the first frame of the animation in the multiple frames of animation, and the first frame of the animation is the same as the first interface; before drawing the third animation, a Vsync request signal is sent to the image synthesizer; the third animation includes the animations in the multiple frames of animation except the first frame and the second frame; in response to the Vsync signal, the target animation playback thread draws the third animation.
[0294] In one implementable manner, the animation interface drawing module 904 is used to obtain interface drawing data and animation parameters corresponding to the second interface in response to the animation start notification message, the animation parameters including the correspondence between the animation playback progress and the animation playback time and the animation type; determine the animation playback time corresponding to the second frame of animation effect screen; determine the animation playback progress corresponding to the second frame of animation effect screen based on the animation curve and the animation playback time corresponding to the second frame of animation effect screen; determine the interface drawing data corresponding to the second frame of animation effect screen based on the interface drawing data corresponding to the second interface, the animation playback progress corresponding to the second frame of animation effect screen, and the animation type; and draw the second frame of animation effect screen based on the interface drawing data corresponding to the second frame of animation effect screen.
[0295] In one implementable manner, the second interface drawing module 902 is used to determine the click operation scenario in response to a user's click operation on the first control; when the click operation scenario is a scenario of launching an application, the drawing information of the second interface is generated, and the drawing information includes remote animation indication information; the remote animation indication information is used to indicate that the target animation playback thread is a remote animation playback thread.
[0296] In one achievable manner, the sending module 903 is used to obtain the drawing information after completing the drawing operation on the second interface; determine the target motion effect playback thread based on the drawing information; and send a motion effect start notification message to the target motion effect playback thread.
[0297] In one implementable manner, the sending module 903 is used to determine the remote motion effect playback thread as the target motion effect playback thread when the drawing information includes the remote motion effect indication information; and to determine the local motion effect playback thread as the target motion effect playback thread when the drawing information does not include the remote motion effect indication information.
[0298] Fig.15 is a schematic diagram of the structure of another transition effect playback device provided in an embodiment of the present application. In one embodiment, the electronic device can Fig.15 The hardware devices shown in the figure implement the corresponding functions. Fig.15 As shown, the device 1000 may include: a first display module 1001, a second interface drawing module 1002, a sending module 1003, a Vsync signal request module 1004, a dynamic effect picture drawing module 1005 and a second display module 1006.
[0299] A first display module 1001, used to display a first interface, where the first interface includes a first control;
[0300] A second interface drawing module 1002, configured to execute a drawing operation on a second interface in response to a click operation input by a user on the first control;
[0301] The sending module 1003 is used to send a motion effect start notification message to the target motion effect playback thread after completing the drawing operation on the second interface, and the motion effect start notification message is used to notify the target motion effect playback thread to start the motion effect playback operation;
[0302] A Vsync signal request module 1004 is used to send a first Vsync request signal to the image synthesizer in response to the animation start notification message; the first Vsync request signal is used to request drawing a transition animation between the first interface and the second interface; the transition animation includes multiple frames of animation pictures;
[0303] The dynamic effect picture drawing module 1005 is used for responding to the first Vsync signal, the target dynamic effect playback thread skips the first dynamic effect picture in the multiple dynamic effect pictures, and draws the second dynamic effect picture in the multiple dynamic effect pictures; wherein the second dynamic effect picture is the next dynamic effect picture of the first dynamic effect picture in the multiple dynamic effect pictures, and the first dynamic effect picture is the same as the first interface;
[0304] The Vsync signal request module 1004 is used to send a second Vsync request signal to the image synthesizer before drawing a third dynamic effect picture; the third dynamic effect picture includes the dynamic effect pictures other than the first frame dynamic effect picture and the second frame dynamic effect picture in the multiple frames of dynamic effect pictures;
[0305] The dynamic effect picture drawing module 1005 is used for responding to the second Vsync signal, and the target dynamic effect playing thread draws the third dynamic effect picture;
[0306] The second display module 1006 is used for the electronic device to display the second interface after the second frame of the dynamic effect picture and the third dynamic effect picture are displayed.
[0307] That is, the apparatus 900 and the apparatus 1000 can realize the corresponding Figures 1 to 13 The steps or processes performed by the method embodiment shown in the figure may include a method for performing Figures 1 to 13 The modules of the method executed in the method embodiment shown. It should be understood that the specific process of each module executing the above corresponding steps has been described in detail in the above method embodiment, and for the sake of brevity, it will not be repeated here.
[0308] In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in a processor or an instruction in the form of software. The steps of the method disclosed in conjunction with the embodiment of the present application can be directly embodied as a hardware processor for execution, or a combination of hardware and software modules in a processor for execution. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory and completes the steps of the above method in conjunction with its hardware. To avoid repetition, it is not described in detail here.
[0309] It should be noted that the processor in the embodiment of the present application can be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method embodiment can be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software. The above processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to perform, or the hardware and software modules in the decoding processor can be combined and performed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
[0310] It can be understood that the memory in the embodiments of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0311] According to the method provided in the embodiments of the present application, the embodiments of the present application also provide a computer program product, which includes: a computer program or instructions, when the computer program or instructions are run on a computer, the computer executes the method of any one of the embodiments of the method.
[0312] According to the method provided by the embodiments of the present application, the embodiments of the present application also provide a computer storage medium, which stores a computer program or instructions. When the computer program or instructions are run on a computer, the computer executes the method of any one of the embodiments of the method.
[0313] According to the method provided by an embodiment of the present application, an embodiment of the present application also provides an electronic device, including a memory and a processor; the memory and the processor are coupled; the memory is used to store computer program code, and the computer program code includes computer instructions. When the processor executes the computer instructions, the electronic device executes the method of any one of the embodiments of the method embodiment.
[0314] Those of ordinary skill in the art will appreciate that the various illustrative logical blocks and steps described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or in a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0315] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0316] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0317] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0318] In addition, each functional module in each embodiment of the present application may be integrated into one processing unit, or each module may exist physically separately, or two or more modules may be integrated into one unit.
[0319] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks or optical disks.
[0320] The devices, computer storage media, computer program products, and electronic devices provided in the above-mentioned embodiments of the present application are all used to execute the methods provided above. Therefore, the beneficial effects that can be achieved can refer to the corresponding beneficial effects of the methods provided above, and will not be repeated here.
[0321] It should be understood that in each embodiment of the present application, the execution order of each step should be determined by its function and internal logic, and the size of the sequence number of each step does not mean the order of execution and does not limit the implementation process of the embodiment.
[0322] Each part of this specification is described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the embodiments of the device, computer storage medium, computer program product, and electronic device, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the description in the method embodiments.
[0323] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0324] The above-described embodiments of the present application do not constitute a limitation on the protection scope of the present application.
Claims
1. A transition effect playing method, characterized in that: The method is applied to an electronic device, and the method comprises: The electronic device displays a first interface, wherein the first interface includes a first control; In response to a click operation input by the user on the first control, executing a drawing operation on the second interface; After completing the drawing operation on the second interface, sending a motion effect start notification message to the target motion effect playback thread, wherein the motion effect start notification message is used to notify the target motion effect playback thread to start the motion effect drawing operation; In response to the animation start notification message, the target animation playback thread draws a transition animation between the first interface and the second interface; the transition animation includes multiple frames of animation images; After the display of the multiple frames of dynamic effect images is completed, the electronic device displays the second interface.
2. The method according to claim 1, characterized in that: In response to the animation start notification message, the target animation playback thread draws a transition animation between the first interface and the second interface, including: In response to the motion effect start notification message, the target motion effect playback thread draws a first motion effect picture in the multiple frames of motion effect pictures; the first motion effect picture is the first frame of the motion effect picture in the multiple frames of motion effect pictures; Before drawing a second motion effect picture, sending a Vsync request signal to the image synthesizer; the second motion effect picture includes motion effect pictures other than the first frame of the motion effect picture in the multiple frames of the motion effect picture; In response to the Vsync signal, the target motion effect playback thread draws the second motion effect picture.
3. The method according to claim 1, characterized in that In response to the animation start notification message, the target animation playback thread draws a transition animation between the first interface and the second interface, including: In response to the animation start notification message, the target animation playback thread skips the first animation frame in the multiple animation frames and draws the second animation frame in the multiple animation frames; wherein the second animation frame is the next animation frame of the first animation frame in the multiple animation frames, and the first animation frame is the same as the first interface; Before drawing the third motion effect picture, sending a Vsync request signal to the image synthesizer; the third motion effect picture includes the motion effect pictures other than the first frame motion effect picture and the second frame motion effect picture in the multiple frames of motion effect pictures; In response to the Vsync signal, the target motion effect playback thread draws the third motion effect picture.
4. The method according to claim 3, characterized in that The drawing of the second frame of the dynamic effect picture among the multiple frames of the dynamic effect picture includes: In response to the animation start notification message, obtaining interface drawing data and animation parameters corresponding to the second interface, wherein the animation parameters include a correspondence between animation play progress and animation play time, and an animation type; Determine the animation playing time corresponding to the second animation frame; Determine the motion effect playback progress corresponding to the second frame of motion effect picture based on the motion effect curve and the motion effect playback time corresponding to the second frame of motion effect picture; Determine the interface drawing data corresponding to the second frame of the dynamic effect picture based on the interface drawing data corresponding to the second interface, the dynamic effect playback progress corresponding to the second frame of the dynamic effect picture, and the dynamic effect type; Based on the interface drawing data corresponding to the second frame of the dynamic effect picture, the second frame of the dynamic effect picture is drawn.
5. The method according to claim 1, characterized in that Before executing the drawing operation on the second interface, the method further includes: In response to a click operation input by a user to the first control, determining the click operation scenario; When the click operation scenario is a scenario of launching an application program, drawing information of the second interface is generated, and the drawing information includes remote motion effect indication information; the remote motion effect indication information is used to indicate that the target motion effect playback thread is a remote motion effect playback thread.
6. The method according to claim 5, characterized in that After the drawing operation on the second interface is completed, a motion effect start notification message is sent to the target motion effect playback thread, including: After completing the drawing operation on the second interface, obtaining the drawing information; Based on the drawing information, determining the target animation effect playback thread; Send a motion effect start notification message to the target motion effect playback thread.
7. The method according to claim 6, characterized in that The step of determining the target animation playing thread based on the drawing information includes: In a case where the drawing information includes the remote motion effect indication information, determining the remote motion effect playback thread as the target motion effect playback thread; In a case where the drawing information does not include the remote motion effect indication information, the local motion effect playback thread is determined as the target motion effect playback thread.
8. The method according to any one of claims 5 to 7, characterized in that: The local motion effect playing thread includes a default motion effect playing thread in the system service of the electronic device, and the remote motion effect playing thread includes a desktop launcher.
9. The method according to claim 1, characterized in that: The first interface is a main interface of the electronic device; or, the first interface is an interface of an application in the electronic device.
10. A transition effect playing method, characterized in that: The method is applied to an electronic device, and the method comprises: The electronic device displays a first interface, wherein the first interface includes a first control; In response to a click operation input by the user on the first control, executing a drawing operation on the second interface; After completing the drawing operation on the second interface, sending a motion effect start notification message to the target motion effect playback thread, wherein the motion effect start notification message is used to notify the target motion effect playback thread to start the motion effect playback operation; In response to the animation start notification message, a first Vsync request signal is sent to the image synthesizer; the first Vsync request signal is used to request drawing a transition animation between the first interface and the second interface; the transition animation includes multiple frames of animation images; In response to the first Vsync signal, the target animation playback thread skips the first animation frame in the multiple animation frames, and draws the second animation frame in the multiple animation frames; wherein the second animation frame is the next animation frame of the first animation frame in the multiple animation frames, and the first animation frame is the same as the first interface; Before drawing the third motion effect picture, sending a second Vsync request signal to the image synthesizer; the third motion effect picture includes the motion effect pictures other than the first frame motion effect picture and the second frame motion effect picture in the multiple frames of motion effect pictures; In response to the second Vsync signal, the target motion effect playback thread draws the third motion effect picture; After the second frame of motion effect picture and the third motion effect picture are displayed, the electronic device displays the second interface.
11. The method according to claim 10, characterized in that In response to the first Vsync signal, the target animation playback thread skips the first animation frame in the multiple animation frames and draws the second animation frame in the multiple animation frames, including: In response to the first Vsync signal, acquiring interface drawing data and motion effect parameters corresponding to the second interface, wherein the motion effect parameters include a correspondence between motion effect playback progress and playback time, and a motion effect type; Determine the animation playing time corresponding to the second animation frame; Determine the motion effect playback progress corresponding to the second frame of the motion effect picture based on the motion effect curve and the motion effect playback time corresponding to the second frame of the motion effect picture; Determine the interface drawing data corresponding to the second frame of the dynamic effect picture based on the interface drawing data corresponding to the second interface, the dynamic effect playback progress corresponding to the second frame of the dynamic effect picture, and the dynamic effect type; Based on the interface drawing data corresponding to the second frame of the dynamic effect picture, the second frame of the dynamic effect picture is drawn.
12. An electronic device, characterized in that: The electronic device comprises a memory and a processor; the memory and the processor are coupled; the memory is used to store computer program code, the computer program code comprises computer instructions, and when the processor executes the computer instructions, the electronic device executes the method as described in any one of claims 1-11.
13. A computer program product, characterized in that The computer program product comprises a computer program or instructions, and when the computer program or instructions are run on a computer, the computer is caused to perform the method according to any one of claims 1 to 11.
Citation Information
Cited By
Transition animation playback method and electronic device
EP4718247A1
Transition animation playback method and electronic device
WO2025039535A1