Display method and electronic equipment
By setting unified switching parameters and adjusting switching animations in the display interface, the problem of power consumption wasted caused by asynchronous switching of scrolling window display objects is solved, synchronous switching of scrolling windows is realized, the sleep time is extended, and the efficiency of electronic devices is improved. Battery life.
Patent Information
- Application Number
- CN202310380041.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-31
- Publication Date
- 2024-10-01
AI Technical Summary
When there are two or more rolling windows in the display interface, the display objects of the rolling windows are switched out of synchronization, resulting in reduced sleep time of the SoC and display system, resulting in unnecessary waste of power consumption.
By setting unified preset switching parameters, including switching time points and switching frequencies, the switching of display objects in different rolling windows can be synchronized, thereby increasing the sleep time of the SoC and display system and reducing waste of power consumption. Specific methods include obtaining the drawing command sequence of the rolling window, adjusting the playback start time of the switching animation, and adjusting the switching time point of the display object through frame loss processing.
It realizes the synchronization of display object switching in different rolling windows, extends the sleep time of SoC and display system, reduces unnecessary waste of power consumption, and improves the battery life of electronic devices.
Smart Images

Figure CN118733159A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of display technology, and in particular to a display method and an electronic device. Background Art
[0002] With the development of technology, application software emerges in an endless stream. In order to display more services that can be provided to users in the interface, many applications will use scrolling windows in the interface to periodically scroll and display pictures or texts. For a scrolling window, when the pictures or texts therein are scrolled and switched, the display system of the electronic device needs to perform a display refresh operation. When the pictures and texts are not switched, the SoC and the display system do not need to perform a display refresh operation. That is, when the pictures and texts are not switched, the SoC and the display system are in a dormant state for the scrolling window.
[0003] Some applications include two scrolling windows in one display interface, and the display objects (such as pictures or texts) in the two scrolling windows are periodically scrolled. In such scenarios, the pictures and texts in the two scrolling windows are not scrolled at the same time, that is, the pictures in the picture scrolling window and the texts in the text scrolling window are scrolled crosswise, which will greatly shorten the sleep time of the system on chip (SoC) and the entire display system, resulting in unnecessary power consumption. Summary of the invention
[0004] The embodiments of the present application provide a display method and an electronic device for solving the problem that images and texts on some display interfaces scroll crosswise, resulting in a reduction in the sleep time of a SoC and a display system and causing unnecessary power consumption.
[0005] To achieve the above objectives, the embodiments of the present application adopt the following technical solutions:
[0006] In a first aspect, a display method is provided, the method being applied to an electronic device, comprising:
[0007] When an electronic device displays more than two scrolling windows, if it is determined that the switching of the display objects of the two or more scrolling windows is not synchronized, then the electronic device will display the two or more scrolling windows with the same preset switching parameters, so that the switching of the display objects of the two or more scrolling windows becomes synchronized. The preset switching parameters include at least one of a preset switching time point and a preset switching frequency, and the switching time point is used to indicate the time point when the scrolling window switches from the current display object to the next display object. In this way, the electronic device synchronizes the switching of the display objects of the two or more scrolling windows displayed in the interface, which can increase the sleep time of the SoC and the display system, reduce unnecessary power consumption, and improve the battery life of the mobile phone.
[0008] In some possible implementations, the method further includes: after the current display object of the scrolling window is displayed, the electronic device plays the switching effect of the scrolling window; and after the switching effect is played, the electronic device displays the next display object. The switching time point is specifically used to indicate the start time point of the switching effect when the scrolling window switches from the current display object to the next display object. In this way, when adjusting the switching parameters of the scrolling window, it can be achieved by adjusting the start time point of the switching effect of the scrolling window.
[0009] In some possible implementations, the electronic device displays more than two scrolling windows with the same preset switching parameters, which may specifically include: the electronic device obtains a first drawing command sequence of the current scrolling window, and draws and displays a first display object in the current scrolling window according to the first drawing command sequence. When it is determined according to the preset switching parameters that the current scrolling window needs to switch the display object, the electronic device obtains a second drawing command sequence of the current scrolling window. Afterwards, the electronic device may draw and display the second display object in the current scrolling window according to the second drawing command sequence. In this implementation, by determining whether the display object needs to be switched for each scrolling window according to the same preset switching parameters, different scrolling windows can switch the display objects according to the same switching time point and switching frequency, thereby achieving synchronization of display object switching of different scrolling windows.
[0010] In some possible implementations, the electronic device obtains the first drawing command sequence of the current scrolling window, which may specifically include: the electronic device obtains the first drawing command sequence from a first display list displaylist of the current scrolling window.
[0011] In some possible implementations, before the electronic device obtains the first drawing command sequence from the first display list displaylist of the current scrolling window, the method further includes: the electronic device creates the first display list based on the first display object to be displayed in the current scrolling window; then, the electronic device stores the first drawing command sequence in the first display list. Afterwards, the electronic device obtains the first drawing command sequence from the first display list, and draws and displays the first display object according to the first drawing command sequence.
[0012] In some possible implementations, the first display list also includes the number of frame drops of the first display object. The number of frame drops may be specifically determined by the electronic device according to the first drawing command sequence and the preset switching parameters. In this implementation, after the electronic device draws and displays the first display object in the current scrolling window according to the first drawing command sequence, the method further includes: if the electronic device determines that the display of the first display object ends according to the first drawing command sequence, and determines that the current scrolling window does not need to switch the display object according to the preset switching parameters, the electronic device performs frame drop processing on the current scrolling window according to the number of frame drops. Furthermore, the electronic device may specifically determine that the current scrolling window needs to switch the display object after completing the frame drop processing on the current scrolling window according to the number of frame drops.
[0013] In this solution, the electronic device can also determine the number of times the current scrolling window needs to drop frames according to the preset switching parameters and the first drawing command sequence of the current scrolling window, so as to facilitate the subsequent change of the time point of switching the display object of the current scrolling window by dropping frames, so that the switching of the display objects of different scrolling windows can be synchronized.
[0014] In some possible implementations, before the electronic device displays two or more scrolling windows with the same preset switching parameter, the method further includes: when the switching frequencies of the two or more scrolling windows are different, the electronic device obtains the minimum switching frequency of the two or more scrolling windows as the preset switching frequency. In this way, the switching frequencies of different scrolling windows can be made the same. If the switching time points of the two or more scrolling windows are different, the electronic device can respectively obtain the next switching time points of the two or more scrolling windows, and select the latest next switching time point as the preset switching time point.
[0015] In this solution, the preset switching parameters can be determined according to the current switching parameters of different rolling windows, and a method for determining the preset switching parameters in different situations is provided, so that the switching parameters of different rolling windows can be adjusted easily.
[0016] In some possible implementations, when it is determined that the switching of display objects of two or more scrolling windows is not synchronized, the electronic device displays the two or more scrolling windows with the same preset switching parameter, which may specifically include: when it is determined that the switching of display objects of two or more scrolling windows is not synchronized, the electronic device first determines a target scrolling window whose switching frequency is greater than a preset frequency. If the number of target scrolling windows is greater than 1, the electronic device displays the target scrolling window according to the preset switching parameter.
[0017] In this solution, when the electronic device determines that there are two or more scrolling windows that are switched asynchronously, if the switching frequency of some of the scrolling windows is too low, the switching parameters of the display objects of these scrolling windows may not be adjusted. By setting a preset frequency threshold, only the switching frequency of the scrolling windows whose switching frequency is greater than the preset frequency is adjusted, so that the switching frequency of the scrolling windows can be prevented from changing too much before and after the switching frequency of the scrolling windows is adjusted.
[0018] In some possible implementations, the electronic device obtains the minimum switching frequency of two or more scrolling windows as a preset switching frequency, which may specifically include: the electronic device obtains the minimum switching frequency of two or more scrolling windows that meets a preset condition as the preset switching frequency; the preset condition includes the switching frequency being greater than a frequency threshold.
[0019] In this solution, when determining the preset switching frequency according to the switching frequencies of different scrolling windows, a scrolling window with a relatively low switching frequency, that is, a scrolling window that scrolls very slowly, is not considered. In this way, the switching frequency is limited to avoid the problem that the switching frequency of the scrolling window is adjusted too much, resulting in a large difference between the adjusted and the unadjusted switching frequency.
[0020] In some possible implementations, the scrolling window includes a first scrolling window and a second scrolling window; the electronic device uniformly changes the switching parameters of more than two scrolling windows to preset switching parameters, including: if the switching frequency of the first scrolling window is the same as the switching frequency of the second scrolling window, and the switching time point of the first scrolling window is earlier than the switching time point of the second scrolling window, or the first switching frequency in the first scrolling window is greater than the second switching frequency of the second scrolling window, then the electronic device postpones the switching time point of the first scrolling window from the first time point to the second time point; wherein the first time point is the display end time point of the currently displayed object in the first scrolling window, and the second time point is the display end time point of the most recent displayed object in the second scrolling window; when the second scrolling window is currently displaying a display object, the most recent displayed object in the second scrolling window includes the currently displayed object of the second scrolling window; when the second scrolling window is currently displaying a switching animation, the most recent displayed object in the second scrolling window includes the next displayed object in the second scrolling window.
[0021] In this solution, if the switching of display objects of the scrolling windows is not synchronized, the switching time points of display objects of some scrolling windows can be postponed so that the switching time points of display objects of different scrolling windows are changed to be the same, thereby achieving the synchronization of switching of display objects of different scrolling windows.
[0022] In some possible implementations, the electronic device postpones the switching time point of the first scrolling window from the first time point to the second time point, which may specifically include: when the current time reaches the first time point, the first scrolling window of the electronic device continues to display the current display object; when the current time reaches the second time point, the electronic device draws and displays the next display object in the first scrolling window.
[0023] In some possible implementations, the electronic device draws and displays the next display object in the first scrolling window, which may specifically include: the electronic device executes the method of invalidating the first scrolling window, triggering the electronic device to draw and display the next display object in the first scrolling window.
[0024] In this solution, when postponing the switching time point of the display object of the scrolling window, it can be achieved by not executing the method of invalidating the scrolling window at the corresponding time point by the electronic device. Then, the postponed method of invalidating the scrolling window is executed at the corresponding time point (the second time point) thereafter. Thus, the switching time point of the scrolling window is postponed from the first time point to the second time point.
[0025] In some possible implementations, determining that the switching of display objects of more than two scrolling windows is not synchronized may specifically include: the electronic device obtains switching parameters of more than two scrolling windows; the switching parameters include at least one of the switching time point and the switching frequency of the display object of the scrolling window. When it is detected that the switching time points of at least two scrolling windows are different, and / or the switching frequencies of at least two scrolling windows are different, it is determined that the switching of more than two scrolling windows is not synchronized. If the display interface includes three or more scrolling windows, and the switching of display objects of two scrolling windows is synchronized, but the switching of display objects of other scrolling windows is not synchronized, it will also be determined that the switching of the scrolling windows is not synchronized. In this way, it can be ensured as much as possible that the display objects of the scrolling windows in the display interface are switched synchronously, so as to increase the sleep time of the SoC and the display system and improve the battery life of the electronic device.
[0026] In a second aspect, an electronic device is provided, comprising: a processor, a display screen and a memory; the memory and the display screen are respectively coupled to the processor. The display screen is used to display more than two scrolling windows. The memory is used to store computer-executable instructions, and when the electronic device is running, the processor executes the computer-executable instructions stored in the memory, so that the electronic device performs any display method as described in the first aspect above.
[0027] In a third aspect, a computer-readable storage medium is provided, wherein instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is run on a computer, the computer can execute any one of the display methods in the first aspect.
[0028] In a fourth aspect, a computer program product comprising instructions is provided, which, when executed on an electronic device, enables the electronic device to execute any one of the display methods of the first aspect.
[0029] In a fifth aspect, a device (for example, the device may be a chip system) is provided, the device including a processor for supporting an electronic device to implement the functions involved in the first aspect above. In one possible design, the device also includes a memory for storing program instructions and data necessary for the electronic device. When the device is a chip system, it may be composed of a chip, or may include a chip and other discrete devices.
[0030] Among them, the technical effects brought about by any design method in the second to fifth aspects can refer to the technical effects brought about by different design methods in the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1A A schematic diagram of a display interface provided in an embodiment of the present application;
[0032] Figure 1B A schematic diagram of switching display objects in a scrolling window provided in an embodiment of the present application;
[0033] Figure 2A A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;
[0034] Figure 2B A schematic diagram of the software structure of an electronic device provided in an embodiment of the present application;
[0035] Figure 3A A flow chart of a display method provided in an embodiment of the present application;
[0036] Figure 3B A flow chart of a display method provided in an embodiment of the present application;
[0037] Figure 3C A schematic diagram of a display interface provided in an embodiment of the present application;
[0038] Figure 4A A flow chart of a display method provided in an embodiment of the present application;
[0039] Figure 4B A schematic diagram of switching display objects in a scrolling window provided in an embodiment of the present application;
[0040] Figure 4C A flow chart of a display method provided in an embodiment of the present application;
[0041] Figure 5AA schematic diagram of switching display objects in a scrolling window provided in an embodiment of the present application;
[0042] Figure 5B A schematic diagram of switching display objects in a scrolling window provided in an embodiment of the present application;
[0043] Fig. 6A A schematic diagram of switching display objects in a scrolling window provided in an embodiment of the present application;
[0044] Figure 6B A schematic diagram of switching display objects in a scrolling window provided in an embodiment of the present application;
[0045] Figure 7 A schematic diagram of the structure of a chip system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0046] In order to display more services that can be provided to users in the interface, many applications will use scrolling windows to periodically scroll and display pictures or texts in the interface. For example, the display interface of some mobile phones may include both text scrolling windows and picture scrolling windows. Among them, the text scrolling window can be used to display text, and the text scrolling window supports scrolling display of different texts. The picture scrolling window can be used to display pictures, and the picture scrolling window supports scrolling display of different pictures.
[0047] Figure 1A A schematic diagram of a portion of the display interface of a mobile phone is shown. As time changes, the mobile phone can display the following Figure 1A 10, 20, 30, and 40 are shown in FIG. In this example, the mobile phone display interface includes two scrolling windows, text and picture. It should be understood that in other embodiments, the display interface may also include 3, 4, 5, or more different scrolling windows at the same time.
[0048] Figure 1A In the display interface 10 shown, the text scrolling window 11 displays the text "earrings", and the picture scrolling window 12 displays the picture "pants".
[0049] In the process of updating from display interface 10 to display interface 20, the display object in the text scrolling window is switched, and after the switching, the display is displayed as text scrolling window 21. The display object in text scrolling window 21 of display interface 20 is the text "earring". Compared with display interface 10, the display object in the picture scrolling window (i.e., picture scrolling window 22) in display interface 20 is not switched.
[0050] In the process of updating from display interface 20 to display interface 30, the display object in the text scrolling window does not switch, and the text "earrings" as shown in scrolling window 31 is displayed. However, the display object in the picture scrolling window switches, and after switching, the picture "skirt" as shown in picture scrolling window 32 is displayed.
[0051] In the process of updating from the display interface 30 to the display interface 40, the display in the text scrolling window is switched again, and the display after switching is shown as the text scrolling window 41. The display object in the text scrolling window 41 in the display interface 40 is the text "earring". The display object in the picture scrolling window (i.e., the picture scrolling window 22) is not switched.
[0052] In some embodiments, during the process of switching from the current display object to the next display object in the scrolling window, the mobile phone will play the corresponding switching animation effect (hereinafter referred to as switching animation effect). Figure 1B It shows a Figure 1A An example of the switching process of display objects in the text scrolling window and the picture scrolling window in the mobile phone display interface. Figure 1B In the text scrolling window, when the display object switches, the displayed switching effect is recorded as effect 1. When the display object switches in the picture scrolling window, the displayed switching effect is recorded as effect 2.
[0053] It should be noted that in Figure 1B The switching process shown is only an example. Figure 1B In the example, the switching frequency of the displayed objects in the text scrolling window and the picture scrolling window is the same. That is, the time period from the moment when one text (such as earring) starts to be displayed to the moment when the next text (such as earring) starts to be displayed in the text scrolling window is equal to the time period from the moment when one text (such as earring) starts to be displayed to the moment when the next text (such as earring) starts to be displayed in the picture scrolling window. Figure 1B The time period T1 between time t11 and time t12 shown in the figure is equal to the time period T2 between time t21 and time t22. Furthermore, if the playing time of animation 1 is equal to that of animation 2, then the display time of a text display object is equal to the display time of an image display object. In other embodiments, the switching frequency of display objects in the text scrolling window and the image scrolling window may also be different.
[0054] When the pictures in the picture scrolling window of the display interface of the mobile phone are switched, or the text in the text scrolling window is switched, the display system of the mobile phone needs to perform related operations such as display refresh. When the pictures and text in the scrolling window are not switched, the display system of the mobile phone does not need to perform the display refresh operation. That is, if the above Figure 1AWhen other contents in the mobile phone display interface shown do not change, and when neither the pictures nor the texts are switched, the display system is in a dormant state.
[0055] Combination Figure 1A and Figure 1B From the information shown, we can see that the above Figure 1A In the time period when the text scrolling window and the picture scrolling window in the display interface of the mobile phone are not playing the animation 1 and the animation 2, the display system of the mobile phone may not perform the display refresh operation, that is, the display system is in a dormant state. Figure 1B Since the switching time point t11 of the display object in the text scrolling window is not synchronized with the switching time point t21 of the display object in the picture scrolling window, that is, the text and pictures in the two scrolling windows are cross-scrolled, the sleep time of the display system will be shortened, resulting in unnecessary power consumption waste.
[0056] Based on this, the present application proposes a display method, which can be applied to electronic devices, such as Figure 1A In the technical solution provided in the embodiment of the present application, if it is detected that the switching of two or more scrolling windows in the display interface is not synchronized, the electronic device changes the switching parameters of the two or more scrolling windows to a unified switching parameter, so that the switching of the above scrolling windows in the display interface is changed to synchronized switching. In this way, the sleep time of the SoC and the display system can be increased, and unnecessary power consumption waste of the electronic device can be reduced.
[0057] In some embodiments, the electronic device may be a mobile phone (eg Figure 1A As shown in ), tablet computers, personal computers (PC), smart screens, desktops, laptops, handheld computers, notebook computers, ultra-mobile personal computers (UMPC), netbooks, smart watches and other wearable devices, artificial intelligence (AI) speakers and vehicle-mounted devices, can also be various teaching aids (such as learning machines, early education machines), smart toys, portable robots, personal digital assistants (PDA), augmented reality (AR) \ virtual reality (VR) devices, media players and other devices, can also be devices with mobile office functions, devices with smart home functions, devices with audio and video entertainment functions, devices that support smart travel, etc. The embodiments of the present application do not impose any special restrictions on the specific form of the device.
[0058] like Figure 2A The figure shows a schematic diagram of the structure of an electronic device 100 provided in an embodiment of the present application. Exemplarily, the electronic device 100 may be the above-mentioned mobile phone. 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 sensor module 180, a button 190, a motor 191, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. Among them, the sensor module 180 may include a pressure sensor 180A, a touch sensor 180B, etc.
[0059] It is to be understood that the structure illustrated in the embodiment of the present application 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 split 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.
[0060] The processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a memory, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and / or a neural-network processing unit (neural-network processing unit, NPU), etc. Among them, different processing units can be independent devices or integrated in one or more processors. For example, the processor 110 is used to execute the display method in the embodiment of the present application.
[0061] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.
[0062] 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.
[0063] The USB interface 130 is an interface that complies with USB standard specifications, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 may be used to connect a charger to charge the electronic device 100, and may also be used to transmit data between the electronic device 100 and a peripheral device.
[0064] 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.
[0065] The internal memory 121 can be used to store computer executable program codes, and the executable program codes include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system and an application required for at least one function (such as a sound playback function, an image playback function, etc.).
[0066] 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.
[0067] 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 the wired charger through the USB interface 130 .
[0068] 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 to power the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160.
[0069] In some other embodiments, the power management module 141 may also be disposed in the processor 110. In some other embodiments, the power management module 141 and the charging management module 140 may also be disposed in the same device.
[0070] 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.
[0071] 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.
[0072] 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, etc. 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.
[0073] 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.
[0074] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, so that electronic device 100 can communicate with the network and other devices through wireless communication technology.
[0075] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170 and the application processor.
[0076] The audio module 170 is used to convert digital audio signals into analog audio signals for output, and is also used to convert analog audio inputs 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.
[0077] 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. A 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 based on the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 100 detects the intensity of the touch operation based on the pressure sensor 180A. The electronic device 100 can also calculate the position of the touch based on the detection signal of the pressure sensor 180A.
[0078] The touch sensor 180B is also called a "touch panel". The touch sensor 180B can be arranged on the display screen 194, and the touch sensor 180B and the display screen 194 form a touch screen, also called a "touch screen". The touch sensor 180B 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 180B can also be arranged on the surface of the electronic device 100, which is different from the position of the display screen 194. In an embodiment of the present application, the display screen 194 can be specifically used to display a scrolling window, and different display objects are displayed at different times in the scrolling window.
[0079] 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.
[0080] 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.
[0081] 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.
[0082] The display screen 194 is used to display images, videos, 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.
[0083] The camera 193 is used to capture still images or videos. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
[0084] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to or disconnected from the electronic device 100 by inserting or removing 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.
[0085] The display methods in the following embodiments can all be implemented in the electronic device 100 having the above hardware structure.
[0086] 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. The embodiment of the present application takes the Android system of the layered architecture as an example to exemplify the software structure of the electronic device 100. Figure 2B It is a software structure block diagram of the electronic device 100 according to an embodiment of the present application.
[0087] 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.
[0088] The application layer can include a series of application packages.
[0089] like Figure 2B As shown, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, etc.
[0090] 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.
[0091] like Figure 2B As 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, and the like.
[0092] 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.
[0093] Content providers are used to store and retrieve data and make it accessible to applications. The data can include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
[0094] 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.
[0095] 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.).
[0096] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0097] 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.
[0098] 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), etc.
[0099] Android Runtime includes core libraries and virtual machines. Android Runtime is responsible for scheduling and management of the Android system.
[0100] 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.
[0101] 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.
[0102] 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), etc.
[0103] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.
[0104] 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.
[0105] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0106] A 2D graphics engine is a drawing engine for 2D drawings.
[0107] 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.
[0108] The following is a brief introduction to the technical terms that may be involved in the embodiments of the present application.
[0109] Animation effect, referred to as dynamic effect. In the embodiment of the present application, when switching from one display object to another display object in the scrolling window, a switching animation effect will be played in the middle.
[0110] The scrolling window indicates that display objects can be switched therein, so as to achieve the effect of scrolling and displaying different display objects at different times in the same window.
[0111] The essence of a display list is a buffer that records the sequence of drawing commands to be executed. When a view needs to be rendered for the first time, a display list is created. If the content of some visible components in the view changes, the previous display list cannot be used anymore. You need to create a new display list and re-execute the rendering command to update it on the screen.
[0112] The invalidate method can be used to update the view. Calling invalidate() will invalidate the current view and notify each subview of the view that it needs to be re-rendered to display the latest state. The display system will refresh the view.
[0113] The user interface (UI) rendering process of the Android application window can be divided into three stages: measurement, layout, and drawing. Before drawing the elements in the UI interface, it is necessary to measure the actual size of the elements to be drawn from top to bottom, and arrange these original positions reasonably, that is, to lay them out appropriately.
[0114] In some embodiments, the user interface needs to create a displaylist for the view object view to be displayed, and then perform measurement, layout and drawing in sequence at corresponding times, so that the view to be displayed is displayed in the user interface.
[0115] For the user interface, when the view is drawn for the first time, a displaylist is created, and the drawing objects are stored in the displaylist, and then the measure, layout, and draw operations are completed. When the view is drawn again, if the drawing content of the view is updated, the displaylist, measure, layout, and draw operations need to be recreated to complete the drawing. For the scrolling window, when the view is not drawn for the first time, the drawing content of the view will be updated. Therefore, each time the display object of the scrolling window is switched, the displaylist, measure, layout, and draw operations need to be recreated to complete the drawing.
[0116] The display method provided in the embodiment of the present application can be applied to a scenario where the display interface of an electronic device includes multiple scrolling windows, and the switching of display objects in the multiple scrolling windows is not synchronized. Specifically, by adjusting the switching parameters of the display objects in the multiple scrolling windows, the switching of display objects in different scrolling windows is changed to synchronous switching, thereby increasing the sleep time of the SoC and the display system, reducing unnecessary power consumption waste of the electronic device, and improving the battery life of the electronic device.
[0117] The technical solution provided by the embodiment of the present application will be described in detail below in conjunction with the accompanying drawings. The following description will be given by taking the electronic device as a mobile phone as an example.
[0118] like Figure 3A Shown is a flow chart of a display method provided in an embodiment of the present application.
[0119] S301. The mobile phone starts.
[0120] After the phone is started, the interface will be displayed. The display interface usually includes multiple display windows, and different display windows can be used to display different display objects. Some display windows can be fixed display windows, which can display fixed display objects, such as text, pictures, a combination of pictures and text, or dynamic images, etc. Another part of the display windows can be scrolling display windows. In the scrolling display window, the display objects can be switched in it, so that different display objects can be scrolled and displayed at different times in the same window. Figure 1A The display windows 11, 12, 21, 22 shown are scrolling display windows in some embodiments, and may also be referred to as scrolling windows.
[0121] S302. The mobile phone displays two or more scrolling windows.
[0122] The scroll window displays different display objects at different times, such as Figure 1A shown.
[0123] S303. When it is determined that the switching of the display objects of the two or more scrolling windows is not synchronized, the mobile phone displays the two or more scrolling windows with preset switching parameters.
[0124] by Figure 1A Taking the scenario shown as an example, the switching of the display objects in the text scrolling window and the picture scrolling window in the display interface is not synchronized. In the embodiment of the present application, if the mobile phone recognizes more than two scrolling windows displayed on the interface, and the switching of the display objects in the two or more scrolling windows is not synchronized.
[0125] In some embodiments, the mobile phone may respectively obtain the switching parameters of the two or more scrolling windows, and then determine whether the switching of the display objects of the two or more scrolling windows is synchronized based on the switching parameters.
[0126] The switching parameters of the scrolling window specifically refer to the parameters used when switching the display object in the scrolling window. In some embodiments, the switching parameters specifically include at least one of the switching time point and the switching frequency of the display object.
[0127] Among them, the switching time point is used to indicate the time point when the scrolling window switches from the current display object to the next display object. Exemplarily, from the 0th second when the mobile phone display starts to display the picture, the word "earring" is displayed in the scrolling window 1. After displaying "earring" for 1 second, the display object in the scrolling window 1 will be switched to the word "earring". That is, at the 1st second when the mobile phone display starts to display the picture, the display object in the scrolling window 1 will be switched to the word "earring". This time point of 1 second from the start of displaying the picture on the display screen is one of the switching time points of the display object of the scrolling window 1. Afterwards, if the display object in the scrolling window 1 switches again at 2.2 seconds from the start of displaying the picture on the mobile phone display, the time point of 2.2 seconds from the start of displaying the picture on the display screen is another switching time point of the display object of the scrolling window. And so on. Figure 1B The t11, t12, and t13 shown in FIG. 1 are switching time points of the text scrolling window, and the t21, t22, and t23 are switching time points of the picture scrolling window.
[0128] In some embodiments, in any scrolling window, after the current display object is displayed, the mobile phone will first play the switching effect. After that, after the switching effect is played, the next display object will be displayed in the scrolling window. In this embodiment, the switching time point is the time when the switching effect starts playing during the process of switching from the current display object to the next display object. It should be noted that the scrolling window in the mobile phone display interface is in the current display object (such as Figure 1B After the text "Earrings" in the text is displayed, the scroll window switching effect will be played (such as Figure 1B After the switching animation ends, the next display object will be displayed in the scroll window (such as Figure 1B the word "earrings" in the text).
[0129] Exemplarily, the switching animation effect may be scrolling from right to left, scrolling from bottom to top, page turning, etc.
[0130] The switching frequency indicates the switching frequency of the display objects in the scrolling window. In some embodiments, if there is no switching animation when the display objects in the scrolling window are switched, then the switching frequency of a scrolling window = 1 / the display duration of a display object. In other embodiments, if a switching animation needs to be played before the display object is updated to the next display object when the display object in the scrolling window is switched, then the switching frequency of a scrolling window = 1 / (the display duration of a display object + the playing duration of a switching animation). Figure 1B For example, the switching frequency of the text scrolling window = 1 / T1, and the switching frequency of the picture scrolling window = 1 / T2.
[0131] In other embodiments, the mobile phone may also identify the display content in the scrolling window, and then determine whether the switching of the display objects of two or more scrolling windows is synchronized according to the identified display content. Exemplarily, the mobile phone may identify the display content of each scrolling window at a preset time interval. Then, by comparing the changes in the display content in each scrolling window and the changes in the display content between different scrolling windows, it is determined whether the switching of the display objects of different scrolling windows is synchronized.
[0132] In the technical solution provided in the embodiment of the present application, the mobile phone determines whether the switching of display objects of different scrolling windows is synchronized by combining switching parameters or identifying from the screen, so as to facilitate the mobile phone to adjust the switching parameters of different scrolling windows.
[0133] After determining that the display objects of the scrolling windows are not displayed synchronously, the mobile phone can start adjusting the switching parameters of the scrolling windows so that the switching parameters of different scrolling windows become the same, thereby making the switching of the display objects of the scrolling windows synchronous. Figure 3B As shown, after determining that the switching of the display objects of the two or more scrolling windows is not synchronized, the mobile phone displays the two or more scrolling windows with preset switching parameters, which may specifically include S303a-S303d, wherein:
[0134] S303a. For the current scrolling window, the mobile phone obtains the first drawing command sequence of the current scrolling window.
[0135] The current scroll window is any one of the two or more scroll windows.
[0136] The drawing command sequence is used for the mobile phone to draw and display the display object in the current scrolling window according to the drawing command sequence. In the embodiment of the present application, the drawing command sequence corresponding to the first display object to be displayed in the current scrolling window is the first drawing command sequence; that is, the mobile phone can draw and display the first display object in the current scrolling window according to the first drawing command sequence.
[0137] In some embodiments, the mobile phone obtains the first drawing command sequence of the current scrolling window, which may specifically include the mobile phone obtaining the first drawing command sequence from the first display list displaylist of the current scrolling window. As can be seen from the above description, the displaylist is essentially a buffer that records the drawing command sequence to be executed.
[0138] It should be noted that before the mobile phone obtains the first drawing command sequence from the first display list, the mobile phone needs to first create a first display list corresponding to the first display object of the current scrolling window. The specific implementation process of the mobile phone creating a display list can refer to the description in the relevant technology and will not be repeated in the embodiment of this application.
[0139] S303b. The mobile phone draws and displays the first display object in the current scrolling window according to the first drawing command sequence.
[0140] Specifically, the mobile phone executes according to the first drawing command sequence, so as to draw and display the first display object in the current scrolling window on the display interface of the mobile phone.
[0141] S303c. When it is determined according to the preset switching parameters that the current scrolling window needs to switch the display object, the mobile phone obtains a second drawing command sequence of the current scrolling window.
[0142] It can be seen from the description of the above embodiment that in order to make the switching of the display object of the scrolling window become synchronous switching, the mobile phone needs to display different scrolling windows with preset switching parameters. Therefore, in the embodiment of the present application, after adjusting the switching parameters of the scrolling window to the preset switching parameters, the mobile phone will determine whether the display object needs to be switched in the current scrolling window according to the preset switching parameters.
[0143] Corresponding to the switching parameter, the preset switching parameter may include at least one of a preset switching time point and a preset switching frequency. In some embodiments, a suitable switching parameter may be directly selected from two or more scrolling windows as the preset switching parameter. In other embodiments, the preset switching parameter may also be jointly determined based on the initial switching parameters of the two or more scrolling windows. The specific process of determining the preset switching parameter will be described in detail in the following embodiments and will not be repeated here.
[0144] Afterwards, the mobile phone displays the two or more scroll windows according to the same preset switching parameter, so that the scroll windows that originally displayed objects were switched asynchronously can be switched synchronously.
[0145] When the preset switching parameters include a preset switching time point, the mobile phone determines whether the current scrolling window needs to switch the display object based on the preset switching parameters. Specifically, it may include: the mobile phone obtains the current time and determines whether the current time reaches the preset switching time point. If so, it is determined that the current scrolling window needs to switch the display object; if not, it is determined that the current scrolling window does not need to switch the display object.
[0146] When the preset switching parameters include a preset switching frequency, the mobile phone determines whether the current scrolling window needs to switch the display object according to the preset switching parameters, which may specifically include: the mobile phone times the display time of the first display object. According to the timed time, it is determined whether the preset switching frequency is met, and if so, it is determined that the current scrolling window needs to switch from the first display object to the second display object, that is, the display object needs to be switched; if not, it indicates that the current scrolling window does not need to switch the display object.
[0147] It should be understood that in other embodiments, the mobile phone may also determine whether the current scrolling window needs to switch the display object in other ways.
[0148] After determining that the display object of the current scrolling window needs to be switched, the mobile phone can obtain the drawing command sequence corresponding to the next display object to be displayed. In the embodiment of the present application, the display object to be displayed after the current scrolling window displays the first display object is recorded as the second display object, and the drawing command sequence corresponding to the second display object is recorded as the second drawing command sequence.
[0149] Similar to obtaining the first drawing command sequence, the mobile phone can also obtain the second drawing command sequence from the display list. Combined with the above description of the displaylist, it can be seen that if the content of some visible components in the view changes, it is necessary to re-create a displaylist and re-execute the rendering instructions to update the screen. In an embodiment of the present application, it is necessary to switch from the first display object to the second display object in the current scrolling window, which means that the content of the visible component has changed. Therefore, before displaying the second display object, the mobile phone needs to re-create the display list corresponding to the second display object, which can be recorded as the second display list. The second drawing command sequence corresponding to the second display list is then stored in the second display list. Afterwards, when the mobile phone needs to switch the display object, it obtains the second drawing command sequence from the second display list, and can draw and display the second display object of the current scrolling window according to the second drawing command sequence, such as S303d.
[0150] S303d. The mobile phone draws and displays the second display object in the current scrolling window according to the second drawing command sequence.
[0151] like Figure 3C As shown, for Figure 1A The scenario shown is a schematic diagram of the mobile phone display interface after executing S303. Figure 3C FIG. 1 shows a schematic diagram of a portion of the display interface of a mobile phone after adjusting the switching parameters of the scroll window. As time changes, the mobile phone can display the following in sequence: Figure 3C , the display interface 50, the display interface 60, the display interface 70, and the display interface 80 shown in FIG. In this example, the mobile phone display interface includes two scrolling windows, text and picture. It should be understood that in other embodiments, the display interface can also include 3, 4, 5 or more different scrolling windows at the same time.
[0152] Figure 3C In the display interface 50 shown, the text scrolling window 51 displays the text “earrings”, and the picture scrolling window 52 displays the picture “pants”.
[0153] In the process of updating the display interface 50 to the display interface 60, the display objects in the text scrolling window and the picture scrolling window are switched synchronously, and after the switching, the display is displayed as a text scrolling window 61 and a picture scrolling window 62. The display object in the text scrolling window 61 of the display interface 60 is the text "earrings", and the display object in the picture scrolling window 62 is the picture "skirt".
[0154] In the process of updating the display interface 60 to the display interface 70, the display objects in the text scrolling window and the picture scrolling window are switched synchronously, and after the switching, the display is displayed as a text scrolling window 71 and a picture scrolling window 72. The display object in the text scrolling window 71 of the display interface 70 is the text "earrings", and the display object in the picture scrolling window 72 is the picture "pants".
[0155] In the process of updating from display interface 70 to display interface 80, the display objects in the text scrolling window and the picture scrolling window are switched synchronously, and after the switching, the display is displayed as text scrolling window 81 and picture scrolling window 82. The display object in the text scrolling window 81 of display interface 80 is the text "earrings", and the display object in the picture scrolling window 82 is the picture "skirt".
[0156] It should be understood that Figure 3C Only a partial display diagram of the mobile phone after adjusting the switching parameters of the scroll window is shown. In other embodiments, the display interface of the mobile phone may also include other windows, and the display interface may also continue to change, which will not be described in detail in the embodiments of the present application.
[0157] It should be noted that the current scrolling window in the above embodiment can represent any one of the two or more scrolling windows displayed on the mobile phone display interface, that is, for each scrolling window displayed on the current display interface, it will be determined whether the display object needs to be switched according to the preset switching parameters. In this way, the switching parameters of each scrolling window on the display interface can be changed to preset switching parameters, so that the switching of display objects of different display windows becomes synchronized. Furthermore, since the display objects of different display windows are switched at the same time, the time points at which the SoC and the system need to perform refresh operations for different scrolling windows become the same. Thereby, the frequency of refresh operations (including creating displaylist, measure, layout and draw) can be reduced. The sleep time of the SoC and the system is increased, unnecessary power consumption is reduced, and the power consumption of the mobile phone is reduced.
[0158] Further, in some embodiments, the switching frequency of the display object in some scrolling windows displayed on the mobile phone interface is very low, much lower than the switching frequency of other scrolling windows. For example, the switching frequency of scrolling window 2 is switched once every 15 seconds, which is much lower than the switching frequency of the display object of scrolling window 3, which is switched once every 2 seconds. In this case, if this scrolling window with a lower switching frequency is switched synchronously with other scrolling windows with a higher switching frequency to display objects, it is necessary to increase the switching frequency of the scrolling window with a lower switching frequency, or reduce the switching frequency of the scrolling window with a higher switching frequency. Due to the large difference in the switching frequency of the above-mentioned scrolling windows, such an adjustment will cause the switching frequency of the scrolling window in the display interface to change greatly before and after the adjustment. In order to reduce the adjustment of the switching parameters of the scrolling window, which causes the user to visually perceive the large change in the switching frequency of the display object of the scrolling window in the display interface, the adjustment operation of the switching parameters of the scrolling window can be omitted for some scrolling windows with a lower switching frequency.
[0159] In some embodiments, the above S303 may specifically include: when the switching frequencies of more than two scrolling windows are different, the mobile phone filters the target scrolling windows whose switching frequencies are greater than the preset frequency; when the number of target scrolling windows is greater than 1, the mobile phone displays the target scrolling windows with the same preset switching parameters.
[0160] The preset switching frequency can be set according to actual conditions. For example, the preset switching frequency can be set to switch once every 6 seconds, once every 8 seconds, or once every 10 seconds, etc.
[0161] Furthermore, in some embodiments, the mobile phone filters the target scrolling windows whose switching frequency is greater than the preset frequency, specifically requiring the mobile phone to obtain the switching frequency of each scrolling window. The mobile phone obtains the switching frequency of the scrolling window, specifically by monitoring the switching of the display objects of each scrolling window displayed in the interface, thereby determining the switching frequency of each scrolling window. Alternatively, the mobile phone obtains the switching frequency of the scrolling window, specifically by obtaining the drawing-related commands corresponding to each scrolling window. Among them, when the mobile phone displays the display objects in the scrolling window on the interface, it needs to draw and display them according to the above-mentioned drawing-related commands.
[0162] The display objects of different scrolling windows switch asynchronously, which may specifically include different switching frequencies of different scrolling windows. In this embodiment, in order to synchronize the display objects that originally switch asynchronously, the switching frequency of the scrolling windows with higher switching frequency can be reduced to make the switching frequencies of different scrolling windows the same.
[0163] In some other embodiments, the display objects of different scrolling windows are switched asynchronously, which may specifically mean that the switching frequencies of different scrolling windows are the same, but the switching time points of different scrolling windows are different. In this embodiment, the mobile phone can synchronize the switching of the display objects of the scrolling windows by making the switching time points of all scrolling windows the same.
[0164] In other embodiments, the display objects of different scrolling windows are switched asynchronously, which may specifically mean that the switching frequencies of different scrolling windows are different, and the switching time points of different view windows are different. In this embodiment, the switching frequencies of different scrolling windows can be made the same by first reducing the switching frequency of the scrolling window with a higher switching frequency. After that, the switching time points of the display objects of different scrolling windows can be made the same, so that each time the display objects of different scrolling windows are switched, they are at the same switching time point. In other words, different scrolling windows can be switched synchronously.
[0165] In some embodiments, the above adjustment of the switching frequency and switching time of the scrolling window can be achieved by dropping frames of the scrolling window. For a scrolling window, if frames are dropped at the moment when the display object is originally required to be switched, the switching time of the display object of the scrolling window can be postponed, that is, the display time of the display object in the scrolling window can be extended.
[0166] Furthermore, when judging whether the current scrolling window needs to switch the display object according to the preset switching parameters, it is possible to first determine at which time points the current scrolling window needs to drop frames and the number of times the frames need to be dropped according to the preset switching parameters and the drawing command sequence of the current scrolling window.
[0167] In some embodiments, the frame loss times can be stored together with the drawing command sequence in the display list. The method further includes: the mobile phone determines the frame loss times of the current scrolling window according to the preset switching parameters and the drawing command sequence of the current scrolling window. The mobile phone stores the frame loss times in the first display list.
[0168] After the mobile phone draws and displays the first display object in the current scrolling window according to the first drawing command sequence, the above method also includes: if the mobile phone determines that the display of the first display object is finished according to the first drawing command sequence, and determines according to the preset switching parameters that the current scrolling window does not need to execute the display object switching, then the mobile phone performs frame drop processing on the current scrolling window according to the number of frame drop times.
[0169] In some embodiments, the mobile phone performs frame dropping processing on the scrolling window, which can be specifically done by not executing the drawing and displaying of the next display object (such as the second display object). In other embodiments, it can be seen from the above description that the invalidate() method can be used to update the view. In some embodiments, when the mobile phone switches the display object of the current scrolling window, it can trigger the drawing and display of the next display object by calling the invalidate() method. In this embodiment, the mobile phone performs frame dropping processing on the scrolling window, which can be specifically done by not executing the method of invalidating the window to postpone the drawing and display time point of the next display object, thereby synchronizing the switching time point of the current scrolling window with other scrolling windows.
[0170] Furthermore, since the number of times the current scrolling window needs to drop frames has been stored in the first display list, after the mobile phone completes the frame drop processing for the current scrolling window, it means that the current time has reached the preset switching time point. In other words, at this moment, the current scrolling window should need to execute the switching of the display object. In some embodiments, after the mobile phone completes the frame drop processing for the current scrolling window according to the number of frame drops, it determines that the current scrolling window needs to execute the switching of the display object. It can be understood that if the number of frame drops completed by the current scrolling window has not reached the number of frame drops stored in the first display list, it means that the current scrolling window has not reached the preset switching time point, that is, the current scrolling window does not need to execute the switching of the display object.
[0171] In the technical solution provided by the embodiment of the present application, when the mobile phone displays more than two scrolling windows according to the preset switching parameters, the number of frame drops is first determined according to the preset switching parameters and the drawing command sequence. After that, when it is necessary to postpone the switching time point of the scrolling window, the current scrolling window can be processed according to the number of frame drops. And it can be determined whether the frame drop processing of the current scrolling window is completed according to the number of frame drops. If the frame drop processing of the current scrolling window is completed, it means that the preset switching time point in the preset switching parameters has been reached, and the current scrolling window needs to execute the switching of the display object. At this time, the mobile phone can obtain the drawing command sequence corresponding to the next display object, and draw and display the next display object (that is, the second display object mentioned above) according to the drawing command sequence. In this way, it is convenient for the mobile phone to determine whether the scrolling window needs to switch the display object.
[0172] like Figure 4A The flowchart of the display method provided in some other embodiments is shown. In this embodiment, the above display method will be described from the perspective of the background execution of the mobile phone. The method includes S401-S406, wherein:
[0173] S401. The mobile phone starts.
[0174] In order to display more services that can be provided to users in the interface, some mobile phone applications can also display different services by scrolling windows in the application interface. Therefore, in some embodiments, after S401, the mobile phone also starts the application and displays the application display interface.
[0175] S402. Identify a scrolling window included in the display interface of the mobile phone.
[0176] In some embodiments, the above S402 may specifically include: the mobile phone identifies a window in the display interface, and then determines whether the identified window is a scrolling window. The specific implementation process of the mobile phone identifying the window in the display interface can refer to the description in the relevant technology, and will not be repeated in the embodiments of the present application. In some embodiments, the window in the display interface can also be referred to as a view object in the display interface.
[0177] Furthermore, after the mobile phone identifies the window in the display interface, it is also necessary to determine whether the window is a scrolling window. As can be seen from the above description, the scrolling window supports displaying different display objects at different times, and the display objects are scrolled in the scrolling window in a switching manner. Therefore, in some embodiments, the mobile phone can determine whether the window in the display interface is a scrolling window by detecting whether the display object in the window of the display interface is updated or switched over time. Exemplarily, when it is detected that the display object in the window is updated or switched over time, the mobile phone can determine that the window is a scrolling window.
[0178] Combination Figure 1B As can be seen from the content shown, in some embodiments, when a scrolling window switches from one display object to another display object, a switching animation will be displayed in the scrolling window. Therefore, in some embodiments, the collection can also determine whether the window of the display interface is a scrolling window by detecting whether the display object in the window includes a switching animation. Exemplarily, when it is detected that the display object in the window includes a switching animation, the window is determined to be a scrolling window.
[0179] In other embodiments, the mobile phone determines whether the window is a scrolling window by obtaining display-related parameters of the window. In some embodiments, the display-related parameters of the window can be used to indicate the display content to be displayed in the window. The mobile phone can determine whether the window is a scrolling window by analyzing whether the display-related parameters of the window include more than two display objects to be displayed. Exemplarily, the mobile phone can determine that the window is a scrolling window when it is determined through the display-related parameters of the window that the window includes more than two display objects to be displayed.
[0180] In some embodiments, the above-mentioned determination of whether a window is a scrolling window by analyzing the display-related parameters of the window can be performed when the mobile phone just starts to display the display interface. In this way, if the display interface contains more than two scrolling windows, and the display object switching of the scrolling windows is not synchronized, the mobile phone can adjust the switching of the display objects of different scrolling windows when the display interface is just displayed. In this way, the switching of the display objects of different scrolling windows is adjusted to synchronous switching as early as possible, which can better improve the sleep time of the SoC and the display system, and can also avoid unnecessary waste of power consumption to a greater extent, thereby improving the battery life of the mobile phone.
[0181] In other embodiments, the mobile phone may also determine whether the window in the display interface is a scrolling window in other ways.
[0182] In some embodiments, the above S402 may specifically include identifying the display position, display object, and other information of the scrolling window contained in the display interface. The display position of the scrolling window indicates the position of the scrolling window in the display interface. After the mobile phone identifies the scrolling window of the display interface, it can obtain the display position of the scrolling window to facilitate the subsequent determination of the number of scrolling windows contained in the display interface.
[0183] The display object represents the content displayed in the scroll window, which may be text, pictures, etc. After identifying the scroll window of the display interface, the mobile phone may also identify the display object of the scroll window to facilitate subsequent determination of switching parameters of the display object of the scroll window.
[0184] S403. Display whether the interface includes more than two scrolling windows.
[0185] After the mobile phone identifies the scrolling window in the display interface, the number of scrolling windows included in the display interface can be counted. Then, it can be determined whether the current display interface contains more than two scrolling windows. If the display interface does not contain a scrolling window or only contains one scrolling window, since there is no cross-display of display objects of different scrolling windows, no special processing is performed on the current display interface. That is, if the judgment result of S403 is no, that is, the current display interface of the mobile phone contains only one scrolling window, or the current display interface does not contain a scrolling window. At this time, the mobile phone can perform related display operations according to the original process, without performing special operations to adjust the switching of display objects. Alternatively, in other embodiments, when the judgment result of S403 is no, the display interface of the electronic device can change, so the electronic device can also continue to determine whether the display interface includes more than two scrolling windows.
[0186] If the current display interface includes more than two scrolling windows, the two or more scrolling windows may cause the display objects to scroll crosswise. This will reduce the sleep time of the SoC and the display system and increase unnecessary power consumption. Therefore, if the judgment result of S403 is yes, it means that the current display interface of the mobile phone includes 2, 3 or more scrolling windows. At this time, the mobile phone can execute S404.
[0187] S404. Obtain the switching parameters of each scrolling window respectively.
[0188] The specific implementation process of the mobile phone obtaining the switching parameters of the scrolling window can be specifically described in the above embodiment and will not be repeated here.
[0189] S405. Determine whether the switching of different scrolling windows is synchronized according to the switching parameters.
[0190] In some embodiments, the above S405 may specifically include: judging whether the switching of different scrolling windows is synchronous according to the switching time point and / or switching frequency of display objects of different scrolling windows.
[0191] It can be seen from the description of the above embodiments that if the display objects of two scrolling windows are switched asynchronously in the same display interface, the display objects of different scrolling windows may cross-scroll, thereby causing the problem of reduced sleep time of the SoC and the display system. Therefore, in some embodiments, as long as it is detected that the display objects of at least two scrolling windows in the display interface are switched asynchronously, the mobile phone needs to perform a synchronous switching optimization operation on the scrolling windows of the display interface.
[0192] Furthermore, in some embodiments, when the mobile phone detects that the switching time points of at least two scrolling windows in the display interface are different, the mobile phone can determine that the display objects of different scrolling windows are not switched synchronously. Figure 1B The text scrolling window and the picture scrolling window shown have the same switching frequency of the text in the text scrolling window, but different switching time points. Therefore, it can be determined that Figure 1B The switching of the display objects of the text scrolling window and the picture scrolling window is not synchronized.
[0193] Exemplarily, the mobile phone detects that the display interface includes three scrolling windows, and the display object switching of two scrolling windows (scrolling window 1 and scrolling window 2) is synchronized, while the display object switching of two scrolling windows (scrolling window 1 and scrolling window 3) is not synchronized. At this time, since the display object switching of scrolling window 1 and scrolling window 3 is not synchronized, scrolling window 1 and scrolling window 3 may have cross-scrolling of display objects, resulting in the problem of reduced sleep time of SoC and display system. Therefore, at this time, the mobile phone can determine that the switching of display objects of the scrolling windows is not synchronized. Similarly, when the display interface of the mobile phone includes 4, 5 or more scrolling windows, the mobile phone can still determine that the judgment result of S405 is no when it detects that the switching of display objects of any two scrolling windows is not synchronized.
[0194] In other embodiments, when the mobile phone detects that the switching frequencies of display objects in at least two scrolling windows in the display interface are different, it can be determined that the switching of display objects in different scrolling windows is not synchronized. Figure 4B In the figure shown, the switching frequency of the display objects of the text scrolling window and the picture scrolling window is different, T5≠T6. At some moments, the switching time points of the text scrolling window and the picture display window are synchronized, such as Figure 4B The time t31 is shown.
[0195] In other embodiments, when it is detected that the switching time points and switching frequencies of at least two scrolling windows in the display interface are different, it can also be determined that the switching of different scrolling windows is not synchronized.
[0196] If the result of S405 is yes, it means that the switching of multiple scrolling windows in the current display interface of the mobile phone is synchronized, so there is no problem of cross-scrolling switching of display objects in different scrolling windows, which leads to a reduction in the sleep time of the SoC and the display system. At this time, the mobile phone does not need to perform special operations. It should be noted that in Figure 4A In the flowchart shown, the case where the judgment result of S405 is yes is not shown.
[0197] If the result of S405 is no, it means that at least two scrolling windows in the current display interface of the mobile phone are switched asynchronously. At this time, the display objects in different scrolling windows of the mobile phone are switched crosswise, which will reduce the sleep time of the SoC and the display system. At this time, the mobile phone can execute S406.
[0198] S406. Determine the switching parameters of the two or more scrolling windows as preset switching parameters, and display the display objects in the scrolling windows according to the preset switching parameters.
[0199] As can be seen from the above description, for the scrolling window in the display interface, when drawing the display object, it is necessary to first create a displaylist, and then perform measurement, layout and drawing in sequence. In order to achieve synchronous switching, the switching frequency of the original part of the scrolling window in the display interface can be reduced. Therefore, in some embodiments, such as Figure 4C As shown, the above S406 may specifically include S4061-S4067:
[0200] S4061. The mobile phone determines the preset switching parameters of the scrolling window.
[0201] The specific implementation process of the mobile phone determining the preset switching parameters of the rolling window can refer to the description in the above embodiment, which will not be repeated here. For any rolling window, the following steps can be performed respectively.
[0202] S4062. Create a first display list of the current scrolling window, and store a first drawing command sequence corresponding to the first display object and preset switching parameters in the first display list.
[0203] It should be noted that, in the actual drawing process, creating a display list of the first display object also requires storing the first drawing command sequence of the first display object in the first display list, so that the first display object can be drawn and displayed in the interface according to the first drawing command sequence.
[0204] In the embodiment of the present application, in order to achieve synchronous switching of display objects of different scrolling windows in the display interface, it is necessary to adjust the switching parameters of some scrolling windows to preset switching parameters. Therefore, in S4062, the mobile phone will additionally store the preset switching parameters in the first display list, so that the switching parameters of the scrolling window can be adjusted according to the preset switching parameters later, so as to achieve the effect of synchronous switching with display objects of other scrolling windows.
[0205] In some embodiments, the current scroll window may be any scroll window in the display interface. The first display object in the current scroll window may be the current display object in the current scroll window after it is determined that the display objects in the at least two scroll windows in the display interface are switched out of sync. Figure 1BFor example, if it is determined that the display interface includes at least two scrolling windows at a time when display object switching is not synchronized, and the text scrolling window is displaying the text "ear stud" before t11, then the first display object is the text "ear stud".
[0206] Alternatively, in some other embodiments, when it is determined that the display objects of at least two scrolling windows in the display interface are switched asynchronously, the current scrolling window is in the process of playing the switching animation, and the first display object may be the next display object to be displayed in the current scrolling window. Figure 1B Taking the shown example, if it is determined that the display interface contains at least two scrolling windows whose display objects switch asynchronously, the text scrolling window is playing animation 1 after t11. At this time, the first display object may be the next display object to be displayed, namely the text "earrings".
[0207] In some embodiments, after creating the first display list, the preset switching frequency and the preset switching time point in the preset switching parameters can be directly stored in the first display list. In other embodiments, the switching time point in the scrolling window and the number of frame drops required for frame drops can also be determined based on the preset switching frequency and the preset switching time point. In this way, it is convenient to determine whether it is necessary to perform display object switching later.
[0208] S4063. Draw and display the first display object in the current scrolling window according to the first drawing command sequence.
[0209] As can be seen from the above description, the above S4063 may specifically include sequentially performing measurement, layout and drawing according to the first drawing command sequence. After the drawing is completed, the first display object may be displayed in the current scrolling window of the display interface.
[0210] Among them, the second display object may refer to the first display object to be displayed after the first display object in the scrolling window. If the display method provided in the embodiment of the present application is not executed, then after the display of the first display object in the scrolling window is completed, a switching animation will be played, and then the second display object will be displayed. However, in the embodiment of the present application, in order to achieve synchronous switching of display objects in different scrolling windows, the switching time points in some scrolling windows need to be adjusted. Therefore, in the embodiment of the present application, before the scrolling window switches from the first display object to the second display object, it is also necessary to combine the preset switching parameters in the first display list to determine whether it is currently necessary to execute the switching of the display object. Therefore, in some embodiments, before the scrolling window switches from the first display object to the second display object, the mobile phone can also execute S4064.
[0211] S4064. Determine whether the current scrolling window needs to execute a display object switch according to the preset switching parameters in the display list.
[0212] Further, when the judgment result of S4064 is no, the mobile phone can execute S4065; when the judgment result of S4064 is yes, the mobile phone can execute S4066 and S4067.
[0213] S4065. Continue to display the first display object in the scrolling window according to the first display list.
[0214] S4066. Create a second display list of the second display object of the scrolling window.
[0215] S4067. Draw and display the second display object in the current scroll window according to the second drawing command sequence in the second display list.
[0216] In the technical solution provided by the embodiment of the present application, after determining that the switching parameters of the scrolling window need to be adjusted, the switching parameters that need to be uniformly adjusted are additionally stored in the first display list of the display object drawn for the first time by any scrolling window. And before switching the display object, it is first determined whether the display object needs to be switched according to the preset switching parameters. If so, the drawing operation of the next display object will be performed. Thereby, different scrolling windows can realize synchronous switching of display objects. At the same time, in order to realize synchronous switching of display objects of different scrolling windows, the switching time point of some scrolling windows will be postponed. Since the system needs to perform a refresh operation when switching the display object, the above-mentioned operation of postponing the switching time point of some view windows reduces the operations that need to be performed for the SoC and the display system compared to before adjusting the switching parameters, thereby saving calculation time and achieving the effect of reducing the power consumption of electronic devices.
[0217] It can be seen from the description of the above embodiments that when the switching time points and / or switching frequencies of the display objects of the scrolling window are different, it can be determined that the switching of the scrolling window is not synchronized.
[0218] Taking the display interface including two scrolling windows, namely the first scrolling window and the second scrolling window as an example, in some embodiments, if the first switching frequency of the first scrolling window is the same as the second switching frequency of the second scrolling window, but the first switching time point t11 of the first scrolling window is different from the second switching time point t21 of the second scrolling window, such as Figure 1B In the case shown, the above S406 may specifically include: the mobile phone postpones the start time of playing the switching animation in the first scrolling window.
[0219] Furthermore, the mobile phone postpones the start time of playing the switching animation in the first scrolling window, which may specifically include: the mobile phone selects a switching animation from the first scrolling window as a target switching animation, and then postpones the start time of playing the target switching animation, so that the target switching animation is played together with the switching animation of the first scrolling window when the switching animation of the second scrolling window starts playing next time.
[0220] Figure 5A The diagram shows the switching of display objects in which the switching frequency of the first scrolling window and the second scrolling window is the same but the switching time points are different. In this example, the mobile phone selects animation 11 as the target switching animation, postpones the start time of animation 11, and plays animation 11 together with the next switching animation (animation 21) of the second scrolling window. In this way, the switching time points in the first scrolling window and the second scrolling window can be changed to be the same. Figure 5A As shown in the schematic diagram after delaying the animation 11, the mobile phone delays the animation 11 to start playing at the same time as the animation 21, so that the display object switching of the text scrolling window and the picture scrolling window can be synchronized. At this time, the sleep time is changed to T7, which is different from the case when the display object switching of the two scrolling windows is not synchronized (i.e. Figure 1B In the scenario of mobile phone, the sleep time of display system and SoC is increased. It reduces unnecessary power consumption and improves the battery life of mobile phone.
[0221] Since the playing time of the animation is usually fixed, in some embodiments, if the first switching frequency is the same as the second switching frequency, and the first switching time point is different from the second switching time point, it is only necessary to postpone the start time of a switching animation of the first scrolling window to the same as the playing start time of the switching animation of the second scrolling window, and then the display objects and the playing of the switching animation in the first scrolling window will be automatically postponed and changed to be synchronized with the display objects and the playing of the switching animation in the second scrolling window. Thus, the switching synchronization effect of the display objects of the first scrolling window and the second scrolling window is achieved.
[0222] Among them, the step of the mobile phone selecting the target switching animation effect can be specifically performed after the mobile phone determines that the display interface includes more than two scrolling windows, and the display object switching of the two scrolling windows is not synchronized.
[0223] In some embodiments, the mobile phone can determine that the switching of display objects in two scrolling windows is not synchronized when the scrolling window displays the first display object. At this time, the mobile phone can directly select the switching effect of the first display object switching to the second display object as the target switching effect, that is, the first switching effect displayed in the scrolling window. In other embodiments, the mobile phone can also determine that the switching of display objects in two or more scrolling windows is not synchronized after the display object in the scrolling window has been switched to a non-first display object. At this time, the mobile phone can also select the next switching effect to be played as the target switching effect.
[0224] It should be noted that in the above embodiment where the first switching frequency = the second switching frequency, but the first switching time point is different from the second switching time point, the mobile phone may also delay the start time of playing the switching effect in the second scrolling window. Figure 5B As shown, the switching time point of the first scroll window and the second scroll window can also be changed to the same effect. Figure 5B In the schematic diagram shown, the mobile phone postpones the start time of playing the dynamic effect 21 of the picture scrolling window until the dynamic effect 12 of the text scrolling window starts playing, and then plays the dynamic effect 21 of the picture scrolling window. As a result, the text "earrings" in the text scrolling window and the picture "skirt" in the picture scrolling window are displayed and switched synchronously at the same time. After this time, the mobile phone can also achieve synchronous switching of the display objects of the text scrolling window and the picture scrolling window.
[0225] The above-mentioned postponement of the start time of playing the switching animation in the first scrolling window can also be called extending the display duration of the current display object. In some embodiments, the mobile phone postpones the start time of playing the first switching animation in the first scrolling window, which can specifically include: when the remaining display duration of the current display object in the first scrolling window becomes 0, the mobile phone does not execute the invalidate() method. That is, the mobile phone does not execute the operation method to invalidate the current display object in the first scrolling window, so that the display of the mobile phone achieves the effect of frame loss, so that the current display object continues to be displayed in the first scrolling window of the mobile phone, and it will not immediately switch to display the next display object.
[0226] When the remaining display time of the current display object in the first scrolling window becomes 0, it indicates that the first scrolling window is about to switch from the current display object to the next display object.
[0227] Furthermore, when the next switching animation of the second scrolling window starts playing, the mobile phone executes the invalidate() method of the first scrolling window to switch the current display object to the next display object in the first scrolling window, such as switching from the text "earring" to the text "earring".
[0228] In the technical solution provided by the embodiment of the present application, the mobile phone achieves the effect of delaying the switching effect by not executing the invalidate() method that invalidates the interface, which does not increase the computing power burden of the mobile phone. At the same time, the switching of display objects in different scrolling windows can be changed to synchronous switching, which increases the sleep time of SoC and system and reduces unnecessary power consumption.
[0229] In other embodiments, the first switching frequency of the first scrolling window is not equal to the second switching frequency of the second scrolling window, so the switching of the display objects of the first scrolling window and the second scrolling window is not synchronized. In this embodiment, it is necessary to adjust the switching frequency of the first scrolling window and the switching frequency of the second scrolling window to be consistent, and then adjust the switching time points of the first scrolling window and the second scrolling window to be consistent, so as to achieve the effect of synchronous switching of the display objects of the first scrolling window and the second scrolling window.
[0230] Furthermore, in some embodiments, the mobile phone can reduce the switching frequency of the scrolling window with a higher switching frequency to make it consistent with the switching frequency of the scrolling window with a lower switching frequency. Alternatively, in other embodiments, the mobile phone can also adjust the switching frequency of all scrolling windows to a unified switching frequency; the unified switching frequency can be pre-set or determined based on the switching frequencies of all scrolling windows.
[0231] In some embodiments, the preset switching frequency is determined according to the switching frequencies of all scrolling windows, which may specifically include the mobile phone determining the minimum switching frequency among all scrolling windows, and determining the minimum switching frequency as a uniform switching frequency. In some embodiments, the preset switching time point may also be determined according to the switching time point of all scrolling windows. Exemplarily, the mobile phone may respectively obtain the next switching time point of each scrolling window starting from the current moment, and then select the latest time point from the next switching time point of each scrolling window as the preset switching time point.
[0232] In the technical solution provided in the embodiment of the present application, the minimum switching frequency and the latest switching time point in the scrolling window are used as preset switching parameters, so as to facilitate the unified adjustment of the switching parameters of different scrolling windows to the preset switching parameters, and realize the synchronous switching of display objects of different scrolling windows in the same display interface. And a switching time point and switching frequency of a scrolling window are selected from the original scrolling window as the preset switching time point and switching frequency. For the selected scrolling window, its switching time point and switching frequency do not need to be adjusted. In this way, the switching parameters of the scrolling windows that need to be adjusted can be reduced, and the calculation workload of the mobile phone can be reduced.
[0233] Please refer to Fig. 6AAs shown, taking the case where the first scrolling window is a text scrolling window and the second scrolling window is a picture scrolling window as an example, in this example, T8<T9. Therefore, the switching frequency of the text scrolling window>the switching frequency of the picture scrolling window. It can be seen from the description of the above embodiment that the mobile phone can uniformly adjust the switching frequency of the text scrolling window and the picture scrolling window to the minimum switching frequency among all scrolling windows. In this embodiment, the minimum switching frequency is the switching frequency of the picture scrolling window. Therefore, in this embodiment, the mobile phone can adjust the switching frequency of the text scrolling window to the switching frequency of the picture scrolling window.
[0234] Since the switching frequencies of the text scrolling window and the image scrolling window are different, it is necessary to adjust the start time of each switching effect in the text scrolling window. Fig. 6A As shown, the mobile phone postpones the start time of playing the animation 31 in the text scrolling window to the same time as the animation 41 in the picture scrolling window, and postpones the start time of playing the animation 32 to the same time as the animation 42 in the picture scrolling window; and so on.
[0235] Furthermore, since the duration of the switching animation is usually fixed, Fig. 6A In the example shown, the mobile phone can increase T8 by extending the display time of the display object, thereby achieving the effect of lowering the switching frequency of the first scrolling window.
[0236] In the above embodiment, since the switching frequencies of the first scroll window and the second scroll window are inconsistent, in this embodiment, the mobile phone needs to postpone the start time of playing each switching animation in the first scroll window to ensure that the display duration of each display object in the first scroll window is the same as the display duration of the display object in the second scroll window. In this way, the switching frequency of the first scroll window can be ensured to be the same as the switching frequency of the second scroll window.
[0237] Among them, the specific implementation method of delaying the playback start time of each switching animation in the first scrolling window can refer to the description of delaying the playback start time of the first switching animation in the above embodiment, which will not be repeated here.
[0238] In some other embodiments, in addition to the different switching frequencies of the first scroll window and the second scroll window, the switching time point of the first scroll window may also be different from the switching time point of the second scroll window.
[0239] like Figure 6B In the scenario shown in 600, T10≠T11, that is, the switching frequencies of the text scrolling window and the picture scrolling window are different. Figure 6B The switching time points of the text scrolling window and the picture scrolling window shown in 600 are also different.
[0240] In this embodiment, the switching frequencies of the first rolling window and the second rolling window may be adjusted to a uniform switching frequency, such as Figure 6B The display diagram 600 shown in FIG. 601 is adjusted to the display diagram shown in FIG. 601. In the diagram shown in FIG. 601, T10′=T11, but the switching time points of the text scrolling window and the picture scrolling window shown in FIG. 601 are still different. Figure 6B On the basis of 601 shown, the switching time point of the text scrolling window and the picture scrolling window can also be adjusted.
[0241] like Figure 6B As shown in 602, the playback start time of the animation 51 in the text scrolling window is postponed to the same time as the animation 61 in the picture scrolling window; the playback start time of the animation 52 in the text scrolling window is postponed to the same time as the animation 62 in the picture scrolling window; and so on. Figure 6B As shown in 602 , the display object switching of the adjusted text scrolling window and the picture scrolling window is changed to synchronous switching.
[0242] Understandably, in Figure 6B In the example shown in 600, the mobile phone can also adjust the switching time points of the text scrolling window and the picture scrolling window to be the same. Then, the switching frequencies of the text scrolling window and the picture scrolling window are adjusted to be the same. In this way, the display object switching of the text scrolling window and the picture scrolling window can also be changed to synchronous switching.
[0243] Above Fig. 6A and Figure 6B For the specific implementation process of delaying the start time of each switching effect in the text scrolling window, please refer to the above Figure 5A and Figure 5B For example, the mobile phone delays the start time of the switching animation by not executing the invalidate() method. I will not go into details here.
[0244] In the technical solution provided in the embodiment of the present application, when the display interface includes two scrolling windows with different switching frequencies, the switching frequency and switching time point of the two scrolling windows can be adjusted to synchronize the switching of the display objects of the scrolling windows. And this can be achieved by not executing the invalidate() method at the relevant time point on the mobile phone, so that the switching of the display objects of different scrolling windows is changed to synchronized switching without increasing the algorithm burden of the mobile phone.
[0245] In the technical solution provided in the embodiment of the present application, when the mobile phone identifies a scrolling window with at least two display objects switched asynchronously in the display interface, the switching parameters of the scrolling window with switched asynchronously are uniformly adjusted to the preset switching parameters, so that the scrolling window with switched asynchronously in the display interface is changed to switched synchronously. This can increase the sleep time of the SoC and the display system, reduce unnecessary power consumption, and improve the battery life of the mobile phone.
[0246] Some other embodiments of the present application provide a computer device, which may be the above-mentioned electronic device (such as a mobile phone). The computer device may include: a memory and one or more processors. The memory is coupled to the processor. The memory is also used to store computer program code, which includes computer instructions. When the processor executes the computer instructions, the computer device may execute the various functions or steps executed by the mobile phone in the above-mentioned method embodiment. When the computer device is an electronic device, its structure can refer to Figure 2A The structure of the electronic device 100 is shown.
[0247] The present application also provides a chip system, such as Figure 7 As shown, the chip system 70 includes at least one processor 701 and at least one interface circuit 702. The processor 701 and the interface circuit 702 can be interconnected via lines. For example, the interface circuit 702 can be used to receive signals from other devices (such as the memory of a computer device). For another example, the interface circuit 702 can be used to send signals to other devices (such as the processor 701). Exemplarily, the interface circuit 702 can read instructions stored in the memory and send the instructions to the processor 701. When the instruction is executed by the processor 701, the computer device can execute the various steps in the above embodiments. Of course, the chip system can also include other discrete devices, which are not specifically limited in the embodiments of the present application.
[0248] An embodiment of the present application also provides a computer-readable storage medium, which includes computer instructions. When the computer instructions are executed on the above-mentioned electronic device (such as a mobile phone), the electronic device executes each function or step executed by the mobile phone in the above-mentioned method embodiment.
[0249] The present application also provides a computer program product, which, when executed on a computer, enables the computer to execute the functions or steps executed by the mobile phone in the above method embodiment. The computer may be an electronic device, such as a mobile phone.
[0250] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0251] 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 modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, 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 through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0252] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0253] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0254] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0255] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application shall be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims
1. A display method, characterized in that: The method is applied to an electronic device, and the method comprises: The electronic device displays more than two scrolling windows; the display objects in any of the scrolling windows are different at different times; When it is determined that the switching of display objects of more than two scrolling windows is not synchronized, the electronic device displays the two or more scrolling windows with the same preset switching parameters to synchronize the switching of display objects of the two or more scrolling windows; the preset switching parameters include at least one of a preset switching time point and a preset switching frequency, and the switching time point is used to indicate the time point when the scrolling window switches from the current display object to the next display object.
2. The method according to claim 1, characterized in that The method further comprises: In any of the scrolling windows, after the current display object is displayed, the electronic device plays the switching animation of the scrolling window; After the switching animation is finished playing, the electronic device displays the next display object of the scrolling window; Among them, the switching time point is used to indicate the time when the scrolling window switches from the current display object to the next display object, including: the switching time point is used to indicate the start time point of the switching animation when the scrolling window switches from the current display object to the next display object.
3. The method according to claim 1 or 2, characterized in that: The electronic device displays two or more scrolling windows with the same preset switching parameter, including: For a current scrolling window, the electronic device obtains a first drawing command sequence of the current scrolling window; the current scrolling window is any one of the two or more scrolling windows; The electronic device draws and displays a first display object in the current scroll window according to the first drawing command sequence; When it is determined according to the preset switching parameter that the current scrolling window needs to switch the display object, the electronic device acquires a second drawing command sequence of the current scrolling window; The electronic device draws and displays a second display object in the current scrolling window according to the second drawing command sequence.
4. The method according to claim 3, characterized in that The electronic device obtains a first drawing command sequence of the current scrolling window, including: The electronic device obtains the first drawing command sequence from a first display list displaylist of the current scrolling window.
5. The method according to claim 4, characterized in that The first display list also includes the number of frame drops of the first display object; the number of frame drops is determined by the preset switching parameter of the electronic device; After the electronic device draws and displays the first display object in the current scroll window according to the first drawing command sequence, the method further includes: If the electronic device determines that the display of the first display object ends according to the first drawing command sequence, and determines that the current scrolling window does not need to switch the display object according to the preset switching parameter, the electronic device performs frame dropping processing on the current scrolling window according to the frame dropping number; Among them, determining that the current scrolling window needs to execute switching of display objects according to the preset switching parameters includes: the electronic device determines that the current scrolling window needs to execute switching of display objects after completing frame loss processing on the current scrolling window according to the number of frame losses.
6. The method according to any one of claims 1 to 5, characterized in that Before the electronic device displays two or more scrolling windows with the same preset switching parameter, the method further includes: In the case that the switching frequencies of the two or more rolling windows are different, the electronic device acquires the minimum switching frequency of the two or more rolling windows as the preset switching frequency; In the case that the switching time points of the two or more rolling windows are different, the next switching time points of the two or more rolling windows are respectively obtained, and the latest next switching time point is selected as the preset switching time point.
7. The method according to any one of claims 1 to 5, characterized in that Before the electronic device displays two or more scrolling windows with the same preset switching parameter, the method further includes: In the case where the switching frequencies of the two or more rolling windows are different, selecting a target rolling window whose switching frequency is greater than a preset frequency; When the number of the target scrolling windows is greater than 1, the electronic device displays the target scrolling windows with the same preset switching parameters.
8. The method according to claim 1 or 2, characterized in that: The scroll window includes a first scroll window and a second scroll window; and the electronic device displays more than two scroll windows with the same preset switching parameter, including: If the switching frequency of the first scrolling window is the same as the switching frequency of the second scrolling window, and the switching time point of the first scrolling window is earlier than the switching time point of the second scrolling window, or the first switching frequency in the first scrolling window is greater than the second switching frequency of the second scrolling window, the electronic device postpones the switching time point of the first scrolling window from the first time point to the second time point; Among them, the first time point is the display end time point of the current display object in the first scrolling window, and the second time point is the display end time point of the most recent display object in the second scrolling window; when the second scrolling window is currently displaying a display object, the most recent display object in the second scrolling window includes the current display object in the second scrolling window; when the second scrolling window is currently displaying a switching animation, the most recent display object in the second scrolling window includes the next display object in the second scrolling window.
9. The method according to claim 8, characterized in that The electronic device delays the switching time point of the first scrolling window from the first time point to the second time point, including: When the current time reaches the first time point, the first scrolling window of the electronic device continues to display the currently displayed object; When the current time reaches the second time point, the electronic device draws and displays the next display object in the first scrolling window.
10. The method according to claim 9, characterized in that The electronic device draws and displays the next display object in the first scroll window, including: The electronic device executes the method for invalidating the first scrolling window, triggering the electronic device to draw and display the next display object in the first scrolling window.
11. The method according to any one of claims 1 to 10, characterized in that The determining that the switching of display objects of the two or more scrolling windows is not synchronized includes: The electronic device acquires switching parameters of the two or more scrolling windows; the switching parameters include at least one of a switching time point and a switching frequency of a display object of the scrolling window; When it is detected that the switching time points of at least two rolling windows are different and / or the switching frequencies of at least two rolling windows are different, it is determined that the switching of the two or more rolling windows is not synchronized.
12. An electronic device, characterized in that: The electronic device comprises: a processor, a memory and a display screen; the memory and the display screen are respectively coupled to the processor; The display screen is used to display more than two scrolling windows; the memory stores computer program code, and the computer program code includes computer instructions. When the computer instructions are executed by the processor, the electronic device executes the method as described in any one of claims 1-11.
13. A computer-readable storage medium, characterized in that: The method comprises computer instructions, which, when executed on an electronic device, cause the electronic device to execute the method as claimed in any one of claims 1 to 11.
