WO2024016798A1 - 图像显示方法和相关装置 - Google Patents

图像显示方法和相关装置 Download PDF

Info

Publication number
WO2024016798A1
WO2024016798A1 PCT/CN2023/093741 CN2023093741W WO2024016798A1 WO 2024016798 A1 WO2024016798 A1 WO 2024016798A1 CN 2023093741 W CN2023093741 W CN 2023093741W WO 2024016798 A1 WO2024016798 A1 WO 2024016798A1
Authority
WO
WIPO (PCT)
Prior art keywords
application
rendering
priority
foreground
frequency
Prior art date
Application number
PCT/CN2023/093741
Other languages
English (en)
French (fr)
Other versions
WO2024016798A9 (zh
Inventor
李登
李飞
Original Assignee
荣耀终端有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 荣耀终端有限公司 filed Critical 荣耀终端有限公司
Publication of WO2024016798A1 publication Critical patent/WO2024016798A1/zh
Publication of WO2024016798A9 publication Critical patent/WO2024016798A9/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation

Definitions

  • the present application relates to the field of terminal technology, and in particular, to an image display method and related devices.
  • Embodiments of the present application provide an image display method and related devices, which are applied to electronic equipment. By reducing the frequency of sending Vsync signals or stopping sending Vsync signals to foreground applications with lower rendering priority, the fluency of foreground applications with higher rendering priority is improved and the user experience is improved.
  • an embodiment of the present application proposes an image display method applied to an electronic device.
  • the method includes: based on the first initial rendering priority of the first application, whether the first application corresponds to the focus window and/or the application of the first application.
  • the switching type determines the first rendering priority of the first application; wherein the first rendering initial priority is related to the application type of the first application and/or the rendering load of the first application, and the application switching type includes switching out of the application or switching in to the application.
  • the sending frequency of the Vsync signal is reduced or the sending of the Vsync signal is stopped.
  • Foreground applications with higher rendering priority maintain the original Vsync signal sending frequency, thereby improving the smoothness of foreground applications with higher rendering priority and improving user experience.
  • the first application is a switch-out application
  • the second application is a switch-in application
  • determining the first rendering priority of the first application includes: according to the first rendering initialization of the first application Priority and No.
  • the application switching type of an application determines the first rendering priority of the first application
  • determining the second rendering priority of the second application includes: based on the second rendering initial priority of the second application and the application switching type of the second application. , determine the second rendering priority of the second application.
  • the first rendering priority of the first application is determined based on the first rendering initial priority of the first application and the application switching type of the first application; based on the first rendering priority of the second application;
  • the second rendering initial priority determines the second rendering priority of the second application according to the application switching type of the second application, and then determines the difference between the first application and the second rendering priority by comparing the first rendering priority and the second rendering priority.
  • the rendering control method of the second application is determined based on the first rendering initial priority of the first application and the application switching type of the first application.
  • determining the first rendering priority of the first application based on the first rendering initial priority of the first application and the application switching type of the first application includes: based on the first application being a cut-out application, reducing the first application The first rendering initial priority of the first application is obtained; the second rendering priority of the second application is determined according to the second rendering initial priority of the second application and the application switching type of the second application, The method includes: based on the second application being a cut-in application, increasing the second rendering initial priority of the second application to obtain the second rendering priority of the second application.
  • the first application is switched out based on the first application, and the first rendering initial priority of the first application is reduced to obtain the first rendering priority of the first application; based on the second
  • the application is a cut-in application, and the second rendering initial priority of the second application is increased to obtain the second rendering priority of the second application. Then, the first rendering priority and the second rendering priority can be compared to determine the priority of the first application. and the rendering control method of the second application.
  • the electronic device is in a split-screen display scenario, and the first application and the second application are displayed in two different windows respectively; determining the first rendering priority of the first application includes: according to the first rendering priority of the first application The initial rendering priority and whether the first application corresponds to the focus window, determine the first rendering priority of the first application; determine the second rendering priority of the second application, including: based on the second rendering initial priority of the second application and the second rendering priority. Whether the second application corresponds to the focus window determines the second rendering priority of the second application.
  • the first rendering priority of the first application is determined based on whether the first application corresponds to the focus window; based on the second rendering initial priority of the second application, based on the second application Whether it corresponds to the focus window, determine the second rendering priority of the second application, and then determine the rendering control method for the first application and the second application by comparing the first rendering priority and the second rendering priority.
  • determining the first rendering priority of the first application based on the first rendering initial priority of the first application and whether the first application corresponds to the focus window includes: reducing the first application based on the first application corresponding to the non-focus window.
  • the first rendering initial priority of the first application is obtained;
  • the second rendering priority of the second application is determined according to the second rendering initial priority of the second application and whether the second application corresponds to the focus window,
  • the method includes: based on the focus window corresponding to the second application, increasing the second rendering initial priority of the second application to obtain the second rendering priority of the second application.
  • the focus window is the window with higher focus of the user.
  • the initial priority of the first rendering of the first application is reduced to obtain the first rendering of the first application.
  • the electronic device is in a scene where the floating window is displayed; determining the first rendering priority of the first application includes: determining the first application according to the first rendering initial priority of the first application and whether the first application corresponds to the focus window. the first rendering priority; determining the second rendering priority of the second application, including: determining the second rendering priority of the second application based on the second initial rendering priority of the second application and whether the second application corresponds to the focus window .
  • the first rendering priority of the first application is determined based on whether the first application corresponds to the focus window; based on the second rendering initial priority of the second application, based on the second application Whether it corresponds to the focus window, determine the second rendering priority of the second application, and then determine the rendering control method for the first application and the second application by comparing the first rendering priority and the second rendering priority.
  • determining the first rendering priority of the first application based on the first rendering initial priority of the first application and whether the first application corresponds to the focus window includes: reducing the first application based on the first application corresponding to the non-focus window.
  • the first rendering initial priority of the first application is obtained;
  • the second rendering priority of the second application is determined according to the second rendering initial priority of the second application and whether the second application corresponds to the focus window,
  • the method includes: based on the focus window corresponding to the second application, increasing the second rendering initial priority of the second application to obtain the second rendering priority of the second application.
  • the focus window is the window with higher focus of the user.
  • the initial priority of the first rendering of the first application is reduced to obtain the first rendering of the first application.
  • the method before determining the first rendering priority of the first application and determining the second rendering priority of the second application, the method further includes: obtaining the rendering area of the first application and the rendering area of the second application; determining the first The first rendering priority of the application and the second rendering priority of the second application include: when the rendering area of the first application and the rendering area of the second application are both greater than the first preset value, determining the first rendering priority of the first application. a rendering priority, and determining a second rendering priority of the second application.
  • the first rendering priority of the first application and the second rendering priority of the second application are determined. According to the first rendering The priority and the second rendering priority control the rendering of the first application and the second application, thereby reducing the rendering load of the system and improving the smoothness of the application.
  • the method before determining the first rendering priority of the first application and determining the second rendering priority of the second application, the method further includes: obtaining window information of the application running in the foreground and/or switching information of the application running in the foreground. ; According to the window information of the application running in the foreground and/or the switching information of the application running in the foreground, determine that the application running in the foreground includes the first application and the second application.
  • the application running in the foreground includes the first application and the second application based on the window information of the application running in the foreground and/or the switching information of the application running in the foreground.
  • the applications running in the foreground include the first application and the second application, compare the first rendering priority of the first application and the second rendering priority of the second application, and then perform rendering control on the first application and the second application, Improve application fluency; when it is determined that the application running in the foreground includes the first application and does not include the second application, there is no need to obtain the first rendering priority of the first application, thereby saving system resources.
  • embodiments of the present application propose an image display method, applied to electronic devices.
  • the method includes: displaying a multi-task interface, where the multi-task interface includes a first application and a second application; receiving a first operation from a user; for switching the first application in and switching the second application out; in response to the first operation, sending the vertical synchronization signal Vsync signal to the first application at the first frequency, or stopping sending the Vsync signal to the first application; in response to the first operation One operation, sending a Vsync signal to the second application at the second frequency; wherein the first frequency is less than the second frequency; synthesizing the image rendered in the first application and the image rendered in the second application to obtain the target image ;Display the target image.
  • the first operation may be the click operation in Figure 12
  • the first application may be the video application in Figure 12
  • the second application may be the social application in Figure 12.
  • Vsync signals are sent to them at the original frequency; for switching-out applications, the frequency of sending Vsync signals is reduced, or Vsync signals are stopped being sent to them, so that switching-in applications can have sufficient rendering resources and improve switching-in. Application fluency.
  • embodiments of the present application propose an image display method, applied to electronic devices.
  • the method includes: displaying a first interface, where the first interface includes a first application; and receiving a user's request to separate the first application and the second application. a second operation of screen display; in response to the second operation, displaying the first application in the first window, and displaying the second application in the second window; receiving a third operation on the second application in the second window; In response to the third operation, send the Vsync signal to the first application at the first frequency, or stop sending the Vsync signal to the first application; in response to the second operation, send the Vsync signal to the second application at the second frequency; wherein, the first The frequency is smaller than the second frequency; the image rendered in the first application and the image rendered in the second application are synthesized to obtain a target image; and the target image is displayed.
  • the first application can be a word application as shown in Figure 14
  • the second application can be a ppt application as shown in Figure 14
  • the first window can be a window corresponding to the word application
  • the second window can be a window corresponding to the ppt application.
  • the third operation can be an operation for the user to create a ppt in the ppt application corresponding to the second window.
  • Vsync signals are sent to them at the original frequency.
  • the frequency of sending Vsync signals is reduced, or Vsync signals are stopped being sent to them, so that applications in the focus window There can be sufficient rendering resources to improve the smoothness of applications in the focus window.
  • embodiments of the present application propose an image display method, applied to electronic devices.
  • the method includes: displaying a first application in full screen; receiving a fourth operation for triggering a second application; responding to the fourth operation, displaying a first application in full screen Display the second application, and display the first application in a floating window on the second application; receive the fifth operation on the second application; in response to the fifth operation, send the vertical synchronization signal Vsync signal to the first application at the first frequency , or stop sending the Vsync signal to the first application; in response to the fifth operation, send the Vsync signal to the second application at the second frequency; wherein the first frequency is less than the second frequency; compare the rendered image in the first application with the The rendered images in the second application are synthesized and processed to obtain the target image; the target image is displayed.
  • the first application may be a video application as shown in a in Figure 15
  • the second application may be a social application as shown in b in Figure 15
  • the fourth operation may be as shown in a in Figure 15
  • the fifth operation of clicking on the message reminder of the social application may be the operation of replying to the message as shown in b in Figure 15 .
  • Vsync signals are sent to them at the original frequency.
  • the frequency of sending Vsync signals is reduced, or Vsync signals are stopped being sent to them, so that applications in the focus window There can be sufficient rendering resources to improve the smoothness of applications in the focus window.
  • embodiments of the present application propose an image display method, applied to an electronic device.
  • the method includes: receiving a sixth operation from the user to return to the desktop application from the first application; in response to the sixth operation, stopping the display to the first application.
  • Send the Vsync signal send the vertical synchronization signal Vsync signal to the first application at the first frequency, or stop sending the Vsync signal to the first application; in response to the sixth operation, send the Vsync signal to the second application at the second frequency; wherein, the The first frequency is smaller than the second frequency; the image rendered in the first application and the image rendered in the desktop application are synthesized to obtain a target image; and the target image is displayed.
  • the first application may be a social networking application as shown in a in Figure 13
  • the second application may be a desktop application as shown in b in Figure 13
  • the sixth operation may be as shown in a in Figure 13 Swipe up to return to the desktop.
  • Vsync signals are sent to them at the original frequency; for switching-out applications, the frequency of sending Vsync signals is reduced, or Vsync signals are stopped being sent to them, so that switching-in applications can have sufficient rendering resources. source to improve the smoothness of entering applications.
  • embodiments of the present application provide an electronic device, which includes: a touch screen, wherein the touch screen includes a touch panel and a display screen; one or more processors; a memory; a plurality of application programs; and one or more a computer program, wherein one or more computer programs are stored in the memory, and the one or more computer programs include instructions that, when executed by the electronic device, cause the electronic device to perform the following steps: first initial rendering according to the first application The priority, whether the first application corresponds to the focus window and/or the application switching type of the first application, determine the first rendering priority of the first application; wherein the first rendering initial priority is related to the application type of the first application and/or Determined based on the second initial rendering priority of the second application, whether the second application corresponds to the focus window and/or the application switching type of the second application.
  • the second rendering priority of the second application wherein the second rendering initial priority is related to the application type of the second application and/or the rendering load of the interface to be displayed by the second application; wherein the first application and the second application are electronic An application running on the device in the foreground; when the first rendering priority is lower than the second rendering priority, sending the vertical synchronization signal Vsync signal to the first application at the first frequency, or stopping sending the Vsync signal to the first application; and The second frequency sends a Vsync signal to the second application; where the first frequency is smaller than the second frequency; the image rendered in the first application and the image rendered in the second application are synthesized to obtain a target image; and the target image is displayed.
  • embodiments of the present application provide an electronic device, which includes: a touch screen, wherein the touch screen includes a touch panel and a display screen; one or more processors; a memory; a plurality of application programs; and one or more A computer program, wherein one or more computer programs are stored in the memory, and the one or more computer programs include instructions that, when executed by the electronic device, cause the electronic device to perform the following steps: display a multi-tasking interface, and the multi-tasking interface includes The first application and the second application; receive a first operation from the user; the first operation is used to switch the first application in and switch the second application out; in response to the first operation, send vertical synchronization to the first application at a first frequency signal the Vsync signal, or stop sending the Vsync signal to the first application; in response to the first operation, send the Vsync signal to the second application at the second frequency; wherein the first frequency is smaller than the second frequency; the rendered Vsync signal in the first application is The
  • embodiments of the present application provide an electronic device, which includes: a touch screen, wherein the touch screen includes a touch panel and a display screen; one or more processors; a memory; a plurality of application programs; and one or more A computer program, wherein one or more computer programs are stored in the memory, and the one or more computer programs include instructions that, when executed by the electronic device, cause the electronic device to perform the following steps: display a first interface, and the first interface includes The first application; receiving a second operation from the user to display the first application and the second application in split screens; in response to the second operation, displaying the first application in the first window and displaying the second application in the second window.
  • Receiving a third operation for the second application in the second window In response to the third operation, sending the vertical synchronization signal Vsync signal to the first application at the first frequency, or stopping sending the Vsync signal to the first application;
  • In response to The second operation is to send a Vsync signal to the second application at a second frequency; wherein the first frequency is smaller than the second frequency; and the image rendered in the first application and the image rendered in the second application are synthesized to obtain the target image. ;Display the target image.
  • embodiments of the present application provide an electronic device, which includes: a touch screen, wherein the touch screen includes a touch panel and a display screen; one or more processors; a memory; a plurality of application programs; and one or more A computer program, wherein one or more computer programs are stored in the memory, and the one or more computer programs include instructions that, when executed by the electronic device, cause the electronic device to perform the following steps: display the first application in full screen; receive a user request in triggering a fourth operation of the second application; in response to the fourth operation, displaying the second application in full screen, and in the second application The first application is displayed in a floating window; the fifth operation on the second application is received; in response to the fifth operation, the vertical synchronization signal Vsync signal is sent to the first application at the first frequency, or the Vsync signal is stopped to be sent to the first application ; In response to the fifth operation, sending a Vsync signal to the second application at the second frequency; wherein the first frequency is
  • embodiments of the present application provide an electronic device, which includes: a touch screen, wherein the touch screen includes a touch panel and a display screen; one or more processors; a memory; a plurality of application programs; and one or more A computer program, wherein one or more computer programs are stored in the memory, and the one or more computer programs include instructions that, when executed by the electronic device, cause the electronic device to perform the following steps: receiving the user's return to the desktop from the first application A sixth operation of the application; in response to the sixth operation, stopping sending the Vsync signal to the first application, sending the vertical synchronization signal Vsync signal to the first application at the first frequency, or stopping sending the Vsync signal to the first application; in response to the sixth operation Operation, send a Vsync signal to the second application at the second frequency; wherein the first frequency is less than the second frequency; synthesize the image rendered in the first application and the image rendered in the desktop application to obtain the target image; display target image.
  • embodiments of the present application provide an electronic device, including: a processor and a memory.
  • the processor is configured to call a program in the memory to cause the electronic device to execute the above first aspect, the second aspect, the third aspect, and the fourth aspect. method provided by aspect or fifth aspect.
  • embodiments of the present application provide a computer-readable storage medium.
  • the computer-readable storage medium stores computer instructions.
  • the electronic device causes the electronic device to execute the first aspect and the second aspect. , the method provided by the third aspect, the fourth aspect or the fifth aspect.
  • inventions of the present application provide a computer program product.
  • the computer program product includes a computer program.
  • the computer program When the computer program is run, it causes the computer to execute the above-mentioned first aspect, second aspect, third aspect, and fourth aspect. Or the method provided by the fifth aspect.
  • Figure 1 is a schematic structural diagram of a terminal device provided by an embodiment of the present application.
  • Figure 2 is a software structure block diagram of the terminal device provided by the embodiment of the present application.
  • FIG. 3 is a schematic diagram of module interaction provided by an embodiment of the present application.
  • Figure 4 is a schematic diagram of module interaction provided by an embodiment of the present application.
  • Figure 5 is a schematic diagram of an electronic device interface display processing flow provided by an embodiment of the present application.
  • Figure 6 is a schematic diagram of an electronic device interface display processing flow provided by an embodiment of the present application.
  • Figure 7 is a schematic diagram of an electronic device interface display processing flow provided by an embodiment of the present application.
  • Figure 8 is a schematic diagram of an electronic device interface display processing flow provided by an embodiment of the present application.
  • Figure 9 is a schematic flowchart of an image display method provided by an embodiment of the present application.
  • Figure 10a is a schematic diagram of rendering control for a foreground application provided by an embodiment of the present application.
  • Figure 10b is a schematic diagram of an electronic device interface display processing flow provided by an embodiment of the present application.
  • Figure 11a is a schematic diagram of rendering control for a foreground application provided by an embodiment of the present application.
  • Figure 11b is a schematic diagram of an electronic device interface display processing flow provided by an embodiment of the present application.
  • Figure 12 is a schematic diagram of a first scenario applicable to an image display method provided by an embodiment of the present application.
  • Figure 13 is a schematic diagram of a second scenario applicable to an image display method provided by an embodiment of the present application.
  • Figure 14 is a schematic diagram of a third scenario applicable to an image display method provided by an embodiment of the present application.
  • Figure 15 is a schematic diagram of a fourth scenario applicable to an image display method provided by an embodiment of the present application.
  • Figure 16 is a schematic flowchart of an image display method provided by an embodiment of the present application.
  • Figure 17 is a schematic structural diagram of an image display device provided by an embodiment of the present application.
  • FIG. 18 is a schematic diagram of the hardware structure of an image display device provided by an embodiment of the present application.
  • System application An application developed by the manufacturer of a certain electronic device in order to solve various practical problems and improve user experience.
  • system applications can be system desktop, system gallery, etc.
  • Third-party applications In addition to applications developed by manufacturers of electronic devices, there are also applications developed by other individuals or companies for certain electronic devices, which are called third-party applications.
  • the third-party application can be WeChat, Toutiao, etc.
  • Frame refers to the smallest unit of a single picture in the interface display.
  • a frame can be understood as a still picture, and displaying multiple connected frames in rapid succession can create the illusion of object movement.
  • Frame rate refers to the number of images that can be generated in 1 second, the unit is frame per second (fps).
  • Refresh rate refers to the number of frames that refresh the picture in 1 second. It can also be understood as the number of times the graphics processor in the electronic device refreshes the picture per second. A high frame rate results in smoother and more realistic animations. The more frames per second, the smoother the action shown will be. The unit is hertz (Hz).
  • the interface usually needs to go through processes such as drawing, rendering, and synthesis before displaying frames.
  • Frame drawing refers to the picture drawing of the display interface.
  • the display interface can be composed of one or more views. Each view can be drawn by the visual control of the view system. Each view is composed of subviews. One subview corresponds to a widget in the view. For example, one of the subviews corresponds to the picture view. a symbol in .
  • Frame rendering It is to perform coloring operations on the drawn view or add 3D effects, etc.
  • 3D effects can be lighting effects, shadow effects, texture effects, etc.
  • Frame synthesis It is the process of synthesizing one or more of the above rendered views into a display interface.
  • words such as “first” and “second” are used to distinguish identical or similar items with basically the same functions and effects.
  • the first chip and the second chip are only used to distinguish different chips, and their sequence is not limited.
  • words such as “first” and “second” do not limit the number and execution order, and words such as “first” and “second” do not limit the number and execution order.
  • At least one refers to one or more, and “multiple” refers to two or more.
  • “And/or” describes the association of associated objects, indicating that there can be three relationships, for example, A and/or B, which can mean: A exists alone, A and B exist simultaneously, and B exists alone, where A, B can be singular or plural.
  • the character “/” generally indicates that the related objects are in an “or” relationship.
  • “At least one of the following” or similar expressions thereof refers to any combination of these items, including any combination of a single item (items) or a plurality of items (items).
  • At least one of a, b, or c can mean: a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, c can be single or multiple .
  • the electronic device when there are multiple foreground applications, the electronic device will perform rendering control according to the rendering priority of each foreground application, reducing the overall load of the system and improving the smoothness of the application interface. , thereby improving user experience.
  • the image display method provided by the embodiment of the present application can be applied to electronic devices that support multiple foreground applications.
  • Terminal equipment includes terminal equipment, which can also be called terminal, user equipment (UE), mobile station (MS), mobile terminal (MT), etc.
  • Terminal devices can be mobile phones, smart TVs, wearable devices, tablets (Pads), computers with wireless transceiver functions, virtual reality (VR) terminal devices, augmented reality (AR) terminals Equipment, wireless terminals in industrial control, wireless terminals in self-driving, wireless terminals in remote medical surgery, wireless terminals in smart grid, transportation Wireless terminals in transportation safety, wireless terminals in smart city, wireless terminals in smart home, etc.
  • the embodiments of the present application do not limit the specific technology and specific device form used by the electronic device.
  • the structure of the electronic device of the embodiments of the present application is introduced below:
  • FIG. 1 shows a schematic structural diagram of an electronic device 100 .
  • 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 , mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone interface 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and Subscriber identification module (SIM) card interface 195, etc.
  • SIM Subscriber identification module
  • the sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and ambient light. Sensor 180L, bone conduction sensor 180M, etc.
  • the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100 .
  • the electronic device 100 may include more or fewer components than shown in the figures, or some components may be combined, some components may be separated, or some components may be arranged differently.
  • the components illustrated may be implemented in hardware, software, or a combination of software and hardware.
  • the processor 110 may include one or more processing units.
  • the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (GPU), an image signal processor ( image signal processor (ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit, NPU), etc.
  • application processor application processor, AP
  • modem processor graphics processing unit
  • GPU graphics processing unit
  • ISP image signal processor
  • controller video codec
  • digital signal processor digital signal processor
  • DSP digital signal processor
  • baseband processor baseband processor
  • neural network processor neural-network processing unit
  • the controller can generate operation control signals based on the instruction operation code and timing signals to complete the control of fetching and executing instructions.
  • the processor 110 may also be provided with a memory for storing instructions and data.
  • the memory in processor 110 is cache memory. This memory may hold instructions or data that have been recently used or recycled by processor 110 . If the processor 110 needs to use the instructions or data again, it can be recalled from memory. Repeated access is avoided and the waiting time of the processor 110 is reduced, thus improving the efficiency of the system.
  • processor 110 may include one or more interfaces.
  • Interfaces may include integrated circuit (inter-integrated circuit, I2C) interface, integrated circuit built-in audio (inter-integrated circuitsound, I2S) interface, pulse code modulation (pulse code modulation, PCM) interface, universal asynchronous receiver (universal asynchronous receiver) /transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (subscriber identity module, SIM) interface, and/or Universal serial bus (USB) interface, etc.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • PCM pulse code modulation
  • UART universal asynchronous receiver
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM subscriber identity module
  • USB Universal serial bus
  • the interface connection relationships between the modules illustrated in the embodiments of the present application are schematic illustrations and do not constitute a structural limitation on the electronic device 100 .
  • the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
  • the charging management module 140 is used to receive charging input from the charger.
  • the charger can be a wireless charger or a wired charger.
  • the charging management module 140 may receive charging input from the wired charger through the USB interface 130 .
  • the charging management module 140 may receive wireless charging input through the wireless charging coil of the electronic device 100 . While the charging management module 140 charges the battery 142, it can also provide power to the electronic device 100 through the power management module 141.
  • 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.
  • the electronic device 100 implements display functions through a graphics processing unit (GPU), a display screen 194, an application processor, and the like.
  • the GPU is an image processing microprocessor and is connected to the display screen 194 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering.
  • Processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
  • the display screen 194 is used for displaying images, displaying videos, receiving sliding operations, and the like.
  • Display 194 includes a display panel.
  • the display panel may use a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light emitting diode or an active matrix organic light emitting diode.
  • LCD liquid crystal display
  • OLED organic light-emitting diode
  • AMOLED active-matrix organic light emitting diode
  • flexible light-emitting diode flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diodes (QLED), etc.
  • the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
  • Digital signal processors are used to process digital signals. In addition to digital image signals, they can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
  • 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 the data storage function. Such as saving music, videos, etc. files in external memory card.
  • Internal memory 121 may be used to store computer executable program code, which includes instructions.
  • the internal memory 121 may include a program storage area and a data storage area.
  • the stored program area can store an operating system, at least one application program required for a function (such as a sound playback function, an image playback function, etc.).
  • the storage data area may store data created during use of the electronic device 100 (such as audio data, phone book, etc.).
  • the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.
  • the processor 110 executes various functional applications and data processing of the electronic device 100 by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
  • the electronic device 100 can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor. Such as music playback, recording, etc.
  • the software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture, etc.
  • the embodiment of this application takes the Android system with a layered architecture as an example to illustrate the software structure of the electronic device 100 .
  • Figure 2 is a software structure block diagram of the electronic device according to the embodiment of the present application.
  • the layered architecture divides the software into several layers, and each layer has clear roles and division of labor.
  • the layers communicate through software interfaces.
  • the Android system is divided into five layers, from top to bottom: application layer, application framework layer, Android runtime and system library, and kernel layer.
  • the application layer can include a series of application packages. As shown in Figure 2, the application package can include desktop launcher Launcher, system user interface SystemUI, phone, camera, calendar, WeChat and other applications.
  • the application framework layer provides application programming interface (API) and programming framework for applications in the application layer.
  • API application programming interface
  • the application framework layer includes some predefined functions.
  • the application framework layer can include a system server, a rendering orchestrator, a graphics system, a view system, etc.
  • the system server can include a window manager, package manager, activity manager, input system, etc.
  • the graphics system is used to manage the graphics data of each application, including frame buffer, graphics rendering pipeline, etc.
  • Window manager service is used to manage window programs.
  • the window manager can obtain the display size, determine whether there is a status bar, lock the screen, capture the screen, etc.
  • Package managers are used for program management within the system, such as application installation, uninstallation, and upgrades.
  • AMS Activity manager service
  • Android is the core service of Android. It is mainly responsible for the startup, switching, and scheduling of multiple important components in the system, as well as the management and scheduling of application processes. It also tracks and manages the switching of foreground applications.
  • the input system is used for processing input events, for example, receiving user touch operations.
  • the rendering orchestrator is used to provide a unified logical update and callback processing mechanism for the application, and is responsible for requesting and receiving APP-Vsync signals to provide a stable operating mechanism for the application.
  • the view system includes visual controls, such as controls that display text, controls that display pictures, etc.
  • a view system can be used to build applications.
  • the display interface can be composed of one or more views.
  • a display interface including a text message notification icon may include a view for displaying text and a view for displaying pictures.
  • Android runtime includes core libraries and virtual machines. Android runtime is responsible for the scheduling and management of the Android system.
  • the core library contains two parts: one is the functional functions that need to be called by the Java language, and the other is the core library of Android.
  • the application layer and application framework layer run in virtual machines.
  • the virtual machine executes the java files of the application layer and application framework layer into binary files.
  • the virtual machine is used to perform object life cycle management, stack management, thread management, security and exception management, and garbage collection and other functions.
  • System libraries can include multiple functional modules. For example: surface manager, 3D graphics processing library (for example: OpenGL ES), graphics synthesis module, compositor client, graphics rendering management module, etc.
  • 3D graphics processing library for example: OpenGL ES
  • graphics synthesis module for example: compositor client
  • graphics rendering management module etc.
  • the surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications.
  • the 3D graphics processing library is used to implement 3D graphics drawing, image rendering, composition, and layer processing.
  • Graphics synthesis module includes connection manager, signal simulator, graphics synthesizer and synthesis controller.
  • connection manager is used to establish a connection between the application and the graphics synthesis module when the application is started, receive layer information related to the application, and send Vsync signals to the application.
  • Signal simulator is used to modulate software Vsync signals based on hardware Vsync signals.
  • the graphics synthesizer is used to synthesize one or more rendered views into a display interface. For example, in a multi-window display, the images of multiple windows are synthesized after rendering.
  • the synthesizer client is used to encapsulate the external functional interface of the graphics synthesizer, including layer creation, destruction, rearrangement, event delivery, rendering control, etc.
  • the graphics rendering management module is responsible for recording and managing the rendering status of applications in the system, and controlling the rendering of each application according to the rendering control strategy.
  • the hardware abstraction layer can include multiple library modules.
  • the library modules can be hardware configuration modules (hwcomposer, HWC), camera library modules, etc.
  • the Android system can load the corresponding library module for the device hardware, thereby achieving the purpose of the application framework layer accessing the device hardware.
  • the kernel layer is the layer between hardware and software.
  • the kernel layer is used to drive the hardware and make the hardware work.
  • the kernel layer at least includes central processor driver, sensor driver, display driver, audio driver, camera driver, backlight driver and graphics processor driver.
  • Hardware can be audio devices, Bluetooth devices, LCD screens, cameras, etc.
  • the display process of the electronic device 100 will be described below.
  • the WeChat application calls the image drawing module in the system library to draw the image through the view system of the application framework layer, and calls the image rendering module to render the drawn image.
  • the WeChat application sends the rendered image to the graphics synthesis module.
  • the graphics synthesis module calls the image synthesis module in the system library to synthesize the rendered images.
  • the graphics synthesis module sends the synthesized image to the HWC of the hardware abstraction layer. HWC will The synthesized image is sent to the LCD/LED driver of the core layer.
  • the LCD/LED driver drives the screen to refresh the display image.
  • electronic devices generally display based on Vsync signals to synchronize processes such as image drawing, rendering, synthesis, and screen refresh display.
  • the Vsync signal is a periodic signal
  • the Vsync period can be set according to the screen refresh frame rate.
  • the Vsync period can be 16.6ms, that is, the electronic device generates a control signal every 16.6ms. Vsync cycle trigger.
  • the modules involved in the image display method provided by the embodiment of the present application may include an application program, a graphics synthesis module, a graphics rendering management module, a system server, and a rendering orchestrator.
  • Figures 3 and 4 are interaction diagrams of each module.
  • the system server may include a window manager and an activity manager
  • the graphics rendering management module may include a rendering load manager and a rendering controller
  • the graphics composition module may include a connection manager, a signal simulator and a composition controller.
  • the application receives and responds to the preset operation and establishes a Vsync signal transmission channel through the connection manager and the graphics synthesis module.
  • the preset operation is used to instruct opening an application or switching applications.
  • the system server monitors changes in the foreground application, records the window information of the foreground application in the window manager, records the activity information of the foreground application in the activity manager, and sends the window information of the foreground application and the activity information of the foreground application to Render load manager.
  • the change of the foreground application includes adding a foreground application or switching the foreground application.
  • the foreground application creates a rendering thread, sends the rendering attribute information to the rendering load manager, and at the same time, registers the rendering callback function to the rendering orchestrator.
  • the rendering attribute information includes information such as the initial priority of rendering.
  • the rendering controller obtains the window information of the foreground application and the activity information of the foreground application from the rendering load manager, and determines the number of foreground applications based on the window information of the foreground application and the activity information of the foreground application.
  • the rendering controller obtains the initial rendering priority from the rendering load manager, and determines the rendering priority of each foreground application based on the window information of the foreground application, the activity information of the foreground application, and the initial rendering priority. , obtain the rendering control strategies of multiple front-end applications, and send the rendering control strategies to the composition controller.
  • the signal simulator obtains the rendering control strategy from the composition controller, and sends corresponding Vsync signals to multiple front-end applications according to the rendering control strategy and based on the established Vsync signal transmission channel.
  • the Vsync signal may be a software Vsync signal (for example, APP-Vsync), and the software Vsync signal is a Vsync signal modulated by the signal simulator based on the hardware Vsync signal.
  • the hardware Vsync signal is the HW-Vsync signal generated by the LCD/LED driver.
  • the LCD/LED driver sends the HW-Vsync signal to the graphics synthesis module through HWC, and the graphics synthesis module
  • the signal simulator in the software modulates the software Vsync signal based on the hardware Vsync signal.
  • connection manager there are communication connections between the connection manager, the signal simulator and the synthesis controller.
  • Multiple front-end applications call the rendering callback function in the rendering orchestrator according to the corresponding Vsync signal to perform rendering operations.
  • the APP-Vsync signal can be sent normally to each foreground application. After receiving the APP-Vsync signal, Application 1, Application 2 and Application 3 can all render according to the APP-Vsync signal.
  • the rendering control method can be to send the APP-Vsync signal to Application 1 normally, and stop sending APP-Vsync to Application 2 and Application 3. Signal. Specifically, after application 1 receives the APP-Vsync signal, it can render according to the APP-Vsync signal; but after application 2 and application 3 cannot receive the APP-Vsync signal, the display interface will no longer be refreshed.
  • Vsync signals in electronic equipment can be divided into software Vsync signals and hardware Vsync signals.
  • Software Vsync signals include APP-Vsync signals and SF-Vsync signals.
  • the APP-Vsync signal is used to trigger the drawing and rendering process
  • the SF-Vsync signal is used to trigger the synthesis process.
  • the hardware Vsync signal (HW-Vsync signal) is used to trigger the screen display refresh process.
  • the software Vsync signal and the hardware Vsync signal maintain period synchronization. Taking the change between 60Hz and 120Hz as an example, if the HW-Vsync signal switches from 60Hz to 120Hz, the APP-Vsync signal and the SF-Vsync signal change synchronously, switching from 60Hz to 120Hz.
  • the application sends a Vsync request to the graphics synthesis module
  • the graphics synthesis module sends a HW-Vsync request to the HWC
  • the HWC sends a HW-Vsync request to the LCD/LED driver
  • the LCD/LED driver generates the HW-Vsync signal
  • the HW-Vsync The signal is fed back to the HWC, the HWC feeds back the HW-Vsync signal to the graphics synthesis module
  • the graphics synthesis module sends the HW-Vsync signal to the application.
  • the application draws and renders the image based on the received HW-Vsync signal; the graphics synthesis module performs image synthesis based on the HW-Vsync signal; the HWC controls the LCD/LED screen to refresh and display the image based on the HW-Vsync signal through the LCD/LED driver of the kernel layer. .
  • the graphics synthesis module can generate software Vsync signals to control image drawing, rendering, synthesis and other processes.
  • the graphics synthesis module collects the timestamp of the HW-Vsync signal.
  • the graphics synthesis module receives the HW-Vsync signal multiple times in succession, the graphics synthesis module generates the software Vsync signal according to the recorded period of the HW-Vsync signal, and sends the software Vsync signal to the application to synchronize the drawing, rendering and synthesis of the image. Waiting process.
  • the display process of the electronic device is given as an example for reference.
  • Figure 5 is a schematic diagram of an electronic device interface display processing flow in a possible implementation.
  • the content displayed by the electronic device corresponds to frame 1, frame 2, frame 3, frame 4 and frame 5.
  • the Vsync period is 8.3ms
  • the Vsync period is 16.6ms, etc.
  • the difference between the screen refresh rate and the Vsync period is The specific value is not specifically limited.
  • the electronic device application when application 1 renders, taking frame 2 as an example, the electronic device application renders frame 2 through the view system of the application framework layer. After the rendering of frame 2 is completed, the application of the electronic device sends the rendered frame 2 to the graphics synthesis module (for example, surfaceflinger), and the graphics synthesis module synthesizes the rendered frame 2. After frame 1 is synthesized, the electronic device can start the display driver by calling the kernel layer to display the content corresponding to frame 2 on the screen. Frames 3 and 4 are also synthesized and displayed in a process similar to that of frame 2, which will not be described again here.
  • the graphics synthesis module for example, surfaceflinger
  • the interface of application 1 is displayed as frame 1, frame 2, frame 3 and frame 4 in sequence.
  • the interface changes continuously and smoothly without any lag.
  • the time it takes for the application to draw the rendered image and the time it takes to synthesize the image are related to the system load and other conditions of the electronic device.
  • the display interface of the electronic device changes smoothly.
  • the system load is heavy (for example, two applications are rendering at the same time)
  • the time it takes for the application to draw the rendered image and/or the time it takes to synthesize the image increases, which may cause a certain frame of image to not be sent to the display in time, resulting in frame loss. , causing the display of electronic devices to freeze and reducing the user experience.
  • Figure 6 is a schematic diagram of an electronic device interface display processing flow in a possible implementation.
  • the electronic device renders, synthesizes, and displays frame 2, frame 3, and frame 4 in Figure 6 respectively.
  • frame 2, frame 3, and frame 4 in Figure 6 respectively.
  • the rendering thread of the application includes rendering operations in the CPU and rendering in the GPU.
  • the rendering operation will do some event processing, specifically including: in response to the event, calling the DoFrame function to perform processing on the application interface. layout, and sends various attribute information of the interface to the GPU through rendering instructions, and the GPU performs specific rendering operations according to the rendering instructions.
  • Figure 7 is a schematic diagram of an electronic device interface display processing flow in a possible implementation.
  • the electronic device renders, synthesizes and displays frame 2, frame 3 and frame 4 in Figure 7 respectively.
  • frame 2 frame 3 and frame 4 in Figure 7 respectively.
  • Application 1 and Application 2 are running in the foreground at the same time. Due to insufficient resource supply and other reasons, frame 3 takes more time to synthesize and cannot be completed within the Vsync cycle. As a result, when the electronic device is displayed, Application 1 The interface of Application 2 is displayed as Frame 1, Frame 2, Frame 2 and Frame 3 in sequence. The interface of Application 2 is displayed as Frame 1, Frame 2, Frame 2 and Frame 3 in sequence. The display duration of Frame 2 in Application 1 and Application 2 increases. , causing the display of Application 1 and Application 2 to freeze, reducing the user experience.
  • FIG. 8 is a schematic diagram of an electronic device interface display processing flow in a possible implementation.
  • the content displayed by the electronic device corresponds to frame 1, frame 2, frame 3, frame 4 and frame 5.
  • the electronic device renders, synthesizes, and displays frame 2, frame 3, and frame 4 in Figure 8 respectively.
  • Figure 9 is a schematic flowchart of an image display method provided by an embodiment of the present application.
  • the method shown in Figure 9 can be performed by the electronic device 100 shown in Figure 1.
  • the method includes:
  • the application receives and responds to the preset operation.
  • the system server monitors changes in the foreground application, records the window information and activity information of the foreground application in the system server, and stores the window information and activity information of the foreground application in the system server.
  • the activity information is sent to the graphics rendering management module.
  • the preset operation is used to instruct opening an application or switching applications.
  • a foreground application can be understood as a running application visible on the desktop taskbar of the terminal device, for example, a running game application.
  • window information can be understood as the existence of a corresponding window interface for each application during the running process.
  • Each window interface has its own corresponding information and data. These information and data can include window size and window position. and window layout and other attribute information.
  • WeChat window information can include the location of each button, the size of the dialog box, and other information.
  • activity information can be understood as information generated and stored in the activity manager when the application of the terminal device is started or the foreground application is switched, so as to facilitate tracking and management of the switching of the foreground application. For example, when the front-end application is switched from a social application to a game application, activity information will be generated and recorded in the activity manager.
  • the system server includes a window manager and an activity manager.
  • the window information of the foreground application is recorded in the window manager, and the activity information of the foreground application is recorded in the activity manager.
  • the graphics rendering management module includes a rendering load manager.
  • the graphics rendering management module records the obtained information in the rendering load manager.
  • the system server sends the window information of the foreground application and the activity information of the foreground application to the graphics rendering management module. , stored in the render load manager.
  • the system server when an application receives a preset operation indicating opening the application or switching applications, the system server will monitor changes in the foreground application and generate window information and activity information.
  • social applications and game applications have been pre-launched on the electronic device.
  • the social application runs in the foreground and the game application runs in the background.
  • the foreground application switches and a generated Window information and activity information.
  • the foreground application sends the rendering attribute information to the graphics rendering management module based on the created rendering thread.
  • the rendering attribute information includes information such as the initial priority of rendering.
  • the foreground application sends the rendering attribute information to the graphics rendering management module, it is also stored in the rendering load manager.
  • the initial rendering priority can be divided into high-medium-low.
  • the initial rendering priority can be set to 0-2 in order from high to low.
  • the initial rendering priority is high, it corresponds to 0, and when the rendering initial priority is high, it corresponds to 0.
  • the initial priority is medium, it corresponds to 1, and when the initial rendering priority is low, it corresponds to 2.
  • the initial rendering priority is high, it corresponds to 2.
  • the initial rendering priority is medium, it corresponds to 1.
  • the initial rendering priority is low, it corresponds to 1. 0.
  • the rendering initial priority can be set based on the application type of the application. Specifically, the initial rendering priority of the system application can be set higher than the initial rendering priority of the third-party application.
  • system application It can include desktop launcher, system user interface, etc.
  • Third-party applications can include WeChat, Toutiao, etc.
  • the initial rendering priority can be set based on the application's rendering load. Specifically, the initial rendering priority of an application with a large rendering load may be set higher than the initial rendering priority of an application with a small rendering load. For example, if the rendering load of a game application is greater than that of a social application, set the initial rendering priority of the game application to be higher than the initial rendering priority of the social application.
  • the rendering initial priority can be set based on the application type of the application and the application's rendering load. Specifically, when multiple applications have the same application type, the initial rendering priority can be set according to the rendering load of the application, and the initial rendering priority of the application with a large rendering load is set higher than the initial rendering priority of the application with a small rendering load. class. For example, when the two foreground applications are a third-party game application and a third-party social application respectively, and the rendering load of the third-party game application is greater than that of the third-party social application, set the initial rendering priority of the third-party game application to be higher than that of the third-party social application. Initial rendering priority for third-party social applications.
  • the foreground application creates a rendering thread and sends rendering attribute information such as the initial rendering priority in the rendering thread to the rendering load manager.
  • the graphics rendering management module can determine the number of foreground applications based on the window information of the foreground application and the activity information of the foreground application.
  • the graphics rendering management module can determine whether the foreground application has changed based on the window information of the foreground application and the activity information of the foreground application, for example, the switching or addition of the foreground application, and based on the window information of the foreground application and the activity information of the foreground application.
  • Application activity information to obtain which applications are in the foreground, thereby determining the number of foreground applications.
  • the embodiment of the present application can also use any other method to determine the number of foreground applications, and the embodiment of the present application does not make a specific limitation.
  • the graphics rendering management module determines the rendering priority of each foreground application based on the window information of the foreground application, the activity information of the foreground application and the initial rendering priority, and obtains the rendering corresponding to multiple foreground applications. Control strategy and send the rendering control strategy to the graphics synthesis module.
  • the rendering controller determines the rendering priority of each foreground application based on the window information of the foreground application, the activity information of the foreground application, and the initial rendering priority stored in the rendering load manager, and obtains multiple The rendering control strategy corresponding to the foreground application.
  • rendering priority can be used to control rendering to varying degrees on multiple foreground applications. For example, when rendering multiple foreground applications, the higher the rendering priority of the foreground application, the more computing resources are given, which can improve the smoothness of the foreground application with high rendering priority.
  • the rendering priority can be divided into high-medium-low.
  • the rendering priority can be set to 0-2 in order from high to low.
  • the rendering priority is high, it corresponds to 0, and the rendering priority is Medium corresponds to 1, and rendering priority to low corresponds to 2.
  • the rendering priority is high, it corresponds to 2, when the rendering priority is medium, it corresponds to 1, and when the rendering priority is low, it corresponds to 0.
  • the graphics rendering management module determines the rendering control strategies corresponding to multiple foreground applications based on the rendering priority of each foreground application, which may include: the rendering controller obtains the initial rendering priority from the rendering load manager, and based on The window information of the foreground application, the activity information of the foreground application and the initial rendering priority are used to determine the rendering priority of each foreground application and obtain the rendering control strategies corresponding to multiple foreground applications.
  • the window information also includes the rendering area of the foreground application.
  • the base Determine whether to control rendering of each foreground application based on the rendering area of each foreground application.
  • rendering control is not performed on each foreground application; when the rendering area of each foreground application exceeds a certain threshold, rendering control is performed on each foreground application.
  • the window information of the application, the activity information of the foreground application and the initial rendering priority are used to determine the rendering priority of each foreground application and obtain the rendering control strategy of multiple foreground applications.
  • the threshold can be set according to the actual situation or experience, for example, it can be set to one-half of the screen area, etc.
  • the embodiment of the present application does not limit the specific value of the threshold.
  • the window information may also include the z-order of the windows corresponding to each foreground application, and whether the window corresponding to each foreground application is the focus window.
  • the activity information includes switching information of the foreground application, and the rendering controller may The rendering priority of each foreground application is obtained based on the z-order of the corresponding windows, whether the window corresponding to each foreground application is the focus window, the switching information of the foreground application and/or the initial rendering priority of the foreground application.
  • window z-order can be understood as the order of windows stacked on each other along an imaginary straight line perpendicular to the screen. High-level rendering priority is given to applications whose window z-order is close to the top, and low-level rendering priority is given to applications whose window z-order is close to the bottom.
  • the focus window can be determined according to the user's operation. For example, when two foreground applications are displayed on a split screen and the user performs a touch operation on the upper half of the screen, the foreground application displayed in the upper half of the screen is the focus window, and the display The foreground application in the lower half of the screen is an unfocused window.
  • the window manager when the user performs a touch operation, the window manager will also receive corresponding information, so that the foreground application corresponding to the focus window can be determined based on the window information.
  • the initial rendering priority is set to 0-2 in order from high to low. Based on the initial rendering priority of each application, for the application that is about to be switched out, the rendering priority is increased by 1, and for the application that is about to be switched in, the rendering priority is increased by 1. For applications whose z-order is moved forward, the rendering priority is decreased by 1; for applications whose windows are moved forward in z-order, the rendering priority is decreased by 1; for applications whose windows are moved back in z-order, the rendering priority is increased by 1; for applications corresponding to the focus window, the rendering priority is decreased 1. For applications corresponding to non-focused windows, the rendering priority is increased by 1.
  • the rendering control strategy may be related to the rendering priority of each application.
  • the rendering control strategy can be determined based on the rendering priority, such as stopping sending Vsync signals to foreground applications with lower rendering priority, or reducing the frequency of sending Vsync signals to foreground applications with lower rendering priority, or first Stop sending Vsync signals to foreground applications with lower rendering priority. If based on the window information of the foreground application and the activity information of the foreground application, it is recognized that the load of multiple foreground applications has reduced to the first threshold, then adjust to give priority to rendering. Lower level foreground applications reduce the frequency of sending Vsync signals.
  • Figure 10a and Figure 11a are two rendering control diagrams for foreground applications.
  • Figure 10a shows stopping sending Vsync signals to the foreground application with lower rendering priority
  • Figure 11a shows stopping sending Vsync signals to the foreground application with lower rendering priority. The application reduces the frequency of sending Vsync signals.
  • the graphics synthesis module stops sending Vsync signals to foreground applications with lower rendering priority, and normally sends Vsync signals to foreground applications with higher rendering priority according to the original Vsync cycle.
  • FIG. 10b is a schematic diagram of an electronic device interface display processing flow in a possible implementation.
  • the graphics synthesis module stops sending Vsync signals to the foreground application with a lower rendering priority, and according to In the original Vsync cycle, Vsync signals are normally sent to the foreground application with a higher rendering priority.
  • the foreground application interface with a higher rendering priority processes frame 1, frame 2, frame 3, frame 4, and frame 5 according to the original Vsync cycle. render.
  • frame 2, frame 3, and frame 4 rendered by the foreground application with a higher rendering priority are processed according to the original Vsync cycle. and frame 5, etc. are synthesized and displayed in sequence, and the last frame frame 1 rendered by the foreground application with a lower rendering priority is synthesized and displayed according to the original Vsync cycle.
  • the synthesized pictures are still displayed sequentially in the order of frame 1, frame 2, and frame 3.
  • the foreground application interface with higher rendering priority is refreshed according to the original Vsync cycle, while the foreground application interface with lower rendering priority stays on the last frame before rendering control.
  • the graphics synthesis module reduces the Vsync signal sending frequency for foreground applications with lower rendering priority, for example, to half of the original Vsync signal sending frequency, and according to the original There is a Vsync cycle, and Vsync signals are normally sent to the foreground application with a higher rendering priority.
  • FIG. 11b is a schematic diagram of an electronic device interface display processing flow in a possible implementation.
  • the graphics synthesis module reduces the Vsync signal sending frequency of the foreground application with a lower rendering priority to one-half of the original Vsync signal sending frequency.
  • the lower front-end application interface renders frame 1, frame 3, and frame 5 according to the reduced Vsync cycle, and according to the original Vsync cycle, normally sends Vsync signals to the foreground application with a higher rendering priority, and the rendering priority is higher.
  • the high-end front-end application interface renders frame 1, frame 2, frame 3, frame 4, and frame 5 according to the original Vsync cycle.
  • frame 2, frame 3, and frame 4 rendered by the foreground application with a higher rendering priority are processed according to the original Vsync cycle. and frame 5, etc. are synthesized and displayed in sequence, and frames 1, frame 3, frame 5, etc. rendered by the foreground application with a lower rendering priority are synthesized and displayed in sequence according to the reduced Vsync cycle.
  • the synthesized pictures are still displayed sequentially in the order of frame 1, frame 2, and frame 3.
  • the foreground application interface with a higher rendering priority is refreshed according to the original Vsync cycle, while the foreground application interface with a lower rendering priority is rendered less frequently and the screen refreshes slower.
  • the foreground application interface with a higher rendering priority is rendered,
  • the foreground application interface with lower rendering priority can only refresh 1 frame.
  • the refresh frequency of the foreground application interface with lower rendering priority is half slower than the refresh frequency of the foreground application interface with higher rendering priority.
  • the graphics rendering management module obtains the rendering priority of each foreground application and determines the rendering control strategy corresponding to multiple foreground applications.
  • the graphics rendering management module can be as follows: for foreground applications with lower rendering priority , stop sending Vsync signals and/or reduce the frequency of sending Vsync signals until the load of the foreground application is recognized or the number of foreground applications is reduced to the corresponding threshold; for foreground applications with higher priority, the normal Vsync cycle will be used according to the original Vsync cycle. Send Vsync signal.
  • the graphics synthesis module performs rendering control on each foreground application according to the rendering control strategies corresponding to the multiple foreground applications.
  • the graphics synthesis module includes synthesis controller, signal simulator, connection manager, etc.
  • the graphics synthesis module stores the rendering control strategy sent by the rendering controller in the synthesis controller, and the synthesis controller sends the rendering control strategy to the signal simulator.
  • the signal simulator establishes the rendering control strategy according to the rendering control strategy.
  • the Vsync signal transmission channel sends corresponding Vsync signals to each front-end application.
  • the Vsync signal transmission channel is a channel established between the graphics synthesis module and the foreground application through the connection manager, so that the Vsync signal generated by the signal simulator can be sent to the foreground application.
  • the signal simulator stops sending Vsync signals to the foreground application with a lower rendering priority within the rendering control duration based on the established Vsync signal transmission channel.
  • the lower-priority foreground application sends a Vsync signal, and according to the original Vsync cycle, normally sends a Vsync signal to the higher-priority foreground application.
  • the signal simulator stops sending Vsync signals to Application 2, and Application 2 stops rendering within the rendering control duration.
  • the picture of application 2 stays at the last frame before rendering control, and according to the original Vsync cycle, a Vsync signal is sent to application 1, and application 1 can render normally.
  • the signal simulator when the rendering control method reduces the frequency of Vsync signal transmission for foreground applications with lower rendering priority, the signal simulator prioritizes rendering within the rendering control duration based on the established Vsync signal transmission channel.
  • the lower-level foreground application reduces the sending frequency of Vsync signals (for example, to one-half or one-third of the original Vsync signal sending frequency, etc.), and according to the original Vsync cycle, normally sends signals to higher-priority applications.
  • the foreground application sends a Vsync signal.
  • the original Vsync signal sending frequency of Application 1 and Application 2 is both 60Hz, and the rendering priority of Application 1 is higher than the rendering priority of Application 2, the original Vsync signal of Application 2 will be If the sending frequency of the Vsync signal is reduced to 30Hz, and the sending frequency of Application 1 is maintained at 60Hz, within the rendering control duration, when the screen of Application 1 is refreshed for 2 frames, the screen of Application 2 can only be refreshed for 1 frame.
  • the screen refresh frequency of Application 2 is one-half slower than the screen refresh frequency of Application 1.
  • the number of foreground applications may be reduced, and/or the load of the foreground application may be reduced. In this way, the number of foreground applications can be reduced to 1 or the load of the foreground application is less than a certain
  • the rendering control strategy stops executing. It is understandable that changes in the foreground application are uncertain, so the rendering control duration for executing the rendering control strategy may also be uncertain.
  • the number of foreground applications can also be identified based on the window information of the foreground application and the activity information of the foreground application.
  • the rendering control method can be stopped.
  • the load of multiple foreground applications is identified based on the window information of the foreground application and the activity information of the foreground application.
  • the rendering control method can be stopped.
  • the electronic device when multiple foreground applications occur, the electronic device will perform rendering control according to the rendering priority of each foreground application, reducing the overall load of the system and improving the smoothness of applications with higher rendering priority. sex, thereby improving user experience.
  • the image display method provided by the embodiment of the present application can be applied in a multi-window display scenario.
  • the multi-window display can include interface display during foreground application switching, split-screen display or floating window display, etc.
  • the graphics rendering management module determines the rendering control strategies corresponding to multiple foreground applications based on the rendering priority of each foreground application, it will be explained from three scenarios: foreground application switching, split-screen display, and floating window display.
  • each foreground application meets the conditions of rendering control, the rendering control of each foreground application is triggered; when the rendering area of each foreground application does not meet the conditions of rendering control, each foreground application will be triggered according to the original Vsync signal for rendering.
  • the multi-window display scenario can be a scenario where the foreground application switches, for example, the foreground application switches from a third-party application to Or other system applications return to the desktop, open third-party applications or other system applications, foreground applications are swapped in/out from third-party applications or other system applications, etc.
  • the specific process includes: displaying a multi-tasking interface on the screen of the electronic device, and the multi-tasking interface includes a first application and a second application; receiving the user's second application.
  • the first operation is used to switch the first application in, and switch the second application out; in response to the first operation, send the vertical synchronization signal Vsync signal to the first application at the first frequency, or stop sending the vertical synchronization signal Vsync signal to the first application Vsync signal; in response to the first operation, sending a Vsync signal to the second application at a second frequency; wherein the first frequency is less than the second frequency; performing a comparison between the rendered image in the first application and the rendered image in the second application Synthesize and process to obtain the target image; display the target image.
  • FIG. 12 shows a schematic diagram of the first scenario to which the image display method according to the embodiment of the present application is applicable.
  • a multi-tasking interface is displayed on the screen of the electronic device.
  • the multi-tasking interface includes a social application and a video application. It receives the user's operation of clicking on the social application.
  • the social application is switched in, and the video is The application is cut out, and the interface shown in b in Figure 12 is obtained, and the social application is displayed on the screen.
  • the Vsync signal is sent to the video application at the first frequency, or the Vsync signal is stopped to be sent to the video application; in response to this operation, the Vsync signal is sent to the social application at the second frequency.
  • the application sends a Vsync signal; wherein the first frequency is smaller than the second frequency; the image rendered in the video application and the image rendered in the social application are synthesized to obtain a target image; and the target image is displayed.
  • Vsync signals are sent to them at the original frequency; for hand-out applications, the frequency of sending Vsync signals is reduced or Vsync signals are stopped being sent to them, so that the hand-in applications can have sufficient Render resources to improve the smoothness of entering applications.
  • the specific process includes: receiving the sixth operation of the user returning from the first application to the desktop application; in response to the sixth operation, stopping sending data to the first application.
  • Figure 13 shows a schematic diagram of the second scenario applicable to the image display method according to the embodiment of the present application.
  • the social application can be a third-party application or a system application.
  • the Vsync signal is sent to the social application at the first frequency, or the Vsync signal is stopped to be sent to the video application; in response to this operation, the Vsync signal is sent to the Launcher at the second frequency.
  • Vsync signal wherein, the first frequency is smaller than the second frequency; the image rendered in the social application and the image rendered by the Launcher are synthesized to obtain the target image; the target image is displayed.
  • the social application and Launcher may be rendered at the same time, which may cause the system load to be too high.
  • the electronic device may render social applications and Launcher according to their rendering priorities. Perform rendering control.
  • Launcher It is located at the top level in the window z order.
  • the window z order corresponding to Launcher and other applications does not change when the foreground application is switched; when the foreground application is two other applications except Launcher , when the foreground application is switched, the z-order of the swapped-in application is moved forward and the rendering priority is increased. The z-order of the swapped-out application is moved backward and the rendering priority is lowered.
  • the rendering priority of the swapped-in application is increased, and the rendering priority of the swapped-out application is lowered, thereby ensuring the smoothness of the application to be displayed in the foreground.
  • the window touched by the user may not be the window corresponding to the application to be swapped in. Therefore, there is no need to adjust the rendering priority of the application based on whether it corresponds to the focused window.
  • the initial rendering priority set by the electronic device is 0 to 2 from high to low
  • the initial rendering priority of the social interface and the initial rendering priority of the Launcher are 2 and 1 respectively.
  • the Launcher's rendering priority is reduced by 1 based on its initial rendering priority
  • the Launcher's rendering priority becomes 0
  • the rendering priority of the social application is increased by 1 based on its initial rendering priority
  • the rendering of the social application The priority becomes 3.
  • the window z-order corresponding to Launcher and social applications does not change.
  • the corresponding relationship between foreground applications and rendering priorities can be shown in Table 1.
  • limiting the rendering of the social application may include stopping sending the Vsync signal to the social application and/or reducing the frequency of sending the Vsync signal.
  • Vsync signals are sent to them at the original frequency; for hand-out applications, the frequency of sending Vsync signals is reduced or Vsync signals are stopped being sent to them, so that the hand-in applications can have sufficient Render resources to improve the smoothness of entering applications.
  • the scene displayed in multiple windows can be a scene displayed in split screen.
  • the upper half window of the screen and the lower half window of the screen display different applications respectively.
  • the upper half of the screen displays a ppt file
  • the lower half of the screen displays a word document.
  • a first interface is displayed, and the first interface includes a first application; a second operation is received from the user to display the first application and the second application in split screens; in response to the second operation, the first application is displayed in the first window. an application, and displaying the second application in the second window; receiving a third operation on the second application in the second window; in response to the third operation, sending a vertical synchronization signal Vsync signal to the first application at a first frequency , or stop sending the Vsync signal to the first application; in response to the second operation, send the Vsync signal to the second application at the second frequency; wherein the first frequency is less than the second frequency; combine the rendered image in the first application with the second The rendered images in the application are synthesized and processed to obtain the target image; the target image is displayed.
  • Figure 14 shows a schematic diagram of the third scenario applicable to the image display method according to the embodiment of the present application.
  • the display interface of the electronic device includes ppt application and word application, and the upper half window of the screen displays ppt file, the lower half window of the screen displays a word document, and the user edits the ppt file based on the word document. Then the user performs a touch operation on the upper half window of the screen, thereby determining that the upper half window is the focus window.
  • the initial rendering priority set by the electronic device is 0 to 2 from high to low.
  • the initial rendering priority of the word application and the initial rendering priority of the ppt application are both 2. Since the window corresponding to the ppt application is the focus window, then The rendering priority of the ppt application is reduced by 1 based on its initial rendering priority, and the rendering priority of the ppt application becomes 1; since the window corresponding to the word application is a non-focus window, the rendering priority of the word application is at the initial rendering priority of the word application. Add 1 to the priority, and the rendering priority of the word application becomes 3.
  • Table 2 The corresponding relationship between foreground applications and rendering priorities can be shown in Table 2.
  • the rendering priority of the word application is 3 and the rendering priority of the ppt application is 1, so the rendering priority of the word application can be restricted.
  • Rendering ensures the rendering of ppt applications and improves the smoothness of ppt applications.
  • limiting the rendering of the word application may include stopping sending Vsync signals to the word application and/or reducing the frequency of sending Vsync signals.
  • Vsync signals are sent to them at the original frequency, and for applications in non-focus windows, the frequency of sending Vsync signals is reduced or Vsync signals are stopped being sent to them, so that The application in the focus window can have sufficient rendering resources, improving the fluency of the application in the focus window.
  • the scene of multi-window display can be the scene of floating window display, for example, picture-in-picture display of video application, display of web pages, files and other windows on the desktop, etc.
  • the first application is displayed in full screen; a fourth operation for triggering the second application is received; in response to the fourth operation, the second application is displayed in full screen, and the first application is displayed in a floating window on the second application; receiving to the fifth operation for the second application; in response to the fifth operation, sending the vertical synchronization signal Vsync signal to the first application at the first frequency, or stopping sending the Vsync signal to the first application; in response to the fifth operation, using the second The frequency sends a Vsync signal to the second application; wherein the first frequency is smaller than the second frequency; the image rendered in the first application and the image rendered in the second application are synthesized to obtain a target image; and the target image is displayed.
  • FIG. 15 shows a schematic diagram of the fourth scenario applicable to the image display method according to the embodiment of the present application.
  • a social application for example, WeChat
  • the playback interface is switched to full-screen display, the dialog interface of the social application and the playback interface of the video application are displayed in the form of a floating window, resulting in the display interface of the electronic device as shown in b in Figure 15, including both the social application and the video application.
  • Frontend application when the user is watching the video in full screen through the video software, a social application (for example, WeChat) pops up a message notification, and the user clicks on the message notification, and the display interface of the electronic device changes from full screen display to the video application.
  • the playback interface is switched to full-screen display, the dialog interface of the social application and the playback interface of the video application are displayed in the form of a floating window, resulting in the display interface of the electronic device as shown in b in Figure 15, including both the social application and the video application.
  • Frontend application when the user is watching the video in full screen through the video software, a social application (for example, WeChat) pops up a message
  • the electronic device can render the social application and the video application based on the rendering priority. Rendering control for social applications and video applications.
  • the user since the user switches from the full-screen display interface of the video application to the dialog box of the social application, and performs operations such as viewing messages or replying to messages, the user's focus is on the social application, and the corresponding The window is determined as the focused window, and the window corresponding to the video application is determined as the non-focused window.
  • the social application corresponds to the focus window and the video application corresponds to the focus window, and the Vsync signal is sent to the video application at the first frequency, or the Vsync signal is stopped to be sent to the video application; in response to the Operation, send a Vsync signal to the social application at the second frequency; wherein the first frequency is less than the second frequency; synthesize the image rendered in the video application and the image rendered in the social application to obtain a target image; display the target image .
  • the initial rendering priority set by the electronic device is 0 to 2 from high to low
  • the initial rendering priority of the social interface and the initial rendering priority of the video application are 2 and 1 respectively.
  • the window corresponding to the social application is the focus window
  • the rendering priority of the social application is reduced by 1 based on its initial rendering priority, and the rendering priority of the social application becomes 1; the window corresponding to the video application is not If the focus window is focused, the rendering priority of the video application is increased by 1 based on its initial rendering priority, and the rendering priority of the video application becomes 2.
  • Table 3 The corresponding relationship between foreground applications and rendering priorities can be shown in Table 3.
  • Vsync signals are sent to them at the original frequency, and for applications in non-focus windows, the frequency of sending Vsync signals is reduced, or Vsync signals are stopped being sent to them, so that The application in the focus window can have sufficient rendering resources, improving the fluency of the application in the focus window.
  • FIG. 16 is a schematic flowchart of an image display method provided by an embodiment of the present application.
  • the method shown in Figure 16 can be performed by the electronic device 100 shown in Figure 1.
  • the method includes:
  • S1601. Determine the first rendering priority of the first application according to the first initial rendering priority of the first application, whether the first application corresponds to the focus window, and/or the application switching type of the first application.
  • the first rendering initial priority is related to the application type of the first application and/or the rendering load of the first application.
  • the initial rendering priority can be divided into high-medium-low.
  • the initial rendering priority can be set to 0-2 in order from high to low.
  • the initial rendering priority is high, it corresponds to 0, and when the rendering initial priority is high, it corresponds to 0.
  • the initial priority is medium, it corresponds to 1, and when the initial rendering priority is low, it corresponds to 2.
  • the initial rendering priority is high, it corresponds to 2.
  • the initial rendering priority is medium, it corresponds to 1.
  • the initial rendering priority is low, it corresponds to 1. 0.
  • the rendering initial priority can be set based on the application type of the application. Specifically, the initial rendering priority of the system application can be set higher than the initial rendering priority of the third-party application.
  • system application It can include desktop launcher, system user interface, etc.
  • Third-party applications can include WeChat, Toutiao, etc.
  • the initial rendering priority can be set based on the application's rendering load. Specifically, the initial rendering priority of an application with a large rendering load may be set higher than the initial rendering priority of an application with a small rendering load. For example, if the rendering load of a game application is greater than that of a social application, set the initial rendering priority of the game application to be higher than the initial rendering priority of the social application.
  • the rendering initial priority can be set based on the application type of the application and the application's rendering load. Specifically, when multiple applications have the same application type, the initial rendering priority can be set according to the rendering load of the application, and the initial rendering priority of the application with a large rendering load is set higher than the initial rendering priority of the application with a small rendering load. class. For example, when the two foreground applications are a third-party game application and a third-party social application, and the rendering load of the third-party game application is greater than that of the third-party social application, set the initial rendering priority of the third-party game application to be higher than that of the third-party social application. Initial rendering priority for third-party social applications.
  • application switching types include switching out of applications or switching in applications.
  • Switching in applications can be understood as switching into the foreground of the electronic device.
  • Switching out applications can be understood as switching out of the foreground of the electronic device and switching into the foreground of the electronic device. Background application.
  • the first initial rendering of the first application when the window corresponding to the first application is the focus window and/or the application switching type of the first application is a cut-in application, the first initial rendering of the first application is increased. Priority; when the window corresponding to the first application is a non-focus window and/or the application switching type of the first application is a cut-out application, the first initial rendering priority of the first application is reduced, thereby obtaining the first priority of the first application. Rendering priority.
  • S1602. Determine the second rendering priority of the second application according to the second initial rendering priority of the second application, whether the second application corresponds to the focus window, and/or the application switching type of the second application.
  • the second rendering initial priority is related to the application type of the second application and/or the rendering load of the interface to be displayed by the second application.
  • the description of the second rendering initial priority may refer to the description in step S1501, and will not be described again here.
  • first application and the second application are applications in which the electronic device is running in the foreground.
  • the first frequency is smaller than the second frequency, and the first frequency can be understood as the frequency obtained by reducing the second frequency.
  • rendering priority can be used to control rendering to varying degrees on multiple foreground applications. For example, when rendering multiple foreground applications, the higher the rendering priority of the foreground application, the more computing resources are given, which can improve the smoothness of the foreground application with high rendering priority.
  • the rendering priority can be divided into high-medium-low.
  • the rendering priority can be set to 0-2 in order from high to low.
  • the rendering priority is high, it corresponds to 0, and the rendering priority is Medium corresponds to 1, and rendering priority to low corresponds to 2.
  • the rendering priority is high, it corresponds to 2, when the rendering priority is medium, it corresponds to 1, and when the rendering priority is low, it corresponds to 0.
  • the first rendering priority of the first application is lower than the second rendering priority of the second application, send the Vsync signal to the second application at the second frequency, and stop sending the Vsync signal to the first application, or , based on the second frequency, reduce the sending frequency of the first application Vsync signal to the first frame rate.
  • the application sends a Vsync signal, renders the second application, and obtains an image rendered by the second application.
  • the image rendered in the first application and the image rendered in the second application are synthesized to obtain a target image.
  • the synthesized interface of the first application and the second application is displayed on the screen of the electronic device.
  • the synthesized interface is a target image synthesized by combining the image rendered in the first application and the image rendered in the second application. .
  • the first application and the second application are applications running in the foreground of the electronic device.
  • the first initial rendering priority of the first application whether the first application corresponds to the focus window and/or the The application switching type of an application determines the first rendering priority of the first application; the second initial rendering priority of the second application is determined based on whether the second application corresponds to the focus window and/or the application switching type of the second application.
  • a second rendering priority of the two applications when the first rendering priority is lower than the second rendering priority, sending a Vsync signal to the first application at a first frequency, or stopping sending a Vsync signal to the first application; and using a second rendering priority.
  • the frequency sends a Vsync signal to the second application; wherein the first frequency is smaller than the second frequency; the image rendered in the first application and the image rendered in the second application are synthesized to obtain a target image; and the target image is displayed.
  • the sending frequency of the Vsync signal is reduced or the sending of the Vsync signal is stopped. Foreground applications with higher rendering priority maintain the original Vsync signal sending frequency, thereby improving the smoothness of rendering foreground applications with higher priority and improving user experience.
  • the image display method further includes:
  • the first application is a switch-out application
  • the second application is a switch-in application
  • determining the first rendering priority of the first application includes: determining the first rendering priority of the first application according to the first rendering initial priority of the first application and the application switching type of the first application. and determining the second rendering priority of the second application, including: determining the second rendering priority of the second application according to the second rendering initial priority of the second application and the application switching type of the second application.
  • the first rendering priority of the first application is determined based on the first rendering initial priority of the first application and the application switching type of the first application; based on the second rendering priority of the second application
  • the initial rendering priority determines the second rendering priority of the second application according to the application switching type of the second application, and then determines the difference between the first application and the second rendering priority by comparing the first rendering priority and the second rendering priority.
  • determining the first rendering priority of the first application based on the first rendering initial priority of the first application and the application switching type of the first application includes: based on the first application being a cut-out application, reducing The first rendering initial priority of the first application is the first rendering priority of the first application. and determining the second rendering priority of the second application based on the second rendering initial priority of the second application and the application switching type of the second application, including: based on the second application being a cut-in application, improving the second rendering of the second application Initial priority, get the second rendering priority of the second application.
  • the first rendering initial priority of the first application is reduced to obtain the first rendering priority of the first application; based on The second application is a cut-in application.
  • the initial priority of the second rendering of the second application is increased to obtain the second rendering priority of the second application.
  • the first rendering priority and the second rendering priority can be compared to determine the priority of the second rendering.
  • 1 is added to the initial rendering priority of the application to be switched out, and for the application to be switched in, 1 is added to the initial rendering priority of the application to be switched in. minus 1.
  • the initial rendering priority set by the electronic device is 0 to 2 from high to low
  • the initial rendering priority of the social interface and the initial rendering priority of the Launcher are 2 and 1 respectively.
  • the Launcher's rendering priority is reduced by 1 based on its initial rendering priority
  • the Launcher's rendering priority becomes 0
  • the rendering priority of the social application is increased by 1 based on its initial rendering priority
  • the rendering of the social application The priority becomes 3.
  • the electronic device is in a split-screen display scenario, and the first application and the second application are displayed in two different windows respectively.
  • determining the first rendering priority of the first application includes: determining the first rendering priority of the first application based on the first rendering initial priority of the first application and whether the first application corresponds to the focus window; and determining The second rendering priority of the second application includes: determining the second rendering priority of the second application based on the second initial rendering priority of the second application and whether the second application corresponds to the focus window.
  • the first application and the second application are displayed in two different windows respectively, and the two different windows may respectively correspond to the focus window and the non-focus window.
  • the first application corresponds to the focus application
  • the second application corresponds to the non-focus application
  • the first application corresponds to the non-focus application
  • the second application corresponds to the focus application.
  • the first rendering priority of the first application is determined according to whether the first application corresponds to the focus window; based on the second rendering initial priority of the second application, the first rendering priority is determined based on the first rendering priority of the first application. Whether the second application corresponds to the focus window determines the second rendering priority of the second application, and then the rendering control method for the first application and the second application can be determined by comparing the first rendering priority and the second rendering priority.
  • determining the first rendering priority of the first application based on the first rendering initial priority of the first application and whether the first application corresponds to the focus window includes: based on the first application corresponding to the non-focus window, reducing According to the first rendering initial priority of the first application, the first rendering priority of the first application is obtained; according to the second rendering initial priority of the second application and whether the second application corresponds to the focus window, the second rendering of the second application is determined.
  • the priority includes: based on the focus window corresponding to the second application, increasing the second rendering initial priority of the second application to obtain the second rendering priority of the second application.
  • the focus window is a window with a higher focus of the user.
  • the first rendering initial priority of the first application is reduced to obtain the first The first rendering priority of the application; based on the focus window corresponding to the second application, the second rendering initial priority of the second application is increased to obtain the second rendering priority of the second application.
  • the focus window can be determined according to the user's operation. For example, when two foreground applications are displayed on a split screen and the user performs a touch operation on the upper half of the screen, the foreground application displayed in the upper half of the screen is the focus window, and the display The foreground application in the lower half of the screen is an unfocused window.
  • the initial rendering priority set by the terminal device is 0 to 2 from high to low.
  • the display interface of the terminal device includes a ppt application and a word application.
  • the initial rendering priority of the word application and the initial rendering priority of the ppt application are both 2.
  • the upper half window of the screen displays the ppt file, and the lower half window of the screen displays the word document. If the user edits the ppt file based on the word document, the user touches the upper half window of the screen, so that the upper half window can be determined.
  • the window is the focus window.
  • the rendering priority of the ppt application is reduced by 1 based on its initial rendering priority, and the rendering priority of the ppt application becomes 1; since the window corresponding to the word application is a non-focus window, Then the rendering priority of the word application is increased by 1 based on its initial rendering priority, and the rendering priority of the word application becomes 3.
  • the corresponding initial rendering priority is increased, and for applications displayed in the non-focus window, the corresponding initial rendering priority is lowered, so that the corresponding initial rendering priority can be improved. application fluency.
  • the electronic device is in a floating window display scenario.
  • determining the first rendering priority of the first application includes: determining the first rendering priority of the first application based on the first rendering initial priority of the first application and whether the first application corresponds to the focus window; and determining The second rendering priority of the second application includes: determining the second rendering priority of the second application based on the second initial rendering priority of the second application and whether the second application corresponds to the focus window.
  • the application type of the second application when the electronic device is in a scene where the floating window is displayed, for the two applications running in the foreground, when the application type of the first application is a switch-in application, the application type of the second application is a switch-out application; when When the application type of the first application is a switch-out application, the application type of the second application is a switch-in application.
  • the first application corresponds to the focus application
  • the second application corresponds to the non-focus application
  • the first application corresponds to the non-focus application
  • the second application corresponds to the focus application.
  • the first rendering priority of the first application is determined according to whether the first application corresponds to the focus window; based on the second rendering initial priority of the second application, the first rendering priority is determined based on the first rendering priority of the first application. Whether the second application corresponds to the focus window determines the second rendering priority of the second application, and then the rendering control method for the first application and the second application can be determined by comparing the first rendering priority and the second rendering priority.
  • determining the first rendering priority of the first application based on the first rendering initial priority of the first application and whether the first application corresponds to the focus window includes: based on the first application corresponding to the non-focus window, reducing According to the first rendering initial priority of the first application, the first rendering priority of the first application is obtained; according to the second rendering initial priority of the second application and whether the second application corresponds to the focus window, the second rendering of the second application is determined.
  • the priority includes: based on the focus window corresponding to the second application, increasing the second rendering initial priority of the second application to obtain the second rendering priority of the second application.
  • the focus window is a window with a higher focus of the user.
  • the first rendering initial priority of the first application is reduced to obtain the first The first rendering priority of the application; based on the focus window corresponding to the second application, the second rendering initial priority of the second application is increased to obtain the second rendering priority of the second application.
  • the focus window can be determined based on the user's operation. For example, when two applications are running in the foreground, application 2 is displayed in full screen on the screen of the electronic device, application 1 is displayed on application 2 in the form of a floating window, and the user targets the application 2 performs a touch operation, application 2 corresponds to the focused window, and application 1 corresponds to the non-focused window.
  • the initial rendering priority set by the terminal electronic device is 0 to 2 from high to low
  • the initial rendering priority of the social interface and the initial rendering priority of the video application are 2 and 1 respectively.
  • the social network is displayed in full screen on the screen of the electronic device
  • the video application is displayed on the social application in the form of a floating window.
  • the corresponding social application window If the window is the focus window, the rendering priority of the social application will be reduced by 1 based on its initial rendering priority, and the rendering priority of the social application will become 1; if the window corresponding to the video application is a non-focus window, the rendering of the video application will take priority The level is increased by 1 to its initial rendering priority, and the video application's rendering priority becomes 2.
  • the method before determining the first rendering priority of the first application and determining the second rendering priority of the second application, the method further includes: obtaining the rendering area of the first application and the rendering area of the second application. Determining the first rendering priority of the first application and the second rendering priority of the second application includes: when the rendering area of the first application and the rendering area of the second application are both greater than a first preset value, determining the first A first rendering priority for an application, and determining a second rendering priority for a second application.
  • the size of the rendering area may be used to represent the size of the rendering load.
  • the rendering load of the system is large, which will affect the first application. Fluency of the primary application and/or secondary application. Therefore, when the rendering area of the first application and the rendering area of the second application are both greater than the first preset value, the first rendering priority of the first application and the second rendering priority of the second application are determined, according to the first rendering The priority and the second rendering priority control the rendering of the first application and the second application, thereby reducing the rendering load of the system and improving the smoothness of the application.
  • the method before determining the first rendering priority of the first application and determining the second rendering priority of the second application, the method further includes: obtaining window information of the application running in the foreground and/or the application running in the foreground. switching information; according to the window information of the application running in the foreground and/or the switching information of the application running in the foreground, it is determined that the application running in the foreground includes the first application and the second application.
  • window information can be understood as the existence of a corresponding window interface for each application during the running process.
  • Each window interface has its own corresponding information and data. These information and data can include window size and window position. and window layout and other attribute information.
  • WeChat window information can include the location of each button, the size of the dialog box, and other information.
  • the switching information of the application running in the foreground can be understood as information generated when the foreground application of the electronic device is switched, so as to facilitate tracking and management of the switching of the foreground application. For example, when the foreground application is switched from a social application to a game application, switching information of the application running in the foreground will be generated.
  • the application running in the foreground includes the first application and the second application according to the window information of the application running in the foreground and/or the switching information of the application running in the foreground.
  • the applications running in the foreground include the first application and the second application, compare the first rendering priority of the first application and the second rendering priority of the second application, and then perform rendering control on the first application and the second application, Improve application fluency; when it is determined that the application running in the foreground includes the first application and does not include the second application, there is no need to obtain the first rendering priority of the first application, thereby saving system resources.
  • the electronic device performance adjustment method according to the embodiment of the present application has been described above.
  • the electronic device performing the above image display method provided by the embodiment of the present application will be described below.
  • Those skilled in the art can understand that methods and devices can be combined and referenced with each other, and the electronic device provided in the embodiment of the present application can perform the steps in the above image display method.
  • Figure 17 shows a schematic structural diagram of an image display device provided by an embodiment of the present application.
  • the image display device may be an electronic device in the embodiment of the present application.
  • the image display device includes: a touch screen 1701, where the touch screen includes a touch panel and a display screen; one or more processors 1702; a memory 1703; a plurality of applications and one or more computer programs, wherein the one or more computer programs are stored in the memory 1703, the one or more computer programs include instructions, and when the instructions are executed by the image display device, the image display in the above embodiment is realized. method.
  • FIG. 18 is a schematic diagram of the hardware structure of an image display device provided by an embodiment of the present application.
  • the device includes: a memory 1801, a processor 1802 and a display screen 1804.
  • the device may also include an interface circuit 1803, in which the memory 1801, the processor 1802, the interface circuit 1803 and the display screen 1804 can communicate; for example, the memory 1801, the processor 1802, the interface circuit 1803 and the display screen 1804 can communicate through a communication bus.
  • the memory 1801 is used to store computer execution instructions, which are controlled by the processor 1802 for execution, and displayed by the display screen 1804, thereby realizing the image display method provided by the following embodiments of the present application.
  • the computer execution instructions in the embodiments of the present application may also be called application codes, which are not specifically limited in the embodiments of the present application.
  • the interface circuit 1803 may also include a transmitter and/or a receiver.
  • the above-mentioned processor 1802 may include one or more CPUs, and may also be other general-purpose processors, digital signal processors (digital signal processors, DSPs), application specific integrated circuits (application specific integrated circuits, ASICs), etc.
  • a general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc. The steps of the method disclosed in this application can be directly implemented by a hardware processor, or executed by a combination of hardware and software modules in the processor.
  • the device of this embodiment can be used to perform the steps performed in the above method embodiment.
  • the implementation principles and technical effects are similar and will not be described again here.
  • An embodiment of the present application also provides a computer-readable storage medium.
  • the methods described in the above embodiments can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. If implemented in software, the functionality may be stored on or transmitted over as one or more instructions or code on a computer-readable medium.
  • Computer-readable media may include computer storage media and communication media and may include any medium that can transfer a computer program from one place to another.
  • the storage media can be any target media that can be accessed by the computer.
  • the computer-readable medium may include RAM, ROM, compact disc read-only memory (CD-ROM) or other optical disk storage, magnetic disk storage or other magnetic storage devices, or may be targeted to carry or any other medium that stores the required program code in the form of instructions or data structures and accessible by a computer.
  • any connection is properly termed a computer-readable medium.
  • coaxial cable, fiber optic cable, twisted pair, Digital Subscriber Line (DSL), or wireless technologies such as infrared, radio, and microwave
  • coaxial Cables, fiber optic cables, twisted pairs, DSL or wireless technologies such as infrared, radio and microwave are included in the definition of medium.
  • Disk and optical disc includes optical disc, laser disc, optical disc, Digital Versatile Disc (DVD), floppy disk, and Blu-ray disc, where disks typically reproduce data magnetically, while optical discs reproduce data optically using lasers. Combinations of the above should also be included within the scope of computer-readable media.
  • Embodiments of the present application are described with reference to flowcharts and/or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present application. It will be understood that each process and/or block in the flowchart illustrations and/or block diagrams, and combinations of processes and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions.
  • These computer program instructions may be provided to a processing unit of a general purpose computer, special purpose computer, embedded processor or other programmable data processing device to produce a machine, such that the instructions executed by the processing unit of the computer or other programmable data processing device produce a To implement a process or processes in a flowchart and/or a box or boxes in a block diagram A device with a specific function.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • User Interface Of Digital Computer (AREA)
  • Digital Computer Display Output (AREA)

Abstract

本申请实施例提供的图像显示方法和相关装置,应用于终端技术领域。第一应用和第二应用为电子设备处于前台运行的应用,根据第一应用的第一初始渲染优先级、第一应用是否对应焦点窗口和/或第一应用的应用切换类型,确定第一应用的第一渲染优先级;根据第二应用的第二初始渲染优先级、第二应用是否对应焦点窗口和/或第二应用的应用切换类型,确定第二应用的第二渲染优先级;比较第一应用的第一渲染优先级和第二应用的第二渲染优先级,当第一渲染优先级低于第二渲染优先级时,对第一应用降低Vsync的发送频率或停止发送Vsync,对于第二应用,保持原有Vsync发送频率,从而提高渲染优先级较高的前台应用的流畅性,提升用户体验。

Description

图像显示方法和相关装置
本申请要求于2022年07月21日提交中国国家知识产权局、申请号为202210868302.5、申请名称为“图像显示方法和相关装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及终端技术领域,尤其涉及一种图像显示方法和相关装置。
背景技术
随着科技的发展,电子设备支持的功能越来越多样化。例如,越来越多的电子设备支持多个前台应用,多个前台应用的场景包括应用切换、悬浮窗显示或分屏显示等场景。同时,应用开发者也会迭代出更多的应用特性,例如,视频应用的画中画特性等。
然而,多前台应用会给系统带来繁重的渲染任务,导致系统负载过大,出现卡顿现象,影响用户体验。
发明内容
本申请实施例提供一种图像显示方法和相关装置,应用于电子设备。通过对渲染优先级较低的前台应用降低Vsync信号的发送频率或停止发送Vsync信号,提高渲染优先级较高的前台应用的流畅性,提升用户体验。
第一方面,本申请实施例提出一种图像显示方法,应用于电子设备,方法包括:根据第一应用的第一初始渲染优先级、第一应用是否对应焦点窗口和/或第一应用的应用切换类型,确定第一应用的第一渲染优先级;其中,第一渲染初始优先级与第一应用的应用类型和/或第一应用的渲染负载有关,应用切换类型包括切出应用或切入应用;根据第二应用的第二初始渲染优先级、第二应用是否对应焦点窗口和/或第二应用的应用切换类型,确定第二应用的第二渲染优先级,其中,第二渲染初始优先级与第二应用的应用类型和/或第二应用待显示界面的渲染负载有关;其中,第一应用和第二应用为电子设备处于前台运行的应用;当第一渲染优先级低于第二渲染优先级时,以第一频率向第一应用发送垂直同步信号Vsync信号,或者停止向第一应用发送Vsync信号;以及以第二频率向第二应用发送Vsync信号;其中,第一频率小于第二频率;将第一应用中渲染后的图像与第二应用中渲染后的图像进行合成处理,得到目标图像;显示目标图像。
这样,通过比较第一应用的第一渲染优先级和第二应用的第二渲染优先级,对于渲染优先级较低的前台应用,降低Vsync信号的发送频率或停止发送Vsync信号,对于渲染优先级较高的前台应用,保持原来的Vsync信号发送频率,从而提高渲染优先级较高的前台应用的流畅性,提升用户体验。
可选的,电子设备处于前台应用切换的场景,第一应用为切出应用,第二应用为切入应用;确定第一应用的第一渲染优先级,包括:根据第一应用的第一渲染初始优先级和第 一应用的应用切换类型,确定第一应用的第一渲染优先级;确定第二应用的第二渲染优先级,包括:根据第二应用的第二渲染初始优先级和第二应用的应用切换类型,确定第二应用的第二渲染优先级。
这样,当电子设备处于前台应用切换的场景时,基于第一应用的第一渲染初始优先级,根据第一应用的应用切换类型,确定第一应用的第一渲染优先级;基于第二应用的第二渲染初始优先级,根据第二应用的应用切换类型,确定第二应用的第二渲染优先级,进而可以通过比较第一渲染优先级和第二渲染优先级,来确定对第一应用和第二应用的渲染控制方法。
可选的,根据第一应用的第一渲染初始优先级和第一应用的应用切换类型,确定第一应用的第一渲染优先级,包括:基于第一应用为切出应用,降低第一应用的第一渲染初始优先级,得到第一应用的第一渲染优先级;根据第二应用的第二渲染初始优先级和第二应用的应用切换类型,确定第二应用的第二渲染优先级,包括:基于第二应用为切入应用,提高第二应用的第二渲染初始优先级,得到第二应用的第二渲染优先级。
这样,为提高从后台切换为前台的应用的流畅性,基于第一应用为切出应用,降低第一应用的第一渲染初始优先级,得到第一应用的第一渲染优先级;基于第二应用为切入应用,提高第二应用的第二渲染初始优先级,得到第二应用的第二渲染优先级,进而可以通过比较第一渲染优先级和第二渲染优先级,来确定对第一应用和第二应用的渲染控制方法。
可选的,电子设备处于分屏显示的场景,第一应用和第二应用分别显示在两个不同的窗口中;确定第一应用的第一渲染优先级,包括:根据第一应用的第一渲染初始优先级和第一应用是否对应焦点窗口,确定第一应用的第一渲染优先级;确定第二应用的第二渲染优先级,包括:根据第二应用的第二渲染初始优先级和第二应用是否对应焦点窗口,确定第二应用的第二渲染优先级。
这样,基于第一应用的第一渲染初始优先级,根据第一应用是否对应焦点窗口,确定第一应用的第一渲染优先级;基于第二应用的第二渲染初始优先级,根据第二应用是否对应焦点窗口,确定第二应用的第二渲染优先级,进而可以通过比较第一渲染优先级和第二渲染优先级,来确定对第一应用和第二应用的渲染控制方法。
可选的,根据第一应用的第一渲染初始优先级和第一应用是否对应焦点窗口,确定第一应用的第一渲染优先级,包括:基于第一应用对应非焦点窗口,降低第一应用的第一渲染初始优先级,得到第一应用的第一渲染优先级;根据第二应用的第二渲染初始优先级和第二应用是否对应焦点窗口,确定第二应用的第二渲染优先级,包括:基于第二应用对应焦点窗口,增加第二应用的第二渲染初始优先级,得到第二应用的第二渲染优先级。
这样,焦点窗口为用户关注点较高的窗口,为提高焦点窗口的流畅性,基于第一应用对应非焦点窗口,降低第一应用的第一渲染初始优先级,得到第一应用的第一渲染优先级;基于第二应用对应焦点窗口,提高第二应用的第二渲染初始优先级,得到第二应用的第二渲染优先级。
可选的,电子设备处于悬浮窗显示的场景;确定第一应用的第一渲染优先级,包括:根据第一应用的第一渲染初始优先级和第一应用是否对应焦点窗口,确定第一应用的第一渲染优先级;确定第二应用的第二渲染优先级,包括:根据第二应用的第二渲染初始优先级和第二应用是否对应焦点窗口,确定第二应用的第二渲染优先级。
这样,基于第一应用的第一渲染初始优先级,根据第一应用是否对应焦点窗口,确定第一应用的第一渲染优先级;基于第二应用的第二渲染初始优先级,根据第二应用是否对应焦点窗口,确定第二应用的第二渲染优先级,进而可以通过比较第一渲染优先级和第二渲染优先级,来确定对第一应用和第二应用的渲染控制方法。
可选的,根据第一应用的第一渲染初始优先级和第一应用是否对应焦点窗口,确定第一应用的第一渲染优先级,包括:基于第一应用对应非焦点窗口,降低第一应用的第一渲染初始优先级,得到第一应用的第一渲染优先级;根据第二应用的第二渲染初始优先级和第二应用是否对应焦点窗口,确定第二应用的第二渲染优先级,包括:基于第二应用对应焦点窗口,提高第二应用的第二渲染初始优先级,得到第二应用的第二渲染优先级。
这样,焦点窗口为用户关注点较高的窗口,为提高焦点窗口的流畅性,基于第一应用对应非焦点窗口,降低第一应用的第一渲染初始优先级,得到第一应用的第一渲染优先级;基于第二应用对应焦点窗口,提高第二应用的第二渲染初始优先级,得到第二应用的第二渲染优先级。
可选的,在确定第一应用的第一渲染优先级,以及确定第二应用的第二渲染优先级之前,还包括:获取第一应用的渲染面积和第二应用的渲染面积;确定第一应用的第一渲染优先级,以及第二应用的第二渲染优先级,包括:当第一应用的渲染面积和第二应用的渲染面积均大于第一预设值时,确定第一应用的第一渲染优先级,以及确定第二应用的第二渲染优先级。
这样,当第一应用的渲染面积和第二应用的渲染面积均大于第一预设值时,确定第一应用的第一渲染优先级和第二应用的第二渲染优先级,根据第一渲染优先级和第二渲染优先级,对第一应用和第二应用进行渲染控制,从而减小系统的渲染负载,提高应用的流畅性。
可选的,在确定第一应用的第一渲染优先级,以及确定第二应用的第二渲染优先级之前,还包括:获取前台运行的应用的窗口信息和/或前台运行的应用的切换信息;根据前台运行的应用的窗口信息和/或前台运行的应用切换信息,确定前台运行的应用包括第一应用和第二应用。
这样,可以根据前台运行的应用的窗口信息和/或前台运行的应用切换信息,确定前台运行的应用包括第一应用和第二应用。在确定前台运行的应用包括第一应用和第二应用时,比较第一应用的第一渲染优先级和第二应用的第二渲染优先级,进而对第一应用和第二应用进行渲染控制,提高应用的流畅性;在确定前台运行的应用包括第一应用,不包括第二应用时,不需要获取第一应用的第一渲染优先级,从而可以节约系统资源。
第二方面,本申请实施例提出一种图像显示方法,,应用于电子设备,方法包括:显示多任务界面,多任务界面包括第一应用和第二应用;接收用户第一操作;第一操作用于将第一应用切入,以及将第二应用切出;响应于第一操作,以第一频率向第一应用发送垂直同步信号Vsync信号,或者停止向第一应用发送Vsync信号;响应于第一操作,以第二频率向第二应用发送Vsync信号;其中,第一频率小于第二频率;将第一应用中渲染后的图像与第二应用中渲染后的图像进行合成处理,得到目标图像;显示目标图像。
其中,第一操作可以为图12中的点击操作,第一应用可以为图12中的视频应用,第二应用可以为图12中的社交应用。
这样,对于切入应用,以原有频率向其发送Vsync信号,对于切出应用,降低其Vsync信号的发送频率,或者停止向其发送Vsync信号,从而使得切入应用可以有充足的渲染资源,提高切入应用的流畅性。
第三方面,本申请实施例提出一种图像显示方法,,应用于电子设备,方法包括:显示第一界面,第一界面包括第一应用;接收用户用于将第一应用以及第二应用分屏显示的第二操作;响应于第二操作,在第一窗口中显示第一应用,以及在第二窗口中显示第二应用;接收到对第二窗口中的第二应用的第三操作;响应于第三操作,以第一频率向第一应用发送Vsync信号,或者停止向第一应用发送Vsync信号;响应于第二操作,以第二频率向第二应用发送Vsync信号;其中,第一频率小于第二频率;将第一应用中渲染后图像与第二应用中渲染后的图像进行合成处理,得到目标图像;显示目标图像。
其中,第一应用可以为如图14所示的word应用,第二应用可以为如图14所示的ppt应用,第一窗口可以为word应用应的窗口,第二窗口可以为ppt应用对应的窗口,第三操作可以为用户在第二窗口对应的ppt应用中制作ppt的操作。
这样,对于焦点窗口中的应用,以原有频率向其发送Vsync信号,对于非焦点窗口中的应用,降低其Vsync信号的发送频率,或者停止向其发送Vsync信号,从而使得焦点窗口中的应用可以有充足的渲染资源,提高焦点窗口中的应用的流畅性。
第四方面,本申请实施例提出一种图像显示方法,,应用于电子设备,方法包括:全屏显示第一应用;接收到用于触发第二应用的第四操作;响应于第四操作,全屏显示第二应用,以及在第二应用上以悬浮窗显示第一应用;接收到对第二应用的第五操作;响应于第五操作,以第一频率向第一应用发送垂直同步信号Vsync信号,或者停止向第一应用发送Vsync信号;响应于第五操作,以第二频率向第二应用发送Vsync信号;其中,第一频率小于第二频率;将第一应用中渲染后的图像与第二应用中渲染后的图像进行合成处理,得到目标图像;显示目标图像。
其中,第一应用可以为如图15中的a所示的视频应用,第二应用可以为如图15中的b所示的社交应用,第四操作可以为如图15中的a所示的点击社交应用的消息提醒的操作,第五操作可以为如图15中的b所示的回复消息的操作。
这样,对于焦点窗口中的应用,以原有频率向其发送Vsync信号,对于非焦点窗口中的应用,降低其Vsync信号的发送频率,或者停止向其发送Vsync信号,从而使得焦点窗口中的应用可以有充足的渲染资源,提高焦点窗口中的应用的流畅性。
第五方面,本申请实施例提出一种图像显示方法,,应用于电子设备,方法包括:接收用户从第一应用返回到桌面应用的第六操作;响应于第六操作,停止向第一应用发送Vsync信号,以第一频率向第一应用发送垂直同步信号Vsync信号,或者停止向第一应用发送Vsync信号;响应于第六操作,以第二频率向第二应用发送Vsync信号;其中,第一频率小于第二频率;将第一应用中渲染后的图像与桌面应用中渲染后的图像进行合成处理,得到目标图像;显示目标图像。
其中,第一应用可以为如图13中的a所示的社交应用,第二应用可以为如图13中的b所示的桌面用,第六操作可以为如图13中的a所示的上划返回桌面的操作。
这样,对于切入应用,以原有频率向其发送Vsync信号,对于切出应用,降低其Vsync信号的发送频率,或者停止向其发送Vsync信号,从而使得切入应用可以有充足的渲染资 源,提高切入应用的流畅性。
第六方面,本申请实施例提供一种电子设备,该电子设备包括:触摸屏,其中,触摸屏包括触控面板和显示屏;一个或多个处理器;存储器;多个应用程序;以及一个或多个计算机程序,其中一个或多个计算机程序被存储在存储器中,一个或多个计算机程序包括指令,当指令被电子设备执行时,使得电子设备执行以下步骤:根据第一应用的第一初始渲染优先级、第一应用是否对应焦点窗口和/或第一应用的应用切换类型,确定第一应用的第一渲染优先级;其中,第一渲染初始优先级与第一应用的应用类型和/或第一应用的渲染负载有关,应用切换类型包括切出应用或切入应用;根据第二应用的第二初始渲染优先级、第二应用是否对应焦点窗口和/或第二应用的应用切换类型,确定第二应用的第二渲染优先级,其中,第二渲染初始优先级与第二应用的应用类型和/或第二应用待显示界面的渲染负载有关;其中,第一应用和第二应用为电子设备处于前台运行的应用;当第一渲染优先级低于第二渲染优先级时,以第一频率向第一应用发送垂直同步信号Vsync信号,或者停止向第一应用发送Vsync信号;以及以第二频率向第二应用发送Vsync信号;其中,第一频率小于第二频率;将第一应用中渲染后的图像与第二应用中渲染后的图像进行合成处理,得到目标图像;显示目标图像。
第七方面,本申请实施例提供一种电子设备,该电子设备包括:触摸屏,其中,触摸屏包括触控面板和显示屏;一个或多个处理器;存储器;多个应用程序;以及一个或多个计算机程序,其中一个或多个计算机程序被存储在存储器中,一个或多个计算机程序包括指令,当指令被电子设备执行时,使得电子设备执行以下步骤:显示多任务界面,多任务界面包括第一应用和第二应用;接收用户第一操作;第一操作用于将第一应用切入,以及将第二应用切出;响应于第一操作,以第一频率向第一应用发送垂直同步信号Vsync信号,或者停止向第一应用发送Vsync信号;响应于第一操作,以第二频率向第二应用发送Vsync信号;其中,第一频率小于第二频率;将第一应用中渲染后的图像与第二应用中渲染后的图像进行合成处理,得到目标图像;显示目标图像。
第八方面,本申请实施例提供一种电子设备,该电子设备包括:触摸屏,其中,触摸屏包括触控面板和显示屏;一个或多个处理器;存储器;多个应用程序;以及一个或多个计算机程序,其中一个或多个计算机程序被存储在存储器中,一个或多个计算机程序包括指令,当指令被电子设备执行时,使得电子设备执行以下步骤:显示第一界面,第一界面包括第一应用;接收用户用于将第一应用以及第二应用分屏显示的第二操作;响应于第二操作,在第一窗口中显示第一应用,以及在第二窗口中显示第二应用;接收到对第二窗口中的第二应用的第三操作;响应于第三操作,以第一频率向第一应用发送垂直同步信号Vsync信号,或者停止向第一应用发送Vsync信号;响应于第二操作,以第二频率向第二应用发送Vsync信号;其中,第一频率小于第二频率;将第一应用中渲染后图像与第二应用中渲染后的图像进行合成处理,得到目标图像;显示目标图像。
第九方面,本申请实施例提供一种电子设备,该电子设备包括:触摸屏,其中,触摸屏包括触控面板和显示屏;一个或多个处理器;存储器;多个应用程序;以及一个或多个计算机程序,其中一个或多个计算机程序被存储在存储器中,一个或多个计算机程序包括指令,当指令被电子设备执行时,使得电子设备执行以下步骤:全屏显示第一应用;接收到用于触发第二应用的第四操作;响应于第四操作,全屏显示第二应用,以及在第二应用 上以悬浮窗显示第一应用;接收到对第二应用的第五操作;响应于第五操作,以第一频率向第一应用发送垂直同步信号Vsync信号,或者停止向第一应用发送Vsync信号;响应于第五操作,以第二频率向第二应用发送Vsync信号;其中,第一频率小于第二频率;将第一应用中渲染后的图像与第二应用中渲染后的图像进行合成处理,得到目标图像;显示目标图像。
第十方面,本申请实施例提供一种电子设备,该电子设备包括:触摸屏,其中,触摸屏包括触控面板和显示屏;一个或多个处理器;存储器;多个应用程序;以及一个或多个计算机程序,其中一个或多个计算机程序被存储在存储器中,一个或多个计算机程序包括指令,当指令被电子设备执行时,使得电子设备执行以下步骤:接收用户从第一应用返回到桌面应用的第六操作;响应于第六操作,停止向第一应用发送Vsync信号,以第一频率向第一应用发送垂直同步信号Vsync信号,或者停止向第一应用发送Vsync信号;响应于第六操作,以第二频率向第二应用发送Vsync信号;其中,第一频率小于第二频率;将第一应用中渲染后的图像与桌面应用中渲染后的图像进行合成处理,得到目标图像;显示目标图像。
第十一方面,本申请实施例提供一种电子设备,包括:处理器和存储器,处理器用于调用存储器中的程序以使电子设备执行上述第一方面、第二方面、第三方面、第四方面或第五方面所提供的方法。
第十二方面,本申请实施例提供一种计算机可读存储介质,计算机可读存储介质存储有计算机指令,当计算机指令在电子设备上运行时,使得电子设备执行上述第一方面、第二方面、第三方面、第四方面或第五方面所提供的方法。
第十三方面,本申请实施例提供一种计算机程序产品,该计算机程序产品包括计算机程序,当计算机程序被运行时,使得计算机执行上述第一方面、第二方面、第三方面、第四方面或第五方面所提供的方法。
上述第六方面至第十三方面的各可能的实现方式,其有益效果可以参见上述第一方面所带来的有益效果,在此不加赘述。
附图说明
图1为本申请实施例所提供的终端设备的结构示意图;
图2为本申请实施例所提供的终端设备的软件结构框图;
图3为本申请实施例所提供的一种模块交互示意图;
图4为本申请实施例所提供的一种模块交互示意图;
图5为本申请实施例所提供的一种电子设备界面显示处理流程的示意图;
图6为本申请实施例所提供的一种电子设备界面显示处理流程的示意图;
图7为本申请实施例所提供的一种电子设备界面显示处理流程的示意图;
图8为本申请实施例所提供的一种电子设备界面显示处理流程的示意图;
图9为本申请实施例所提供的一种图像显示方法流程示意图;
图10a为本申请实施例所提供的一种对前台应用的渲染控制示意图;
图10b为本申请实施例所提供的一种电子设备界面显示处理流程的示意图;
图11a为本申请实施例所提供的一种对前台应用的渲染控制示意图;
图11b为本申请实施例所提供的一种电子设备界面显示处理流程的示意图;
图12为本申请实施例所提供的一种图像显示方法适用的第一种场景示意图;
图13为本申请实施例所提供的一种图像显示方法适用的第二种场景示意图;
图14为本申请实施例所提供的一种图像显示方法适用的第三种场景示意图;
图15为本申请实施例所提供的一种图像显示方法适用的第四种场景示意图;
图16为本申请实施例提供的一种图像显示方法流程示意图;
图17为本申请实施例提供的一种图像显示装置的结构示意图;
图18为本申请实施例提供的一种图像显示装置的硬件结构示意图。
具体实施方式
为了便于清楚描述本申请实施例的技术方案,以下,对本申请实施例中所涉及的部分术语和技术进行简单介绍:
1)系统应用:为解决各种实际问题和提高用户体验,某种电子设备的生产商开发出来的应用程序。例如,系统应用可以为系统桌面、系统图库等。
2)第三方应用:除电子设备的生产商开发出来的应用程序以外,也有其他个人或者公司针对某种电子设备开发出来的应用程序,称为第三方应用。例如,第三方应用可以为微信、今日头条等。
3)帧:是指界面显示中最小单位的单幅画面。一帧可以理解为一副静止的画面,快速连续地显示多个相连的帧可以形成物体运动的假象。
4)帧率:是指在1秒钟可产生的图像的数量,单位为帧/秒(frame per second,fps)。
5)刷新率:是指在1秒钟时间里刷新图片的帧数,也可以理解为电子设备中图形处理器每秒钟刷新画面的次数。高的帧率可以得到更流畅和更逼真的动画。每秒钟帧数越多,所显示的动作就会越流畅。单位为赫兹(hertz,Hz)。
需要说明的是,界面显示帧前通常需要经过绘制、渲染、合成等过程。
6)帧绘制:是指显示界面的图片绘制。显示界面可以由一个或多个视图组成,各个视图可以由视图系统的可视控件绘制,各个视图由子视图组成,一个子视图对应视图中的一个小部件,例如,其中的一个子视图对应图片视图中的一个符号。
7)帧渲染:是将绘制后的视图进行着色操作或增加3D效果等。例如:3D效果可以是灯光效果、阴影效果和纹理效果等。
8)帧合成:是将多个上述一个或多个渲染后的视图合成为显示界面的过程。
9)其他术语
在本申请的实施例中,采用了“第一”、“第二”等字样对功能和作用基本相同的相同项或相似项进行区分。例如,第一芯片和第二芯片仅仅是为了区分不同的芯片,并不对其先后顺序进行限定。本领域技术人员可以理解“第一”、“第二”等字样并不对数量和执行次序进行限定,并且“第一”、“第二”等字样也并不限定一定不同。
需要说明的是,本申请实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其他实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。
本申请实施例中,“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项(个)”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b,或c中的至少一项(个),可以表示:a,b,c,a-b,a-c,b-c,或a-b-c,其中a,b,c可以是单个,也可以是多个。
随着科技的发展,电子设备的显示功能越来越多样化。例如,越来越多的电子设备支持多个前台应用,多个前台应用的场景包括应用切换、悬浮窗显示或分屏显示等场景。同时,应用开发者也会迭代出更多的应用特性,例如,视频应用的画中画特性等。
当电子设备的前台为多应用时,会出现多渲染任务并行工作的情况,给中央处理器(central processing unit,CPU)和图形处理器(graphics processing unit,GPU)等硬件带来很大挑战。由于资源是有限的,当各前台应用按照既定渲染管线工作时,互相争抢资源的情况就会频繁发生,前台应用可能无法按照预期在Vsync周期内完成渲染和/或合成工作,导致应用界面的卡顿,影响用户体验。
有鉴于此,本申请实施例提供的图像显示方法,当出现多前台应用的情况时,电子设备会根据各前台应用的渲染优先级进行渲染控制,降低系统的整体负载,提高应用界面的流畅性,从而提升用户体验。
本申请实施例提供的图像显示方法,可以应用于支持多前台应用的电子设备中。
电子设备包括终端设备,终端设备也可以称为终端(terminal)、用户设备(user equipment,UE)、移动台(mobile station,MS)、移动终端(mobile terminal,MT)等。终端设备可以是手机(mobile phone)、智能电视、穿戴式设备、平板电脑(Pad)、带无线收发功能的电脑、虚拟现实(virtual reality,VR)终端设备、增强现实(augmented reality,AR)终端设备、工业控制(industrial control)中的无线终端、无人驾驶(self-driving)中的无线终端、远程手术(remote medical surgery)中的无线终端、智能电网(smart grid)中的无线终端、运输安全(transportation safety)中的无线终端、智慧城市(smart city)中的无线终端、智慧家庭(smart home)中的无线终端等等。本申请的实施例对电子设备所采用的具体技术和具体设备形态不做限定。为了能够更好地理解本申请实施例,下面对本申请实施例的电子设备的结构进行介绍:
图1示出了电子设备100的结构示意图。电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。
可以理解的是,本申请实施例示意的结构并不构成对电子设备100的具体限定。在本 申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processingunit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从存储器中调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuitsound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purposeinput/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。
可以理解的是,本申请实施例示意的各模块间的接口连接关系,是示意性说明,并不构成对电子设备100的结构限定。在本申请另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过电子设备100的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备100供电。
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。
电子设备100通过图形处理器(graphics processing unit,GPU),显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏194用于显示图像、显示视频和接收滑动操作等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emittingdiode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体 (active-matrixorganic light emitting diod,AMOLED),柔性发光二极管(flex light-emittingdiode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot lightemitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。
内部存储器121可以用于存储计算机可执行程序代码,可执行程序代码包括指令。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器110通过运行存储在内部存储器121的指令,和/或存储在设置于处理器中的存储器的指令,执行电子设备100的各种功能应用以及数据处理。
电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。
电子设备100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构,等。本申请实施例以分层架构的Android系统为例,示例性说明电子设备100的软件结构。图2是本申请实施例的电子设备的软件结构框图。分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为五层,从上至下分别为应用层、应用程序框架层、安卓运行时(Android runtime)和系统库以及内核层。
应用层可以包括一系列应用程序包。如图2所示,应用程序包可以包括桌面启动器Launcher、系统用户界面SystemUI、电话、相机、日历、微信等应用程序。
应用程序框架层为应用层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。
如图2所示,应用程序框架层可以包括系统服务器、渲染编排器、图形系统、视图系统等,其中,系统服务器可以包括窗口管理器、包管理器、活动管理器、输入系统等。
图形系统用于管理各个应用程序的图形数据,包括帧缓存、图形绘制管线等。
窗口管理器(window manager service,WMS)用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。
包管理器用于系统内的程序管理,例如:应用程序安装、卸载和升级等。
活动管理器(activity manager service,AMS)是Android的核心服务,主要负责系统中多个重要组件启动、切换、调度及应用进程的管理和调度工作,跟踪与管理前台应用的切换。
输入系统用于输入事件的处理,例如,接收用户的触控操作。
渲染编排器用于给应用程序提供统一的逻辑更新以及回调处理机制,以及负责请求与接收APP-Vsync信号,为应用程序提供一个稳定的运行机制。
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。
Android runtime包括核心库和虚拟机。Android runtime负责安卓系统的调度和管理。
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。
应用层和应用程序框架层运行在虚拟机中。虚拟机将应用层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。
系统库可以包括多个功能模块。例如:表面管理器(surface manager)、三维图形处理库(例如:OpenGL ES)、图形合成模块、合成器客户端、图形渲染管理模块等。
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。
三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。
图形合成模块包括连接管理器、信号模拟器、图形合成器和合成控制器等。
连接管理器用于在应用程序启动时,建立应用程序与图形合成模块之间的连接,接收与应用程序相关的图层信息,并向应用程序发送Vsync信号。
信号模拟器用于基于硬件Vsync信号调制软件Vsync信号。
图形合成器用于将是将一个或多个渲染后的视图合成为显示界面,例如,在多窗口显示时,将多个窗口的画面在渲染后进行合成处理。
合成器客户端用于图形合成器对外功能接口封装,包括图层创建、销毁、重排、事件下发、渲染控制等。
图形渲染管理模块负责对系统中应用程序的渲染状态进行记录管理,并根据渲染控制策略对各应用程序进行渲染控制。
硬件抽象层,可以包含多个库模块,库模块如可以为硬件配置模块(hwcomposer,HWC)、摄像头库模块等。Android系统可以为设备硬件加载相应的库模块,进而实现应用程序框架层访问设备硬件的目的。
内核层是硬件和软件之间的层。内核层用于驱动硬件,使得硬件工作。内核层至少包含中央处理器驱动、传感器驱动、显示驱动、音频驱动、摄像头驱动、背光驱动和图形处理器驱动等。
硬件可以是音频设备、蓝牙设备、LCD屏幕、摄像头等。
下面对电子设备100的显示流程进行说明。
以微信应用中的界面显示为例,微信应用通过应用程序框架层的视图系统,调用系统库中图像绘制模块对图像进行绘制,以及调用图像渲染模块对绘制后的图像进行渲染。微信应用将渲染后的图像发送至图形合成模块中。图形合成模块调用系统库中图像合成模块将渲染后的图像合成。图形合成模块将合成后的图像发送至硬件抽象层的HWC。HWC将 合成后的图像发送至内核层的LCD/LED驱动。LCD/LED驱动驱动屏幕刷新显示图像。
需要说明的是,为了保证显示的流畅性,避免出现显示卡顿等现象,电子设备一般基于Vsync信号进行显示,以对图像的绘制、渲染、合成和屏幕刷新显示等流程进行同步。
可以理解,Vsync信号为周期性信号,Vsync周期可以根据屏幕刷新帧率进行设置,例如,屏幕刷新帧率为60Hz时,Vsync周期可以为16.6ms,即电子设备每间隔16.6ms生成一个控制信号使Vsync周期触发。
示例性的,本申请实施例提供的图像显示方法涉及到的模块可以包括应用程序、图形合成模块、图形渲染管理模块、系统服务器和渲染编排器,图3和图4为各个模块的交互图。如图3和图4所示,系统服务器可以包括窗口管理器和活动管理器,图形渲染管理模块可以包括渲染负载管理器和渲染控制器,图形合成模块可以包括连接管理器、信号模拟器和合成控制器。
应用接收并响应于预设操作,通过连接管理器与图形合成模块建立Vsync信号的传递通道。其中,预设操作用于指示打开应用或者切换应用。
系统服务器监听到前台应用的变化,将前台应用的窗口信息记录于窗口管理器中,将前台应用的活动信息记录于活动管理器中,并将前台应用的窗口信息和前台应用的活动信息发送给渲染负载管理器。其中,前台应用的变化包括增加前台应用或切换前台应用等。
前台应用创建渲染线程,将渲染属性信息发送给渲染负载管理器,同时,注册渲染回调函数到渲染编排器中。其中,渲染属性信息包括渲染初始优先级等信息。
渲染控制器从渲染负载管理器中获取前台应用的窗口信息和前台应用的活动信息,根据前台应用的窗口信息和前台应用的活动信息,确定前台应用的数量。
需要说明的是,渲染负载管理器和渲染控制器之间存在通信连接。
当前台应用的数量大于1时,渲染控制器从渲染负载管理器中获取渲染初始优先级,根据前台应用的窗口信息、前台应用的活动信息以及渲染初始优先级,确定各个前台应用的渲染优先级,得到多个前台应用的渲染控制策略,并将渲染控制策略发送给合成控制器。
信号模拟器从合成控制器中获取渲染控制策略,根据渲染控制策略并基于建立的Vsync信号传递通道,向多个前台应用发送对应的Vsync信号。其中,该Vsync信号可以为软件Vsync信号(例如,APP-Vsync),软件Vsync信号为信号模拟器基于硬件Vsync信号调制的Vsync信号。
可以理解的是,当电子设备为LCD/LED屏幕时,硬件Vsync信号为LCD/LED驱动产生的HW-Vsync信号,LCD/LED驱动通过HWC将HW-Vsync信号发送至图形合成模块,图形合成模块中的信号模拟器基于硬件Vsync信号调制出软件Vsync信号。
需要说明的是,连接管理器、信号模拟器和合成控制器之间存在通信连接。
多个前台应用根据对应的Vsync信号,调用渲染编排器中的渲染回调函数,进行渲染操作。
例如,当有三个前台应用(例如,应用1、应用2和应用3)时,且应用1、应用2和应用3的渲染优先级相同,可以参照图3中的渲染控制方法,该渲染控制方法可以为向各个前台应用正常发送APP-Vsync信号,应用1、应用2和应用3在接收到APP-Vsync信号后,均可以根据该APP-Vsync信号进行渲染。
又例如,当应用1、应用2和应用3的渲染优先级不相同,且应用1的渲染优先级高 于应用2和应用3的渲染优先级时,各个模块的交互图如图4所示,该渲染控制方法可以为向应用1正常发送APP-Vsync信号,停止向应用2和应用3发送APP-Vsync信号。具体的,应用1在接收到APP-Vsync信号后,可以根据该APP-Vsync信号进行渲染;而应用2和应用3在接收不到APP-Vsync信号后,显示界面不再进行刷新。
下面对可能的实现中Vsync的产生和同步过程进行说明。
需要说明的是,电子设备中的Vsync信号可以分为软件Vsync信号和硬件Vsync信号。软件Vsync信号包括APP-Vsync信号和SF-Vsync信号。其中,APP-Vsync信号用于触发绘制渲染流程,SF-Vsync信号用于触发合成流程。硬件Vsync信号(HW-Vsync信号)用于触发屏幕显示刷新流程。
通常情况下,软件Vsync信号和硬件Vsync信号保持周期同步。以60Hz和120Hz变化为例,若HW-Vsync信号从60Hz切换到120Hz,APP-Vsync信号和SF-Vsync信号同步变化,从60Hz切换到120Hz。
示例性的,应用向图形合成模块发送Vsync请求,图形合成模块向HWC发送HW-Vsync请求,HWC向LCD/LED驱动发送HW-Vsync请求,LCD/LED驱动产生HW-Vsync信号,将HW-Vsync信号反馈至HWC,HWC将HW-Vsync信号反馈至图形合成模块,图形合成模块将HW-Vsync信号发送至应用。
应用根据接收到的HW-Vsync信号对图像进行绘制和渲染;图形合成模块根据HW-Vsync信号进行图像合成;HWC根据HW-Vsync信号通过内核层的LCD/LED驱动控制LCD/LED屏幕刷新显示图像。
由于LCD/LED驱动产生HW-Vsync信号并将HW-Vsync信号反馈至HWC时,电子设备功耗较大。为降低功耗,图形合成模块可以产生软件Vsync信号控制图像的绘制、渲染和合成等流程。
具体的,图形合成模块在收到HWC反馈的HW-Vsync信号后,会收集HW-Vsync信号的时间戳。当图形合成模块连续多次收到HW-Vsync信号后,图形合成模块根据记录的HW-Vsync信号的周期产生软件Vsync信号,并将软件Vsync信号发送至应用中同步对图像的绘制、渲染和合成等流程。
为了便于理解,示例的给出电子设备的显示流程以供参考。
图5为可能的实现中一种电子设备界面显示处理流程的示意图。示例性的,按照时间顺序,电子设备显示的内容依次对应于帧1、帧2、帧3、帧4和帧5。
可以理解的是,当屏幕刷新率为120Hz时,Vsync周期为8.3ms,当屏幕刷新率为60Hz时,Vsync周期为16.6ms,等等,在本申请实施例中对屏幕刷新率和Vsync周期的具体值不做具体的限定。
具体的,当应用1进行渲染时,以帧2为例,电子设备的应用通过应用程序框架层的视图系统,对帧2进行渲染。帧2渲染完成后,电子设备的应用将渲染好的帧2发送至图形合成模块(例如,surfaceflinger),图形合成模块对渲染好的帧2进行合成。帧1完成合成后,电子设备可以通过调用内核层启动显示驱动在屏幕上显示帧2对应的内容。帧3和帧4类似于帧2的过程也进行合成和显示,此处不再赘述。
如图5所示,在5个Vsync周期中,应用1的界面依次显示为帧1、帧2、帧3和帧4,界面变化连续流畅,没有卡顿。
需要说明的是,应用绘制渲染图像的时长以及合成图像的时长与电子设备的系统负载等状态相关。当渲染管线中的每一步工作,包括绘制、渲染和合成等操作,可以在固定的Vsync周期内完成时,电子设备的显示界面变化流畅。当系统负载较大(例如,两个应用同时进行渲染)时,应用绘制渲染图像的时长和/或合成图像的时长增加,可能造成某一帧图像不能及时送显,就会出现丢帧的情况,导致电子设备显示的卡顿,降低用户体验。
示例性的,当应用1和应用2同时进行渲染时,以应用2渲染超时为例,图6为可能的实现中一种电子设备界面显示处理流程的示意图。电子设备对图6中的帧2、帧3和帧4分别进行渲染、合成和显示,具体可以参照图5对应的描述。
与图5不同的是,应用1和应用2同时在前台运行,由于资源供给不足等原因导致应用2的帧3在渲染时耗时增加,不能在Vsync周期内完成渲染。在合成帧3时,应用1的帧3可以正常参与合成工作,应用2的帧3由于渲染超时,无法正常参与帧3的合成,则使得在合成帧3时,应用2中的帧2参与到帧3的合成中,导致电子设备在显示时,应用1的界面依次显示为帧1、帧2、帧3和帧4,而应用2的界面依次显示为帧1、帧2、帧2和帧3,应用2中的帧2的显示时长增加,导致应用2显示的卡顿,降低用户体验。
需要说明的是,应用的渲染线程包括在CPU中的渲染运算和在GPU中的渲染,其中,渲染运算会去做一些事件的处理,具体包括:响应于该事件,调用DoFrame函数对应用界面进行布局,并将界面的各种属性信息通过渲染指令发送给GPU,GPU根据该渲染指令去执行具体的渲染操作。
示例性的,当应用1和应用2同时进行渲染时,以合成超时为例,图7为可能的实现中一种电子设备界面显示处理流程的示意图。电子设备对图7中的帧2、帧3和帧4分别进行渲染、合成和显示,具体可以参照图5对应的描述。
与图5不同的是,应用1和应用2同时在前台运行,由于资源供给不足等原因导致帧3在合成时耗时增加,不能在Vsync周期内完成合成,导致电子设备在显示时,应用1的界面依次显示为帧1、帧2、帧2和帧3,应用2的界面依次显示为帧1、帧2、帧2和帧3,应用1和应用2中的帧2的显示时长均增加,导致应用1和应用2显示的卡顿,降低用户体验。
示例性的,以渲染和合成均超时为例,图8为可能的实现中一种电子设备界面显示处理流程的示意图。按照时间顺序,电子设备显示的内容依次对应于帧1、帧2、帧3、帧4和帧5。电子设备对图8中的帧2、帧3和帧4分别进行渲染、合成和显示,具体可以参照图5对应的描述。
与图5不同的是,应用1和应用2同时在前台运行,由于资源供给不足等原因导致应用2中的帧3在渲染耗时增加,以及由于资源供给不足等原因导致帧3在合成时耗时增加,不能在Vsync周期内完成渲染,也不能在Vsync周期内完成合成。因此,导致电子设备在显示时,应用1的界面依次显示为帧1、帧2、帧2和帧3,而应用2的界面依次显示为帧1、帧2、帧2和帧2,应用1和应用2中的帧2的显示时长均增加,导致应用1和应用2显示的卡顿,降低用户体验。
通过图5-图8可以看出,当多个应用同时进行渲染时,可能会出现渲染负载较大的情况,应用可能无法按照预期在Vsync周期内完成渲染和/或合成工作,导致应用界面的卡顿,影响用户体验。
下面通过具体的实施例对本申请实施例的图像显示方法进行详细说明。下面的实施例可以相互结合或独立实施,对于相同或相似的概念或过程可能在某些实施例中不再赘述。
图9为本申请实施例提供的一种图像显示方法流程示意图。图9所示的方法可以由图1所示的电子设备100执行,如图9所示,该方法包括:
S901、应用接收并响应于预设操作,系统服务器监听到前台应用的变化,将前台应用的窗口信息和前台应用的活动信息记录于系统服务器中,并将该前台应用的窗口信息和该前台应用的活动信息发送给图形渲染管理模块。
其中,预设操作用于指示打开应用或者切换应用。
在本申请实施例中,前台应用可以理解为在终端设备的桌面任务栏上可见正在运行的应用,例如,正在运行的游戏应用。
在本申请实施例中,窗口信息可以理解为每个应用在运行的过程中存在对应的窗口界面,每个窗口界面都有各自对应的信息和数据,这些信息和数据可以包括窗口大小、窗口位置和窗口布局等属性信息。例如,微信在运行的过程中存在对应的微信窗口界面,微信窗口信息可以包括各个按钮的位置、对话框的大小等信息。
在本申请实施例中,活动信息可以理解为在终端设备的应用启动或前台应用发生切换时,会生成信息存储在活动管理器中,以便于跟踪与管理前台应用的切换。例如,当前台应用由社交应用切换为游戏应用时,会生成活动信息,并记录于活动管理器中。
在本申请实施例中,系统服务器包括窗口管理器和活动管理器,前台应用的窗口信息记录于窗口管理器中,前台应用的活动信息记录于活动管理器中。图形渲染管理模块包括渲染负载管理器,图形渲染管理模块将获取到的信息记录在渲染负载管理器中,其中,系统服务器将前台应用的窗口信息和前台应用的活动信息发送给图形渲染管理模块后,存储在渲染负载管理器中。
示例性的,当应用接收到用于指示打开应用或者切换应用的预设操作时,系统服务器会监听到前台应用的变化,生成窗口信息和活动信息。
例如,电子设备上已预先启动社交应用和游戏应用,社交应用运行在前台,游戏应用运行在后台,当用户将电子设备的前台应用从社交应用切换到游戏应用时,前台应用发生切换,会生成窗口信息和活动信息。
S902、前台应用基于创建的渲染线程,将渲染属性信息发送给图形渲染管理模块。其中,渲染属性信息包括渲染初始优先级等信息。
在本申请实施例中,前台应用将渲染属性信息发送给图形渲染管理模块后,也存储在渲染负载管理器中。
在本申请实施例中,不同的应用可以具有不同的渲染初始优先级。示例性的,可以将渲染初始优先级分为高-中-低,例如,可以按照从高到低的顺序将渲染初始优先级设置为0-2,渲染初始优先级为高时对应0,渲染初始优先级为中时对应1,渲染初始优先级为低时对应2。当然,也可以按照从低到高的顺序将渲染初始优先级设置为0-2,渲染初始优先级为高时对应2,渲染初始优先级为中时对应1,渲染初始优先级为低时对应0。在本申请实施例中,对渲染初始优先级的划分不做具体的限定。
一种可能的实现中,可以根据应用的应用类型来设置渲染初始优先级。具体的,可以将系统应用的渲染初始优先级设置的高于第三方应用的渲染初始优先级。例如,系统应用 可以包括桌面启动器、系统用户界面等,第三方应用可以包括微信、今日头条等。
又一种可能的实现中,可以根据应用的渲染负载来设置渲染初始优先级。具体的,可以将渲染负载大的应用的渲染初始优先级设置的高于渲染负载小的应用的渲染初始优先级。例如,游戏应用的渲染负载大于社交应用的渲染负载,设置游戏应用的渲染初始优先级高于社交应用的渲染初始优先级。
另一种可能的实现中,可以根据应用的应用类型和应用的渲染负载来设置渲染初始优先级。具体的,当多个应用的应用类型相同时,可以根据应用的渲染负载来设置渲染初始优先级,将渲染负载大的应用的渲染初始优先级设置的高于渲染负载小的应用的渲染初始优先级。例如,当两个前台应用分别为第三方游戏应用和第三方社交应用时,当第三方游戏应用的渲染负载大于第三方社交应用的渲染负载时,设置第三方游戏应用的渲染初始优先级高于第三方社交应用的渲染初始优先级。
示例性的,前台应用在进行渲染之前,会创建渲染线程,并将渲染线程中的渲染初始优先级等渲染属性信息发送给渲染负载管理器。
S903、图形渲染管理模块可以根据前台应用的窗口信息和前台应用的活动信息,确定前台应用的数量。
示例性的,图形渲染管理模块可以根据前台应用的窗口信息和前台应用的活动信息,来判断前台应用是否发生了变化,例如,前台应用的切换或者增加等,并根据前台应用的窗口信息和前台应用的活动信息,得到哪些应用位于前台,从而确定前台应用的数量。
可以理解的是,本申请实施例也可以采用其它任意方式确定前台应用的数量,本申请实施例不作具体限定。
S904、当前台应用的数量大于1时,图形渲染管理模块根据前台应用的窗口信息、前台应用的活动信息以及渲染初始优先级,确定各个前台应用的渲染优先级,得到多个前台应用对应的渲染控制策略,并将该渲染控制策略发送给图形合成模块。
在本申请实施例中,渲染控制器根据存储在渲染负载管理器中的前台应用的窗口信息、前台应用的活动信息以及渲染初始优先级等信息,确定各个前台应用的渲染优先级,得到多个前台应用对应的渲染控制策略。
在本申请实施例中,渲染优先级可以用于对多个前台应用做不同程度的渲染控制。例如,在对多个前台应用进行渲染时,前台应用的渲染优先级越高,给予的计算资源越多,可以提高渲染优先级高的前台应用的流畅性。
示例性的,可以将渲染优先级分为高-中-低,例如,可以按照从高到低的顺序将渲染优先级设置为0-2,渲染优先级为高时对应0,渲染优先级为中时对应1,渲染优先级为低时对应2。当然,也可以按照从低到高的顺序将渲染优先级设置为0-2,渲染优先级为高时对应2,渲染优先级为中时对应1,渲染优先级为低时对应0。
需要说明的是,在本申请实施例中,对渲染优先级的划分不做具体的限定。
一种可能的实现中,图形渲染管理模块根据各个前台应用的渲染优先级,确定多个前台应用对应的渲染控制策略,可以包括:渲染控制器从渲染负载管理器中获取渲染初始优先级,根据前台应用的窗口信息、前台应用的活动信息以及渲染初始优先级,确定各个前台应用的渲染优先级,得到多个前台应用对应的渲染控制策略。
示例性的,窗口信息中还包括前台应用的渲染面积,当前台应用的数量大于1时,根 据各个前台应用的渲染面积,确定是否对各个前台应用进行渲染控制。
具体的,当各个前台应用的渲染面积均不超过一定的阈值时,不对各个前台应用进行渲染控制;当各个前台应用的渲染面积均超过一定的阈值时,对各个前台应用进行渲染控制,根据前台应用的窗口信息、前台应用的活动信息以及渲染初始优先级,确定各个前台应用的渲染优先级,得到多个前台应用的渲染控制策略。
需要说明的是,该阈值可以根据实际情况或者经验进行设置,例如可以设置为屏幕面积的二分之一等,对于该阈值的具体值,本申请实施例在此不做限制。
示例性的,窗口信息中还可以包括各个前台应用对应的窗口的z序,以及各个前台应用对应的窗口是否为焦点窗口,活动信息中包括前台应用的切换信息,渲染控制器可以根据各个前台应用对应的窗口的z序、各个前台应用对应的窗口是否为焦点窗口、前台应用的切换信息和/或前台应用的渲染初始优先级,得到各个前台应用的渲染优先级。
需要说明的是,要保证从后台切换为前台的应用的流畅性,因此,对于将要从前台切换为后台(切出)的应用给予低级别渲染优先级,对于将要从后台切换为前台(切入)的应用给予高级别渲染优先级。
其中,窗口z序可以理解为沿着垂直于屏幕的假想直线相互堆叠在一起窗口顺序。对于窗口z序靠近顶层的应用给予高级别渲染优先级,对于窗口z序靠近底层的应用给予低级别渲染优先级。
对于焦点窗口对应的应用给予高级别渲染优先级,对于非焦点窗口对应的应用给予低级别渲染优先级。其中,焦点窗口可以根据用户的操作来确定,例如,当两个前台应用分屏显示时,用户针对上半屏进行了触控操作,则显示在上半屏中的前台应用为焦点窗口,显示在下半屏的前台应用为非焦点窗口。其中,当用户进行触控操作时,窗口管理器也会收到相应的信息,从而可以根据窗口信息来确定焦点窗口所对应的前台应用。
一种可能的实现中,按照从高到低的顺序将渲染初始优先级设置为0-2,基于各个应用的渲染初始优先级,对于将要切出的应用,渲染优先级加1,对于将要切入的应用,渲染优先级减1;对于窗口z序前移的应用,渲染优先级减1,对于窗口z序后移的应用,渲染优先级加1;对于焦点窗口对应的应用,渲染优先级减1,对于非焦点窗口对应的应用,渲染优先级加1。
在本申请实施例中,渲染控制策略可以与各应用的渲染优先级有关。
例如,渲染控制策略可以根据渲染优先级来确定,比如对渲染优先级较低的前台应用停止发送Vsync信号,或者,对渲染优先级较低的前台应用降低Vsync信号的发送频率,或者,先为对渲染优先级较低的前台应用停止发送Vsync信号,若根据前台应用的窗口信息和前台应用的活动信息,识别到多个前台应用的负载减小到第一阈值时,再调整为对渲染优先级较低的前台应用降低Vsync信号的发送频率。
示例性的,图10a和图11a为两种对前台应用的渲染控制图,其中,图10a为对渲染优先级较低的前台应用停止发送Vsync信号,图11a为对渲染优先级较低的前台应用降低Vsync信号的发送频率。
如图10a所示,在渲染控制时长内,图形合成模块停止向渲染优先级较低的前台应用发送Vsync信号,以及按照原有Vsync周期,正常向渲染优先级较高的前台应用发送Vsync信号。
示例性的,图10b为可能的实现中一种电子设备界面显示处理流程的示意图。如图10b所示,在渲染优先级较低的前台应用对帧1进行渲染后,在第二个Vsync信号到来时,图形合成模块停止向渲染优先级较低的前台应用发送Vsync信号,以及按照原有Vsync周期,正常向渲染优先级较高的前台应用发送Vsync信号,渲染优先级较高的前台应用界面按照原有Vsync周期对帧1、帧2、帧3、帧4以及帧5等进行渲染。
示例性的,在停止向渲染优先级较低的前台应用发送Vsync信号后,在合成的画面中,按照原有Vsync周期对渲染优先级较高的前台应用渲染的帧2、帧3、帧4和帧5等按顺序依次合成显示,以及按照原有Vsync周期对渲染优先级较低的前台应用渲染的最后一帧帧1进行合成显示。合成后的画面仍以帧1、帧2和帧3等顺序依次进行显示。在显示时,渲染优先级较高的前台应用界面按照原有Vsync周期刷新,而渲染优先级较低的前台应用界面停留在渲染控制之前的最后一帧画面。
如图11a所示,在渲染控制时长内,图形合成模块对渲染优先级较低的前台应用降低Vsync信号的发送频率,例如,降低为原有Vsync信号发送频率的二分之一,以及按照原有Vsync周期,正常向渲染优先级较高的前台应用发送Vsync信号。
示例性的,图11b为可能的实现中一种电子设备界面显示处理流程的示意图。如图11b所示,在第一个Vsync信号到来时,图形合成模块将渲染优先级较低的前台应用的Vsync信号发送频率降低为原有Vsync信号发送频率的二分之一,渲染优先级较低的前台应用界面按照降低后的Vsync周期对帧1、帧3、以及帧5等进行渲染,以及按照原有Vsync周期,正常向渲染优先级较高的前台应用发送Vsync信号,渲染优先级较高的前台应用界面按照原有Vsync周期对帧1、帧2、帧3、帧4以及帧5等进行渲染。
示例性的,在停止向渲染优先级较低的前台应用发送Vsync信号后,在合成的画面中,按照原有Vsync周期对渲染优先级较高的前台应用渲染的帧2、帧3、帧4和帧5等按顺序依次合成显示,以及按照降低后的Vsync周期对渲染优先级较低的前台应用渲染的帧1、帧3和帧5等按顺序依次进行合成显示。合成后的画面仍以帧1、帧2和帧3等顺序依次进行显示。在显示时,渲染优先级较高的前台应用界面按照原有Vsync周期刷新,而渲染优先级较低的前台应用界面渲染频率较低,画面刷新较慢,当渲染优先级较高的前台应用界面刷新2帧时,渲染优先级较低的前台应用界面只能刷新1帧,渲染优先级较低的前台应用界面刷新频率比渲染优先级较高的前台应用界面刷新频率慢二分之一。
示例性的,当前台应用的数量大于1时,图形渲染管理模块得到各个前台应用的渲染优先级,确定多个前台应用对应的渲染控制策略,具体可以为:对于渲染优先级较低的前台应用,停止发送Vsync信号和/或降低Vsync信号的发送频率,直到识别到前台应用的负载或前台应用的数量减小到对应的阈值;对于优先级较高的前台应用,按照原有Vsync周期,正常发送Vsync信号。
S905、图形合成模块根据多个前台应用对应的的渲染控制策略,对各个前台应用进行渲染控制。
其中,图形合成模块包括合成控制器、信号模拟器和连接管理器等。
在本申请实施例中,图形合成模块将渲染控制器发送的渲染控制策略存储在合成控制器中,合成控制器将该渲染控制策略发送给信号模拟器,信号模拟器根据渲染控制策略并基于建立的Vsync信号传递通道,向各个前台应用发送对应的Vsync信号。
其中,Vsync信号传递通道为图形合成模块通过连接管理器,与前台应用之间建立的通道,以使信号模拟器生成的Vsync信号可以发送给前台应用。
一种可能的实现中,当渲染控制方法为对渲染优先级较低的前台应用停止发送Vsync信号时,信号模拟器基于建立的Vsync信号传递通道,在渲染控制时长内,停止向渲染优先级较低的前台应用发送Vsync信号,以及按照原有Vsync周期,正常向优先级较高的前台应用发送Vsync信号。
例如,当前台应用包括应用1和应用2时,应用1的渲染优先级高于应用2的渲染优先级,则信号模拟器停止向应用2发送Vsync信号,应用2在渲染控制时长内,停止渲染,应用2的画面停留在渲染控制之前的最后一帧,以及,按照原有Vsync周期,向应用1发送Vsync信号,应用1可以正常进行渲染。
又一种可能的实现中,当渲染控制方法为对渲染优先级较低的前台应用降低Vsync信号的发送频率时,信号模拟器基于建立的Vsync信号传递通道,在渲染控制时长内,对渲染优先级较低的前台应用降低Vsync信号的发送频率(例如,降低为原有Vsync信号发送频率的二分之一或者三分之一等),以及按照原有Vsync周期,正常向优先级较高的前台应用发送Vsync信号。
例如,当前台应用包括应用1和应用2时,应用1和应用2原有Vsync信号的发送频率均为60Hz,且应用1的渲染优先级高于应用2的渲染优先级,将应用2原有Vsync信号的发送频率降低为30Hz,以及将应用1的发送频率维持为60Hz的发送频率,则在渲染控制时长内,当应用1的画面刷新2帧时,应用2的画面只能刷新1帧,应用2的画面刷新频率比应用1的画面刷新频率慢二分之一。
需要说明的是,在执行渲染控制策略时,前台应用的数量可能减小,和/或,前台应用的负载可能降低,这样,可以再前台应用的数量减少为1个或前台应用的负载小于一定阈值时,停止执行该渲染控制策略。可以理解的是,前台应用的变化情况是不确定的,因此,执行渲染控制策略的渲染控制时长也可以是不确定的。
示例性的,在执行渲染控制策略时,还可以根据前台应用的窗口信息和前台应用的活动信息识别前台应用的数量,当识别到前台应用的数量减少为1个时,可以停止采用渲染控制方法。或者,根据前台应用的窗口信息和前台应用的活动信息识别多个前台应用的负载,当识别到多个前台应用的负载减小到一定的阈值时,可以停止采用渲染控制方法。
本申请实施例提供的图像显示方法,当出现多前台应用的情况时,电子设备会根据各前台应用的渲染优先级进行渲染控制,降低系统的整体负载,提高渲染优先级较高的应用的流畅性,从而提升用户体验。
示例性的,本申请实施例提供的图像显示方法可以应用于多窗口显示的场景中,多窗口显示可以包括前台应用切换过程中的界面显示、分屏显示或悬浮窗显示等。
具体的,当图形渲染管理模块根据各个前台应用的渲染优先级,确定多个前台应用对应的渲染控制策略时,分别从前台应用切换、分屏显示和悬浮窗显示三种场景来说明。
需要说明的是,当各个前台应用的渲染面积满足渲染控制的条件时,触发对各个前台应用的渲染控制;当各个前台应用的渲染面积不满足渲染控制的条件时,各个前台应用按照原有的Vsync信号进行渲染。
其中,多窗口显示的场景可以为前台应用切换的场景,例如,前台应用从第三方应用 或其它系统应用回到桌面、打开第三方应用或其它系统应用、前台应用从第三方应用或其它系统应用换入/换出,等等。
示例性的,当除桌面应用之外的两个应用进行切入/切出时,具体过程包括:电子设备的屏幕上显示多任务界面,多任务界面包括第一应用和第二应用;接收用户第一操作,第一操作用于将第一应用切入,以及将第二应用切出;响应于第一操作,以第一频率向第一应用发送垂直同步信号Vsync信号,或者停止向第一应用发送Vsync信号;响应于第一操作,以第二频率向第二应用发送Vsync信号;其中,第一频率小于第二频率;将第一应用中渲染后的图像与第二应用中渲染后的图像进行合成处理,得到目标图像;显示目标图像。
示例性的,以第一种场景为视频应用和社交应用进行切入/切出为例,图12示出了本申请实施例的图像显示方法适用的第一种场景示意图。
如图12中的a所示,电子设备的屏幕上显示多任务界面,多任务界面包括社交应用和视频应用,接收用户点击社交应用的操作,响应于该操作,将社交应用切入,以及将视频应用切出,得到如图12中的b所示的界面,社交应用显示在屏幕中。
示例性的,基于该社交应用为切入应用,视频应用为切出应用,以第一频率向视频应用发送Vsync信号,或者停止向视频应用发送Vsync信号;响应于该操作,以第二频率向社交应用发送Vsync信号;其中,第一频率小于第二频率;将视频应用中渲染后的图像与社交应用中渲染后的图像进行合成处理,得到目标图像;显示目标图像。
在本申请实施例中,对于切入应用,以原有频率向其发送Vsync信号,对于切出应用,降低其Vsync信号的发送频率,或者停止向其发送Vsync信号,从而使得切入应用可以有充足的渲染资源,提高切入应用的流畅性。
示例性的,当前台应用从第三方应用或其它系统应用回到桌面时,具体过程包括:接收用户从第一应用返回到桌面应用的第六操作;响应于第六操作,停止向第一应用发送Vsync信号,以第一频率向第一应用发送Vsync信号,或者停止向第一应用发送Vsync信号;响应于第六操作,以第二频率向第二应用发送Vsync信号;其中,第一频率小于第二频率;将第一应用中渲染后的图像与桌面应用中渲染后的图像进行合成处理,得到目标图像;显示目标图像。
示例性的,该场景下,各个前台应用的渲染面积满足渲染控制的条件。图13示出了本申请实施例的图像显示方法适用的第二种场景示意图。
如图13中的a和b所示,通过用户的上划操作,响应于该操作,社交应用的显示窗口逐渐减小,直到消失,得到如图13中的c所示的系统桌面,从而电子设备的显示界面从社交界面返回到系统桌面。可以理解的是,该社交应用可以为第三方应用或系统应用。
示例性的,基于该社交应用为切出应用,Launcher为切入应用,以第一频率向社交应用发送Vsync信号,或者停止向视频应用发送Vsync信号;响应于该操作,以第二频率向Launcher发送Vsync信号;其中,第一频率小于第二频率;将社交应用中渲染后的图像与Launcher渲染后的图像进行合成处理,得到目标图像;显示目标图像。
在从社交界面返回到系统桌面的过程中,会出现社交应用和Launcher同时进行渲染的情况,可能会导致系统负载过高,电子设备可以根据社交应用和Launcher的渲染优先级,对社交应用和Launcher进行渲染控制。
在该种场景下,由于对Launcher的渲染对于用户体验来说较为重要,因此Launcher 在窗口z序中位于顶层,当前台应用包括Launcher与其它应用时,在前台应用切换时,Launcher与其它应用对应的窗口z序不发生变化;当前台应用为两个除Launcher以外的其它应用时,在前台应用切换时,换入的应用的z序前移,渲染优先级升高,换出的应用的z序后移,渲染优先级降低。
在该种场景下,换入的应用的渲染优先级升高,换出的应用的渲染优先级降低,从而保证将要在前台显示的应用的流畅性。以及,在该种场景下,用户所触控的窗口可能不是将要换入的应用对应的窗口,因此,不涉及根据是否对应焦点窗口来对应用的渲染优先级进行调整。
例如,电子设备设置的渲染初始优先级从高到低依次为0至2,社交界面的渲染初始优先级和Launcher的渲染初始优先级分别为2和1,在从社交界面返回到系统桌面的过程中,Launcher的渲染优先级在其渲染初始优先级的基础上减1,Launcher的渲染优先级变为0,社交应用的渲染优先级在其渲染初始优先级的基础上加1,社交应用的渲染优先级变为3。以及,Launcher与社交应用对应的窗口z序不发生变化。前台应用与渲染优先级的对应关系可以如表1所示。
表1前台应用与渲染优先级的对应关系
由表1可以看出,通过对社交应用的渲染优先级和Launcher的渲染优先级的调整,社交应用的渲染优先级为3,Launcher的渲染优先级为0,则可以限制对社交应用的渲染,保障对Launcher的渲染,提高Launcher的流畅性。其中,限制对社交应用的渲染可以包括停止向社交应用发送Vsync信号和/或降低Vsync信号的发送频率。
在本申请实施例中,对于切入应用,以原有频率向其发送Vsync信号,对于切出应用,降低其Vsync信号的发送频率,或者停止向其发送Vsync信号,从而使得切入应用可以有充足的渲染资源,提高切入应用的流畅性。
多窗口显示的场景可以为分屏显示的场景。示例性的,屏幕的上半窗口和屏幕的下半窗口分别显示不同的应用。例如,屏幕的上半窗口显示ppt文件,屏幕的下半窗口显示word文档。
示例性的,显示第一界面,第一界面包括第一应用;接收用户用于将第一应用以及第二应用分屏显示的第二操作;响应于第二操作,在第一窗口中显示第一应用,以及在第二窗口中显示第二应用;接收到对第二窗口中的第二应用的第三操作;响应于第三操作,以第一频率向第一应用发送垂直同步信号Vsync信号,或者停止向第一应用发送Vsync信号;响应于第二操作,以第二频率向第二应用发送Vsync信号;其中,第一频率小于第二频率;将第一应用中渲染后图像与第二应用中渲染后的图像进行合成处理,得到目标图像;显示目标图像。
示例性的,该场景下,各个前台应用的渲染面积满足渲染控制的条件。图14示出了本申请实施例的图像显示方法适用的第三种场景示意图。
如图14所示,电子设备的显示界面包括ppt应用和word应用,屏幕的上半窗口显示 ppt文件,屏幕的下半窗口显示word文档,用户根据word文档对ppt文件进行编辑操作,则用户对屏幕的上半窗口进行了触控操作,从而可以确定上半窗口为焦点窗口。
例如,电子设备设置的渲染初始优先级从高到低依次为0至2,word应用的渲染初始优先级和ppt应用的渲染初始优先级均为2,由于ppt应用对应的窗口为焦点窗口,则ppt应用的渲染优先级在其渲染初始优先级的基础上减1,ppt应用的渲染优先级变为1;由于word应用对应的窗口为非焦点窗口,则word应用的渲染优先级在其渲染初始优先级的基础上加1,word应用的渲染优先级变为3。前台应用与渲染优先级的对应关系可以如表2所示。
表2前台应用与渲染优先级的对应关系
由表2可以看出,通过对word应用的渲染优先级和ppt应用的渲染优先级的调整,word应用的渲染优先级为3,ppt应用的渲染优先级为1,则可以限制对word应用的渲染,保障对ppt应用的渲染,提升ppt应用的流畅性。其中,限制对word应用的渲染可以包括停止向word应用发送Vsync信号和/或降低Vsync信号的发送频率。
在本申请实施例中,对于焦点窗口中的应用,以原有频率向其发送Vsync信号,对于非焦点窗口中的应用,降低其Vsync信号的发送频率,或者停止向其发送Vsync信号,从而使得焦点窗口中的应用可以有充足的渲染资源,提高焦点窗口中的应用的流畅性。
多窗口显示的场景可以为悬浮窗显示的场景,例如,视频应用的画中画显示、在桌面显示网页、文件等窗口,等等。
示例性的,全屏显示第一应用;接收到用于触发第二应用的第四操作;响应于第四操作,全屏显示第二应用,以及在第二应用上以悬浮窗显示第一应用;接收到对第二应用的第五操作;响应于第五操作,以第一频率向第一应用发送垂直同步信号Vsync信号,或者停止向第一应用发送Vsync信号;响应于第五操作,以第二频率向第二应用发送Vsync信号;其中,第一频率小于第二频率;将第一应用中渲染后的图像与第二应用中渲染后的图像进行合成处理,得到目标图像;显示目标图像。
以第四种场景为视频应用的画中画显示为例,其中,该场景下,各个前台应用的渲染面积满足渲染控制的条件。图15示出了本申请实施例的图像显示方法适用的第四种场景示意图。
如图15中的a所示,在用户通过视频软件全屏观看视频时,社交应用(例如,微信)弹出一条消息通知,用户通过点击该条消息通知,电子设备的显示界面从全屏显示视频应用的播放界面切换到全屏显示,社交应用的对话框界面以及以悬浮窗的形式显示视频应用的播放界面,得到如图15中的b所示的电子设备的显示界面,包括社交应用和视频应用两个前台应用。
在社交应用和视频应用两个前台应用同时显示时,会出现社交应用和视频应用同时进行渲染的情况,可能会导致系统负载过高,电子设备可以根据社交应用和视频应用的渲染优先级,对社交应用和视频应用进行渲染控制。
需要说明的是,在该种场景下,由于用户从视频应用的全屏显示界面切换到社交应用的对话框,查看消息或回复消息等操作,则用户的关注焦点在社交应用,将社交应用对应的窗口确定为焦点窗口,将视频应用对应的窗口确定为非焦点窗口。
示例性的,基于查看消息或回复消息等操作,可以确定社交应用对应焦点窗口,视频应用对应焦点窗口,以第一频率向视频应用发送Vsync信号,或者停止向视频应用发送Vsync信号;响应于该操作,以第二频率向社交应用发送Vsync信号;其中,第一频率小于第二频率;将视频应用中渲染后的图像与社交应用中渲染后的图像进行合成处理,得到目标图像;显示目标图像。
例如,电子设备设置的渲染初始优先级从高到低依次为0至2,社交界面的渲染初始优先级和视频应用的渲染初始优先级分别为2和1,在社交应用和视频应用两个前台应用同时显示时,社交应用对应的窗口为焦点窗口,则社交应用的渲染优先级在其渲染初始优先级的基础上减1,社交应用的渲染优先级变为1;视频应用对应的窗口为非焦点窗口,则视频应用的渲染优先级在其渲染初始优先级的基础上加1,视频应用的渲染优先级变为2。前台应用与渲染优先级的对应关系可以如表3所示。
表3前台应用与渲染优先级的对应关系
由表1可以看出,通过对社交应用的渲染优先级和视频应用的渲染优先级的调整,社交应用的渲染优先级大于视频应用的渲染优先级,则可以对视频应用的渲染进行限制,以及按照原有的Vsync周期,对社交应用进行渲染,使得用户关注的社交应用的显示界面可以流畅地刷新,提升用户体验。
在本申请实施例中,对于焦点窗口中的应用,以原有频率向其发送Vsync信号,对于非焦点窗口中的应用,降低其Vsync信号的发送频率,或者停止向其发送Vsync信号,从而使得焦点窗口中的应用可以有充足的渲染资源,提高焦点窗口中的应用的流畅性。
示例性的,图16为本申请实施例提供的一种图像显示方法流程示意图。图16所示的方法可以由图1所示的电子设备100执行,如图16所示,该方法包括:
S1601、根据第一应用的第一初始渲染优先级、第一应用是否对应焦点窗口和/或第一应用的应用切换类型,确定第一应用的第一渲染优先级。
其中,第一渲染初始优先级与第一应用的应用类型和/或第一应用的渲染负载有关。
在本申请实施例中,不同的应用可以具有不同的渲染初始优先级。示例性的,可以将渲染初始优先级分为高-中-低,例如,可以按照从高到低的顺序将渲染初始优先级设置为0-2,渲染初始优先级为高时对应0,渲染初始优先级为中时对应1,渲染初始优先级为低时对应2。当然,也可以按照从低到高的顺序将渲染初始优先级设置为0-2,渲染初始优先级为高时对应2,渲染初始优先级为中时对应1,渲染初始优先级为低时对应0。在本申请实施例中,对渲染初始优先级的划分不做具体的限定。
一种可能的实现中,可以根据应用的应用类型来设置渲染初始优先级。具体的,可以将系统应用的渲染初始优先级设置的高于第三方应用的渲染初始优先级。例如,系统应用 可以包括桌面启动器、系统用户界面等,第三方应用可以包括微信、今日头条等。
又一种可能的实现中,可以根据应用的渲染负载来设置渲染初始优先级。具体的,可以将渲染负载大的应用的渲染初始优先级设置的高于渲染负载小的应用的渲染初始优先级。例如,游戏应用的渲染负载大于社交应用的渲染负载,设置游戏应用的渲染初始优先级高于社交应用的渲染初始优先级。
另一种可能的实现中,可以根据应用的应用类型和应用的渲染负载来设置渲染初始优先级。具体的,当多个应用的应用类型相同时,可以根据应用的渲染负载来设置渲染初始优先级,将渲染负载大的应用的渲染初始优先级设置的高于渲染负载小的应用的渲染初始优先级。例如,当两个前台应用分别为第三方游戏应用和第三方社交应用时,当第三方游戏应用的渲染负载大于第三方社交应用的渲染负载时,设置第三方游戏应用的渲染初始优先级高于第三方社交应用的渲染初始优先级。
在本申请实施例中,应用切换类型包括切出应用或切入应用,切入应用可以理解为切入电子设备的前台的应用,切出应用可以理解为切出电子设备的前台,以及切入至电子设备的后台的应用。
示例性的,基于第一应用的第一初始渲染优先级,当第一应用对应的窗口为焦点窗口和/或第一应用的应用切换类型为切入应用时,提高第一应用的第一初始渲染优先级;当第一应用对应的窗口为非焦点窗口和/或第一应用的应用切换类型为切出应用时,降低第一应用的第一初始渲染优先级,从而得到第一应用的第一渲染优先级。
S1602、根据第二应用的第二初始渲染优先级、第二应用是否对应焦点窗口和/或第二应用的应用切换类型,确定第二应用的第二渲染优先级。
其中,第二渲染初始优先级与第二应用的应用类型和/或第二应用待显示界面的渲染负载有关。对第二渲染初始优先级的说明可参考步骤S1501中说明,在此不做赘述。
需要说明的是,第一应用和第二应用为电子设备处于前台运行的应用。
S1603、当第一渲染优先级低于第二渲染优先级时,以第一频率向第一应用发送Vsync信号,或者停止向第一应用发送Vsync信号;以及以第二频率向第二应用发送Vsync信号。
其中,第一频率小于第二频率,第一频率可以理解为将第二频率降低之后得到的频率。
在本申请实施例中,渲染优先级可以用于对多个前台应用做不同程度的渲染控制。例如,在对多个前台应用进行渲染时,前台应用的渲染优先级越高,给予的计算资源越多,可以提高渲染优先级高的前台应用的流畅性。
示例性的,可以将渲染优先级分为高-中-低,例如,可以按照从高到低的顺序将渲染优先级设置为0-2,渲染优先级为高时对应0,渲染优先级为中时对应1,渲染优先级为低时对应2。当然,也可以按照从低到高的顺序将渲染优先级设置为0-2,渲染优先级为高时对应2,渲染优先级为中时对应1,渲染优先级为低时对应0。
需要说明的是,在本申请实施例中,对渲染优先级的划分不做具体的限定。
示例性的,当第一应用的第一渲染优先级低于第二应用的第二渲染优先级时,以第二频率向第二应用发送Vsync信号,以及对第一应用停止发送Vsync信号,或者,在第二频率的基础上,将第一应用Vsync信号的发送频率降低为第一帧率。
S1604、将第一应用中渲染后的图像与第二应用中渲染后的图像进行合成处理,得到目标图像。
示例性的,以第一频率向第一应用发送Vsync信号,或者停止向第一应用发送Vsync信号,对第一应用进行渲染,得到第一应用渲染后的图像,以及以第二频率向第二应用发送Vsync信号,对第二应用进行渲染,得到第二应用渲染后的图像。将第一应用中渲染后的图像与第二应用中渲染后的图像进行合成处理,得到目标图像。
S1605、显示目标图像。
示例性的,在电子设备的屏幕上显示第一应用和第二应用合成后的界面,合成后的界面为第一应用中渲染后的图像与第二应用中渲染后的图像合成后的目标图像。
在本申请实施例提供的图像显示方法,第一应用和第二应用为电子设备处于前台运行的应用,根据第一应用的第一初始渲染优先级、第一应用是否对应焦点窗口和/或第一应用的应用切换类型,确定第一应用的第一渲染优先级;根据第二应用的第二初始渲染优先级、第二应用是否对应焦点窗口和/或第二应用的应用切换类型,确定第二应用的第二渲染优先级;当第一渲染优先级低于第二渲染优先级时,以第一频率向第一应用发送Vsync信号,或者停止向第一应用发送Vsync信号;以及以第二频率向第二应用发送Vsync信号;其中,第一频率小于第二频率;将第一应用中渲染后的图像与第二应用中渲染后的图像进行合成处理,得到目标图像;显示目标图像。在该方法中,通过比较第一应用的第一渲染优先级和第二应用的第二渲染优先级,对于渲染优先级较低的前台应用,降低Vsync信号的发送频率或停止发送Vsync信号,对于渲染优先级较高的前台应用,保持原来的Vsync信号发送频率,从而提高渲染优先级较高的前台应用的流畅性,提升用户体验。
示例性的,在上述实施例的基础上,图像显示的方法还包括:
一种可能的实现中,电子设备处于前台应用切换的场景,第一应用为切出应用,第二应用为切入应用。
示例性的,确定第一应用的第一渲染优先级,包括:根据第一应用的第一渲染初始优先级和第一应用的应用切换类型,确定第一应用的第一渲染优先级。以及确定第二应用的第二渲染优先级,包括:根据第二应用的第二渲染初始优先级和第二应用的应用切换类型,确定第二应用的第二渲染优先级。
当电子设备处于前台应用切换的场景时,基于第一应用的第一渲染初始优先级,根据第一应用的应用切换类型,确定第一应用的第一渲染优先级;基于第二应用的第二渲染初始优先级,根据第二应用的应用切换类型,确定第二应用的第二渲染优先级,进而可以通过比较第一渲染优先级和第二渲染优先级,来确定对第一应用和第二应用的渲染控制方法。
一种可能的实现中,根据第一应用的第一渲染初始优先级和第一应用的应用切换类型,确定第一应用的第一渲染优先级,包括:基于第一应用为切出应用,降低第一应用的第一渲染初始优先级,得到第一应用的第一渲染优先级。以及根据第二应用的第二渲染初始优先级和第二应用的应用切换类型,确定第二应用的第二渲染优先级,包括:基于第二应用为切入应用,提高第二应用的第二渲染初始优先级,得到第二应用的第二渲染优先级。
示例性的,为提高从后台切换为前台的应用的流畅性,基于第一应用为切出应用,降低第一应用的第一渲染初始优先级,得到第一应用的第一渲染优先级;基于第二应用为切入应用,提高第二应用的第二渲染初始优先级,得到第二应用的第二渲染优先级,进而可以通过比较第一渲染优先级和第二渲染优先级,来确定对第一应用和第二应用的渲染控制方法。
一种可能的实现中,基于各个应用的渲染初始优先级,对于将要切出的应用,在其渲染初始优先级的基础上加1,对于将要切入的应用,在其渲染初始优先级的基础上减1。
例如,电子设备设置的渲染初始优先级从高到低依次为0至2,社交界面的渲染初始优先级和Launcher的渲染初始优先级分别为2和1,在从社交界面返回到系统桌面的过程中,Launcher的渲染优先级在其渲染初始优先级的基础上减1,Launcher的渲染优先级变为0,社交应用的渲染优先级在其渲染初始优先级的基础上加1,社交应用的渲染优先级变为3。
一种可能的实现中,电子设备处于分屏显示的场景,第一应用和第二应用分别显示在两个不同的窗口中。
示例性的,确定第一应用的第一渲染优先级,包括:根据第一应用的第一渲染初始优先级和第一应用是否对应焦点窗口,确定第一应用的第一渲染优先级;以及确定第二应用的第二渲染优先级,包括:根据第二应用的第二渲染初始优先级和第二应用是否对应焦点窗口,确定第二应用的第二渲染优先级。
当电子设备处于分屏显示的场景时,第一应用和第二应用分别显示在两个不同的窗口中,两个不同的窗口可以分别对应焦点窗口和非焦点窗口。具体的,当第一应用对应焦点应用时,第二应用对应非焦点应用;当第一应用对应非焦点应用时,第二应用对应焦点应用。
示例性的,基于第一应用的第一渲染初始优先级,根据第一应用是否对应焦点窗口,确定第一应用的第一渲染优先级;基于第二应用的第二渲染初始优先级,根据第二应用是否对应焦点窗口,确定第二应用的第二渲染优先级,进而可以通过比较第一渲染优先级和第二渲染优先级,来确定对第一应用和第二应用的渲染控制方法。
一种可能的实现中,根据第一应用的第一渲染初始优先级和第一应用是否对应焦点窗口,确定第一应用的第一渲染优先级,包括:基于第一应用对应非焦点窗口,降低第一应用的第一渲染初始优先级,得到第一应用的第一渲染优先级;根据第二应用的第二渲染初始优先级和第二应用是否对应焦点窗口,确定第二应用的第二渲染优先级,包括:基于第二应用对应焦点窗口,增加第二应用的第二渲染初始优先级,得到第二应用的第二渲染优先级。
在本申请实施例中,焦点窗口为用户关注点较高的窗口,为提高焦点窗口的流畅性,基于第一应用对应非焦点窗口,降低第一应用的第一渲染初始优先级,得到第一应用的第一渲染优先级;基于第二应用对应焦点窗口,提高第二应用的第二渲染初始优先级,得到第二应用的第二渲染优先级。
其中,焦点窗口可以根据用户的操作来确定,例如,当两个前台应用分屏显示时,用户针对上半屏进行了触控操作,则显示在上半屏中的前台应用为焦点窗口,显示在下半屏的前台应用为非焦点窗口。
一种可能的实现中,基于各个应用的渲染初始优先级,对于对应焦点窗口的应用,在其渲染初始优先级的基础上加1,对于对应非焦点窗口的应用,在其渲染初始优先级的基础上减1。
例如,终端设备设置的渲染初始优先级从高到低依次为0至2,终端设备的显示界面包括ppt应用和word应用,word应用的渲染初始优先级和ppt应用的渲染初始优先级均为 2,屏幕的上半窗口显示ppt文件,屏幕的下半窗口显示word文档,用户根据word文档对ppt文件进行编辑操作,则用户对屏幕的上半窗口进行了触控操作,从而可以确定上半窗口为焦点窗口。由于ppt应用对应的窗口为焦点窗口,则ppt应用的渲染优先级在其渲染初始优先级的基础上减1,ppt应用的渲染优先级变为1;由于word应用对应的窗口为非焦点窗口,则word应用的渲染优先级在其渲染初始优先级的基础上加1,word应用的渲染优先级变为3。
在本申请实施例中,对于显示在焦点窗口中的应用,提高其对应的渲染初始优先级,对于显示在非焦点窗口中的应用,降低其对应的渲染初始优先级,可以提高显示在焦点窗口中的应用的流畅性。
一种可能的实现中,电子设备处于悬浮窗显示的场景。
示例性的,确定第一应用的第一渲染优先级,包括:根据第一应用的第一渲染初始优先级和第一应用是否对应焦点窗口,确定第一应用的第一渲染优先级;以及确定第二应用的第二渲染优先级,包括:根据第二应用的第二渲染初始优先级和第二应用是否对应焦点窗口,确定第二应用的第二渲染优先级。
在本申请实施例中,当电子设备处于悬浮窗显示的场景时,对于前台运行的两个应用,当第一应用的应用类型为切入应用时,第二应用的应用类型为切出应用;当第一应用的应用类型为切出应用时,第二应用的应用类型为切入应用。当第一应用对应焦点应用时,第二应用对应非焦点应用;当第一应用对应非焦点应用时,第二应用对应焦点应用。
示例性的,基于第一应用的第一渲染初始优先级,根据第一应用是否对应焦点窗口,确定第一应用的第一渲染优先级;基于第二应用的第二渲染初始优先级,根据第二应用是否对应焦点窗口,确定第二应用的第二渲染优先级,进而可以通过比较第一渲染优先级和第二渲染优先级,来确定对第一应用和第二应用的渲染控制方法。
一种可能的实现中,根据第一应用的第一渲染初始优先级和第一应用是否对应焦点窗口,确定第一应用的第一渲染优先级,包括:基于第一应用对应非焦点窗口,降低第一应用的第一渲染初始优先级,得到第一应用的第一渲染优先级;根据第二应用的第二渲染初始优先级和第二应用是否对应焦点窗口,确定第二应用的第二渲染优先级,包括:基于第二应用对应焦点窗口,提高第二应用的第二渲染初始优先级,得到第二应用的第二渲染优先级。
在本申请实施例中,焦点窗口为用户关注点较高的窗口,为提高焦点窗口的流畅性,基于第一应用对应非焦点窗口,降低第一应用的第一渲染初始优先级,得到第一应用的第一渲染优先级;基于第二应用对应焦点窗口,提高第二应用的第二渲染初始优先级,得到第二应用的第二渲染优先级。
其中,焦点窗口可以根据用户的操作来确定,例如,当两个应用运行在前台时,应用2全屏显示在电子设备的屏幕上,应用1以悬浮窗的形式显示在应用2上,用户针对应用2进行了触控操作,则应用2对应焦点窗口,应用1对应非焦点窗口。
例如,终端电子设备设置的渲染初始优先级从高到低依次为0至2,社交界面的渲染初始优先级和视频应用的渲染初始优先级分别为2和1,在社交应用和视频应用两个前台应用同时显示时,社交全屏显示在电子设备的屏幕上,视频应用以悬浮窗的形式显示在社交应用上,由于用户在社交应用的对话框内进行了回复消息等操作,则社交应用对应的窗 口为焦点窗口,则社交应用的渲染优先级在其渲染初始优先级的基础上减1,社交应用的渲染优先级变为1;视频应用对应的窗口为非焦点窗口,则视频应用的渲染优先级在其渲染初始优先级的基础上加1,视频应用的渲染优先级变为2。
一种可能的实现中,在确定第一应用的第一渲染优先级,以及确定第二应用的第二渲染优先级之前,还包括:获取第一应用的渲染面积和第二应用的渲染面积。确定第一应用的第一渲染优先级,以及第二应用的第二渲染优先级,包括:当第一应用的渲染面积和第二应用的渲染面积均大于第一预设值时,确定第一应用的第一渲染优先级,以及确定第二应用的第二渲染优先级。
在本申请实施例中,渲染面积的大小可以用于表示渲染负载的大小。
示例性的,第一应用和第二应用同时运行于前台时,当第一应用的渲染面积和第二应用的渲染面积均大于第一预设值时,系统的渲染负载较大,会影响第一应用和/或第二应用的流畅性。因此,当第一应用的渲染面积和第二应用的渲染面积均大于第一预设值时,确定第一应用的第一渲染优先级和第二应用的第二渲染优先级,根据第一渲染优先级和第二渲染优先级,对第一应用和第二应用进行渲染控制,从而减小系统的渲染负载,提高应用的流畅性。
一种可能的实现中,在确定第一应用的第一渲染优先级,以及确定第二应用的第二渲染优先级之前,还包括:获取前台运行的应用的窗口信息和/或前台运行的应用的切换信息;根据前台运行的应用的窗口信息和/或前台运行的应用切换信息,确定前台运行的应用包括第一应用和第二应用。
在本申请实施例中,窗口信息可以理解为每个应用在运行的过程中存在对应的窗口界面,每个窗口界面都有各自对应的信息和数据,这些信息和数据可以包括窗口大小、窗口位置和窗口布局等属性信息。例如,微信在运行的过程中存在对应的微信窗口界面,微信窗口信息可以包括各个按钮的位置、对话框的大小等信息。
在本申请实施例中,前台运行的应用的切换信息可以理解为在电子设备的前台应用发生切换时,会生成信息,以便于跟踪与管理前台应用的切换。例如,当前台应用由社交应用切换为游戏应用时,会生成前台运行的应用的切换信息。
示例性的,可以根据前台运行的应用的窗口信息和/或前台运行的应用切换信息,确定前台运行的应用包括第一应用和第二应用。在确定前台运行的应用包括第一应用和第二应用时,比较第一应用的第一渲染优先级和第二应用的第二渲染优先级,进而对第一应用和第二应用进行渲染控制,提高应用的流畅性;在确定前台运行的应用包括第一应用,不包括第二应用时,不需要获取第一应用的第一渲染优先级,从而可以节约系统资源。
以上示例性实施例中所描述的实施方式并不代表与本申请相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本申请的一些方面相一致的方法的例子。
上面已对本申请实施例的电子设备性能调节方法进行了说明,下面对本申请实施例提供的执行上述图像显示方法的电子设备进行描述。本领域技术人员可以理解,方法和装置可以相互结合和引用,本申请实施例提供的电子设备可以执行上述图像显示方法中的步骤。
图17示出了本申请实施例提供的一种图像显示装置的结构示意图。如图17所示,该图像显示装置可以是本申请实施例中的电子设备。该图像显示装置包括:触摸屏1701,其中,触摸屏包括触控面板和显示屏;一个或多个处理器1702;存储器1703;多个应用程 序;以及一个或多个计算机程序,其中一个或多个计算机程序被存储在存储器1703中,一个或多个计算机程序包括指令,当指令被图像显示装置执行时,实现上述实施例中的图像显示方法。
图18为本申请实施例提供的一种图像显示装置的硬件结构示意图。请参见图18,该装置包括:存储器1801、处理器1802和显示屏1804。该装置还可以包括接口电路1803,其中,存储器1801、处理器1802、接口电路1803和显示屏1804可以通信;示例性的,存储器1801、处理器1802、接口电路1803和显示屏1804可以通过通信总线通信,存储器1801用于存储计算机执行指令,由处理器1802来控制执行,并由显示屏1804来执行显示,从而实现本申请下述实施例提供的图像显示方法。
可能的实现方式中,本申请实施例中的计算机执行指令也可以称之为应用程序代码,本申请实施例对此不作具体限定。
可选的,接口电路1803还可以包括发送器和/或接收器。可选的,上述处理器1802可以包括一个或多个CPU,还可以是其他通用处理器、数字信号处理器(digital signal processor,DSP)、专用集成电路(application specific integrated circuit,ASIC)等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。
本实施例的装置对应地可用于执行上述方法实施例中执行的步骤,其实现原理和技术效果类似,此处不再赘述。
本申请实施例还提供了一种计算机可读存储介质。上述实施例中描述的方法可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。如果在软件中实现,则功能可以作为一个或多个指令或代码存储在计算机可读介质上或者在计算机可读介质上传输。计算机可读介质可以包括计算机存储介质和通信介质,还可以包括任何可以将计算机程序从一个地方传送到另一个地方的介质。存储介质可以是可由计算机访问的任何目标介质。
一种可能的实现方式中,计算机可读介质可以包括RAM,ROM,只读光盘(compact disc read-only memory,CD-ROM)或其它光盘存储器,磁盘存储器或其它磁存储设备,或目标于承载的任何其它介质或以指令或数据结构的形式存储所需的程序代码,并且可由计算机访问。而且,任何连接被适当地称为计算机可读介质。例如,如果使用同轴电缆,光纤电缆,双绞线,数字用户线(Digital Subscriber Line,DSL)或无线技术(如红外,无线电和微波)从网站,服务器或其它远程源传输软件,则同轴电缆,光纤电缆,双绞线,DSL或诸如红外,无线电和微波之类的无线技术包括在介质的定义中。如本文所使用的磁盘和光盘包括光盘,激光盘,光盘,数字通用光盘(Digital Versatile Disc,DVD),软盘和蓝光盘,其中磁盘通常以磁性方式再现数据,而光盘利用激光光学地再现数据。上述的组合也应包括在计算机可读介质的范围内。
本申请实施例是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理单元以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理单元执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指 定的功能的装置。
以上的具体实施方式,对本发明的目的、技术方案和有益效果进行了进一步详细说明,所应理解的是,以上仅为本发明的具体实施方式而已,并不用于限定本发明的保护范围,凡在本发明的技术方案的基础之上,所做的任何修改、等同替换、改进等,均应包括在本发明的保护范围之内。

Claims (16)

  1. 一种图像显示方法,其特征在于,应用于电子设备,所述方法包括:
    根据第一应用的第一初始渲染优先级、所述第一应用是否对应焦点窗口和/或所述第一应用的应用切换类型,确定所述第一应用的第一渲染优先级;其中,所述第一渲染初始优先级与所述第一应用的应用类型和/或所述第一应用的渲染负载有关,所述应用切换类型包括切出应用或切入应用;
    根据第二应用的第二初始渲染优先级、所述第二应用是否对应焦点窗口和/或所述第二应用的应用切换类型,确定所述第二应用的第二渲染优先级,其中,所述第二渲染初始优先级与所述第二应用的应用类型和/或所述第二应用待显示界面的渲染负载有关;
    其中,所述第一应用和所述第二应用为所述电子设备处于前台运行的应用;
    当所述第一渲染优先级低于所述第二渲染优先级时,以第一频率向所述第一应用发送垂直同步信号Vsync信号,或者停止向所述第一应用发送Vsync信号;以及以第二频率向所述第二应用发送Vsync信号;其中,所述第一频率小于所述第二频率;
    将所述第一应用中渲染后的图像与所述第二应用中渲染后的图像进行合成处理,得到目标图像;
    显示所述目标图像。
  2. 根据权利要求1所述的方法,所述电子设备处于前台应用切换的场景,所述第一应用为切出应用,所述第二应用为切入应用;
    所述确定所述第一应用的第一渲染优先级,包括:
    根据所述第一应用的第一渲染初始优先级和所述第一应用的应用切换类型,确定所述第一应用的第一渲染优先级;
    所述确定所述第二应用的第二渲染优先级,包括:
    根据所述第二应用的第二渲染初始优先级和所述第二应用的应用切换类型,确定所述第二应用的第二渲染优先级。
  3. 根据权利要求2所述的方法,其特征在于,所述根据所述第一应用的第一渲染初始优先级和所述第一应用的应用切换类型,确定所述第一应用的第一渲染优先级,包括:
    基于所述第一应用为切出应用,降低所述第一应用的第一渲染初始优先级,得到所述第一应用的第一渲染优先级;
    所述根据所述第二应用的第二渲染初始优先级和所述第二应用的应用切换类型,确定所述第二应用的第二渲染优先级,包括:
    基于所述第二应用为切入应用,提高所述第二应用的第二渲染初始优先级,得到所述第二应用的第二渲染优先级。
  4. 根据权利要求1所述的方法,所述电子设备处于分屏显示的场景,所述第一应用和所述第二应用分别显示在两个不同的窗口中;
    所述确定所述第一应用的第一渲染优先级,包括:
    根据所述第一应用的第一渲染初始优先级和所述第一应用是否对应焦点窗口,确定所述第一应用的第一渲染优先级;
    所述确定所述第二应用的第二渲染优先级,包括:
    根据所述第二应用的第二渲染初始优先级和所述第二应用是否对应焦点窗口,确定所 述第二应用的第二渲染优先级。
  5. 根据权利要求4所述的方法,所述根据所述第一应用的第一渲染初始优先级和所述第一应用是否对应焦点窗口,确定所述第一应用的第一渲染优先级,包括:
    基于所述第一应用对应非焦点窗口,降低所述第一应用的第一渲染初始优先级,得到所述第一应用的第一渲染优先级;
    所述根据所述第二应用的第二渲染初始优先级和所述第二应用是否对应焦点窗口,确定所述第二应用的第二渲染优先级,包括:
    基于所述第二应用对应所述焦点窗口,增加所述第二应用的第二渲染初始优先级,得到所述第二应用的第二渲染优先级。
  6. 根据权利要求1所述的方法,所述电子设备处于悬浮窗显示的场景;
    所述确定所述第一应用的第一渲染优先级,包括:
    根据所述第一应用的第一渲染初始优先级和所述第一应用是否对应焦点窗口,确定所述第一应用的第一渲染优先级;
    所述确定所述第二应用的第二渲染优先级,包括:
    根据所述第二应用的第二渲染初始优先级和所述第二应用是否对应焦点窗口,确定所述第二应用的第二渲染优先级。
  7. 根据权利要求6所述的方法,所述根据所述第一应用的第一渲染初始优先级和所述第一应用是否对应焦点窗口,确定所述第一应用的第一渲染优先级,包括:
    基于所述第一应用对应所述非焦点窗口,降低所述第一应用的第一渲染初始优先级,得到所述第一应用的第一渲染优先级;
    所述根据所述第二应用的第二渲染初始优先级和所述第二应用是否对应焦点窗口,确定所述第二应用的第二渲染优先级,包括:
    基于所述第二应用对应所述焦点窗口,提高所述第二应用的第二渲染初始优先级,得到所述第二应用的第二渲染优先级。
  8. 根据权利要求1-7任一项所述的方法,在确定所述第一应用的第一渲染优先级,以及确定所述第二应用的第二渲染优先级之前,还包括:
    获取所述第一应用的渲染面积和所述第二应用的渲染面积;
    所述确定所述第一应用的第一渲染优先级,以及所述第二应用的第二渲染优先级,包括:当所述第一应用的渲染面积和所述第二应用的渲染面积均大于第一预设值时,确定所述第一应用的第一渲染优先级,以及确定所述第二应用的第二渲染优先级。
  9. 根据权利要求1-8任一项所述的方法,在确定所述第一应用的第一渲染优先级,以及确定所述第二应用的第二渲染优先级之前,还包括:
    获取所述前台运行的应用的窗口信息和/或所述前台运行的应用的切换信息;
    根据所述前台运行的应用的窗口信息和/或所述前台运行的应用切换信息,确定前台运行的应用包括所述第一应用和所述第二应用。
  10. 一种图像显示方法,其特征在于,应用于电子设备,所述方法包括:
    显示多任务界面,所述多任务界面包括第一应用和第二应用;
    接收用户第一操作;所述第一操作用于将所述第一应用切入,以及将所述第二应用切出;
    响应于所述第一操作,以第一频率向所述第一应用发送垂直同步信号Vsync信号,或者停止向所述第一应用发送Vsync信号;
    响应于所述第一操作,以第二频率向所述第二应用发送Vsync信号;其中,所述第一频率小于所述第二频率;
    将所述第一应用中渲染后的图像与所述第二应用中渲染后的图像进行合成处理,得到目标图像;
    显示所述目标图像。
  11. 一种图像显示方法,其特征在于,应用于电子设备,所述方法包括:
    显示第一界面,所述第一界面包括第一应用;
    接收用户用于将所述第一应用以及第二应用分屏显示的第二操作;
    响应于所述第二操作,在第一窗口中显示所述第一应用,以及在第二窗口中显示所述第二应用;
    接收到对所述第二窗口中的所述第二应用的第三操作;
    响应于所述第三操作,以第一频率向所述第一应用发送垂直同步信号Vsync信号,或者停止向所述第一应用发送Vsync信号;
    响应于所述第二操作,以第二频率向所述第二应用发送Vsync信号;其中,所述第一频率小于所述第二频率;
    将所述第一应用中渲染后图像与所述第二应用中渲染后的图像进行合成处理,得到目标图像;
    显示所述目标图像。
  12. 一种图像显示方法,其特征在于,应用于电子设备,所述方法包括:
    全屏显示第一应用;
    接收到用于触发第二应用的第四操作;
    响应于所述第四操作,全屏显示所述第二应用,以及在所述第二应用上以悬浮窗显示所述第一应用;
    接收到对所述第二应用的第五操作;
    响应于所述第五操作,以第一频率向所述第一应用发送垂直同步信号Vsync信号,或者停止向所述第一应用发送Vsync信号;
    响应于所述第五操作,以第二频率向所述第二应用发送Vsync信号;其中,所述第一频率小于所述第二频率;
    将所述第一应用中渲染后的图像与所述第二应用中渲染后的图像进行合成处理,得到目标图像;
    显示所述目标图像。
  13. 一种图像显示方法,其特征在于,应用于电子设备,所述方法包括:
    接收用户从第一应用返回到桌面应用的第六操作;
    响应于所述第六操作,以第一频率向所述第一应用发送垂直同步信号Vsync信号,或者停止向所述第一应用发送Vsync信号;
    响应于所述第六操作,以第二频率向所述桌面应用发送Vsync信号;其中,所述第一频率小于所述第二频率;
    将所述第一应用中渲染后的图像与所述桌面应用中渲染后的图像进行合成处理,得到目标图像;
    显示所述目标图像。
  14. 一种电子设备,其特征在于,包括:处理器和存储器,所述处理器用于调用所述存储器中的程序以使所述电子设备执行权利要求1-13任一项所述的方法。
  15. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1-13任一项所述的方法。
  16. 一种计算机程序产品,其特征在于,包括计算机程序,当所述计算机程序被运行时,使得计算机执行如权利要求1-13任一项所述的方法。
PCT/CN2023/093741 2022-07-21 2023-05-12 图像显示方法和相关装置 WO2024016798A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210868302.5A CN117472483A (zh) 2022-07-21 2022-07-21 图像显示方法和相关装置
CN202210868302.5 2022-07-21

Publications (2)

Publication Number Publication Date
WO2024016798A1 true WO2024016798A1 (zh) 2024-01-25
WO2024016798A9 WO2024016798A9 (zh) 2024-05-16

Family

ID=89616964

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/093741 WO2024016798A1 (zh) 2022-07-21 2023-05-12 图像显示方法和相关装置

Country Status (2)

Country Link
CN (1) CN117472483A (zh)
WO (1) WO2024016798A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106933328A (zh) * 2017-03-10 2017-07-07 广东欧珀移动通信有限公司 一种移动终端帧率的控制方法、装置及移动终端
CN112199067A (zh) * 2020-12-04 2021-01-08 湖北芯擎科技有限公司 一种显示切换方法及装置
CN112711477A (zh) * 2021-03-29 2021-04-27 北京拓课网络科技有限公司 一种切换应用程序的方法、装置及电子设备
CN113722030A (zh) * 2021-06-10 2021-11-30 荣耀终端有限公司 一种显示方法、电子设备及计算机存储介质
WO2022087871A1 (en) * 2020-10-28 2022-05-05 Qualcomm Incorporated Intelligent management of application layer rendering

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106933328A (zh) * 2017-03-10 2017-07-07 广东欧珀移动通信有限公司 一种移动终端帧率的控制方法、装置及移动终端
WO2022087871A1 (en) * 2020-10-28 2022-05-05 Qualcomm Incorporated Intelligent management of application layer rendering
CN112199067A (zh) * 2020-12-04 2021-01-08 湖北芯擎科技有限公司 一种显示切换方法及装置
CN112711477A (zh) * 2021-03-29 2021-04-27 北京拓课网络科技有限公司 一种切换应用程序的方法、装置及电子设备
CN113722030A (zh) * 2021-06-10 2021-11-30 荣耀终端有限公司 一种显示方法、电子设备及计算机存储介质

Also Published As

Publication number Publication date
CN117472483A (zh) 2024-01-30
WO2024016798A9 (zh) 2024-05-16

Similar Documents

Publication Publication Date Title
WO2021057830A1 (zh) 一种信息处理方法及电子设备
CN116501210B (zh) 一种显示方法、电子设备及存储介质
CN114648951B (zh) 控制屏幕刷新率动态变化的方法及电子设备
WO2021180183A1 (zh) 图像处理方法和图像显示设备、存储介质和电子设备
CN114632329B (zh) 终端设备性能调节方法和相关装置
CN114911336B (zh) 调整频率的方法、装置、电子设备及可读存储介质
WO2024041047A1 (zh) 一种屏幕刷新率切换方法及电子设备
WO2023231655A1 (zh) 弹幕识别方法和相关装置
CN114661263A (zh) 一种显示方法、电子设备及存储介质
WO2023040666A1 (zh) 键盘显示方法、折叠屏设备和计算机可读存储介质
WO2023001163A1 (zh) 一种可提升动效性能的屏幕刷新方法及设备
CN114697446A (zh) 一种刷新率切换方法、电子设备及存储介质
WO2022247541A1 (zh) 一种应用程序动效衔接的方法及装置
CN115097994B (zh) 数据处理方法和相关装置
WO2021052488A1 (zh) 一种信息处理方法及电子设备
WO2024016798A1 (zh) 图像显示方法和相关装置
CN116077940B (zh) 游戏应用中的绘图处理方法和相关装置
WO2023185636A1 (zh) 图像显示方法及电子设备
CN118626201A (zh) 运行帧率控制方法、电子设备、芯片系统及可读存储介质
WO2023066177A1 (zh) 动画效果显示方法及电子设备
WO2023124227A9 (zh) 帧率切换方法及装置
WO2024098871A1 (zh) 数据处理方法、设备及存储介质
CN117707406A (zh) 一种亮屏显示方法、电子设备及存储介质
CN117093175A (zh) 一种显示方法、用户界面及相关装置
CN118363688A (zh) 界面渲染方法、电子设备及计算机可读存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23841867

Country of ref document: EP

Kind code of ref document: A1