Interface display method and device and storage medium

By generating multiple drawing tasks in the terminal device and using multi-threaded parallel processing, the problem of lag caused by the main thread sequential execution of drawing tasks is solved, and faster interface display and reduced lag probability is achieved.

CN119902668APending Publication Date: 2025-04-29BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311403232.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-26
Publication Date
2025-04-29

AI Technical Summary

Technical Problem

When the terminal device generates multiple drawing tasks in response to user operations, the main thread executes it in turn, resulting in a long drawing task time, resulting in a stuttering in the display interface of the terminal device.

Method used

By generating at least two drawing tasks, the target drawing tasks are determined and executed by the first thread, and the other drawing tasks are executed by the second thread, and the multithreaded parallel processing is used to reduce the amount of tasks of the main thread.

Benefits of technology

By executing the drawing task in parallel, the time for the first thread to complete the drawing task is shortened and the probability of lag in the display interface of the terminal device is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119902668A_ABST
    Figure CN119902668A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of terminal control, in particular to an interface display method and device and a storage medium, and can reduce the probability that a display interface of terminal equipment is stuck. The interface display method comprises the following steps: in response to a control operation for terminal equipment, generating at least two drawing tasks corresponding to the control operation; determining a target drawing task which needs to display drawing content on the display interface in the at least two drawing tasks; calling a first thread to execute the target drawing task, and calling a second thread to execute other drawing tasks except the target drawing task in the at least two drawing tasks to obtain a target display image; and displaying the target display image in a display interface of the terminal equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of terminal control technology, and in particular to an interface display method, device and storage medium. Background Art

[0002] As the hardware configuration of terminal devices becomes higher and higher, users have higher and higher requirements for the display effects of terminal devices. In response to user operations, the terminal device generates multiple drawing tasks, and the main thread in the terminal device executes each drawing task in sequence, that is, executes tasks serially, which makes the main thread take a long time to complete the drawing task, resulting in the display interface of the terminal device being stuck when displaying. Summary of the invention

[0003] In order to overcome the problems existing in the related art, the present disclosure provides an interface display method, device, storage medium and electronic device, which can reduce the probability of freeze in the display interface of the terminal device.

[0004] According to a first aspect of an embodiment of the present disclosure, there is provided an interface display method, including:

[0005] In response to a control operation on a terminal device, generating at least two drawing tasks corresponding to the control operation;

[0006] Determining a target drawing task that needs to display drawing content on the display interface from among the at least two drawing tasks;

[0007] Calling the first thread to execute the target drawing task, and calling the second thread to execute other drawing tasks among the at least two drawing tasks except the target drawing task, to obtain a target display image;

[0008] The target display image is displayed in the display interface of the terminal device.

[0009] Optionally, in response to a control operation on a terminal device, generating at least two drawing tasks corresponding to the control operation includes:

[0010] In response to a recording operation on screen content of a terminal device, generating at least two drawing tasks corresponding to the recording operation; or,

[0011] In response to a sharing operation on the screen content of a terminal device, generating at least two drawing tasks corresponding to the sharing operation; or,

[0012] In response to a screen capture operation on a terminal device, at least two drawing tasks corresponding to the screen capture operation are generated.

[0013] Optionally, calling the second thread to execute other drawing tasks except the target drawing task among the at least two drawing tasks includes:

[0014] Create a second thread;

[0015] The second thread is called to execute other drawing tasks among the at least two drawing tasks except the target drawing task.

[0016] Optionally, calling the first thread to execute the target drawing task, and calling the second thread to execute other drawing tasks among the at least two drawing tasks except the target drawing task, to obtain a target display image, includes:

[0017] The first thread is called to trigger the first processing hardware of the terminal device to execute the target drawing task, and the second thread is called to trigger the second processing hardware of the terminal device to execute other drawing tasks among the at least two drawing tasks except the target drawing task, so as to obtain a target display image, wherein the first processing hardware and the second processing hardware are the same or different.

[0018] Optionally, calling the first thread to trigger the first processing hardware of the terminal device to execute the target drawing task, and calling the second thread to trigger the second processing hardware of the terminal device to execute other drawing tasks among the at least two drawing tasks except the target drawing task, includes:

[0019] Determine the control layer corresponding to the control operation, and obtain display data of other layers to be displayed under the control layer;

[0020] Calling the first thread to trigger the first processing hardware of the terminal device to execute the target drawing task, and drawing the first target display image according to the control layer and the display data, and calling the second thread to trigger the second processing hardware of the terminal device to execute the other drawing tasks, and drawing the second target display image according to the control layer and the display data;

[0021] The first target display image and the second target display image are the same as or different from each other.

[0022] Optionally, both the first processing hardware and the second processing hardware are graphics processors; or, the first processing hardware is a hardware hybrid renderer, and the second processing hardware is a graphics processor.

[0023] Optionally, the interface display method further includes:

[0024] The priority of the thread related to executing the other drawing tasks is adjusted to shorten the drawing time of the target display image.

[0025] Optionally, the adjusting the priority of the thread related to executing the other drawing task includes:

[0026] Adjust the priority of the thread related to executing the other drawing task in at least one of the following ways:

[0027] Adjusting the priority of the second thread to a real-time priority;

[0028] Adjust the priority of the glue thread in the task process to real-time priority;

[0029] Adjust the priority of the drawing thread in the task process to real-time priority;

[0030] Adjust the priority of the rendering thread in the task process to real-time priority;

[0031] The task process is a process that triggers the processing hardware of the terminal device to execute a drawing task.

[0032] According to a second aspect of an embodiment of the present disclosure, there is provided an interface display device, including:

[0033] A response module, configured to generate at least two drawing tasks corresponding to a control operation on a terminal device in response to the control operation;

[0034] A determination module, configured to determine a target drawing task that needs to display drawing content on the display interface from among the at least two drawing tasks;

[0035] An execution module, configured to call the first thread to execute the target drawing task, and call the second thread to execute other drawing tasks among the at least two drawing tasks except the target drawing task, to obtain a target display image;

[0036] A control module is used to display the target display image in the display interface of the terminal device.

[0037] According to a third aspect of an embodiment of the present disclosure, there is provided an interface display device, including:

[0038] processor;

[0039] a memory for storing processor-executable instructions;

[0040] Wherein, the processor is configured to:

[0041] In response to a control operation on a terminal device, generating at least two drawing tasks corresponding to the control operation;

[0042] Determining a target drawing task that needs to display drawing content on the display interface from among the at least two drawing tasks;

[0043] Calling the first thread to execute the target drawing task, and calling the second thread to execute other drawing tasks among the at least two drawing tasks except the target drawing task, to obtain a target display image;

[0044] The target display image is displayed in the display interface of the terminal device.

[0045] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of the interface display method provided in the first aspect of the present disclosure are implemented.

[0046] The technical solution provided by the embodiment of the present disclosure may include the following beneficial effects: in response to generating at least two drawing tasks for a control operation on a terminal device, calling a first thread to execute a target drawing task, and calling a second thread to execute other drawing tasks, obtaining a target display layer, and displaying the target layer in a display interface of the terminal device. By calling the second thread to execute other drawing tasks, the first thread and the second thread execute drawing tasks in parallel, thereby reducing the task load of the first thread, shortening the time for the first thread to complete the task, and reducing the probability of freezes in the interface display.

[0047] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0049] Figure 1 The figure is a flow chart of an interface display method according to an exemplary embodiment.

[0050] Figure 2a It is a target display image of a terminal device responding to a recording operation according to an exemplary embodiment.

[0051] Figure 2b The target display image of a terminal device in response to a sharing operation according to an exemplary embodiment is shown.

[0052] Figure 2c It is a target display image of a terminal device in response to a screenshot operation according to an exemplary embodiment.

[0053] Figure 3 is a flowchart of step S13 according to an exemplary embodiment.

[0054] Figure 4is another flow chart of an interface display method according to an exemplary embodiment.

[0055] Figure 5a The diagram is a schematic diagram of interaction between threads of an interface display method according to an exemplary embodiment.

[0056] Figure 5b The diagram is another schematic diagram of interaction between threads of an interface display method according to an exemplary embodiment.

[0057] Figure 6 The diagram is a schematic diagram of the interaction between processes and threads of an interface display method according to an exemplary embodiment.

[0058] Figure 7 is another flow chart of an interface display method according to an exemplary embodiment.

[0059] Figure 8 The figure is a block diagram of an interface display device according to an exemplary embodiment.

[0060] Fig. 9 is another block diagram of an interface display device according to an exemplary embodiment. DETAILED DESCRIPTION

[0061] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0062] It should be noted that all actions of acquiring signals, information or data in the present disclosure are carried out in compliance with the relevant data protection laws and policies of the country where the device is located and with the authorization given by the owner of the corresponding device.

[0063] As mentioned in the background technology, the main program in the terminal device will sequentially execute the drawing tasks generated in response to the user's control operation, which makes the main thread take a long time to complete the drawing tasks, resulting in display delays and freezes on the display interface of the terminal device. For example, the terminal device generates two drawing tasks in response to the user's screen recording operation, namely, drawing the drawing content that needs to be displayed on the display interface corresponding to the screen recording process and drawing the drawing content other than the drawing content that needs to be displayed on the display interface corresponding to other processes. The main thread of the terminal device executes the two drawing tasks sequentially, that is, the main thread takes a long time to complete the drawing task corresponding to the screen recording operation, resulting in freezes on the display interface of the terminal device when recording the screen.

[0064] For example, the screen recording process: the SurfaceFlinger main thread (SF main thread, graphics synthesis process) of the Android phone calls HWC (Hardware composer, hardware control center) to draw the first drawing content to be displayed on the display interface, and then continues to execute the corresponding Dequeuebuffer() instruction (get graphics memory instruction), and initiates the drawing task of other drawing contents other than the first drawing content to the RenderEngine thread (RE thread, rendering engine thread), and waits for the RenderEngine thread to complete the drawing in the Buffer (buffer), and then the SurfaceFlinger main thread executes the Queuebuffer() instruction (call memory instruction) to notify the business process that the drawing has been completed. The RE thread is used to encapsulate the display data into a data format readable by the GPU (Graphic Processing Unit) and call the GPU.

[0065] It is worth noting that terminal devices generally include multi-core CPUs (Central Processing Units). CPU multi-core generally refers to multi-core, which means that at least two independent processors are packaged together. Multiple cores in the CPU can run at the same time, but each core can only execute one thread at the same time, namely the main thread. In the case of a large number of drawing tasks, completing the drawing tasks only through the main thread will cause a high probability that the display interface of the terminal device will become stuck. For example, the CPU of an Android phone generally has 8 cores, each core can only execute one at the same time, and an Android phone can only execute 8 threads at the same time.

[0066] In view of this, the embodiments of the present disclosure provide an interface display method, device and storage medium, which can shorten the time for the main thread to complete the drawing task and reduce the probability of freezes in the display interface of the terminal device.

[0067] Figure 1 is a flow chart of an interface display method according to an exemplary embodiment. Figure 1 As shown, the interface display method is used in a terminal, and the interface display method may include the following steps.

[0068] In step S11 , in response to a control operation on a terminal device, at least two drawing tasks corresponding to the control operation are generated.

[0069] It is worth noting that the terminal device can be a tablet, mobile phone, laptop, etc., and the synthetic process in the system of the terminal device carries the data of all processes. For example, the main process of an Android system (Android system) mobile phone is the Surface Flinger process, and the Surface Flinger process carries the data of all running processes in the terminal device.

[0070] For example, when the synthesis process SurfaceFlinger of an Android phone performs a synthesis task, it obtains a Buffer that can be filled with data from the business layer, calls the RenderEngine thread to perform the drawing task, and after the RenderEngine thread completes the drawing in the Buffer, the SurfaceFlinger main thread notifies the business process that the drawing has been completed.

[0071] It is worth noting that the control operation can trigger the terminal device to generate a drawing task corresponding to the control operation, and the types and quantities of drawing tasks corresponding to different control operations vary. For example, the screen recording operation can trigger the terminal device to generate a physical screen drawing task corresponding to the first drawing content and a virtual screen drawing task corresponding to the second drawing content. The first drawing content can be the content displayed on the display interface of the terminal device during the screen recording process, and the second drawing content can be the video generated by the terminal device during the screen recording process.

[0072] In step S12, a target drawing task whose drawing content needs to be displayed on a display interface is determined from among at least two drawing tasks.

[0073] It is worth noting that the drawing tasks in the main thread are divided into physical screen drawing tasks and virtual screen drawing tasks, and the physical screen drawing tasks are used as target drawing tasks.

[0074] In step S13, the first thread is called to execute the target drawing task, and the second thread is called to execute other drawing tasks except the target drawing task among the at least two drawing tasks, so as to obtain a target display image.

[0075] It is worth noting that the first thread may be the SurfaceFlinger main thread of the terminal device, and the second thread may be a subthread that the SurfaceFlinger main thread may call. In all embodiments of the present disclosure, the second thread is taken as the Passblur thread (PB thread, blanking subthread) as an example.

[0076] In step S14, the target display image is displayed on the display interface of the terminal device.

[0077] The disclosed embodiment calls the first thread to execute a target drawing task, calls the second thread to execute other drawing tasks, and assigns part of the drawing tasks generated by the terminal device in response to the operation control to the second thread for execution, so as to reduce the amount of drawing tasks of the first thread, thereby shortening the time for the first thread to complete the drawing tasks and reducing the situation where the display interface of the terminal device is stuck due to display delay.

[0078] In order to facilitate those skilled in the art to better understand the interface display method provided by the present disclosure, the steps of the interface display method are described in detail below with examples.

[0079] In a possible embodiment, in step S11, in response to a control operation on a terminal device, generating at least two drawing tasks corresponding to the control operation may include:

[0080] In response to a recording operation on screen content of a terminal device, generating at least two drawing tasks corresponding to the recording operation; or,

[0081] In response to a sharing operation on the screen content of the terminal device, generating at least two drawing tasks corresponding to the sharing operation; or,

[0082] In response to a screen capture operation on a terminal device, at least two drawing tasks corresponding to the screen capture operation are generated.

[0083] It is worth noting that in response to the recording operation of the screen content of the terminal device, a physical screen drawing task and a virtual screen drawing task corresponding to the recording operation are generated, and the target display image corresponding to the physical screen drawing task can be as follows: Figure 2a In response to the sharing operation of the screen content of the terminal device, a physical screen drawing task and a virtual screen drawing task corresponding to the sharing operation are generated. The target display image corresponding to the physical screen drawing task can be as shown in FIG. Figure 2b In response to the screen capture operation for the terminal device, a physical screen drawing task and a virtual screen drawing task corresponding to the screen capture operation are generated. The target display image corresponding to the physical screen drawing task can be as shown in FIG. Figure 2c shown.

[0084] In one possible embodiment, see Figure 3 In step S13, calling the second thread to execute other drawing tasks among the at least two drawing tasks except the target drawing task includes:

[0085] In step S41, a second thread is newly created.

[0086] In step S42, the second thread is called to execute other drawing tasks except the target drawing task among the at least two drawing tasks.

[0087] For example, when the terminal device generates a drawing task corresponding to the control request, the SurfaceFlinger main thread creates a new Passblur thread, and calls the Passblur thread to execute other drawing tasks except the target drawing task among the at least two drawing tasks.

[0088] The disclosed embodiment calls the first thread to execute the target drawing task, creates and calls the second thread to execute other drawing tasks, and assigns part of the drawing tasks generated by the terminal device in response to the operation control to the second thread to reduce the drawing task amount of the first thread.

[0089] In a possible embodiment, in step S13, calling the first thread to execute the target drawing task, and calling the second thread to execute other drawing tasks except the target drawing task among the at least two drawing tasks to obtain the target display image may include:

[0090] A first thread is called to trigger a first processing hardware of a terminal device to execute a target drawing task, and a second thread is called to trigger a second processing hardware of the terminal device to execute other drawing tasks except the target drawing task among at least two drawing tasks, so as to obtain a target display image, wherein the first processing hardware and the second processing hardware are the same or different.

[0091] It is worth noting that the terminal device includes hardware resources such as GPU and HWC hardware (Hardware Composer, hardware hybrid renderer), and each hardware resource has different characteristics. For example, the GPU has a strong ability to process image data and consumes more power, while the HWC has a weak ability to process image data and consumes less power. Different threads can be called to trigger the hardware to execute the target drawing task.

[0092] In one possible embodiment, see Figure 4 , calling a first thread to trigger a first processing hardware of a terminal device to execute a target drawing task, and calling a second thread to trigger a second processing hardware of the terminal device to execute other drawing tasks except the target drawing task among at least two drawing tasks, may include:

[0093] In step S51, the control layer corresponding to the control operation is determined, and display data of other layers to be displayed under the control layer is obtained.

[0094] It is worth noting that the control operation triggers the control terminal device to start the task process. Each task process is associated with a unique preset layer, and the preset layers associated with different task processes are different. Therefore, when the control operation triggers the terminal device to start the task process, the preset layer associated with the task process will be used as the control layer corresponding to the control operation.

[0095] It is worth noting that, according to the historical control operation of the terminal device, the rendering hierarchy structure corresponding to the terminal device is determined, and according to the rendering hierarchy structure, the display data of other layers to be displayed under the control layer is obtained. Among them, the rendering hierarchy structure represents the existing layers of the terminal device and the positions of each layer. The rendering hierarchy structure is not fixed and changes with the control operation of the terminal device.

[0096] In step S52, the first thread is called to trigger the first processing hardware of the terminal device to perform a target drawing task, and draw the first target display image according to the control layer and the display data, and the second thread is called to trigger the second processing hardware of the terminal device to perform other drawing tasks, and draw the second target display image according to the control layer and the display data.

[0097] In step S53, the first target display image and the second target display image are the same or different.

[0098] It is worth noting that the target display image includes a first target display image and / or a second target display image. For example, when recording a screen, the first target image and the second target image are the same; when taking a screenshot, the first target image and the second target image are different.

[0099] In the embodiment of the present disclosure, a first thread is called to trigger the first processing hardware of the terminal device to execute a target drawing task to obtain a first target display image, and a second thread is called to trigger the second processing hardware of the terminal device to execute other drawing tasks to obtain a second target display image, thereby making full use of the processing hardware of the terminal device.

[0100] In a possible embodiment, the first processing hardware and the second processing hardware are both graphics processors; or, the first processing hardware is a hardware hybrid renderer, and the second processing hardware is a graphics processor.

[0101] It is worth noting that because the GPU has a stronger ability to process image data and consumes more power, the HWC has a weaker ability to process image data and consumes less power. When the amount of image processing data corresponding to the target drawing request is large, both the SF main thread and the PB thread trigger the GPU to execute the target drawing task. At this time, the interaction between the threads can be seen in Figure 5a .

[0102] like Figure 5aAs shown, the SF main thread sends the control layer and display data and the GPU call instruction to the RE thread. The RE thread encapsulates the control layer and display data into a data format readable by the GPU, calls the GPU to draw the first target display image, and feeds back the first target display image to the SF main thread. At the same time, the SF main thread sends the control layer and display data to the PB thread. The PB thread sends the display data and the GPU call request to the RE thread. The RE thread encapsulates the display data into a data format readable by the GPU, calls the GPU to draw the second target display image, and sends the second target image to the task process.

[0103] It is worth noting that both the SF main thread and the PB thread trigger the GPU to execute the target drawing task, which will cause the terminal device to consume more power. Therefore, the target display image is generally obtained by triggering the HWC to execute the target drawing task through the SF main thread, and the PB thread triggers the GPU to execute other drawing tasks. At this time, the interaction between the threads can be seen in Figure 5b .

[0104] like Figure 5b As shown, the SF main thread sends the control layer and display data to the PB thread, and the PB thread sends the control layer and display data and the GPU call request to the RE thread. The RE thread encapsulates the control layer and display data into a data format readable by the GPU, and calls the GPU to draw the second target display image, and sends the second target image to the task process. At the same time, the SF main thread calls the HWC to draw the first target display image.

[0105] For example, in the screen recording process: when the SurfaceFlinger main thread of the Android phone detects multiple drawing requests, it sends the second display data corresponding to other drawing requests to the Passblur thread. The Passblur thread is responsible for executing the DequeueBuffer() instruction and initiating a drawing task to the RenderEngine thread. After the RenderEngine thread finishes drawing the buffer, the SurfaceFlinger main thread notifies the business process that the drawing has been completed. At this time, the SurfaceFlinger main thread reduces a lot of drawing tasks and can make full use of the multi-core operation principle of the CPU.

[0106] In the disclosed embodiment, the same or different processing hardware may be triggered to execute the drawing request according to the amount of image processing data corresponding to the target drawing request, thereby reducing the power consumption of the terminal device while obtaining the target display image.

[0107] In a possible embodiment, the interface display method may further include:

[0108] Adjust the priority of threads that are performing other drawing tasks to reduce the time it takes to draw the target display image.

[0109] It is worth noting that threads related to executing other drawing tasks may include a Passblur thread, a Binder thread (bonding thread), a drawing thread, and a rendering thread.

[0110] In a possible embodiment, adjusting the priority of threads related to executing other drawing tasks may include:

[0111] Adjust the priority of threads associated with other drawing tasks in at least one of the following ways:

[0112] Adjust the priority of the second thread to the real-time priority;

[0113] Adjust the priority of the glue thread in the task process to real-time priority;

[0114] Adjust the priority of the drawing thread in the task process to real-time priority;

[0115] Adjust the priority of the rendering thread in the task process to real-time priority;

[0116] The task process is a process that triggers the processing hardware of the terminal device to execute the drawing task.

[0117] For example, see Figure 6 In the case where threads related to executing other drawing tasks may include a Passblur thread, a Binder thread (bonding thread), a drawing thread, and a rendering thread, the interaction process between the SF main thread and the task process may include:

[0118] The SF main thread sends a post task to the Passblur thread.

[0119] It is worth noting that when a new Passblur thread is created and the Passblur thread is started by the SF main thread, the priority of the Passblur thread is adjusted to Real-Rime priority.

[0120] The Passblur thread sends a DequeueBuffer() instruction to the Binder thread, and the Binder thread responds to the DequeueBuffer() instruction and feeds back the address of the image to be drawn to the Passblur thread; after calling the GPU to execute other drawing requests, the Passblur thread sends a QueueBuffer() instruction to the Binder thread, and the Binder thread responds to the QueueBuffer() instruction and feeds back the address of the target image to be stored to the Passblur thread; the Binder thread notifies the rendering thread.

[0121] It is worth noting that the Passblur thread sends the DequeueBuffer() instruction and the QueueBuffer() instruction to the Binder thread, that is, the Passblur thread initiates the request to the Binder thread for the buffer space to be filled with data and notifies the Binder thread that the data filling has been completed. The priority of the Binder thread is adjusted to the Real-Rime priority to ensure that the business thread can be executed as soon as possible to avoid blocking the SF main thread.

[0122] The rendering thread notifies the drawing thread.

[0123] It is worth noting that after the Binder thread receives the QueueBuffer() instruction and executes the QueueBuffer() instruction, it will notify the rendering thread that new data has arrived. In order to ensure that the rendering thread in the business process receives the message of new data in time, so that the rendering thread of the business process can technically obtain the basic data required for blur processing, the priority of the rendering process is adjusted to the Real-Rime priority.

[0124] The drawing thread performs drawing to obtain the target display image.

[0125] It is worth noting that in order to improve the execution speed of the drawing task in the business process, the priority of the drawing thread can be adjusted to the Real-Rime priority.

[0126] In the disclosed embodiment, the priority of the thread related to executing other drawing tasks can be adjusted to the Real-Rime priority to ensure that the drawing task can be executed in the shortest time to obtain the target drawing image, further shortening the time for the main thread to execute the drawing task.

[0127] See also Figure 7 The interface display method provided by the present disclosure may also include the following steps:

[0128] In step S91, in response to a screenshot operation on a terminal device, at least two drawing tasks corresponding to the screenshot operation are generated.

[0129] In step S92, a target drawing task that needs to display drawing content on a display interface is determined from at least two drawing tasks.

[0130] In step S93, a new Passblur thread is created.

[0131] In step S94, the control layer corresponding to the control operation is determined, and display data of other layers to be displayed under the control layer is obtained.

[0132] In step S95, the SurfaceFlinger main thread is called to trigger the hardware hybrid renderer of the terminal device to perform the target drawing task, draw the first target display image according to the control layer and the display data, and the Passblur thread is called to trigger the graphics processor of the terminal device to perform other drawing tasks, and draw the second target display image according to the control layer and the display data.

[0133] In step S96, the priorities of the Passblur thread, the Binder thread, the drawing thread and the rendering thread related to executing other drawing tasks are adjusted to the Real-Rime priority.

[0134] In step S97, the target display image is displayed on the display interface of the terminal device.

[0135] The disclosed embodiment uses the SurfaceFlinger main thread to execute the target drawing task, creates and calls the Passblur thread to execute other drawing tasks, and assigns part of the drawing tasks generated by the terminal device in response to the operation control to the second thread to reduce the drawing task amount of the first thread. The priority of the thread related to executing other drawing tasks is adjusted to the Real-Rime priority, ensuring that the drawing task can be executed in the shortest time to obtain the target drawing image, further shortening the time for the main thread to execute the drawing task.

[0136] Based on the same inventive concept, the present disclosure also provides an interface display device, referring to Figure 8 The interface display device includes a response module 101, a determination module 102, an execution module 103 and a control module 104.

[0137] The response module 101 is used to generate at least two drawing tasks corresponding to the control operation in response to the control operation on the terminal device.

[0138] The determination module 102 is used to determine a target drawing task that needs to display drawing content on a display interface from among at least two drawing tasks.

[0139] The execution module 103 is used to call the first thread to execute the target drawing task, and call the second thread to execute other drawing tasks except the target drawing task among the at least two drawing tasks, so as to obtain a target display image.

[0140] The control module 104 is used to display the target display image in the display interface of the terminal device.

[0141] The disclosed embodiment calls the first thread to execute the target drawing task, creates and calls the second thread to execute other drawing tasks, and assigns part of the drawing tasks generated by the terminal device in response to the operation control to the second thread to reduce the drawing task amount of the first thread.

[0142] For example, the response module 101 is used to generate at least two drawing tasks corresponding to the recording operation in response to the recording operation on the screen content of the terminal device; or,

[0143] In response to a sharing operation on the screen content of the terminal device, generating at least two drawing tasks corresponding to the sharing operation; or,

[0144] In response to a screen capture operation on a terminal device, at least two drawing tasks corresponding to the screen capture operation are generated.

[0145] For example, the execution module 103 is used to create a new second thread;

[0146] The second thread is called to execute other drawing tasks except the target drawing task among the at least two drawing tasks.

[0147] By way of example, the execution module 103 is used to call a first thread to trigger a first processing hardware of a terminal device to execute a target drawing task, and to call a second thread to trigger a second processing hardware of the terminal device to execute other drawing tasks among at least two drawing tasks except the target drawing task, to obtain a target display image, wherein the first processing hardware and the second processing hardware are the same or different.

[0148] For example, the execution module 103 is used to determine the control layer corresponding to the control operation, and obtain display data of other layers to be displayed under the control layer;

[0149] Calling the first thread to trigger the first processing hardware of the terminal device to perform a target drawing task, drawing a first target display image according to the control layer and the display data, and calling the second thread to trigger the second processing hardware of the terminal device to perform other drawing tasks, drawing a second target display image according to the control layer and the display data;

[0150] The first target display image and the second target display image are the same as or different from each other.

[0151] For example, the first processing hardware and the second processing hardware are both graphics processors; or, the first processing hardware is a hardware hybrid renderer, and the second processing hardware is a graphics processor.

[0152] For example, the interface display device further includes an optimization module, which is used to adjust the priority of threads related to executing other drawing tasks to shorten the drawing time of the target display image.

[0153] For example, the optimization module is used to adjust the priority of threads related to executing other drawing tasks in at least one of the following ways:

[0154] Adjust the priority of the second thread to the real-time priority;

[0155] Adjust the priority of the glue thread in the task process to real-time priority;

[0156] Adjust the priority of the drawing thread in the task process to real-time priority;

[0157] Adjust the priority of the rendering thread in the task process to real-time priority;

[0158] The task process is a process that triggers the processing hardware of the terminal device to execute the drawing task.

[0159] Regarding the interface display device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0160] The present disclosure also provides a computer-readable storage medium having computer program instructions stored thereon, and the program instructions, when executed by a processor, implement the steps of the interface display method provided by the present disclosure.

[0161] Based on the same inventive concept, the embodiment of the present disclosure further provides an interface display device, including:

[0162] processor;

[0163] a memory for storing processor-executable instructions;

[0164] Wherein, the processor is configured to:

[0165] In response to a control operation on a terminal device, generating at least two drawing tasks corresponding to the control operation;

[0166] Determining a target drawing task that needs to display drawing content on the display interface from among at least two drawing tasks;

[0167] Calling the first thread to execute the target drawing task, and calling the other drawing tasks except the target drawing task among the at least two drawing tasks of the second thread to obtain a target display image;

[0168] The target display image is displayed in a display interface of a terminal device.

[0169] The disclosed embodiment calls the first thread to execute the target drawing task, creates and calls the second thread to execute other drawing tasks, and assigns part of the drawing tasks generated by the terminal device in response to the operation control to the second thread to reduce the drawing task amount of the first thread.

[0170] Fig. 9 1 is a block diagram of an interface display device 1100 according to an exemplary embodiment. For example, the interface display device 1100 may be a mobile phone, a computer, a messaging device, a tablet device, a personal digital assistant, and the like.

[0171] Reference Fig. 9 The interface display device 1100 may include one or more of the following components: a processing component 1102 , a memory 1104 , a power component 1106 , a multimedia component 11011 , an audio component 1110 , an input / output interface 1112 , a sensor component 1114 , and a communication component 1116 .

[0172] The processing component 1102 generally controls the overall operation of the interface display device 1100, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 1102 may include one or more processors 1120 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 1102 may include one or more modules to facilitate the interaction between the processing component 1102 and other components. For example, the processing component 1102 may include a multimedia module to facilitate the interaction between the multimedia component 1108 and the processing component 1102.

[0173] The memory 1104 is configured to store various types of data to support operations on the interface display device 1100. Examples of such data include instructions for any application or method operating on the interface display device 1100, contact data, phone book data, messages, pictures, videos, etc. The memory 1104 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0174] The power supply component 1106 provides power to the various components of the interface display device 1100. The power supply component 1106 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the interface display device 1100.

[0175] The multimedia component 1108 includes a screen that provides an output interface between the interface display device 1100 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 1108 includes a front camera and / or a rear camera. When the interface display device 1100 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0176] The audio component 1110 is configured to output and / or input audio signals. For example, the audio component 1110 includes a microphone (MIC), and when the interface display device 1100 is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 1104 or sent via the communication component 1116. In some embodiments, the audio component 1110 also includes a speaker for outputting audio signals.

[0177] The input / output interface 1112 provides an interface between the processing component 1102 and the peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.

[0178] The sensor assembly 1114 includes one or more sensors for providing various aspects of status assessment for the interface display device 1100. For example, the sensor assembly 1114 can detect the open / closed state of the interface display device 1100, the relative positioning of components, such as the display and keypad of the interface display device 1100, and the sensor assembly 1114 can also detect the position change of the interface display device 1100 or a component of the interface display device 1100, the presence or absence of user contact with the interface display device 1100, the orientation or acceleration / deceleration of the interface display device 1100, and the temperature change of the interface display device 1100. The sensor assembly 1114 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 1114 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 1114 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0179] The communication component 1116 is configured to facilitate wired or wireless communication between the interface display device 1100 and other devices. The interface display device 1100 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 1116 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 1116 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0180] In an exemplary embodiment, the interface display device 1100 can be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above method.

[0181] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 1104 including instructions, and the instructions can be executed by a processor 1120 of the interface display device 1100 to complete the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0182] In addition to being an independent electronic device, the above-mentioned interface display device can also be a part of an independent electronic device. For example, in one embodiment, the device can be an integrated circuit (IC) or a chip, wherein the integrated circuit can be an IC or a collection of multiple ICs; the chip can include but is not limited to the following types: GPU (Graphics Processing Unit), CPU (Central Processing Unit), FPGA (Field Programmable Gate Array), DSP (Digital Signal Processor), ASIC (Application Specific Integrated Circuit), SOC (System on Chip, SoC), etc. The above-mentioned integrated circuit or chip can be used to execute executable instructions (or codes) to implement the above-mentioned interface display method. The executable instructions can be stored in the integrated circuit or chip, or can be obtained from other devices or equipment, for example, the integrated circuit or chip includes a processor, a memory, and an interface for communicating with other devices. The executable instruction can be stored in the memory, and when the executable instruction is executed by the processor, the above-mentioned interface display method is implemented; alternatively, the integrated circuit or chip can receive the executable instruction through the interface and transmit it to the processor for execution, so as to implement the above-mentioned interface display method.

[0183] In another exemplary embodiment, a computer program product is further provided. The computer program product includes a computer program that can be executed by a programmable device. The computer program has a code portion for executing the above interface display method when executed by the programmable device.

[0184] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the present disclosure. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0185] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. An interface display method, characterized in that: include: In response to a control operation on a terminal device, generating at least two drawing tasks corresponding to the control operation; Determining a target drawing task that needs to display drawing content on the display interface from among the at least two drawing tasks; Calling the first thread to execute the target drawing task, and calling the second thread to execute other drawing tasks among the at least two drawing tasks except the target drawing task, to obtain a target display image; The target display image is displayed in the display interface of the terminal device.

2. The interface display method according to claim 1, characterized in that: The step of generating, in response to a control operation on a terminal device, at least two drawing tasks corresponding to the control operation comprises: In response to a recording operation on screen content of a terminal device, generating at least two drawing tasks corresponding to the recording operation; or, In response to a sharing operation on the screen content of a terminal device, generating at least two drawing tasks corresponding to the sharing operation; or, In response to a screen capture operation on a terminal device, at least two drawing tasks corresponding to the screen capture operation are generated.

3. The interface display method according to claim 1, characterized in that: The calling the second thread to execute other drawing tasks among the at least two drawing tasks except the target drawing task includes: Create a second thread; The second thread is called to execute other drawing tasks among the at least two drawing tasks except the target drawing task.

4. The interface display method according to any one of claims 1 to 3, characterized in that: The calling of the first thread to execute the target drawing task, and the calling of the second thread to execute other drawing tasks among the at least two drawing tasks except the target drawing task, to obtain a target display image, includes: The first thread is called to trigger the first processing hardware of the terminal device to execute the target drawing task, and the second thread is called to trigger the second processing hardware of the terminal device to execute other drawing tasks among the at least two drawing tasks except the target drawing task, so as to obtain a target display image, wherein the first processing hardware and the second processing hardware are the same or different.

5. The interface display method according to claim 4, characterized in that: The calling of the first thread to trigger the first processing hardware of the terminal device to execute the target drawing task, and the calling of the second thread to trigger the second processing hardware of the terminal device to execute other drawing tasks among the at least two drawing tasks except the target drawing task, include: Determine the control layer corresponding to the control operation, and obtain display data of other layers to be displayed under the control layer; Calling the first thread to trigger the first processing hardware of the terminal device to perform the target drawing task, and draw a first target display image according to the control layer and the display data, and calling the second thread to trigger the second processing hardware of the terminal device to perform the other drawing tasks, and draw a second target display image according to the control layer and the display data; The first target display image and the second target display image are the same as or different from each other.

6. The interface display method according to claim 4, characterized in that: The first processing hardware and the second processing hardware are both graphics processors; or, the first processing hardware is a hardware hybrid renderer, and the second processing hardware is a graphics processor.

7. The interface display method according to any one of claims 1 to 3, characterized in that: The interface display method further includes: The priority of the thread related to executing the other drawing tasks is adjusted to shorten the drawing time of the target display image.

8. The interface display method according to claim 7, characterized in that: The adjusting the priority of the thread related to executing the other drawing tasks includes: Adjust the priority of the thread related to executing the other drawing task in at least one of the following ways: Adjusting the priority of the second thread to a real-time priority; Adjust the priority of the glue thread in the task process to real-time priority; Adjust the priority of the drawing thread in the task process to real-time priority; Adjust the priority of the rendering thread in the task process to real-time priority; The task process is a process that triggers the processing hardware of the terminal device to execute a drawing task.

9. An interface display device, characterized in that: include: A response module, configured to generate at least two drawing tasks corresponding to a control operation on a terminal device in response to the control operation; A determination module, configured to determine a target drawing task that needs to display drawing content on the display interface from among the at least two drawing tasks; An execution module, configured to call the first thread to execute the target drawing task, and call the second thread to execute other drawing tasks among the at least two drawing tasks except the target drawing task, to obtain a target display image; A control module is used to display the target display image in the display interface of the terminal device.

10. An interface display device, characterized in that: include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to: In response to a control operation on a terminal device, generating at least two drawing tasks corresponding to the control operation; Determining a target drawing task that needs to display drawing content on the display interface from among the at least two drawing tasks; Calling the first thread to execute the target drawing task, and calling the second thread to execute other drawing tasks among the at least two drawing tasks except the target drawing task, to obtain a target display image; The target display image is displayed in the display interface of the terminal device.

11. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the steps of the interface display method described in any one of claims 1 to 8 are implemented.