Display method and device
By detecting that the application maintains the first display bandwidth when the application turns on the camera in the terminal device, the screen splash screen or lag caused by the reduction in the display bandwidth after the application turns on the camera is solved, and the smoothness is improved.
Patent Information
- Application Number
- CN202311224472.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-19
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2043-09-19
AI Technical Summary
After the terminal device detects that the application turns on the camera, the display bandwidth decreases from the first display bandwidth to the second display bandwidth, resulting in a screen splash or stuttering.
When the terminal device detects that the application turns on the camera, it maintains the first display bandwidth to avoid screen splashing or lag caused by insufficient display bandwidth.
By maintaining the first display bandwidth, the screen splash or lags are reduced, and the smoothness of the camera usage process is improved.
Smart Images

Figure CN119728900A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminal technology, and in particular to a display method and device. Background Art
[0002] With the popularization and development of terminal devices, people's functional requirements for terminal devices are becoming more and more diverse. For example, many terminal devices can support the use of cameras in a certain application. For example, social applications can use cameras to realize functions such as taking pictures, recording videos, scanning codes, and video calls. However, when users use the camera in the application, the terminal device may experience screen flickering or freezing. Summary of the invention
[0003] The embodiments of the present application provide a display method and apparatus, and when a terminal device detects that a first application turns on a camera, the terminal device can maintain a first display bandwidth, so as to reduce the situation where the terminal device reduces the first display bandwidth to a second display bandwidth after detecting that an application turns on the camera, resulting in screen flickering or freezing due to insufficient display bandwidth.
[0004] In a first aspect, an embodiment of the present application provides a display method, the method comprising: at a first moment, a terminal device receives a first operation of opening a first application; in response to the first operation, the terminal device displays a first interface;
[0005] The terminal device receives a second operation for turning on a camera in a first application; in response to the second operation, the terminal device displays a second interface, which is an interface displayed by the first application when the camera is turned on; the terminal device receives a third operation for turning off the camera in the first application; at a second moment, in response to the third operation, the terminal device displays the first interface, and between the first moment and the second moment, the display bandwidth of the terminal device is the first value; at a third moment, the terminal device receives a fourth operation for opening the second application; in response to the fourth operation, the terminal device displays the third interface; at a fourth moment, the terminal device receives a fifth operation for turning on the camera in the second application, and between the third moment and the fourth moment, the display bandwidth of the terminal device is the first value; at a fifth moment, in response to the fifth operation, the terminal device displays a fourth interface, which is an interface displayed by the second application when the camera is turned on, and between the fourth moment and the fifth moment, the display bandwidth of the terminal device is the first value; the terminal device receives a sixth operation for turning off the camera in the second application; at a sixth moment, in response to the sixth operation, the terminal device displays the third interface, and between the fifth moment and the sixth moment, the display bandwidth of the terminal device is the second value, and the first value is greater than the second value.
[0006] In this way, when the terminal device detects that the first application turns on the camera, the terminal device can maintain the first display bandwidth to reduce the screen flickering or freezing caused by insufficient display bandwidth due to the terminal device reducing the first display bandwidth to the second display bandwidth after detecting that the application turns on the camera.
[0007] The first value may be the value of the first display bandwidth described in the embodiment of the present application, and the second value may be the value of the second display bandwidth described in the embodiment of the present application.
[0008] In one possible implementation, after responding to the second operation, the method further includes: when the terminal device determines that the first application is a preset application and the camera status is on, the terminal device sets the display bandwidth of the terminal device to a first value, the preset application is an application whose display bandwidth required when the terminal device runs the preset application is greater than a second value, and / or the preset application is an application whose flicker frequency of the terminal device is greater than a first threshold when running the preset application; after responding to the fifth operation, the method further includes: when the terminal device determines that the second application is not a preset application and the camera status is on, the terminal device sets the display bandwidth of the terminal device to a second value.
[0009] In this way, when the terminal device detects that the application meets the preset application and the camera is turned on, the display bandwidth can be set to the first value to improve the fluency of the camera use process.
[0010] In a possible implementation, a terminal device is configured with: a first application, a camera hardware abstraction layer HAL, and a hardware synthesis processor. When the terminal device determines that the first application is a preset application and the camera is on, the terminal device sets the display bandwidth of the terminal device to a first value. The method also includes: the first application sends a first message to the camera HAL, the first message includes: a message for indicating that the camera is on, and the package name of the first application; the camera HAL sends the first message to the hardware synthesis processor; when the hardware synthesis processor determines that the first application is a preset application based on the first message and the camera is on, the hardware synthesis processor sets the display bandwidth of the terminal device to the first value.
[0011] In this way, the display synthesizer can set the display bandwidth when the preset application is met and the camera is on, so as to reduce the situation where the terminal device reduces the first display bandwidth to the second display bandwidth after detecting that the application turns on the camera, resulting in screen flickering or freezing due to insufficient display bandwidth.
[0012] In a possible implementation, the terminal device is further configured with: a display synthesizer, a data processor DPU, and a liquid crystal display LCD. After the hardware synthesis processor sets the display bandwidth of the terminal device to a first value, the method also includes: the hardware synthesis processor sends the first value to the DPU; the first application sends N layers to the DPU via the camera HAL, the display synthesizer and the hardware synthesis processor; when the DPU determines that the sum of the display bandwidths of the N layers is less than the first value, the DPU synthesizes the N layers into a target image and sends the target image to the LCD.
[0013] In this way, after the display bandwidth is set to the first value, the terminal device can synthesize and display the N layers according to the set display bandwidth, reducing screen flickering or freezes caused by partially synthesizing the layers in the GPU and partially synthesizing them in the DPU.
[0014] In one possible implementation, after responding to the third operation, the method also includes: the first application sends a second message to the camera HAL, the second message including: a message for indicating that the camera is in a turned-off state, and the package name of the first application; the camera HAL sends the second message to the hardware synthesis processor; when the hardware synthesis processor determines that the camera is in a turned-off state based on the second message, the hardware synthesis processor sets the display bandwidth of the terminal device to the first value.
[0015] In this way, when the terminal device detects that the camera is turned on or off, it can synchronously transmit the camera status and the application package name to the hardware synthesis processor, so that the hardware synthesis processor can achieve reasonable settings for the display bandwidth.
[0016] In one possible implementation, when the terminal device determines that the second application is not a preset application and the camera is on, the terminal device sets the display bandwidth of the terminal device to a second value, including: the second application sends a third message to the camera HAL, the third message includes: a message for indicating that the camera is on, and the package name of the second application; the camera HAL sends the third message to the hardware synthesis processor; when the hardware synthesis processor determines, based on the third message, that the second application is not a preset application and the camera is on, the hardware synthesis processor sets the display bandwidth of the terminal device to the second value.
[0017] In this way, when the terminal device detects that the camera is turned on or off, it can synchronously transmit the camera status and the application package name to the hardware synthesis processor, so that the hardware synthesis processor can achieve reasonable settings for the display bandwidth.
[0018] In one possible implementation, before the terminal device receives a first operation to open a first application, the method also includes: the terminal device receives a seventh operation to start up or restart; at a seventh moment, in response to the seventh operation, the terminal device displays a fifth interface, the fifth interface is the desktop of the terminal device, and the seventh moment is before the first moment, and between the seventh moment and the first moment, the display bandwidth of the terminal device is the first value.
[0019] In this way, the terminal device can set the display bandwidth to the first value when detecting startup or restart, so as to ensure smooth display of the picture.
[0020] In a second aspect, an embodiment of the present application provides a display method, the method comprising: at an eighth moment, a terminal device receives a first operation of opening a first application; in response to the first operation, the terminal device displays a first interface;
[0021] The terminal device receives a second operation for turning on a camera in a first application; at a ninth moment, in response to the second operation, the terminal device sets a display bandwidth of the terminal device to a second value, and between the eighth moment and the ninth moment, the display bandwidth of the terminal device is a first value, which is greater than the second value; at a tenth moment, when the terminal device obtains N layers and determines that there is a preset layer based on the layer names of the N layers, the terminal device sets the display bandwidth of the terminal device to a first value, where N is an integer greater than or equal to 1, and the terminal device displays a second interface based on the display bandwidth of the first value, and the second interface is an interface displayed by the first application when the camera is turned on, and between the ninth moment and the tenth moment, the display bandwidth of the terminal device is a second value; the terminal device receives a third operation for turning off the camera in the first application; at an eleventh moment, in response to the third operation, the terminal device displays the first interface, and between the tenth moment and the eleventh moment, the display bandwidth of the terminal device is the first value.
[0022] In this way, the terminal device can set the display bandwidth to the first value based on the layer name received and the existence of the preset layer, thereby reducing the screen freeze caused by insufficient display bandwidth and improving the smoothness of the displayed picture.
[0023] In a possible implementation, the terminal device is configured with: a first application, a camera hardware abstraction layer HAL, a display synthesizer, and a hardware synthesis processor. When the terminal device obtains N layers and determines that there is a preset layer based on the layer names of the N layers, the terminal device sets the display bandwidth of the terminal device to a first value, including: the first application sends the N layers to the hardware synthesis processor via the camera HAL and the display synthesizer, and the N layers carry the layer name corresponding to any layer in the N layers; when the hardware synthesis processor determines that there is a preset layer based on the layer names of the N layers, the hardware synthesis processor sets the display bandwidth of the terminal device to the first value.
[0024] In this way, the hardware synthesis processor can provide higher display bandwidth for preset layers with higher display bandwidth requirements by screening layers, so as to improve the smoothness of the picture.
[0025] In a possible implementation, the terminal device is further configured with: a DPU, and an LCD. After the hardware synthesis processor sets the display bandwidth of the terminal device to a first value, the method further includes: the hardware synthesis processor sends the first value to the DPU; the hardware synthesizer sends N layers to the DPU; when the DPU determines that the sum of the display bandwidths of the N layers is less than the first value, the DPU synthesizes the N layers into a target image, and sends the target image to the LCD.
[0026] In one possible implementation, before the terminal device receives a first operation to open a first application, the method also includes: the terminal device receives a seventh operation to power on or restart; at a seventh moment, in response to the seventh operation, the terminal device displays a fifth interface, and the fifth interface is the desktop of the terminal device. The seventh moment is before the eighth moment, and between the seventh moment and the eighth moment, the display bandwidth of the terminal device is the first value.
[0027] In a third aspect, an embodiment of the present application provides a display device, which includes a display unit and a processing unit. The display unit is used to process the steps of displaying data in the display device, and the processing unit is used to process the steps of processing data in the display device.
[0028] In a possible implementation, the display device may further include a storage unit, which may include one or more memories, and the memory may be a device in one or more devices or circuits for storing programs or data.
[0029] In a fourth aspect, an embodiment of the present application provides a terminal device, comprising a processor and a memory, the memory being used to store code instructions; the processor being used to run the code instructions so that the terminal device executes the method described in the first aspect or any one of the implementations of the first aspect, or executes the method described in the second aspect or any one of the implementations of the second aspect.
[0030] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores instructions. When the instructions are executed, the computer executes the method described in the first aspect or any one of the implementations of the first aspect, or executes the method described in the second aspect or any one of the implementations of the second aspect.
[0031] In the sixth aspect, a computer program product comprises a computer program, which, when executed, enables a computer to execute the method described in the first aspect or any one of the implementations of the first aspect, or to execute the method described in the second aspect or any one of the implementations of the second aspect.
[0032] It should be understood that the third to sixth aspects of the present application correspond to the technical solutions of the first and second aspects of the present application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation methods are similar and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 A schematic diagram of the structure of a terminal device provided in an embodiment of the present application;
[0034] Figure 2 A schematic diagram of the software structure of a terminal device provided in an embodiment of the present application;
[0035] Figure 3 A schematic diagram of a scenario provided for an embodiment of the present application;
[0036] Figure 4 Another scenario schematic diagram provided for an embodiment of the present application;
[0037] Figure 5 A schematic diagram of another scenario provided for an embodiment of the present application;
[0038] Figure 6 A schematic diagram of a flow chart for setting display bandwidth provided in an embodiment of the present application;
[0039] Figure 7 A flow chart of a display method provided in an embodiment of the present application;
[0040] Figure 8 A schematic diagram of another display method provided in an embodiment of the present application;
[0041] Fig. 9 A flowchart of another display method provided in an embodiment of the present application;
[0042] Fig.10 A schematic diagram of an interface for starting a camera in a first application provided in an embodiment of the present application;
[0043] Fig.11 A schematic diagram of an interface for starting a camera in a second application provided in an embodiment of the present application;
[0044] Fig.12 A schematic diagram of the structure of a display device provided in an embodiment of the present application;
[0045] Fig.13A schematic diagram of the hardware structure of another terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0046] In order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish between identical or similar items with substantially the same functions and effects. For example, the first value and the second value are only used to distinguish different values, and their order is not limited. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit them to be different.
[0047] It should be noted that, in this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in this application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0048] In the present application, "at least one" means one or more, and "plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can mean: a, b, c, a and b, a and c, b and c, or a, b and c, where a, b, c can be single or multiple.
[0049] The terminal device described in the embodiments of the present application may also be referred to as a terminal, user equipment (UE), mobile station (MS), mobile terminal (MT), etc. The terminal device may be a mobile phone with a touch screen, a smart TV, a wearable device, a tablet computer (Pad), a computer with a wireless transceiver function, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal in industrial control, a wireless terminal in self-driving, a wireless terminal in remote medical surgery, a wireless terminal in smart grid, a wireless terminal in transportation safety, a wireless terminal in smart city, a wireless terminal in smart home, etc. The embodiments of the present application do not limit the specific technology and specific device form adopted by the terminal device.
[0050] Therefore, in order to better understand the embodiment of the present application, the structure of the terminal device of the embodiment of the present application is introduced below. Figure 1 A schematic diagram of the structure of a terminal device provided in an embodiment of the present application.
[0051] The terminal device may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, an indicator 192, a camera 193, and a display screen 194, etc.
[0052] Among them, the sensor module 180 may include one or more of the following: pressure sensor, gyroscope sensor, air pressure sensor, magnetic sensor, acceleration sensor, distance sensor, proximity light sensor, fingerprint sensor, temperature sensor, touch sensor, ambient light sensor, or bone conduction sensor, etc., which is not specifically limited in the embodiments of the present application.
[0053] It is to be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the terminal device. In other embodiments of the present application, the terminal device may include more or fewer components than shown in the figure, or combine certain components, or split certain 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.
[0054] The processor 110 may include one or more processing units. Different processing units may be independent devices or integrated into one or more processors. The processor 110 may also be provided with a memory for storing instructions and data.
[0055] The USB interface 130 is an interface that complies with the USB standard specification, and can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the terminal device, and can also be used to transfer data between the terminal device and peripheral devices. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices, etc.
[0056] The charging management module 140 is used to receive charging input from a charger, which may be a wireless charger or a wired charger. The power management module 141 is used to connect the charging management module 140 to the processor 110 .
[0057] The wireless communication function of the terminal device can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor.
[0058] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. The antenna in the terminal device can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antenna.
[0059] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to terminal devices. The mobile communication module 150 can include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, etc. the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation.
[0060] The wireless communication module 160 can provide wireless communication solutions applied to terminal devices, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), etc.
[0061] The terminal device realizes the display function through the GPU, the display screen 194, and the application processor. The GPU is a microprocessor for image processing, connecting the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering.
[0062] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. In some embodiments, the terminal device may include 1 or N display screens 194, where N is a positive integer greater than 1.
[0063] The terminal device can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
[0064] The camera 193 is used to capture static images or videos. In some embodiments, the terminal device may include 1 or N cameras 193, where N is a positive integer greater than 1.
[0065] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the terminal device. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and videos can be stored in the external memory card.
[0066] The internal memory 121 can be used to store computer executable program codes, and the executable program codes include instructions. The internal memory 121 can include a program storage area and a data storage area.
[0067] The terminal device can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor.
[0068] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. Speaker 170A, also known as "speaker", is used to convert audio electrical signals into sound signals. The terminal device can listen to music or listen to hands-free calls through speaker 170A. Receiver 170B, also known as "earpiece", is used to convert audio electrical signals into sound signals. When the terminal device answers a call or voice message, the voice can be answered by placing receiver 170B close to the human ear. Headphone interface 170D is used to connect wired headphones. Microphone 170C, also known as "microphone" or "microphone", is used to convert sound signals into electrical signals. In an embodiment of the present application, the terminal device may have a microphone 170C.
[0069] The pressure sensor is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor can be set on the display screen 194. The gyroscope sensor can be used to determine the motion posture of the terminal device. The air pressure sensor is used to measure the air pressure. The magnetic sensor includes a Hall sensor. The acceleration sensor can detect the magnitude of the acceleration of the terminal device in all directions (generally three axes). Distance sensor, used to measure the distance. The proximity light sensor can include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The ambient light sensor is used to sense the brightness of the ambient light. The fingerprint sensor is used to collect fingerprints. The temperature sensor is used to detect the temperature. The touch sensor, also known as a "touch device". The bone conduction sensor can obtain vibration signals.
[0070] The touch sensor can be arranged on the display screen 194 , and the touch sensor and the display screen 194 form a touch screen, or “touch screen”, and a capacitive sensing node grid (hereinafter referred to as capacitive sensor) can be arranged in the touch screen.
[0071] The button 190 includes a power button, a volume button, etc. The button 190 may be a mechanical button. It may also be a touch button. The terminal device may receive the button input and generate a key signal input related to the user settings and function control of the terminal device. The indicator 192 may be an indicator light, which may be used to indicate the charging status, power change, message, missed call, notification, etc.
[0072] The software system of the terminal device can adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture, etc., which will not be elaborated here.
[0073] For example, Figure 2 A schematic diagram of the software structure of a terminal device provided in an embodiment of the present application. Figure 2As shown, 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 multiple layers, from top to bottom, including the application (APP) layer, the application framework (framework) layer, the hardware abstraction layer (HAL), and the kernel layer (kernel), etc., which is not limited in the embodiments of the present application.
[0074] The application layer may include a series of application packages. The application layer may include one or more of the following: camera, desktop, map, Bluetooth, or preset applications, etc., which are not limited in the embodiments of the present application.
[0075] 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 interfaces. The application framework layer may include one or more of the following: a rendering engine, a graphical user interface (GUI), or a surface synthesizer (SF).
[0076] The main function of the display synthesizer is to receive graphic data buffers from multiple sources, synthesize them in layers, and then send them to the display device; at the same time, the display synthesizer is used to generate vertical synchronization (Vsync) signals, such as SF-VSync and APP-VSync signals; the synthesizer flow control, signal simulator and connection manager collaborate to notify the application and the display synthesizer itself of the VSync signal. Among them, Vsync-APP is used to trigger the application's drawing and rendering process for image frames. Vsync-SF is used to trigger the suiface flinger's layer synthesis process for image frames. The hardware Vsync signal (Vsync-HW) is used to trigger the screen display refresh process.
[0077] The rendering engine can realize functions such as layer rendering and synthesis through the call of GPU.
[0078] In a possible implementation, the application framework layer may further include one or more of the following: a window manager, a content provider, a resource manager, a view system, or a notification manager, etc.
[0079] The window manager is used to manage window programs. For example, the window manager can be used to apply for the foreground window, obtain the display screen size, determine whether there is a status bar, lock the screen, touch the screen, drag the screen, capture the screen, etc.
[0080] The display compositor is used to switch frame rates and synthesize layers.
[0081] Content providers are used to store and retrieve data and make it accessible to applications. Data can include video, images, audio, calls made and received, browsing history and bookmarks, phone books, etc. The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, etc. The view system can be used to build applications. The 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 pictures. The resource manager provides various resources for applications, such as localized strings, icons, pictures, layout files, video files, and so on.
[0082] The purpose of the hardware abstraction layer is to abstract the hardware, and can provide a unified interface for querying hardware devices for upper-layer applications, or can also provide data storage services for upper-layer applications. The hardware abstraction layer can include one or more of the following: hardware composer (HWC), camera HAL and other modules.
[0083] The hardware editor mainly provides hardware support for the display synthesizer, as well as supports functions such as layer synthesis and display.
[0084] The camera HAL is used to connect the underlying camera-enabled hardware to the framework APIs in android.hardware. The Camera subsystem mainly includes various implementations of camera pipeline components, and the camera HAL provides the interface for using these components.
[0085] The kernel layer is the layer between hardware and software. The kernel layer is used to drive the hardware to make it work. The kernel layer may include one or more of the following: data processing unit (DPU), display driver, camera driver, or sensor driver.
[0086] DPU can realize the synthesis processing of layers and send the synthesized image to the LCD display.
[0087] The hardware layer may include one or more of the following: a liquid crystal display (LCD), a graphics processing unit (GPU), or a central processing unit (CPU).
[0088] GPU can realize layer rendering and layer synthesis processing.
[0089] In the embodiments of the present application, no specific limitation is imposed on the software layers involved in the software architecture, the modules contained in the layers, and the functions of the modules.
[0090] The display method provided in the embodiment of the present application can be applied to Figure 3-Figure 5 Any scenario described in the corresponding embodiment, such as the terminal device displays the preview interface in the short video application in full screen and displays any video in the video application in a floating window (see Figure 3 Corresponding embodiments), the terminal device splits the screen to display any interface in the video application and shares the content displayed by the camera to other devices (see Figure 4 Corresponding embodiment), the terminal device displays the desktop in full screen and the floating window displays the video call interface in the social application (see Figure 5 corresponding embodiments).
[0091] For example, Figure 3 A schematic diagram of a scenario provided in an embodiment of the present application. Figure 3 In the corresponding embodiments, a foldable screen mobile phone is used as an example for explanation, but this example does not constitute a limitation on the embodiments of the present application.
[0092] When a user opens the camera in a short video application and opens a video in a video application, the terminal device can Figure 3 The interface shown in a is the same as Figure 3 Switch back and forth between the interfaces shown in b. Figure 3The interface shown in a in the figure may be a short video shooting interface 301, which may include the content displayed after the camera is turned on in the short video application. The interface 301 may display one or more of the following: a preview screen obtained when the camera is turned on (such as a girl), a control for selecting music at the top of the interface, a shooting control at the bottom of the interface, a control for selecting shooting effects, a control for opening the album, and a function control in a dotted box 303. The function control in the dotted box 303 may include one or more of the following: a control for using the segmented shooting function (displayed as the words "segmented shooting"), a control for using the quick shot function (displayed as the words "quick shot"), a control for opening a shooting template (displayed as the words "template"), or a control for starting a video live broadcast (displayed as the words "start live broadcast").
[0093] The upper layer of the short video application may display a floating window 302, which may display a certain video content in the video application, or may display other content in the video application, or content in other applications, which is not limited in the embodiments of the present application.
[0094] In the terminal device Figure 3 The interface shown in a in the figure switches to Figure 3 During the process of the interface shown in b in FIG. 1 , the color of the function control in the dotted frame 303 gradually darkens. Figure 3 The interface shown in b in the figure switches to Figure 3 During the process of the interface shown in a in FIG. 1 , the color of the function control in the dotted frame 303 gradually becomes lighter, which can be understood as the terminal device in Figure 3 Screen flickering or freezing occurs in the corresponding scenes.
[0095] For example, Figure 4 Another scenario schematic diagram provided for an embodiment of the present application.
[0096] When the user opens the video application and shares the camera in the device 400 with other devices, the terminal device can Figure 4 The interface shown in a is the same as Figure 4 Switch back and forth between the interfaces shown in b. Figure 4The interface shown in a in the figure may display: a window 401 located on the left half of the terminal device screen, and a window 402 located on the right half of the terminal device screen. Window 401 may be any interface in the video application, and window 402 may be an interface displayed when the terminal device turns on the camera and shares the camera with other devices. Window 402 may display: prompt information, pause controls, and controls for disconnecting. The prompt information may be displayed as "rear camera in use, connected to 'device 400'", which can be understood as the terminal device can share the camera with device 400. In this scenario, device 400 can display the content captured by the camera of the terminal device on its own display screen. The background of window 402 may be part of the wallpaper in the terminal device, and the wallpaper may be semi-transparent.
[0097] like Figure 4 In the interface shown in b, the content displayed in window 403 may be the same as the content displayed in window 401. Compared with window 402, the background of window 404 is not part of the wallpaper in the terminal device.
[0098] In the terminal device Figure 4 The interface shown in a in the figure switches to Figure 4 The interface shown in b in the figure, or by Figure 4 The interface shown in b in the figure switches to Figure 4 During the process of the interface shown in a in the figure, the background of the right half of the terminal device screen keeps switching, which can be understood as the terminal device switching between Figure 4 Screen flickering or freezing occurs in the corresponding scenes.
[0099] In a possible implementation, when the left half screen of the terminal device displays other application interfaces and the right half screen displays any interface displayed after calling the camera, the terminal device will also generate the same Figure 4 In the corresponding embodiments, similar screen flashing situations are described. In the embodiments of the present application, the specific content displayed on the terminal device is not limited.
[0100] For example, Figure 5 A schematic diagram of another scenario provided for an embodiment of the present application.
[0101] When a user opens the video call function in a social application, the terminal device can Figure 5 The interface shown in a is the same as Figure 5 Switch back and forth between the interfaces shown in b. Figure 5The interface shown in a in the figure can display a desktop interface in full screen, and the desktop interface can display: at least one application icon, such as an icon for displaying a file management application (such as the application icon displayed in the dotted box 501). A line segment can be displayed below the icon of the file management application, and the line segment below the icon of the file management application can indicate that the file management application can support being displayed in the form of a card on the desktop. For example, in response to a long press operation of the user on the icon of the file management application, the terminal device can set a card for the file management application.
[0102] A floating window 502 may be displayed on the upper layer of the desktop interface, and a video call interface in a social application may be displayed in the floating window 502. For example, the video call interface may include: video content acquired by the terminal device based on a camera (such as video content displayed as a girl), and video content acquired by the camera of another device when the terminal device establishes a call connection with the other device (such as video content displayed as a boy).
[0103] It is understandable that, in response to the user's triggering operation on the desktop interface, the terminal device may flash the line segment in the dotted frame 501. Figure 5 The interface shown in a in the figure switches to Figure 5 In the process of the interface shown in b in FIG. 1 , the line segment below the icon of the file management application in the dotted frame 501 is cancelled, and the terminal device is Figure 5 The interface shown in b in the figure switches to Figure 5 In the process of the interface shown in a in FIG, the line segment below the icon of the file management application is displayed, which can be understood as the terminal device in Figure 5 Screen flickering or freezing may occur in the corresponding scenarios, and the terminal device may be severely overheated.
[0104] In a possible implementation, when the terminal device displays other interfaces in full screen, and displays the interface of other applications after turning on the camera in a floating window, the other interface may also have screen flickering or freezing. The embodiments of the present application do not limit the content displayed in full screen of the terminal device and the content displayed in the floating window.
[0105] Combination Figure 3-Figure 5In the corresponding embodiment, in response to the user triggering the operation of turning on the camera in the terminal device, the terminal device may experience a screen flickering phenomenon. The reason for the screen flickering phenomenon of the terminal device may be: when the terminal device detects that the user turns on the camera, the terminal device can set the display bandwidth to the second display bandwidth (such as 4700Mbps, etc.), and when the display bandwidth required by the usage scenario is higher, some layers will be synthesized through the GPU and some layers will be synthesized through the DPU. When an image is synthesized through both the GPU and the DPU within a period of time, different synthesis methods will cause the device to flicker or freeze.
[0106] The display bandwidth can be understood as the size of the display data transmitted per unit time, and the display bandwidth can be related to parameters such as the horizontal resolution, vertical resolution, and maximum refresh rate of the display screen. For example, the display bandwidth can be the product of the horizontal resolution, the vertical resolution, and the maximum refresh rate. The specific calculation method of the display bandwidth is not limited in the embodiments of the present application.
[0107] Typically, combined Figure 6 The corresponding embodiment provides examples for setting the display bandwidth and the reasons why the screen flickering phenomenon occurs on the terminal device. Figure 6 A schematic diagram of a flow chart for setting display bandwidth provided in an embodiment of the present application. Figure 6 In the corresponding embodiment, the terminal device may include: target application, camera HAL, rendering engine, display synthesizer, hardware synthesis processor, DPU and LCD modules.
[0108] like Figure 6 As shown, the method for setting the display bandwidth can be as follows:
[0109] S601: In response to a user power-on or restart operation, the camera HAL initializes the camera service.
[0110] S602: In response to a user power-on or restart operation, a hardware synthesis processor is initialized.
[0111] It can be understood that in response to the user's power-on or restart operation, the camera HAL can execute S701, and the hardware synthesis processor can execute the steps shown in S702-S703 in sequence. The sequential relationship between S701 and S702 is not specifically limited in the embodiment of the present application.
[0112] S603: The hardware synthesis processor configures a first display bandwidth and a second display bandwidth.
[0113] The first display bandwidth may be a display bandwidth set when the camera state is off, and the second display bandwidth may be a display bandwidth set when the camera state is on, and the first display bandwidth is greater than the second display bandwidth. For example, the first display bandwidth may be set to a value such as 8800 Mbps, and the second display bandwidth may be set to a value such as 4700 Mbps.
[0114] It is understandable that the total bandwidth of the terminal device may include: bandwidth used for calls, bandwidth used for taking photos, display bandwidth, and other bandwidths, and the proportion of other bandwidths in the total bandwidth is relatively small. In order to ensure the smoothness of the photo function, the terminal device may set a smaller display bandwidth when detecting that the camera is turned on, so that more bandwidth can be provided for the photo function.
[0115] Exemplarily, an LCD configuration file may be provided in the terminal device, and the LCD configuration file may be provided in the kernel layer. The LCD configuration file may include: a first display bandwidth and a second display bandwidth. The hardware synthesis processing and the camera HAL may parse the LCD configuration file to determine the first display bandwidth that is allowed to be set when the camera state is off, and determine the second display bandwidth that is allowed to be set when the camera state is on.
[0116] S604: The camera HAL sends a message to the hardware synthesis processor indicating that the camera state is off.
[0117] It is understandable that the camera HAL may execute the step shown in S604 after S601. The camera HAL may execute the step shown in S604 after confirming that the camera state is off after initialization, so that the hardware synthesis processor can set a default value for the display bandwidth.
[0118] S605: The hardware synthesis processor sets the display bandwidth to the first display bandwidth.
[0119] Adaptively, the hardware composition processor may synchronize the first display bandwidth to the DPU.
[0120] S606: In response to the operation for turning on the camera, the target application sends a message to the camera HAL for indicating that the camera state is turned on.
[0121] Among them, the operation for turning on the camera can be: an operation for taking photos, an operation for starting video recording, an operation for scanning a code, an operation for starting a video call, an operation for starting face verification, or an operation for sharing the camera to other devices, etc. The operation for turning on the camera can be an operation that the user is not aware of, but the target application needs to turn on the camera for image acquisition.
[0122] S607: The camera HAL sends a message to the hardware synthesis processor indicating that the camera state is turned on.
[0123] S608: The hardware synthesis processor sets the display bandwidth to the second display bandwidth.
[0124] Adaptively, when receiving a message indicating that the camera state is turned on, the hardware composition processor may use the display bandwidth in S603 to configure a second display bandwidth and synchronize the second display bandwidth to the DPU.
[0125] S609: The target application sends N layers to the display compositor.
[0126] The N layers may be layers that the target application requests to be drawn after the camera in the target application is opened.
[0127] N layers may carry layer information corresponding to the N layers respectively, and the layer information corresponding to any layer may include one or more of the following: horizontal resolution of the layer, vertical resolution of the layer, maximum refresh rate, or layer name, etc. Among them, the horizontal resolution, vertical resolution, and maximum refresh rate of the layer may be used to calculate the display bandwidth of the current layer.
[0128] S610: The display synthesizer sends N layers to the hardware synthesis processor.
[0129] exist Figure 6 In the corresponding embodiment, N is an integer greater than 1.
[0130] S611. The hardware synthesis processor sends N layers to the DPU.
[0131] S612: The DPU determines, based on the display bandwidth of the N layers, that M layers among the N layers are to be processed by the GPU, and sets labels for the M layers.
[0132] The DPU can sort the N layers according to the stacking relationship of the layers, for example, in the order of the layers covering the top layer to the layers covering the bottom layer, to obtain the order of the N layers. The display bandwidth of each layer is calculated using the layer information of the N layers. The DPU uses the second display bandwidth and the sorted N layers to determine that the sum of the display bandwidths of the NM layers is less than the second display bandwidth, and the remaining M layers need to be processed by the GPU for layer synthesis, so the DPU can set labels for the M layers.
[0133] S613. The DPU sends M layers to the hardware synthesis processor.
[0134] S614. The hardware synthesis processor sends M layers to the display synthesizer.
[0135] S615: The display compositor sends M layers to the rendering engine.
[0136] S616: The rendering engine uses the GPU to render the M layers, creates a first layer, and fills the data of the rendered M layers into the first layer.
[0137] Exemplarily, when the rendering engine receives M layers, it can call a method based on the tag to enable OpenGL ES to process the M layers, and OpenGL ES enables the GPU to process the M layers by calling the method; then the GPU can render the M layers, create a first layer, and fill the data of the rendered M layers into the first layer, and then the GPU can return the first layer to the rendering engine through OpenGL ES.
[0138] The first layer may also carry layer information. For the type of information carried in the layer information of the first layer, refer to the step shown in S609, which will not be described in detail here.
[0139] S617. The rendering engine sends the first layer to the reality synthesizer.
[0140] S618: The display synthesizer sends the first layer to the hardware synthesis processor.
[0141] S619: The hardware synthesis processor sends the first layer to the DPU.
[0142] S620. The DPU determines that the display bandwidth of N-M+1 layers meets the second display bandwidth.
[0143] The DPU can obtain the first layer and NM layers, totaling N-M+1 layers, and based on the layer information corresponding to the N-M+1 layers, reconfirm whether the sum of the display bandwidths of the N-M+1 layers meets the second display bandwidth, and when it is determined that the sum of the display bandwidths of the N-M+1 layers is less than the second display bandwidth, execute the steps shown in S621.
[0144] S621. The DPU performs layer synthesis on the N-M+1 layers to obtain a first image, and sends the first image to the LCD.
[0145] The adapted LCD may display the first image.
[0146] S622: In response to the user's operation of turning off the camera, the target application sends a message to the camera HAL indicating that the camera state is turned off.
[0147] S623: The camera HAL sends a message to the hardware synthesis processor indicating that the camera state is off.
[0148] S624: The hardware synthesis processor sets the display bandwidth to the first display bandwidth.
[0149] Adaptively, when receiving a message indicating that the camera state is off, the hardware composition processor may use the display bandwidth in S603 to configure the first display bandwidth and synchronize the first display bandwidth to the DPU.
[0150] Combination Figure 6 In the corresponding embodiments, some layers are synthesized by the GPU and some layers are synthesized by the DPU. Therefore, when an image is synthesized by both the GPU and the DPU within a period of time, the different synthesis methods may cause the device to flash or freeze.
[0151] For example, combining Figure 3 In the corresponding embodiment, the layer including the dotted frame 303 may be a layer synthesized by the GPU; Figure 4 In the corresponding embodiment, the layer including the window 402 or the window 404 may be a layer synthesized by the GPU; Figure 5 In a corresponding embodiment, the layer including the line segment in the dashed box 501 may be a layer synthesized by a GPU.
[0152] In view of this, an embodiment of the present application provides a display method, which can set the display bandwidth to a first display bandwidth when the terminal device detects that the power is turned on. When the terminal device detects that a preset application turns on the camera, the terminal device can maintain the first display bandwidth to reduce the first display bandwidth from being reduced to the second display bandwidth when it is detected that the application turns on the camera, and reduce the screen flickering or freezing caused by insufficient display bandwidth.
[0153] The following specific embodiments are used to describe in detail the technical solution of the present application and how the technical solution of the present application solves the above technical problems. The following specific embodiments can be implemented independently or in combination with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0154] The present application embodiment can provide two methods for setting the display bandwidth, for example, by filtering the application package name to determine the display bandwidth (see Figure 7 corresponding embodiment), or determine the display bandwidth by filtering the layer name (see Figure 8 corresponding embodiments).
[0155] For example, Figure 7 A flow chart of a display method provided in an embodiment of the present application. Figure 7In the corresponding embodiment, the terminal device may include: target application, camera HAL, display synthesizer, hardware synthesis processor, DPU, LCD and other modules.
[0156] like Figure 7 As shown, the display method may include the following steps:
[0157] S701: In response to a user power-on or restart operation, the camera HAL initializes the camera service.
[0158] S702: In response to a user power-on or restart operation, the hardware synthesis processor is initialized.
[0159] S703: The hardware synthesis processor configures a first display bandwidth and a second display bandwidth.
[0160] S704: The camera HAL sends a message to the hardware synthesis processor indicating that the camera state is off.
[0161] S705: The hardware synthesis processor sets the display bandwidth to the first display bandwidth.
[0162] Among them, the steps shown in S701-S705 can refer to the description of the steps shown in S601-S605, and will not be repeated here.
[0163] S706: In response to the operation for turning on the camera, the target application sends a first message to the camera HAL.
[0164] The first message may include: a message indicating that the camera status is turned on, and a package name of the target application.
[0165] S707: The camera HAL sends a first message to the hardware synthesis processor.
[0166] S708: The hardware synthesis processor determines whether the target application satisfies a preset application.
[0167] The preset application may be an application that occupies a large display bandwidth during operation, and / or an application that often has screen flickering or freezes. For example, the terminal device may set an application that occupies a display bandwidth greater than the second display bandwidth during operation as a preset application, and / or the terminal device may set an application that has a screen flickering (or freezes) greater than a preset number of times within a time threshold as a preset application.
[0168] When the camera state is turned on, when the hardware synthesis processor determines that the target application meets the preset application (or is understood that the package name of the target application belongs to the package name of the preset application), the hardware synthesis processor executes the step shown in S709; or, when the camera state is turned on, when the hardware synthesis processor determines that the target application does not meet the preset application (or is understood that the package name of the target application does not belong to the package name of the preset application), the hardware synthesis processor executes the step shown in S710. The package name of the preset application can be preset in the terminal device.
[0169] S709: The hardware synthesis processor sets the display bandwidth to the first display bandwidth.
[0170] Adaptively, the hardware composition processor may synchronize the first display bandwidth to the DPU.
[0171] S710. The hardware synthesis processor sets the display bandwidth to a second display bandwidth.
[0172] Optionally, the hardware composition processor may synchronize the second display bandwidth to the DPU.
[0173] It can be understood that, when the hardware synthesizer sets the display bandwidth to the first display bandwidth in S709, the terminal device can execute the steps shown in S711-S715 when N layers are detected.
[0174] S711. The target application sends N layers to the display compositor.
[0175] exist Figure 7 In the corresponding embodiment, N is an integer greater than 1.
[0176] S712. The display synthesizer sends N layers to the hardware synthesis processor.
[0177] S713. The hardware synthesis processor sends N layers to the DPU.
[0178] S714. The DPU determines that the display bandwidths of the N layers meet the first display bandwidth.
[0179] The DPU may obtain layer information corresponding to the N layers respectively, and when it is determined that the sum of the display bandwidths of the N layers is less than the first display bandwidth, execute the step shown in S715.
[0180] S715. The DPU performs layer synthesis on the N layers to obtain a second image, and sends the second image to the LCD.
[0181] The adapted LCD can display the second image.
[0182] S716: In response to the user's operation of closing the camera, the target application sends a second message to the camera HAL.
[0183] The second message includes: a message indicating that the camera status is off and a package name of the target application, or the second message may only include a message indicating that the camera status is off.
[0184] S717. The camera HAL sends a second message to the hardware synthesis processor.
[0185] S718. The hardware synthesis processor sets the display bandwidth to the first display bandwidth.
[0186] Adaptively, the hardware composition processor may synchronize the first display bandwidth to the DPU.
[0187] Based on this, the hardware synthesis processor can set the display bandwidth to the first display bandwidth when detecting that the preset application turns on the camera, reducing the screen flicker or freeze caused by insufficient display bandwidth and improving the smoothness of the displayed screen. In addition, after setting the first display bandwidth, the terminal device can also save the GPU usage when the display bandwidth is insufficient, saving GPU power consumption.
[0188] It is understandable that, combined with Figure 3-Figure 5 In any of the scenarios described in the corresponding embodiments, the terminal device can maintain a higher display bandwidth when it detects that the camera of the preset application is turned on. In this way, the terminal device can not only reduce screen freezes or screen flickers in the preset application, but when the terminal device simultaneously turns on other devices, the higher display bandwidth can also enable the terminal device to reduce screen freezes or screen flickers in other applications, thereby improving the smoothness of device use.
[0189] For example, Figure 8 A flow chart of another display method provided in an embodiment of the present application. Figure 8 In the corresponding embodiment, the terminal device may include: target application, camera HAL, display synthesizer, hardware synthesis processor, DPU, LCD and other modules.
[0190] like Figure 8 As shown, the display method may include the following steps:
[0191] S801: In response to a user power-on or restart operation, the camera HAL initializes the camera service.
[0192] S802: In response to a user power-on or restart operation, a hardware synthesis processor is initialized.
[0193] S803: The hardware synthesis processor configures a first display bandwidth and a second display bandwidth.
[0194] S804: The camera HAL sends a message to the hardware synthesis processor indicating that the camera state is off.
[0195] S805: The hardware synthesis processor sets the display bandwidth to the first display bandwidth.
[0196] S806: In response to the operation for turning on the camera, the target application sends a message to the camera HAL for indicating that the camera state is turned on.
[0197] S807: The camera HAL sends a message to the hardware synthesis processor indicating that the camera state is turned on.
[0198] S808: The hardware synthesis processor sets the display bandwidth to the second display bandwidth.
[0199] S809: The target application sends N layers to the display compositor.
[0200] S810. The display synthesizer sends N layers to the hardware synthesis processor.
[0201] The steps shown in S801-S810 can be found in Figure 6 The steps S601-S610 in the corresponding embodiment are not repeated here.
[0202] S811. When the hardware synthesis processor determines that there is a layer whose layer name satisfies a preset layer name among the N layers, the hardware synthesis processor sets the display bandwidth to the first display bandwidth.
[0203] exist Figure 8 In the corresponding embodiment, N is an integer greater than or equal to 1.
[0204] The preset layer name may be a layer whose display bandwidth is greater than the third display bandwidth when the application to which the layer belongs is running, and / or a layer that often has screen flickering or freezing. The third display bandwidth is less than the second display bandwidth, for example, the third display unit may be a value such as 2500Mbps or 3000Mbps.
[0205] Suitably, the hardware synthesizer may synchronize the first display bandwidth to the DPU after executing the step shown in S811.
[0206] In a possible implementation, when there is no layer whose layer name satisfies the preset layer name among the N layers, the terminal device may maintain the second display bandwidth. S812: The hardware synthesis processor sends the N layers to the DPU.
[0207] S813. The DPU determines that the display bandwidths of the N layers meet the first display bandwidth.
[0208] The DPU may obtain layer information corresponding to the N layers respectively, and when it is determined that the sum of the display bandwidths of the N layers is less than the first display bandwidth, execute the step shown in S814.
[0209] S814. The DPU performs layer synthesis on the N layers to obtain a third image, and sends the third image to the LCD.
[0210] The adapted LCD can display the third image.
[0211] S815: In response to the user's operation of turning off the camera, the target application sends a message to the camera HAL indicating that the camera status is turned off.
[0212] S816. The camera HAL sends a message to the hardware synthesis processor indicating that the camera state is off.
[0213] S817: The hardware synthesis processor sets the display bandwidth to the first display bandwidth.
[0214] Adaptively, the hardware composition processor may synchronize the first display bandwidth to the DPU.
[0215] Based on this, the hardware synthesis processor can also set the display bandwidth to the first display bandwidth when receiving a layer that meets the preset layer name (or it can also be understood that there is a preset layer), thereby reducing the screen freeze caused by insufficient display bandwidth and improving the smoothness of the displayed picture.
[0216] In a possible implementation, the terminal device may also use Figure 7 as well as Figure 8 The method described in the corresponding embodiment uses both the application package name and the layer name to determine the display bandwidth. It can be understood that, Figure 8 The preset layers described in can be Figure 7 The layers in the preset applications, that is, the preset layers, can also be used as a method for detecting whether it is a preset application.
[0217] It should be understood that the interface provided in the embodiment of the present application is merely an example and does not constitute a limitation on the embodiment of the present application.
[0218] exist Figure 7 Based on the corresponding embodiments, the display method provided in the embodiments of the present application is illustrated by taking the target applications as the first application and the second application as examples, see Figure 9-11 The corresponding embodiments.
[0219] For example, Fig. 9 A flowchart of another display method provided in an embodiment of the present application is shown below. Fig. 9In the corresponding embodiment, an example is given in which the first application may be a short video application and the second application may be a shopping application. This example does not constitute a limitation on the embodiments of the present application.
[0220] like Fig. 9 As shown, the display method may include the following steps:
[0221] S901. At a first moment, a terminal device receives a first operation of opening a first application.
[0222] The first application is a short video application, and the first application satisfies the preset application described in the embodiment of the present application.
[0223] The first operation to open the first application can be an operation to open the first application when the first application is closed, or an operation to open the first application from the background multitasking interface, or an operation to open the first application by sliding left or right at the bottom of the interface. This is not limited in the embodiments of the present application.
[0224] S902: In response to a first operation, the terminal device displays a first interface.
[0225] Fig.10 This is a schematic diagram of an interface for starting a camera in a first application provided in an embodiment of the present application. The first interface may be Fig.10 The interface shown in a.
[0226] S903: The terminal device receives a second operation for opening a camera in the first application.
[0227] like Fig.10 The interface shown in a in the figure may include: short video content, a control 1001 for shooting a short video, etc. The second operation for turning off and on the camera may be an operation on the control 1001.
[0228] S904. In response to the second operation, the terminal device displays a second interface.
[0229] The second interface is the interface displayed by the first application when the camera is turned on. For example, the second interface can be Fig.10 The interface shown in b in FIG. 1 may include: a control 1002 for closing short video shooting based on the content acquired by the camera.
[0230] S905. The terminal device receives a third operation for turning off the camera in the first application.
[0231] The third operation may be an operation on the control 1002, or an operation on Fig.10 The operation of sliding right or left in the interface shown in b.
[0232] S906. At the second moment, in response to the third operation, the terminal device displays the first interface.
[0233] Between the first moment and the second moment, the display bandwidth of the terminal device is a first value, and the first value may be the first display bandwidth described in the embodiment of the present application.
[0234] S907. At the third moment, the terminal device receives a fourth operation of opening the second application.
[0235] The second application is a shopping application, and the second application does not satisfy the preset application described in the embodiment of the present application.
[0236] S908. In response to the fourth operation, the terminal device displays a third interface.
[0237] Fig.11 This is a schematic diagram of an interface for starting a camera in a second application provided in an embodiment of the present application. The third interface can be Fig.11 The interface shown in a in FIG. 1 may include: a control 1101 for scanning a code, a control 1102 for taking a photo, and the like.
[0238] S909. At the fourth moment, the terminal device receives a fifth operation for opening the camera in the second application.
[0239] The fifth operation may be a click operation on the control 1101 or a click operation on the control 1102 .
[0240] Between the third moment and the fourth moment, the display bandwidth of the terminal device is the first value.
[0241] S910. At a fifth moment, in response to a fifth operation, the terminal device displays a fourth interface.
[0242] The fourth interface is the interface displayed by the second application when the camera is turned on. Between the fourth moment and the fifth moment, the display bandwidth of the terminal device is the first value. For example, the fourth interface can be Fig.11 The interface shown in b in FIG. 1 may display: a control 1103 for exiting the current interface.
[0243] S911. The terminal device receives a sixth operation for turning off the camera in the second application.
[0244] The sixth operation may be a click operation on the control 1103, or a Fig.11 The operation of sliding left or right in the interface shown in b.
[0245] S912: At a sixth moment, in response to a sixth operation, the terminal device displays a third interface.
[0246] Between the fifth moment and the sixth moment, the display bandwidth of the terminal device is a second value, and the first value is greater than the second value.
[0247] It is understandable that when the terminal device uses the first application, the terminal device can set the display bandwidth to the first value, and when the terminal device uses the second application, the terminal device can set the display bandwidth to the second value when it detects that the camera is turned on.
[0248] In a possible implementation, at an eighth moment, the terminal device receives a first operation of opening a first application; in response to the first operation, the terminal device displays a first interface; the terminal device receives a second operation for opening a camera in the first application; at a ninth moment, in response to the second operation, the terminal device sets the display bandwidth of the terminal device to a second value, and between the eighth moment and the ninth moment, the display bandwidth of the terminal device is the first value, and the first value is greater than the second value; at a tenth moment, when the terminal device obtains N layers and determines that there is a preset layer based on the layer names of the N layers, the terminal device sets the display bandwidth of the terminal device to the first value, N is an integer greater than or equal to 1, and the terminal device displays a second interface based on the display bandwidth of the first value, and the second interface is the interface displayed by the first application when the camera is turned on, and between the ninth moment and the tenth moment, the display bandwidth of the terminal device is the second value; the terminal device receives a third operation for closing the camera in the first application; at an eleventh moment, in response to the third operation, the terminal device displays the first interface, and between the eleventh moment and the first moment, the display bandwidth of the terminal device is the first value.
[0249] Combination Fig.10 as well as Figure 8 In a corresponding embodiment, the terminal device can set the display bandwidth to the second value when it detects that the camera is turned on, and when it detects that a preset layer is included in the N layers, it determines to set the display bandwidth to the first value, and processes the N layers based on the first value.
[0250] Combined with the above Figure 4-Figure 11 , the method provided in the embodiment of the present application is described, and the device for executing the above method provided in the embodiment of the present application is described below. Fig.12 As shown, Fig.12 A schematic diagram of the structure of a display device provided in an embodiment of the present application. The display device may be a terminal device in an embodiment of the present application, or a chip or chip system in a terminal device.
[0251] like Fig.12As shown, the display device 1200 can be used in a communication device, a circuit, a hardware component or a chip, and the display device 1200 includes: a display unit 1201 and a processing unit 1202. The display unit 1201 is used to support the display step performed by the display method; the processing unit 1202 is used to support the display device 1200 to perform the information processing step.
[0252] In a possible implementation, the display device 1200 may further include a communication unit 1203, and the communication unit 1203 is used to support the display device 1200 to perform steps such as receiving or sending a message.
[0253] The display devices described in the embodiments of the present application may include Fig.12 The units described in the corresponding embodiments.
[0254] Specifically, the processing unit 1202 and the display unit 1201 may be integrated together, and the processing unit 1202 and the display unit 1201 may communicate with each other.
[0255] In a possible implementation, the display device 1200 may further include: a storage unit 1204. The storage unit 1204 may include one or more memories, and the memory may be a device in one or more devices or circuits for storing programs or data.
[0256] The storage unit 1204 may exist independently and be connected to the processing unit 1202 via a communication bus. The storage unit 1204 may also be integrated with the processing unit 1202.
[0257] Taking the display device 1200 as an example, which can be a chip or chip system of a terminal device in an embodiment of the present application, the storage unit 1204 can store computer execution instructions of the method of the terminal device, so that the processing unit 1202 executes the method of the terminal device in the above embodiment. The storage unit 1204 can be a register, a cache, or a random access memory (RAM), etc. The storage unit 1204 can be integrated with the processing unit 1202. The storage unit 1204 can be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, and the storage unit 1204 can be independent of the processing unit 1202.
[0258] In a possible implementation, the display device 1200 may further include: a communication unit 1203. The communication unit 1203 is used to support the display device 1200 to interact with other devices. Exemplarily, when the display device 1200 is a terminal device, the communication unit 1203 may be a communication interface or an interface circuit. When the display device 1200 is a chip or a chip system in a terminal device, the communication unit 1203 may be a communication interface. For example, the communication interface may be an input / output interface, a pin or a circuit, etc.
[0259] The device of this embodiment can be used to execute the steps executed in the above method embodiment. Its implementation principle and technical effects are similar and will not be described in detail here.
[0260] Fig.13 A schematic diagram of the hardware structure of another terminal device provided in an embodiment of the present application.
[0261] The terminal device includes a processor 1301, a communication line 1304 and at least one communication interface ( Fig.13 The communication interface 1303 is used as an example for explanation).
[0262] The processor 1301 may be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the present application.
[0263] Communications link 1304 may include circuitry to transmit information between the above-described components.
[0264] The communication interface 1303 uses any transceiver or other device for communicating with other devices or communication networks, such as Ethernet, wireless local area networks (WLAN), etc.
[0265] Possibly, the terminal device may further include a memory 1302 .
[0266] The memory 1302 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory may exist independently and be connected to the processor via a communication line 1304. The memory may also be integrated with the processor.
[0267] The memory 1302 is used to store computer-executable instructions for executing the solution of the present application, and the execution is controlled by the processor 1301. The processor 1301 is used to execute the computer-executable instructions stored in the memory 1302, thereby implementing the method provided by the embodiment of the present application.
[0268] Possibly, the computer-executable instructions in the embodiments of the present application may also be referred to as application code, and the embodiments of the present application do not specifically limit this.
[0269] In a specific implementation, as an embodiment, the processor 1301 may include one or more CPUs, such as Fig.13 CPU0 and CPU1 in.
[0270] In a specific implementation, as an embodiment, the terminal device may include multiple processors, such as Fig.13 1301 and processor 1305 in the embodiment of the present invention. Each of these processors may be a single-CPU processor or a multi-CPU processor. The processor herein may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).
[0271] In the above embodiments, the instructions stored in the memory for execution by the processor may be implemented in the form of a computer program product, wherein the computer program product may be pre-written in the memory, or may be downloaded and installed in the memory in the form of software.
[0272] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a server or data center that includes one or more available media integrated. For example, the available medium can include a magnetic medium (e.g., a floppy disk, a hard disk or a tape), an optical medium (e.g., a digital versatile disc (digital versatiledisc, DVD)), or a semiconductor medium (e.g., a solid state drive (solid state disk, SSD)), etc.
[0273] The embodiments of the present application also provide a computer-readable storage medium. The methods described in the above embodiments can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. Computer-readable media may include computer storage media and communication media, and may also include any medium that can transfer a computer program from one place to another. The storage medium may be any target medium that can be accessed by a computer.
[0274] As a possible design, the computer readable medium may include a compact disc read-only memory (CD-ROM), RAM, ROM, EEPROM or other optical disc storage; the computer readable medium may include a magnetic disk storage or other magnetic disk storage device. Moreover, any connection line may also be appropriately referred to as a computer readable medium. For example, if the software is transmitted from a website, server or other remote source using a coaxial cable, fiber optic cable, twisted pair, DSL or wireless technology (such as infrared, radio and microwave), the coaxial cable, fiber optic cable, twisted pair, DSL or wireless technology such as infrared, radio and microwave are included in the definition of medium. Disk and disc as used herein include compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk and Blu-ray disc, where disks usually reproduce data magnetically, while optical discs reproduce data optically using lasers.
[0275] The above combinations should also be included in the scope of computer-readable media. The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
[0276] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards, and provide corresponding operation entrances for users to choose to authorize or refuse.
Claims
1. A display method, characterized in that: The method comprises: At a first moment, the terminal device receives a first operation of opening a first application; In response to the first operation, the terminal device displays a first interface; The terminal device receives a second operation for opening a camera in the first application; In response to the second operation, the terminal device displays a second interface, where the second interface is the interface displayed by the first application when the camera is turned on; The terminal device receives a third operation for closing the camera in the first application; At a second moment, in response to the third operation, the terminal device displays the first interface, and between the first moment and the second moment, the display bandwidth of the terminal device is a first value; At a third moment, the terminal device receives a fourth operation of opening a second application; In response to the fourth operation, the terminal device displays a third interface; At a fourth moment, the terminal device receives a fifth operation for opening a camera in the second application, and between the third moment and the fourth moment, the display bandwidth of the terminal device is the first value; At a fifth moment, in response to the fifth operation, the terminal device displays a fourth interface, where the fourth interface is an interface displayed by the second application when the camera is turned on, and between the fourth moment and the fifth moment, the display bandwidth of the terminal device is the first value; The terminal device receives a sixth operation for closing the camera in the second application; At a sixth moment, in response to the sixth operation, the terminal device displays the third interface, and between the fifth moment and the sixth moment, the display bandwidth of the terminal device is a second value, and the first value is greater than the second value.
2. The method according to claim 1, characterized in that After responding to the second operation, the method further includes: when the terminal device determines that the first application is a preset application and the state of the camera is turned on, the terminal device sets the display bandwidth of the terminal device to the first value, the preset application is an application where the display bandwidth required by the terminal device when running the preset application is greater than the second value, and / or the preset application is an application where the number of flickering times of the terminal device when running the preset application is greater than a first threshold; After responding to the fifth operation, the method further includes: when the terminal device determines that the second application is not the preset application and the state of the camera is turned on, the terminal device sets the display bandwidth of the terminal device to the second value.
3. The method according to claim 2, characterized in that The terminal device is configured with: a first application, a camera hardware abstraction layer HAL, and a hardware synthesis processor. When the terminal device determines that the first application is a preset application and the state of the camera is turned on, the terminal device sets the display bandwidth of the terminal device to the first value. The method further includes: The first application sends a first message to the camera HAL, wherein the first message includes: a message indicating that the camera is in an on state, and a package name of the first application; The camera HAL sends the first message to the hardware synthesis processor; When the hardware synthesis processor determines, based on the first message, that the first application is the preset application and the state of the camera is turned on, the hardware synthesis processor sets the display bandwidth of the terminal device to the first value.
4. The method according to claim 3, characterized in that The terminal device is further configured with: a display synthesizer, a data processor DPU, and a liquid crystal display LCD. After the hardware synthesis processor sets the display bandwidth of the terminal device to the first value, the method further includes: The hardware synthesis processor sends the first value to the DPU; The first application sends N layers to the DPU via the camera HAL, the display compositor, and the hardware compositing processor; When the DPU determines that the sum of the display bandwidths of the N layers is less than the first value, the DPU synthesizes the N layers into a target image and sends the target image to the LCD.
5. The method according to claim 3, characterized in that: After responding to the third operation, the method further includes: The first application sends a second message to the camera HAL, wherein the second message includes: a message indicating that the camera is in a closed state, and a package name of the first application; The camera HAL sends the second message to the hardware synthesis processor; When the hardware synthesis processor determines that the state of the camera is off based on the second message, the hardware synthesis processor sets the display bandwidth of the terminal device to the first value.
6. The method according to claim 3, characterized in that When the terminal device determines that the second application is not the preset application and the state of the camera is turned on, the terminal device sets the display bandwidth of the terminal device to the second value, including: The second application sends a third message to the camera HAL, wherein the third message includes: a message indicating that the camera is turned on, and a package name of the second application; The camera HAL sends the third message to the hardware synthesis processor; When the hardware synthesis processor determines, based on the third message, that the second application is not the preset application and the state of the camera is turned on, the hardware synthesis processor sets the display bandwidth of the terminal device to the second value.
7. The method according to any one of claims 1 to 6, characterized in that: Before the terminal device receives a first operation of opening a first application, the method further includes: The terminal device receives a seventh operation of powering on or restarting; At the seventh moment, in response to the seventh operation, the terminal device displays a fifth interface, the fifth interface is the desktop of the terminal device, the seventh moment is before the first moment, and between the seventh moment and the first moment, the display bandwidth of the terminal device is the first value.
8. A display method, characterized in that: The method comprises: At an eighth moment, the terminal device receives a first operation of opening a first application; In response to the first operation, the terminal device displays a first interface; The terminal device receives a second operation for opening a camera in the first application; At a ninth moment, in response to the second operation, the terminal device sets the display bandwidth of the terminal device to a second value, and between the eighth moment and the ninth moment, the display bandwidth of the terminal device is a first value, and the first value is greater than the second value; At the tenth moment, when the terminal device obtains N layers and determines that there is a preset layer based on the layer names of the N layers, the terminal device sets the display bandwidth of the terminal device to the first value, where N is an integer greater than or equal to 1. The terminal device displays a second interface based on the display bandwidth of the first value, where the second interface is the interface displayed by the first application when the camera is turned on. Between the ninth moment and the tenth moment, the display bandwidth of the terminal device is the second value. The terminal device receives a third operation for closing the camera in the first application; At the eleventh moment, in response to the third operation, the terminal device displays the first interface, and between the tenth moment and the eleventh moment, the display bandwidth of the terminal device is the first value.
9. The method according to claim 8, characterized in that The terminal device is configured with: a first application, a camera hardware abstraction layer HAL, a display synthesizer, and a hardware synthesis processor, When the terminal device acquires N layers and determines that there is a preset layer based on the layer names of the N layers, the terminal device sets the display bandwidth of the terminal device to the first value, including: The first application sends the N layers to the hardware synthesis processor via the camera HAL and the display synthesizer, wherein the N layers carry a layer name corresponding to any layer in the N layers; When the hardware synthesis processor determines that the preset layer exists based on the layer names of the N layers, the hardware synthesis processor sets the display bandwidth of the terminal device to the first value.
10. The method according to claim 9, characterized in that The terminal device is further configured with: a DPU and an LCD. After the hardware synthesis processor sets the display bandwidth of the terminal device to the first value, the method further includes: The hardware synthesis processor sends the first value to the DPU; The hardware synthesizer sends N layers to the DPU; When the DPU determines that the sum of the display bandwidths of the N layers is less than the first value, the DPU synthesizes the N layers into a target image and sends the target image to the LCD.
11. The method according to any one of claims 8 to 10, characterized in that: Before the terminal device receives a first operation of opening a first application, the method further includes: The terminal device receives a seventh operation of powering on or restarting; At the seventh moment, in response to the seventh operation, the terminal device displays a fifth interface, the fifth interface is the desktop of the terminal device, and the seventh moment is before the eighth moment, and between the seventh moment and the eighth moment, the display bandwidth of the terminal device is the first value.
12. A terminal device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the terminal device executes the method according to any one of claims 1 to 7, or executes the method according to any one of claims 8 to 11.
13. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the computer executes the method according to any one of claims 1 to 7, or executes the method according to any one of claims 8 to 11.
Citation Information
Patent Citations
Method and device for dynamic bandwidth adaptation of display layer
CN110610688A
Camera starting method and related apparatus
CN113366819A
Memory control method and device
CN113589916A
Interface switching method and device, electronic equipment and readable storage medium
CN114816630A
Screen display method and terminal equipment
CN115798390A