Display control method and device

By dividing the display buffer into multiple sub-regions and using state value management operations, the lag caused by mismatch in rendering and display speeds is solved, and a lower lag probability and shorter waiting time is achieved.

CN119579389APending Publication Date: 2025-03-07HUAWEI DEVICE CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202311152909.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-07
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

In the display system, the speed of rendering and sending display does not match, resulting in lag and affecting the user experience.

Method used

The display buffer is divided into multiple sub-regions, and the corresponding status values ​​are locked or unlocked. The GPU and display hardware render and send display operations in sub-regions.

Benefits of technology

It effectively reduces the probability of lag caused by mismatch in rendering and display, and reduces the waiting time of the GPU and display hardware.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119579389A_ABST
    Figure CN119579389A_ABST
Patent Text Reader

Abstract

The invention discloses a display control method and equipment, the method is applied to electronic equipment, and the electronic equipment comprises a central processing unit (CPU), an image processor (GPU) and display hardware; the CPU sends a rendering instruction to the GPU and sends a display sending instruction to the display hardware; after the GPU receives the rendering instruction, rendering operation is executed in each sub-area of a display buffer area in sequence, the display buffer area comprises a plurality of sub-areas, and each sub-area is associated with a state value; and after the display hardware receives the display sending instruction, before the display sending operation is executed on any sub-region, judging whether the rendering operation of the current sub-region is completed or not according to the state value corresponding to the current sub-region, and if the rendering operation of the current sub-region is determined to be completed, executing the display sending operation on the current sub-region. The display buffer area is divided into a plurality of sub-areas, and rendering and sending display are carried out by taking the sub-areas as units, so that the probability of a lagging phenomenon caused by mismatching of rendering and sending display is effectively reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computer technology, and in particular, to a display control method and device. Background Art

[0002] In the display system, screen display usually requires two steps: rendering and display. Rendering is when the graphics processor (GPU) draws the display content to the display buffer, that is, the GPU writes to the display buffer, and display display is when the display hardware synthesizes the content on the display buffer and transmits it to the screen, that is, the display hardware reads the display buffer. The rendering and display display of the display buffer will not be performed at the same time. Display display can only start after rendering is completed, and the rendering of the next frame of the image can only start after display display is completed, so as to avoid display problems such as screen splitting.

[0003] However, the rendering speed and the display speed are usually not matched, and the number of current tasks has a great impact on the rendering speed. If the rendering speed is fast and there are many tasks, and the display speed is slow, there will be no buffer available and delayed drawing, which will lead to screen freezes and affect the user experience. Summary of the invention

[0004] The embodiments of the present application provide a display control method and device, which divide the display buffer into multiple sub-areas, and render and display them in units of sub-areas, which can effectively reduce the probability of stuttering caused by mismatch between rendering and display.

[0005] In a first aspect, an embodiment of the present application provides a display control method, which is applied to an electronic device, the electronic device comprising: a central processing unit (CPU), a GPU and display hardware, wherein a display buffer of the electronic device comprises a plurality of sub-areas, each of which is associated with a state value;

[0006] The CPU sends rendering instructions to the GPU and sends display instructions to the display hardware;

[0007] After receiving the rendering instruction sent by the CPU, the GPU performs rendering operations in each of the multiple sub-areas in turn;

[0008] After the display hardware receives the display sending instruction sent by the CPU, it will execute the display sending operation in each of the multiple sub-areas in turn. Before executing the display sending operation on any sub-area, the display hardware will determine whether the rendering operation of the current sub-area has been completed based on the status value corresponding to the current sub-area. If it is determined that the rendering operation of the current sub-area has been completed, the display sending operation will be executed on the current sub-area.

[0009] In the embodiment of the present application, the display buffer is divided into multiple sub-areas and locked or unlocked through corresponding status values. After the GPU completes the rendering operation on any sub-area, the display hardware can perform the display operation on the sub-area, thereby reducing the waiting time of the display hardware.

[0010] In a possible implementation, the multiple sub-areas of the display buffer are divided based on a single rendering space occupied by the GPU and a single display space occupied by the display hardware.

[0011] In a possible implementation, the space occupied by each sub-region is a larger value of the space occupied by a single rendering of the GPU and the space occupied by a single display sending of the display hardware.

[0012] In an embodiment of the present application, the display buffer is divided based on the larger value of the space occupied by the GPU for single rendering and the space occupied by the display hardware for single display transmission. The display buffer can be divided into as many sub-areas as possible without affecting the normal operation of the GPU and the display hardware. The more sub-areas there are, the shorter the waiting time.

[0013] In a possible implementation, the state value includes: a value corresponding to an operable state or a value corresponding to an inoperable state;

[0014] The specific way in which the display hardware determines whether the rendering operation of the corresponding sub-region has been completed based on the status value of each sub-region includes:

[0015] If the state value corresponds to an operable state, it is determined that the rendering operation of the corresponding sub-region has been completed;

[0016] If the state value corresponds to an inoperable state, it is determined that the rendering operation of the corresponding sub-region is not completed.

[0017] In the embodiment of the present application, the status value of each sub-region may be used to indicate whether the corresponding sub-region is operable, so that the GPU and the display hardware do not operate on the same sub-region at the same time.

[0018] In a possible implementation, before the display hardware performs a rendering operation on any sub-region, if it is determined that the rendering operation of the current sub-region is not completed, the display operation is not performed on the current sub-region and the process waits.

[0019] In the embodiment of the present application, the GPU and the display hardware cannot operate on the same sub-area at the same time. When the display hardware detects that the GPU is rendering the current sub-area, it needs to wait to avoid incomplete display of the picture.

[0020] In a possible implementation, after receiving the rendering instruction, the GPU performs a rendering operation in each sub-area of ​​the display buffer in a specific manner, including:

[0021] Before the GPU performs a rendering operation on any sub-region, it determines whether the display operation of the current sub-region has been completed according to the status value corresponding to the current sub-region;

[0022] If it is determined that the rendering operation of the current sub-region has been completed, the rendering operation is performed on the current sub-region; if it is determined that the rendering operation of the current sub-region has not been completed, the rendering operation is not performed on the current sub-region and waiting is performed.

[0023] In an embodiment of the present application, for any sub-area, after the display hardware completes the display sending operation, the GPU can start to execute the rendering operation, thereby reducing the waiting time. When the display hardware is still executing the display sending operation, the GPU needs to wait, thereby avoiding an incomplete picture.

[0024] In a possible implementation, when the GPU performs a rendering operation on any sub-region, the state value corresponding to the current sub-region is modified to a value corresponding to the inoperable state;

[0025] After the rendering operation on any sub-region is completed, the state value corresponding to the current sub-region is modified to a value corresponding to the operable state.

[0026] In the embodiment of the present application, the GPU can lock or unlock the corresponding sub-area by modifying the state value, blocking the display hardware access to ensure the integrity of the display image.

[0027] In a possible implementation, when the display hardware performs a display operation on any sub-region, the state value corresponding to the current sub-region is modified to a value corresponding to an inoperable state;

[0028] After the display operation of any sub-region is completed, the state value corresponding to the current sub-region is modified to the value corresponding to the operable state.

[0029] In the embodiment of the present application, the display hardware can lock or unlock the corresponding sub-area by modifying the state value, blocking the GPU access to ensure the integrity of the display image.

[0030] In a second aspect, an embodiment of the present application provides an electronic device, including:

[0031] at least one processor; and

[0032] at least one memory in communication with the processor, wherein:

[0033] The memory stores program instructions, and the processor calls the program instructions to execute the method provided in the first aspect.

[0034] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium includes a stored program, wherein when the program is executed by a processor, the method provided in the first aspect is implemented.

[0035] In an embodiment of the present application, the electronic device includes: a central processing unit CPU, a graphics processing unit GPU and display hardware; the CPU sends a rendering instruction to the GPU, and sends a display sending instruction to the display hardware; after receiving the rendering instruction, the GPU performs a rendering operation in each sub-area of ​​the display buffer in turn, wherein the display buffer includes multiple sub-areas, and each sub-area is associated with a status value; after receiving the display sending instruction, before performing the display sending operation on any sub-area, the display hardware determines whether the rendering operation of the current sub-area has been completed according to the status value corresponding to the current sub-area, and if it is determined that the rendering operation of the current sub-area has been completed, the display sending operation is performed on the current sub-area. By dividing the display buffer into multiple sub-areas and performing rendering and display sending in units of sub-areas, the probability of a jamming phenomenon caused by a mismatch between rendering and display sending is effectively reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 A schematic diagram of a display control method provided in an embodiment of the present application;

[0037] Figure 2 A schematic diagram of another display control method provided in an embodiment of the present application;

[0038] Figure 3A A schematic diagram of another display control method provided in an embodiment of the present application;

[0039] Figure 3B A flow chart of a display control method provided in an embodiment of the present application;

[0040] Figure 4 A flowchart of another display control method provided by an embodiment of the present application;

[0041] Figure 5 A flowchart of another display control method provided by an embodiment of the present application;

[0042] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application

[0043] Figure 7 A software structure block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0044] The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, but should not be construed as limiting the present invention.

[0045] In order to better understand the technical solution of this specification, the embodiments of the present application are described in detail below with reference to the accompanying drawings.

[0046] It should be clear that the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this specification.

[0047] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit this specification. The singular forms of "a", "said" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.

[0048] When electronic devices (such as smartphones, smart watches, and tablets) display image content on the screen, they need to perform a pair of related operations: rendering and display. Figure 1 As shown, the rendering operation is performed by GPU 101. During this process, GPU 101 draws the image content to be displayed into the display buffer; the display sending operation is performed by display hardware 102. During this process, display hardware 102 transmits the image content in the display buffer to the screen. For the same frame of image, generally, the display hardware 102 can perform the display sending operation only after the rendering operation of GPU 101 is completed, so as to prevent display errors such as screen splitting caused by incomplete buffer content during display sending. However, the rendering speed and the display sending speed do not necessarily match. If the rendering speed is fast and there are many tasks, and the display sending speed is slow, there will be no buffer available and delayed drawing, which will appear as a freeze to the user.

[0049] In response to the above technical problems, one possible implementation method is to increase the display buffer. When the display hardware has not completed the display operation of one display buffer, the GPU will draw the new drawing content to other display buffers without waiting for the display hardware to complete the display operation. Taking the Android system as an example, the Android system can set three display buffers, such as Figure 2As shown, the three display buffers are display buffer A, display buffer B and display buffer C. GPU201 performs a rendering operation at display buffer A, and display hardware 202 performs a display sending operation at display buffer C. After GPU201 completes the rendering operation on display buffer A, display buffer A is exchanged with display buffer B, and GPU draws the subsequent image content into display buffer B. After display hardware 202 completes the display sending operation on display buffer C, display buffer C is exchanged with display buffer A, and display hardware 202 performs a display sending operation on display buffer A, and reads the image content previously drawn by GPU201 in display buffer A. Although increasing the display buffer can reduce the probability of screen freeze, it also increases system overhead, and the display buffer cannot be increased indefinitely.

[0050] Based on the above technical problems, an embodiment of the present application provides a display control method, which reduces the waiting time for rendering and display by dividing a display buffer into multiple sub-areas, thereby reducing the probability of screen freeze.

[0051] In the embodiment of the present application, the GPU does not draw the image content in the display buffer in units of the entire display buffer. The area occupied by a single rendering is usually smaller than the display buffer. Similarly, the area occupied by the display hardware for a single display is usually smaller than the display buffer. On this basis, the embodiment of the present application divides the display buffer into multiple sub-areas, such as Figure 3A As shown, the display buffer may include a first sub-area, a second sub-area, ..., an Nth sub-area.

[0052] When executing the display task, the operation mode of each module can be as follows: Figure 3B As shown, CPU303 sends rendering instructions and display instructions to GPU301 and display hardware 302 respectively. After receiving the rendering instructions sent by CPU303, GPU301 performs a rendering operation on the display buffer. Specifically, GPU301 first draws the image content in the first sub-area. At this time, the first sub-area can be regarded as a rendering area. After receiving the display instruction sent by CPU303, display hardware 302 performs a display operation on the display buffer. Specifically, the display hardware first detects whether the rendering operation of the first sub-area has been completed. If it is determined that GPU301 has completed the drawing in the first sub-area, the display operation is performed in the first sub-area, and the image content in the first sub-area is read and transmitted to the screen. If the display hardware 302 detects that GPU301 is still drawing the image content in the first sub-area, it waits until GPU301 has finished drawing, and then reads the image content in the first sub-area.

[0053] After GPU301 completes drawing the image content in the first sub-area, it will continue drawing in the second sub-area, and the second sub-area can be used as a rendering area at this time. After the display hardware 302 detects that GPU301 has completed drawing in the first sub-area, it can directly perform a display operation on the first sub-area, and the first sub-area can be used as a display area at this time. After GPU301 completes the rendering operation in the second sub-area, it will continue to perform the rendering operation in the next sub-area. After the display hardware 302 completes the display operation on the first sub-area and detects that GPU301 has completed the rendering operation on the second sub-area, it will continue to perform the display operation on the second sub-area.

[0054] In a possible implementation, each sub-area of ​​the display buffer may be configured with an associated status value, and the status value may include an operable state and an inoperable state, which is used to implement the function of locking and unlocking the sub-area. In a specific implementation, the numerical value of the status value may include 0 or 1, wherein 0 indicates an operable state and 1 indicates an inoperable state. Before GPU301 performs a rendering operation on the first sub-area, it is necessary to first detect the status value of the first sub-area. If this status value is 0, the rendering operation is performed directly; if this status value is 1, it indicates that the display hardware 302 is performing a display sending operation on the first sub-area, and GPU301 needs to wait. When GPU301 performs a rendering operation on the first sub-area, it is necessary to modify the status value of the first sub-area from 0 to 1 to prevent the display hardware 302 from performing a display sending operation before the rendering is completed, resulting in an incomplete picture. When GPU301 performs a rendering operation on any sub-area, it will modify the corresponding status value to 1, and after the rendering operation is completed, the status will be modified to 0. Similarly, when the display hardware 302 performs a display operation on any sub-area, the corresponding status value will be modified to 1. After the display operation is completed, the status value will be modified to 0. Modifying the status value to 1 can be regarded as locking the sub-area and blocking other hardware access, and modifying the status value to 0 can be regarded as unlocking the sub-area and allowing other hardware access.

[0055] In the existing scheme, the object to be locked and unlocked is usually the entire display buffer. The display hardware can only perform the display operation after the GPU has completed the rendering operation on the entire display buffer; the GPU can only perform the rendering operation again after the display hardware has completed the display operation on the entire display buffer, and the waiting time of the GPU or the display hardware is relatively long. In the embodiment of the present application, the object to be locked and unlocked is a sub-area. After the GPU has completed the rendering operation on any sub-area, the display hardware can perform the display operation on the sub-area; after the display hardware has completed the display operation on any sub-area, the GPU can perform the rendering operation on the sub-area. The maximum waiting time of the GPU is shortened from the time it takes the display hardware to read the contents of the entire display buffer to the time it takes the display hardware to read the contents of a sub-area, and the maximum waiting time of the display hardware is shortened from the time it takes the GPU to draw the contents of the entire display buffer to the time it takes the GPU to draw the contents of a sub-area, which effectively reduces the waiting time of the GPU or the display hardware and reduces the probability of screen freezes.

[0056] In a specific embodiment, the locking and unlocking of the display buffer can be achieved through a fence mechanism, and each display buffer is equipped with a fence. Among them, the fence can be regarded as a public variable, and both the GPU and the display hardware can operate the fence. After the GPU completes the rendering operation in the display buffer, it will modify the corresponding fence, and the display hardware will also modify the corresponding fence after completing the display operation in the display buffer. The GPU and the display hardware indicate whether the corresponding display buffer can perform rendering operations or display operations by modifying the value of the fence. The GPU is an image processor, which is used to draw the image content to be displayed to the display buffer; the display hardware can specifically refer to a display controller, which is used to read the image content of the display buffer and transmit it to the screen. Taking an electronic device equipped with an embedded system as an example, the liquid crystal display (LCD) controller is a display hardware that can complete a series of complex graphic display functions such as display, flipping, superposition and scaling of graphics.

[0057] The display control method of the embodiment of the present application optimizes the fence mechanism. After dividing the display buffer into multiple sub-areas, each sub-area is equipped with a corresponding subfence. Subfence is a specific implementation method of the above-mentioned state value. Its function is similar to that of fence. Both can be regarded as public variables. GPU and display hardware can read the value of subfence and modify the value of sunfence. Different values ​​of subfence are used to indicate whether the corresponding sub-area is occupied.

[0058] As a specific optional method of the display control method of the embodiment of the present application, a display buffer is configured in the electronic device, and the display buffer is internally divided into 10 sub-areas, including the first sub-area, the second sub-area, ..., the tenth sub-area, and each sub-area is equipped with a subfence. Among them, subfence can be regarded as a public variable, and the display buffer is divided into 10 sub-areas only for the exemplary example of the embodiment of the present application. For different electronic devices, the display buffer can also be divided into other numbers of sub-areas.

[0059] When the electronic device needs to display the first frame of the image, the CPU sends rendering instructions and display instructions to the GPU and display hardware respectively. After receiving the rendering instructions, the GPU draws the first frame of the image in 10 sub-areas in sequence based on the rendering rules. When performing a rendering operation in any sub-area, the corresponding subfence is modified to block the display hardware from reading. After receiving the display instruction, the display hardware reads the image content in the 10 sub-areas in sequence based on the display rules. Before performing a display operation in any sub-area, it is necessary to first determine whether the current sub-area has been occupied by the GPU based on the value of the subfence (0 or 1). If it has been occupied, wait, otherwise read the image content directly. For example, when the display hardware receives the display instruction, the GPU is still drawing the image in the first sub-area (subfence is 0), then the display hardware needs to wait until the GPU has finished drawing in the first sub-area and modified the corresponding subfence (subfence is 1), and then the display hardware can read the image content in the first sub-area. In another scenario, when the display receives the display sending instruction, the GPU has completed the drawing of the first sub-area and the second sub-area, and is drawing the image in the third sub-area. For the image content in the first sub-area and the second sub-area, the display hardware can read it directly in order without waiting. Assuming that it takes one unit of time for the GPU to perform the rendering operation in each sub-area, the initial waiting time of the display hardware in the embodiment of the present application when reading the first frame of the image is at most one unit of time. For example, when the display hardware receives the display sending instruction, the GPU just starts to perform the display sending operation in the first sub-area, and the display hardware needs to wait for one unit of time. If the sub-areas are not divided, the longest waiting time of the display hardware is 10 units of time. For example, when the display hardware wants to perform the display sending operation on the display buffer, the GPU just starts to perform the rendering operation in the display buffer, and the display hardware needs to wait for 10 units of time. After the GPU has finished drawing the first frame of the image, the display hardware can start to read the image content of the first frame of the image.

[0060] Afterwards, when the electronic device needs to display the second frame image, the GPU performs rendering operations in 10 sub-areas in turn. When the GPU draws the second frame image, the display hardware may still be reading the first frame image. When the display hardware performs the display operation in any sub-area, it will modify the corresponding subfence to block the GPU from performing the rendering operation. For any sub-area, if the display hardware has completed reading the content corresponding to the first frame image in the sub-area, the GPU can directly draw the content corresponding to the second frame image in the sub-area, otherwise it is necessary to wait. Assuming that the display hardware requires two units of time to perform the display operation in each sub-area, the GPU in the embodiment of the present application has an initial waiting time of up to two units of time when drawing the second frame image. For example, when the GPU receives the rendering instruction for the second frame image, the display hardware has just started to read the content of the first frame image in the first sub-area, and the GPU needs to wait for two units of time. After the display hardware completes the reading, the GPU can draw the content of the second frame image in the first sub-area. Similarly, if the sub-areas are not divided, the initial waiting time when the GPU draws the second frame image is up to 20 units of time.

[0061] If the electronic device is configured with multiple display buffers, such as Figure 2 As shown, it includes display buffer A, display buffer B and display buffer C. Each display buffer is also divided into 10 sub-areas, and each sub-area is equipped with a corresponding subfence. It is still assumed that the GPU needs one unit of time to perform a rendering operation on any sub-area, and the display hardware needs two units of time to perform a display operation on any sub-area. When the electronic device needs to display the first frame of the image, the GPU draws it in display buffer A. When the electronic device needs to display the second frame of the image, the GPU draws it in display buffer B. When the electronic device needs to display the third frame of the image, the GPU draws it in display buffer C.

[0062] Afterwards, the electronic device needs to display the fourth frame image, and the GPU also needs to draw it in the display buffer A, but at this time, the display hardware may read the content of the first frame image in the display buffer A, and the GPU needs to wait. Specifically, when the GPU needs to draw the fourth frame image, if the display hardware just starts to read the content corresponding to the first frame image in the first sub-area of ​​the display buffer A, the GPU needs to wait for two units of time until the display hardware completes the reading, and then the GPU can draw the content corresponding to the fourth frame image in the first sub-area of ​​the display buffer A. In another scenario, when the GPU needs to draw the fourth frame image, if the display hardware has already read the content of the second frame image in the display buffer B, the GPU does not need to wait and can directly perform the rendering operation. In the embodiment of the present application, the initial waiting time for the GPU to draw the fourth frame image is still two units of time at most, and if the sub-area is not divided, the initial waiting time for the GPU to draw the fourth frame image is up to 20 units of time, that is, when the GPU needs to draw the fourth frame image in the display buffer A, the display hardware just starts to read the first frame image in the display buffer A, and the GPU needs to wait for the display hardware to read the image content in the entire display buffer A before performing the rendering operation.

[0063] After dividing the display buffer into multiple sub-areas, in addition to the reduction in the initial waiting time, the total time consumed by the GPU to render a frame of image and the total time consumed by the display hardware to display a frame of image will also be reduced. As mentioned above, it is assumed that it takes one unit of time for the GPU to perform a rendering operation on any sub-area, and two units of time for the display hardware to perform a display operation on any sub-area. If the GPU wants to draw the fourth frame of image in display buffer A, and the display hardware has just started to read the first frame of image in the first sub-area of ​​display buffer A, the GPU needs to wait for two units of time. After two units of time, the display hardware starts to read the first frame of image in the second sub-area of ​​display buffer A, and the GPU draws the fourth frame of image in the first sub-area of ​​display buffer A. After one unit of time, the GPU completes the drawing of this sub-area and needs to continue drawing in the second sub-area. However, at this time, the display hardware is still reading the first frame of image in the second sub-area, and the GPU needs to continue waiting for one unit of time. By analogy, after the display hardware completes reading the first frame image in the 9th sub-area of ​​display buffer A, the GPU starts drawing the 4th frame image in the 9th sub-area, while the display hardware continues to read the first frame image in the 10th sub-area of ​​display buffer A. After 1 unit time, the GPU completes drawing the 9th sub-area, while the display hardware is still reading the first frame image in the 10th sub-area. After the GPU waits for 1 unit time, the display hardware has completed reading the first frame image in the 10th sub-area, and the GPU can start drawing the 4th frame image in the 10th sub-area.

[0064] Since the display hardware needs two units of time to perform the display operation on any sub-region, it takes a total of 20 units of time from "the display hardware just started to read the first frame of the image in the first sub-region of display buffer A" to "the display hardware has completed the operation of reading the first frame of the image in the tenth sub-region". After 20 units of time, the GPU starts to draw the fourth frame of the image in the tenth sub-region, and the drawing is completed after 1 unit of time. It takes a total of 21 units of time from the GPU determining that the fourth frame of the image needs to be drawn in display buffer A to the completion of the drawing of the fourth frame of the image. If the sub-regions are not divided, the GPU wants to draw the fourth frame of the image in display buffer A, and when the display hardware just starts to read the first frame of the image in display buffer A, the GPU must first wait for 20 units of time for the display hardware to complete the reading. After that, the GPU needs to take 10 units of time to draw the fourth frame of the image to display buffer A, and the total time required is 30 units of time.

[0065] In the embodiment of the present application, after the display buffer is divided into multiple sub-areas, from the perspective of the display buffer, the GPU and the display hardware can execute in parallel with multiple threads, that is, when the GPU draws an image in a display buffer, the display hardware can also read the image in the same display buffer. Therefore, the total time spent by the GPU to draw a frame of image and the total time spent by the display hardware to read a frame of image are reduced.

[0066] The display control method of the embodiment of the present application is applicable regardless of whether one display buffer or multiple display buffers are set inside the electronic device. Based on the above description, it can be seen that after the display buffer is divided into multiple sub-areas, the initial waiting time for drawing a frame of image or reading a frame of image, as well as the total time required to draw a frame of image or read a frame of image can be effectively reduced. After the electronic device applies this method, the probability of screen freeze can be effectively reduced.

[0067] If sub-areas are not divided, the rendering and display process based on the fence mechanism can be as follows Figure 4 As shown, specifically including:

[0068] Step 401: GPU 410 receives rendering instructions;

[0069] Step 402: GPU 410 requests display buffer from display buffer management module 420;

[0070] Step 403: GPU 410 obtains a display buffer from display buffer management module 420;

[0071] Step 404. Display hardware 430 releases the display buffer;

[0072] Step 405: GPU 410 performs rendering operations;

[0073] Step 406. The display hardware 430 receives the display instruction;

[0074] Step 407: The display hardware 430 requests the display buffer from the display buffer management module 420;

[0075] Step 408: The display hardware 430 obtains the display buffer from the display buffer management module 420;

[0076] Step 409: GPU 410 releases the display buffer;

[0077] Step 410: Display hardware 430 performs a display operation.

[0078] Among them, GPU410 obtains the display buffer in step 403, but may not be able to perform rendering operations directly in the display buffer. If the display hardware 430 is currently performing a display operation in the display buffer, GPU410 needs to wait until the display operation of the display hardware 430 is completed and the value of the fence is modified. Only then can GPU410 enter step 405 and perform the rendering operation.

[0079] The waiting time from step 403 to step 405 is the initial waiting time required before GPU410 starts drawing a frame of image. Taking the above conditions as an example, assuming that it takes one unit time for GPU to perform rendering operation on any sub-area, and two units of time for display hardware to perform display sending operation on any sub-area, then the initial waiting time of GPU410 is at most 20 units of time. The shortest initial waiting time is 0, that is, after GPU410 obtains the display buffer in step 403, the display hardware 430 does not perform the display sending operation in the current display buffer, then GPU410 does not need to wait and can directly perform the rendering operation. The total time required from step 403 to the completion of the rendering operation of GPU410 is at most 30 units of time, that is, when GPU410 obtains the display buffer in step 403, the display hardware 430 just starts to perform the display sending operation in the current display buffer; the total time required from step 403 to the completion of the rendering operation of GPU410 is at most 10 units of time, that is, after GPU410 obtains the display buffer in step 403, it can directly perform the rendering operation.

[0080] Similarly, the waiting time from step 408 to step 410 is the initial waiting time required before the display hardware 430 starts to read a frame of image, which is 10 time units at most and 0 at least. The total time required from step 408 to the completion of the display operation of the display hardware 430 is 30 time units at most, that is, when the display hardware 430 obtains the display buffer at step 408, the GPU 410 just starts to perform the rendering operation in the current display buffer; the total time required from step 408 to the completion of the display operation of the display hardware 430 is 20 time units at least, that is, after the display hardware 430 obtains the display buffer at step 408, it can directly perform the display operation.

[0081] After the display buffer is divided into multiple sub-areas, the rendering and display process based on the subfence mechanism can be as follows: Figure 5 As shown, specifically including:

[0082] Step 501: GPU 520 receives rendering instructions sent by the CPU;

[0083] Step 502: GPU 520 requests a display buffer from the display buffer management module 530;

[0084] Step 503: GPU 520 obtains a display buffer from the display buffer management module 530;

[0085] Step 504. Display hardware 540 releases the sub-area;

[0086] Step 505: GPU 520 performs rendering operations;

[0087] Step 506: Display hardware 540 releases the display buffer;

[0088] Step 507: The display hardware 540 receives the display instruction;

[0089] Step 508: The display hardware 540 requests the display buffer from the display buffer management module 530;

[0090] Step 509: The display hardware 540 obtains the display buffer from the display buffer management module 530;

[0091] Step 510. GPU 520 releases the sub-region;

[0092] Step 511. The display hardware 540 performs a display operation;

[0093] Step 512: GPU 520 releases the display buffer.

[0094] and Figure 4 Compared with the process Figure 5There are two major changes in the process: (1) "Step 504. Display hardware 540 releases the sub-region" and "Step 510. GPU 520 releases the sub-region" are added; (2) GPU 520 performs rendering operations in step 505 without waiting until step 506, and display hardware 540 performs display operations in step 511 without waiting until step 512.

[0095] In step 503, GPU520 obtains the display buffer. If the display hardware 540 is currently performing a display operation on the first sub-region of the current display buffer, GPU520 needs to wait until the display hardware 540 completes the display operation on the first sub-region and modifies the value of subfence, and then GPU520 can enter step 505 to perform a rendering operation. In step 509, the display hardware 540 obtains the display buffer. If the display hardware 540 is currently performing a rendering operation on the first sub-region of the current display buffer, GPU520 needs to wait until the display hardware 540 completes the rendering operation on the first sub-region and modifies the value of subfence, and then the display hardware 540 can enter step 511 to perform a display operation.

[0096] The initial waiting time required before GPU502 starts drawing a frame of image is no longer from step 503 to step 506, but from step 503 to step 505. Assuming that the GPU needs one unit time to perform a rendering operation on any sub-region, and the display hardware needs two units of time to perform a display operation on any sub-region, then the maximum initial waiting time of GPU520 is two units of time. The shortest initial waiting time is 0, that is, after GPU520 obtains the display buffer in step 503, the display hardware 540 does not perform a display operation on the first sub-region of the current display buffer, and GPU520 does not need to wait and can directly perform the rendering operation.

[0097] The initial waiting time required before the display hardware 540 starts to read a frame of image is no longer from step 509 to step 512, but from step 509 to step 511. The initial waiting time of the display hardware 540 is 1 unit time at most and 0 at least.

[0098] The above process is an optional method of the embodiment of the present application. In another optional method, the order of the steps may change. For example, in step 504, if the sub-area released by the display hardware 540 is the last sub-area of ​​the current display buffer, then step 504 and step 506 can be regarded as being performed simultaneously; similarly, in step 510, if the sub-area released by the GPU 520 is the last sub-area of ​​the current display buffer, then step 510 and step 512 can be regarded as being performed simultaneously. For another example, step 506 may not be executed until step 505 is completed. During the execution of step 505, the display hardware 540 may have completed the display operation and released the display buffer.

[0099] In the embodiment of the present application, since the display buffer is divided into multiple sub-areas, the GPU 520 or the display hardware 540 performs rendering operations or display operations in units of sub-areas, thereby reducing the initial waiting time. The total time required to perform the rendering operation or the display operation is also reduced, as described above.

[0100] In one embodiment, the size of the sub-region of the display buffer can be determined by the size of the region occupied by the GPU in the display buffer for a single rendering and the size of the region occupied by the display hardware in the display buffer for a single display. If the region occupied by the GPU for a single rendering is the first region and the region occupied by the display hardware for a single display is the second region, the larger value of the first region and the second region can be taken as the sub-region. Alternatively, the sub-region can also be larger than the larger value of the first region and the second region, for example, a multiple of the larger value of the first region and the second region can be taken as the sub-region.

[0101] In an embodiment of the present application, by optimizing the fence mechanism, each display buffer is divided into multiple sub-areas, each sub-area is equipped with a subfence, and the waiting time of the GPU or display hardware is reduced from the entire display buffer to a single sub-area, thereby reducing the scale of the waiting time and thereby reducing the probability of screen freeze.

[0102] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0103] The electronic device 600 may include a processor 610, an external memory interface 620, an internal memory 621, a universal serial bus (USB) interface 630, a charging management module 640, a power management module 641, a battery 642, an antenna 1, an antenna 2, a mobile communication module 650, a wireless communication module 660, an audio module 670, a speaker 670A, a receiver 670B, a microphone 670C, an earphone interface 670D, a sensor module 680, a button 690, a motor 691, an indicator 692, a camera 693, a display screen 694, and a subscriber identification module (SIM) card interface 695, etc. The sensor module 680 may include a pressure sensor 680A, a gyroscope sensor 680B, an air pressure sensor 680C, a magnetic sensor 680D, an acceleration sensor 680E, a distance sensor 680F, a proximity light sensor 680G, a fingerprint sensor 680H, a temperature sensor 680J, a touch sensor 680K, an ambient light sensor 680L, a bone conduction sensor 680M, etc.

[0104] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 600. In other embodiments of the present application, the electronic device 600 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0105] The processor 610 may include one or more processing units. For example, the processor 110 may include a central processing unit (CPU), a graphics processing unit (GPU), and a display controller, etc. Different processing units may be independent devices or integrated into one or more processors.

[0106] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.

[0107] The processor 610 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 610 is a cache memory. In some embodiments, the processor 610 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, etc.

[0108] The charging management module 640 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 640 may receive charging input from a wired charger through the USB interface 630. In some wireless charging embodiments, the charging management module 640 may receive wireless charging input through a wireless charging coil of the electronic device 600. While the charging management module 640 is charging the battery 642, it may also power the electronic device through the power management module 641.

[0109] The power management module 641 is used to connect the battery 642, the charging management module 640 and the processor 610. The power management module 641 receives input from the battery 642 and / or the charging management module 640 to provide power to the processor 610, the internal memory 621, the display screen 694 and the like.

[0110] The wireless communication function of the electronic device 600 can be implemented through antenna 1, antenna 2, mobile communication module 650, wireless communication module 660, modem processor and baseband processor.

[0111] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Mobile communication module 650 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to electronic device 600. Mobile communication module 650 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. Mobile communication module 150 can receive electromagnetic waves from antenna 1, and filter, amplify and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. Mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through antenna 1.

[0112] The modulation and demodulation processor may include a modulator and a demodulator, wherein the modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium-high frequency signal, and the demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal.

[0113] The wireless communication module 660 receives electromagnetic waves via the antenna 2, modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 610. The wireless communication module 660 can also receive signals to be sent from the processor 610, modulate the frequencies of the signals, amplify the signals, and convert them into electromagnetic waves for radiation via the antenna 2.

[0114] In some embodiments, antenna 1 of electronic device 600 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 660, so that electronic device 600 can communicate with the network and other devices through wireless communication technology.

[0115] The electronic device 600 implements the display function through a GPU, a display screen 694, etc. The GPU is a microprocessor for image processing, connected to the display screen 694. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.

[0116] The display screen 694 is used to display images, videos, etc. The display screen 694 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc.

[0117] The electronic device 600 can realize the shooting function through ISP, camera 693, video codec, GPU and display screen 694.

[0118] The ISP is used to process the data fed back by the camera 693. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converts it into an image visible to the naked eye. The ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. The ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP can be set in the camera 193.

[0119] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.

[0120] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 600 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0121] The video codec is used to compress or decompress digital video. The electronic device 600 may support one or more video codecs.

[0122] The external memory interface 620 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 .

[0123] The internal memory 621 can be used to store computer executable program codes, which include instructions. The internal memory 621 can include a program storage area and a data storage area. Among them, the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area can store data created during the use of the electronic device 600 (such as audio data, a phone book, etc.), etc. The processor 610 executes various functional applications and data processing of the electronic device 600 by running instructions stored in the internal memory 621 and / or instructions stored in a memory provided in the processor.

[0124] The electronic device 600 can implement audio functions such as music playing and recording through the audio module 670, the speaker 670A, the receiver 670B, the microphone 670C, the headphone jack 670D, and the application processor.

[0125] The audio module 670 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 670 can also be used to encode and decode audio signals.

[0126] The speaker 670A, also called a "horn", is used to convert audio electrical signals into sound signals.

[0127] The receiver 670B, also called a "handset", is used to convert audio electrical signals into sound signals.

[0128] Microphone 670C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals.

[0129] The earphone interface 670D is used to connect a wired earphone and can be a USB interface 630 or a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.

[0130] The pressure sensor 680A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be disposed on the display screen 694 .

[0131] The gyro sensor 680B can be used to determine the motion posture of the electronic device 600. In some embodiments, the angular velocity of the electronic device 600 around three axes (ie, x, y, and z axes) can be determined by the gyro sensor 680B. The gyro sensor 680B can be used for anti-shake shooting.

[0132] The air pressure sensor 680C is used to measure air pressure. In some embodiments, the electronic device 600 calculates the altitude through the air pressure value measured by the air pressure sensor 680C to assist in positioning and navigation.

[0133] The magnetic sensor 680D includes a Hall sensor, and the electronic device 600 can use the magnetic sensor 680D to detect the opening and closing of the flip leather case.

[0134] The acceleration sensor 680E can detect the magnitude of the acceleration of the electronic device 600 in all directions (generally three axes). When the electronic device 600 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device and is applied to applications such as horizontal and vertical screen switching and pedometers.

[0135] The distance sensor 680F is used to measure the distance. The electronic device 600 can measure the distance by infrared or laser.

[0136] The proximity light sensor 680G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The electronic device 100 may use the proximity light sensor 180G to detect when a user holds the electronic device 100 close to their ear to make a call, so as to automatically turn off the screen to save power.

[0137] The ambient light sensor 680L is used to sense the ambient light brightness, the fingerprint sensor 680H is used to collect fingerprints, and the temperature sensor 680J is used to detect the temperature.

[0138] The touch sensor 680K is also called a "touch control device". The touch sensor 680K can be set on the display screen 694. The touch sensor 680K and the display screen 694 form a touch screen, also called a "touch control screen". The touch sensor 680K is used to detect a touch operation on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.

[0139] The bone conduction sensor 680M can obtain vibration signals. In some embodiments, the bone conduction sensor 680M can obtain vibration signals of vibrating bones of the human body. The bone conduction sensor 680M can also contact the human body's pulse to receive blood pressure beating signals.

[0140] The key 690 includes a power key, a volume key, etc. The key 690 may be a mechanical key or a touch key. The electronic device 600 may receive key input and generate key signal input related to user settings and function control of the electronic device 600.

[0141] Motor 691 can generate vibration prompts. Motor 691 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. Motor 691 can also correspond to different vibration feedback effects for touch operations on different areas of display screen 694.

[0142] Indicator 692 can be an indicator light, which can be used to indicate the charging status, power change, and can also be used to indicate messages, missed calls, notifications, etc.

[0143] The SIM card interface 695 is used to connect a SIM card. The SIM card can be connected to or disconnected from the electronic device 600 by inserting the SIM card interface 695 or removing the SIM card from the SIM card interface 695 .

[0144] The software system of the electronic device 600 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes the Android system of the layered architecture as an example to exemplify the software structure of the electronic device 600.

[0145] Figure 7 It is a software structure block diagram of the electronic device 600 according to an embodiment of the present invention.

[0146] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system library, and the kernel layer.

[0147] The application layer can include a series of application packages.

[0148] like Figure 7 As shown, the application package may include camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and other applications.

[0149] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.

[0150] like Figure 7 As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.

[0151] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.

[0152] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.

[0153] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.

[0154] The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including connecting, hanging up, etc.).

[0155] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.

[0156] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.

[0157] Android Runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.

[0158] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.

[0159] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.

[0160] The system library may include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.

[0161] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.

[0162] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0163] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0164] A 2D graphics engine is a drawing engine for 2D drawings.

[0165] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.

[0166] The embodiment of the present application also provides a non-temporary computer-readable storage medium, which stores computer instructions, and the computer instructions enable the computer to execute the display control method provided by the embodiment of the present application.

[0167] The above-mentioned non-temporary computer-readable storage medium can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (Read Only Memory; hereinafter referred to as: ROM), an erasable programmable read-only memory (ErasableProgrammable Read Only Memory; hereinafter referred to as: EPROM) or flash memory, optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.

[0168] Computer-readable signal media may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0169] Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0170] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0171] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0172] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.

Claims

1. A display control method, characterized in that: The method is applied to an electronic device, which includes: a central processing unit (CPU), a graphics processing unit (GPU) and display hardware; The CPU sends a rendering instruction to the GPU, and sends a display instruction to the display hardware; After receiving the rendering instruction, the GPU sequentially performs rendering operations in multiple sub-areas of the display buffer, wherein the display buffer includes the multiple sub-areas, and each of the multiple sub-areas is associated with a state value; After the display hardware receives the display sending instruction, before executing the display sending operation on any sub-region, it determines whether the rendering operation of the current sub-region has been completed according to the status value corresponding to the current sub-region. If it is determined that the rendering operation of the current sub-region has been completed, the display sending operation is executed on the current sub-region.

2. The method according to claim 1, characterized in that: The multiple sub-areas are divided based on a single rendering space occupied by the GPU and a single display space occupied by the display hardware.

3. The method according to claim 2, characterized in that The space occupied by each sub-area is the larger value of the space occupied by the GPU for single rendering and the space occupied by the display hardware for single display transmission.

4. The method according to any one of claims 1 to 3, characterized in that: The state corresponding to the state value includes: an operable state or an inoperable state; The step of judging whether the rendering operation of the corresponding sub-region is completed according to the status value of each sub-region includes: If the state value corresponds to an operable state, determining that the rendering operation of the corresponding sub-region has been completed; If the state value corresponds to an inoperable state, it is determined that the rendering operation of the corresponding sub-region is not completed.

5. The method according to any one of claims 1 to 4, characterized in that: Before the display hardware performs a rendering operation on any sub-region, if it is determined that the rendering operation of the current sub-region is not completed, the display operation is not performed on the current sub-region and waiting is performed.

6. The method according to any one of claims 1 to 5, characterized in that: After receiving the rendering instruction, performing a rendering operation in each sub-area of ​​the display buffer includes: Before performing a rendering operation on any sub-region, determine whether the display operation of the current sub-region has been completed according to the state value corresponding to the current sub-region; If it is determined that the rendering operation of the current sub-region has been completed, the rendering operation is performed on the current sub-region; if it is determined that the rendering operation of the current sub-region has not been completed, the rendering operation is not performed on the current sub-region and waiting is performed.

7. The method according to claim 4, characterized in that When the GPU performs a rendering operation on any sub-region, the state value corresponding to the current sub-region is modified to a value corresponding to the inoperable state; After the rendering operation on any sub-region is completed, the state value corresponding to the current sub-region is modified to a value corresponding to the operable state.

8. The method according to claim 4, characterized in that When the display hardware performs a display operation on any sub-region, the state value corresponding to the current sub-region is modified to a value corresponding to the inoperable state; After the display operation of any sub-region is completed, the state value corresponding to the current sub-region is modified to a value corresponding to the operable state.

9. An electronic device, characterized in that: include: at least one processor; as well as at least one memory in communication with the processor, wherein: The memory stores program instructions, and the processor calls the program instructions to execute the method according to any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program implements the method according to any one of claims 1 to 8 when executed by a processor.

Citation Information

Cited By

  • DRM-based striped video display method, system and device

    CN121239805A