Interface display method and related device
By using a universal synthesis channel to synthesize the rounded corner layers and application layers in the terminal device, the jagging phenomenon caused by physical cutting of rounded corners and the tight resources of the privacy indicator layer are solved, achieving more efficient layer synthesis and better user experience.
Patent Information
- Application Number
- PCT/CN2024/111005
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-09-22
- Filing Date
- 2024-08-09
- Publication Date
- 2025-03-27
AI Technical Summary
In terminal devices, physically cut screen rounded corners may have jagged when displayed on the screen, affecting the user's visual experience. When displaying the privacy indicator, creating layers for them individually will cause tight layer resources, which in turn affects display performance and power consumption.
By not using the rounded corner synthesis channel dedicated to the rounded corner layer, the general synthesis channel is used to synthesize the rounded corner layer and the applied layer, including drawing the privacy indicator on the rounded corner layer when it is necessary to display the privacy indicator, avoiding layer synthesis exceptions and reserve more layer resources.
It solves the problem of abnormal synthesis of rounded corner layers, reduces the resource usage of layer synthesis, improves the display performance of electronic devices and reduces power consumption.
Smart Images

Figure CN2024111005_27032025_PF_FP_ABST
Abstract
Description
Interface display method and related equipment
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on September 22, 2023, with application number 202311238876.5 and application name “Interface Display Method and Related Equipment”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The embodiments of the present application relate to the field of terminal technology, and in particular to an interface display method and related equipment. Background Art
[0003] To achieve visual appeal and a high screen-to-body ratio, manufacturers typically round the corners of their devices (such as tablets and mobile phones). However, these rounded corners undergo a physical cutting process, which can create jagged edges when displayed, creating a poor visual experience for users.
[0004] To address this issue, device manufacturers typically use software to create a rounded corner layer with the same curvature as the physical cut to mask the aliasing caused by the cut. This is typically achieved by creating a rounded corner layer on the top and bottom layers of the image to be displayed. These layers are then filled with grayscale rendering, with the fillet edges maintaining the same curvature as the physical cut to mask the aliasing and improve the user's visual experience.
[0005] When a camera or recording app is open, a privacy indicator (usually a small green dot) is typically displayed in the upper right corner of the screen to alert the user that the app is using the camera or recording function for privacy reasons. If a separate layer is created for the privacy indicator, the rounded corners layer will occupy two layer resources, leaving less layer resources available for the app interface. This can negatively impact the display performance and power consumption of electronic devices.
[0006] To address the infrequent updates of rounded corner layers and the single nature of their content and rendering colors, some chip manufacturers have created a dedicated rounded corner synthesis channel within the hardware compositor. This channel is specifically designed for synthesizing rounded corner layers. Because the rounded corner synthesis channel only supports single-channel color mode and not multi-channel color mode, when a privacy indicator is drawn on a rounded corner layer, using the rounded corner synthesis channel to synthesize the rounded corner layer with the privacy indicator drawn on it will cause layer synthesis anomalies. Consequently, a separate layer must be created for the privacy indicator. In other words, the privacy indicator must not be drawn on the rounded corner layer to avoid these anomalies.
[0007] Summary of the Invention
[0008] In view of the above content, it is necessary to provide an interface display method and related equipment. In the scenario of displaying the privacy indicator, the rounded corner synthesis channel dedicated to the rounded corner layer is not used to synthesize the rounded corner layer, so as to solve the layer synthesis abnormality problem caused by the inability of the rounded corner synthesis channel to synthesize the rounded corner layer with the privacy indicator drawn. Drawing the privacy indicator on the rounded corner layer can reserve more layer resources for the application layer.
[0009] In the first aspect, the present application provides an interface display method, which is applied to an electronic device, the electronic device including a processing chip and a display screen, the processing chip including a general synthesis channel for layer synthesis and a rounded corner synthesis channel dedicated to the rounded corner layer, the interface display method including: receiving a first operation of the user; in response to the first operation, starting a first application, the first application being an application with a privacy indicator display requirement; drawing a first rounded corner layer, the first rounded corner layer including a privacy indicator; drawing an application layer containing image information of the first application; using the general synthesis channel to synthesize the first rounded corner layer and the application layer to obtain an image frame; and displaying the image frame on the display screen.
[0010] Using the above technical solution, the processing chip can refer to a processor chip or a system-level chip. In a scenario where a privacy indicator needs to be displayed, the rounded corner synthesis channel dedicated to the rounded corner layer is not used to synthesize the rounded corner layer. This can solve the layer synthesis abnormality problem caused by the inability of the rounded corner synthesis channel to synthesize the rounded corner layer with the privacy indicator drawn. Drawing the privacy indicator on the rounded corner layer can reserve more layer resources for the application layer, reducing the number of layers to be synthesized, thereby reducing the resource usage of layer synthesis, and increasing the possibility of electronic devices using hardware synthesis methods to synthesize layers, thereby reducing the power consumption of electronic devices and improving the display performance of electronic devices.
[0011] In one possible implementation, the electronic device also starts a second application, the thread of the second application is used to draw the first rounded corner layer and send the first rounded corner layer to SurfaceFlinger, the thread of the first application is used to draw the application layer containing the image information of the first application and send the application layer of the first application to SurfaceFlinger.
[0012] Using the above technical solution, the second application can refer to a system-level application (SystemUI). SystemUI can be automatically started during the startup of the electronic device. The first rounded corner layer containing the privacy indicator is drawn by the SystemUI thread. When the privacy indicator needs to be displayed, SurfaceFlinger will not call the rounded corner synthesis channel dedicated to the rounded corner layer to synthesize the rounded corner layer, thereby solving the layer synthesis abnormality problem caused by the inability of the rounded corner synthesis channel to synthesize the rounded corner layer with the privacy indicator.
[0013] In one possible implementation, the interface display method also includes: receiving a second operation from the user; exiting the first application in response to the second operation; drawing a second rounded corner layer, the second rounded corner layer not including a privacy indicator; and synthesizing the second rounded corner layer using a rounded corner synthesis channel.
[0014] By adopting the above technical solution, after exiting the first application, since there is no need to display the privacy indicator, the rounded corner layer can be synthesized using the rounded corner synthesis channel dedicated to the rounded corner layer. This can make full use of the rounded corner synthesis channel of the processing chip, reserve more layer synthesis resources for non-rounded corner layers (without occupying the general synthesis channel), and increase the possibility of electronic devices using hardware synthesis methods to synthesize layers, thereby reducing the power consumption of electronic devices and improving the display performance of electronic devices.
[0015] In one possible implementation, after exiting the first application, the interface display method also includes: creating a notification to cancel the display of the privacy indicator; and synthesizing the second rounded corner layer using the rounded corner synthesis channel, including: synthesizing the second rounded corner layer based on the notification to cancel the display of the privacy indicator using the rounded corner synthesis channel.
[0016] By adopting the above technical solution, in scenarios where the privacy indicator does not need to be displayed, a notification to cancel the display of the privacy indicator is created, so that SurfaceFlinger can respond to the notification to cancel the display of the privacy indicator and use the rounded corner synthesis channel to synthesize the second rounded corner layer, thereby making full use of the rounded corner synthesis channel of the processing chip, reserving more layer synthesis resources for non-rounded corner layers, and improving the possibility of electronic devices using hardware synthesis methods to synthesize layers. For example, the thread of SystemUI can create a notification to cancel the display of the privacy indicator, so that in scenarios where the privacy indicator does not need to be displayed, the notification to cancel the display of the privacy indicator can be sent to SurfaceFlinger accurately and timely.
[0017] In one possible implementation, the processing chip includes a hardware compositor (HWC), the HWC includes a rounded corner synthesis channel, the HWC includes a rounded corner synthesis channel and a general synthesis channel, the HWC is used to use the rounded corner synthesis channel to synthesize the layer to be synthesized when the layer to be synthesized includes a rounded corner label, and based on the cancellation display notification of the privacy indicator, use the rounded corner synthesis channel to synthesize the second rounded corner layer, including: the synthesis service (SurfaceFlinger) adds a rounded corner label to the second rounded corner layer in response to the cancellation display notification of the privacy indicator; SurfaceFlinger sends the second rounded corner layer containing the rounded corner label to the HWC; the HWC uses the rounded corner synthesis channel to synthesize the second rounded corner layer.
[0018] Using the above technical solution, HWC determines whether to use the rounded corner synthesis channel for synthesis by identifying whether the layer to be synthesized includes a rounded corner label. If the layer to be synthesized contains a rounded corner label, the rounded corner synthesis channel is used to synthesize the layer to be synthesized. In scenarios where the privacy indicator does not need to be displayed, SurfaceFlinger can add a rounded corner label to the rounded corner layer based on the cancellation notification of the privacy indicator, so that HWC will use the rounded corner synthesis channel dedicated to the rounded corner layer to synthesize the rounded corner layer, thereby making full use of the rounded corner synthesis channel of the processing chip, reserving more layer synthesis resources for non-rounded corner layers, and improving the possibility of electronic devices using hardware synthesis to synthesize layers.
[0019] In one possible implementation, the processing chip includes an HWC, the HWC includes a rounded corner synthesis channel and a general synthesis channel, and based on the cancellation display notification of the privacy indicator, the rounded corner synthesis channel is used to synthesize the second rounded corner layer, including: SurfaceFlinger creates first identification information in response to the cancellation display notification of the privacy indicator, the first identification information includes the identification of the second rounded corner layer; SurfaceFlinger sends the second rounded corner layer and the first identification information to the HWC; the HWC enables the rounded corner synthesis channel based on the first identification information, and uses the rounded corner synthesis channel to synthesize the second rounded corner layer.
[0020] By adopting the above technical solution, after exiting the first application, since there is no need to display the privacy indicator, SurfaceFlinger can create first identification information based on the notification of canceling the display of the privacy indicator. The first identification information includes the identification of the rounded corner layer. HWC can enable the rounded corner synthesis channel and locate the rounded corner layer based on the first identification information, and then use the rounded corner synthesis channel dedicated to the rounded corner layer to synthesize the rounded corner layer, thereby fully utilizing the rounded corner synthesis channel of the processing chip, reserving more layer synthesis resources for non-rounded corner layers, and improving the possibility of electronic devices using hardware synthesis to synthesize layers, thereby reducing the power consumption of electronic devices and improving the display performance of electronic devices.
[0021] In one possible implementation, after launching the first application, the interface display method also includes: creating a display notification of the privacy indicator; and synthesizing the first rounded corner layer and the application layer using a universal synthesis channel, including: based on the display notification of the privacy indicator, synthesizing the first rounded corner layer and the application layer using a universal synthesis channel.
[0022] By adopting the above technical solution, in the scenario where the privacy indicator needs to be displayed, by creating a display notification of the privacy indicator, SurfaceFlinger can respond to the display notification of the privacy indicator, and use the general synthesis channel to synthesize the first rounded corner layer and the application layer, which can solve the layer synthesis abnormality problem caused by the rounded corner synthesis channel being unable to synthesize the rounded corner layer with the privacy indicator drawn. By drawing the privacy indicator on the rounded corner layer, more layer resources can be reserved for the application layer, reducing the number of layers to be synthesized, thereby reducing the resource occupation of layer synthesis, and increasing the possibility of electronic devices using hardware synthesis methods to synthesize layers, thereby reducing the power consumption of electronic devices and improving the display performance of electronic devices. For example, the display notification of the privacy indicator can be created by the SystemUI thread, so that in the scenario where the privacy indicator needs to be displayed, the display notification of the privacy indicator can be sent to SurfaceFlinger accurately and timely.
[0023] In one possible implementation, the processing chip includes an HWC, and the HWC includes a rounded corner synthesis channel and a general synthesis channel. The HWC is used to use the rounded corner synthesis channel to synthesize the layer to be synthesized when the layer to be synthesized includes a rounded corner label, and based on the display notification of the privacy indicator, use the general synthesis channel to synthesize the first rounded corner layer and the application layer, including: SurfaceFlinger removes the rounded corner label set for the first rounded corner layer in response to the display notification of the privacy indicator; SurfaceFlinger sends the first rounded corner layer and the application layer that do not include the rounded corner label to the HWC; HWC uses the general synthesis channel to synthesize the first rounded corner layer and the application layer.
[0024] Using the above technical solution, HWC determines whether to use the rounded corner synthesis channel for synthesis by identifying whether the layer to be synthesized includes a rounded corner label. If the layer to be synthesized contains a rounded corner label, the rounded corner synthesis channel is used to synthesize the layer to be synthesized. In the scenario where the privacy indicator needs to be displayed, SurfaceFlinger can remove the rounded corner label set for the rounded corner layer based on the display notification of the privacy indicator, so that HWC will not use the rounded corner synthesis channel dedicated to the rounded corner layer to synthesize the rounded corner layer, and use the general synthesis channel to synthesize the rounded corner layer and the application layer, thereby solving the layer synthesis abnormality problem caused by the rounded corner synthesis channel being unable to synthesize the rounded corner layer with a privacy indicator drawn.
[0025] In one possible implementation, the processing chip includes an HWC, the HWC includes a rounded corner synthesis channel and a universal synthesis channel, and based on the display notification of the privacy indicator, the universal synthesis channel is used to synthesize the first rounded corner layer and the application layer, including: SurfaceFlinger creates second identification information in response to the display notification of the privacy indicator; SurfaceFlinger sends the first rounded corner layer, the application layer and the second identification information to the HWC; the HWC disables the rounded corner synthesis channel based on the second identification information, and uses the universal synthesis channel to synthesize the first rounded corner layer and the application layer.
[0026] By adopting the above technical solution, in a scenario where a privacy indicator needs to be displayed, SurfaceFlinger can create a second identification information based on the display notification of the privacy indicator. HWC disables the rounded corner synthesis channel dedicated to the rounded corner layer based on the second identification information, so that HWC does not use the rounded corner synthesis channel to synthesize the rounded corner layer, and uses the general synthesis channel to synthesize the rounded corner layer and the application layer, thereby solving the layer synthesis abnormality problem caused by the rounded corner synthesis channel being unable to synthesize the rounded corner layer with the privacy indicator drawn.
[0027] In a possible implementation, the interface display method further includes: constructing a transmission interface for transmitting the first identification information or the second identification information between SurfaceFlinger and HWC.
[0028] By adopting the above technical solution, a transmission interface specifically used to transmit the first identification information or the second identification information is constructed between SurfaceFlinger and HWC, so that SurfaceFlinger can transmit the first identification information or the second identification information to HWC, so that HWC can subsequently disable or enable the rounded corner synthesis channel. The transmission interface can be an Android interface description language (AIDL) interface.
[0029] In one possible implementation, a universal synthesis channel is used to synthesize the first rounded corner layer and the application layer, including: when the synthesis capability of the universal synthesis channel meets the synthesis requirements of the first rounded corner layer and the application layer, the universal synthesis channel is used to synthesize the first rounded corner layer and the application layer; when the synthesis capability of the universal synthesis channel does not meet the synthesis requirements of the first rounded corner layer and the application layer, a graphics processing unit (GPU) and the universal synthesis channel are used to synthesize the first rounded corner layer and the application layer.
[0030] By adopting the above technical solution, when the synthesis capability of the general synthesis channel meets the synthesis requirements of the rounded corner layer and the application layer, the general synthesis channel is used to synthesize the rounded corner layer and the application layer, that is, the rounded corner layer and the application layer are synthesized using the hardware synthesis method, thereby reducing the power consumption of the electronic device and improving the display performance of the electronic device. When the synthesis capability of the general synthesis channel does not meet the synthesis requirements of the rounded corner layer and the application layer, the GPU (software synthesis method) and the general synthesis channel (hardware synthesis method) are used to synthesize the rounded corner layer and the application layer, that is, a hybrid synthesis method including the hardware synthesis method and the software synthesis method is used for layer synthesis. Compared with simply using the software synthesis method for layer synthesis, the layer synthesis efficiency is higher and the device power consumption is lower.
[0031] In a possible implementation, the first application is a camera application or a recording application.
[0032] By adopting the above technical solution, when an electronic device starts a camera application or a recording application, it is necessary to display a privacy indicator. By synthesizing the rounded corner layer without using the rounded corner synthesis channel dedicated to the rounded corner layer, the problem of layer synthesis abnormality caused by the inability of the rounded corner synthesis channel to synthesize the rounded corner layer with the privacy indicator drawn can be solved. Drawing the privacy indicator on the rounded corner layer can reserve more layer resources for the layer of the camera application or the recording application, reducing the number of layers to be synthesized, and increasing the possibility of the electronic device using hardware synthesis to synthesize layers, thereby reducing the power consumption of the electronic device and improving the display performance of the electronic device.
[0033] In the second aspect, the present application also provides an interface display method, which is applied to an electronic device, the electronic device including a processing chip and a display screen, the processing chip including a general synthesis channel for layer synthesis and a rounded corner synthesis channel dedicated to the rounded corner layer, the interface display method including: receiving a first operation of the user; in response to the first operation, starting a camera application; drawing a first rounded corner layer, the first rounded corner layer including the privacy indicator; drawing a camera preview layer of the camera application; using a general synthesis channel to synthesize the first rounded corner layer and the camera preview layer to obtain a camera preview interface; displaying the camera preview interface on the display screen.
[0034] Using the above technical solution, the processing chip can refer to a processor chip or a system-level chip. After the camera application is opened, the camera preview interface will display a privacy indicator. The privacy indicator is drawn on the rounded corner layer. By not using the rounded corner synthesis channel dedicated to the rounded corner layer to synthesize the rounded corner layer, the layer synthesis abnormality problem caused by the inability of the rounded corner synthesis channel to synthesize the rounded corner layer with the privacy indicator drawn can be solved. Drawing the privacy indicator on the rounded corner layer can reserve more layer resources for the application layer, reducing the number of layers to be synthesized, thereby reducing the resource usage of layer synthesis, and increasing the possibility of electronic devices using hardware synthesis methods to synthesize layers, thereby reducing the power consumption of electronic devices and improving the display performance of electronic devices.
[0035] In one possible implementation, the interface display method also includes: receiving a second operation from the user; in response to the second operation, switching to the interface of other applications, where the other applications do not have a requirement to display a privacy indicator; drawing a second rounded corner layer, where the second rounded corner layer does not include a privacy indicator; and synthesizing the second rounded corner layer using a rounded corner synthesis channel.
[0036] By adopting the above technical solution, when switching from the camera application interface to other application interfaces that do not have the display requirements of the privacy indicator, since there is no need to display the privacy indicator, the rounded corner layer can be synthesized using the rounded corner synthesis channel dedicated to the rounded corner layer. This can fully utilize the rounded corner synthesis channel of the processing chip, reserve more layer synthesis resources for non-rounded corner layers (without occupying the general synthesis channel), and increase the possibility of electronic devices using hardware synthesis methods to synthesize layers, thereby reducing the power consumption of electronic devices and improving the display performance of electronic devices.
[0037] In one possible implementation, after switching to the interface of other applications, the interface display method also includes: creating a notification to cancel the display of the privacy indicator; and synthesizing the second rounded corner layer using a rounded corner synthesis channel, including: synthesizing the second rounded corner layer based on the notification to cancel the display of the privacy indicator using a rounded corner synthesis channel.
[0038] By adopting the above technical solution, when switching from the camera application interface to other application interfaces that do not have the display requirements of the privacy indicator, since the privacy indicator does not need to be displayed, a cancellation notification of the privacy indicator is created, so that SurfaceFlinger can respond to the cancellation notification of the privacy indicator and use the rounded corner synthesis channel to synthesize the rounded corner layer, thereby making full use of the rounded corner synthesis channel of the processing chip, reserving more layer synthesis resources for non-rounded corner layers, and improving the possibility of electronic devices using hardware synthesis methods to synthesize layers. For example, the SystemUI thread can create a cancellation notification of the privacy indicator, so that in scenarios where the privacy indicator does not need to be displayed, the cancellation notification of the privacy indicator can be sent to SurfaceFlinger accurately and timely.
[0039] In one possible implementation, the processing chip includes an HWC, and the HWC includes a rounded corner synthesis channel and a general synthesis channel. The HWC is used to use the rounded corner synthesis channel to synthesize the layer to be synthesized when the layer to be synthesized includes a rounded corner label, and based on the cancellation display notification of the privacy indicator, use the rounded corner synthesis channel to synthesize the second rounded corner layer, including: SurfaceFlinger adds a rounded corner label to the second rounded corner layer in response to the cancellation display notification of the privacy indicator; SurfaceFlinger sends the second rounded corner layer containing the rounded corner label to the HWC; HWC uses the rounded corner synthesis channel to synthesize the second rounded corner layer.
[0040] Using the above technical solution, HWC determines whether to use the rounded corner synthesis channel for synthesis by identifying whether the layer to be synthesized includes a rounded corner label. When the layer to be synthesized contains a rounded corner label, the rounded corner synthesis channel is used to synthesize the layer to be synthesized. When switching from the camera application interface to other application interfaces that do not have display requirements for the privacy indicator, since there is no need to display the privacy indicator, SurfaceFlinger can add a rounded corner label to the rounded corner layer based on the cancellation notification of the privacy indicator, so that HWC will use the rounded corner synthesis channel dedicated to the rounded corner layer to synthesize the rounded corner layer, thereby making full use of the rounded corner synthesis channel of the processing chip, reserving more layer synthesis resources for non-rounded corner layers, and improving the possibility of electronic devices using hardware synthesis to synthesize layers.
[0041] In one possible implementation, after starting the camera application, the interface display method also includes: creating a display notification of the privacy indicator; and synthesizing the first rounded corner layer and the camera preview layer using a universal synthesis channel, including: based on the display notification of the privacy indicator, synthesizing the first rounded corner layer and the camera preview layer using a universal synthesis channel.
[0042] By adopting the above technical solution, when the camera application is started to enter the camera preview interface, since the privacy indicator needs to be displayed, a display notification of the privacy indicator is created, so that SurfaceFlinger can respond to the display notification of the privacy indicator, and use the general synthesis channel to synthesize the first rounded corner layer and the camera preview layer. This can solve the layer synthesis abnormality problem caused by the inability of the rounded corner synthesis channel to synthesize the rounded corner layer with the privacy indicator drawn. Drawing the privacy indicator on the rounded corner layer can reserve more layer resources for the application layer, reducing the number of layers to be synthesized, thereby reducing the resource occupation of layer synthesis, and increasing the possibility of electronic devices using hardware synthesis to synthesize layers, thereby reducing the power consumption of electronic devices and improving the display performance of electronic devices. For example, the display notification of the privacy indicator can be created by the SystemUI thread, so that in the scenario where the privacy indicator needs to be displayed, the display notification of the privacy indicator can be sent to SurfaceFlinger accurately and timely.
[0043] In one possible implementation, the processing chip includes an HWC, and the HWC includes a rounded corner synthesis channel and a general synthesis channel. The HWC is used to use the rounded corner synthesis channel to synthesize the layer to be synthesized when the layer to be synthesized includes a rounded corner label, and based on the display notification of the privacy indicator, use the general synthesis channel to synthesize the first rounded corner layer and the camera preview layer, including: SurfaceFlinger removes the rounded corner label set for the first rounded corner layer in response to the display notification of the privacy indicator; SurfaceFlinger sends the first rounded corner layer and the camera preview layer that do not include the rounded corner label to the HWC; HWC uses the general synthesis channel to synthesize the first rounded corner layer and the camera preview layer.
[0044] By adopting the above technical solution, HWC determines whether to use the rounded corner synthesis channel for synthesis by identifying whether the layer to be synthesized includes a rounded corner label. When the layer to be synthesized includes a rounded corner label, the rounded corner synthesis channel is used to synthesize the layer to be synthesized. When the camera application is started to enter the camera preview interface, due to the need to display the privacy indicator, SurfaceFlinger can remove the rounded corner label set for the rounded corner layer based on the display notification of the privacy indicator, so that HWC will not use the rounded corner synthesis channel dedicated to the rounded corner layer to synthesize the rounded corner layer, and use the general synthesis channel to synthesize the rounded corner layer and the camera preview layer, thereby solving the layer synthesis abnormality problem caused by the inability of the rounded corner synthesis channel to synthesize the rounded corner layer with a privacy indicator drawn.
[0045] In a third aspect, the present application also provides an interface display method, which is applied to an electronic device, the electronic device including a processing chip and a display screen, the processing chip including a general synthesis channel for layer synthesis and a rounded corner synthesis channel dedicated to the rounded corner layer, the interface display method including: receiving a first operation of the user; in response to the first operation, starting the recording of the recording application; drawing a first rounded corner layer, the first rounded corner layer including the privacy indicator; drawing the recording layer of the recording application; using the general synthesis channel to synthesize the first rounded corner layer and the recording layer to obtain a recording interface; and displaying the recording interface on the display screen.
[0046] Using the above technical solution, the processing chip can refer to a processor chip or a system-level chip. After the recording application is opened and the recording is started, a privacy indicator will be displayed on the recording interface. The privacy indicator is drawn on the rounded corner layer. By not using the rounded corner synthesis channel dedicated to the rounded corner layer to synthesize the rounded corner layer, the layer synthesis abnormality problem caused by the inability of the rounded corner synthesis channel to synthesize the rounded corner layer with the privacy indicator drawn can be solved. Drawing the privacy indicator on the rounded corner layer can reserve more layer resources for the application layer, reducing the number of layers to be synthesized, thereby reducing the resource usage of layer synthesis, and increasing the possibility of electronic devices using hardware synthesis methods to synthesize layers, thereby reducing the power consumption of electronic devices and improving the display performance of electronic devices.
[0047] In one possible implementation, the interface display method also includes: receiving a second operation from the user; stopping recording of the recording application in response to the second operation; drawing a second rounded corner layer, the second rounded corner layer does not include a privacy indicator; and synthesizing the second rounded corner layer using a rounded corner synthesis channel.
[0048] By adopting the above technical solution, when the recording of the recording application is stopped, since there is no need to display the privacy indicator, the rounded corner layer can be synthesized using the rounded corner synthesis channel dedicated to the rounded corner layer. This can make full use of the rounded corner synthesis channel of the processing chip, reserve more layer synthesis resources for non-rounded corner layers (without occupying the general synthesis channel), and increase the possibility of electronic devices using hardware synthesis methods to synthesize layers, thereby reducing the power consumption of electronic devices and improving the display performance of electronic devices.
[0049] In one possible implementation, after stopping the recording of the recording application, the interface display method also includes: creating a notification to cancel the display of the privacy indicator; and synthesizing the second rounded corner layer using a rounded corner synthesis channel, including: based on the notification to cancel the display of the privacy indicator, synthesizing the second rounded corner layer using a rounded corner synthesis channel.
[0050] By adopting the above technical solution, when the recording of the recording application is stopped, since there is no need to display the privacy indicator, a cancellation notification of the privacy indicator is created, so that SurfaceFlinger can respond to the cancellation notification of the privacy indicator and use the rounded corner synthesis channel to synthesize the rounded corner layer, so as to make full use of the rounded corner synthesis channel of the processing chip, reserve more layer synthesis resources for non-rounded corner layers, and enhance the possibility of electronic devices using hardware synthesis to synthesize layers. For example, the cancellation notification of the privacy indicator can be created by the SystemUI thread, so that in scenarios where the privacy indicator does not need to be displayed, the cancellation notification of the privacy indicator can be sent to SurfaceFlinger accurately and timely.
[0051] In one possible implementation, the processing chip includes an HWC, and the HWC includes a rounded corner synthesis channel and a general synthesis channel. The HWC is used to use the rounded corner synthesis channel to synthesize the layer to be synthesized when the layer to be synthesized includes a rounded corner label, and based on the cancellation display notification of the privacy indicator, use the rounded corner synthesis channel to synthesize the second rounded corner layer, including: SurfaceFlinger adds a rounded corner label to the second rounded corner layer in response to the cancellation display notification of the privacy indicator; SurfaceFlinger sends the second rounded corner layer containing the rounded corner label to the HWC; HWC uses the rounded corner synthesis channel to synthesize the second rounded corner layer.
[0052] Using the above technical solution, HWC determines whether to use the rounded corner synthesis channel for synthesis by identifying whether the layer to be synthesized includes a rounded corner label. When the layer to be synthesized contains a rounded corner label, the rounded corner synthesis channel is used to synthesize the layer to be synthesized. When the recording of the recording application is stopped, since there is no need to display the privacy indicator, SurfaceFlinger can add a rounded corner label to the rounded corner layer based on the cancellation notification of the privacy indicator, so that HWC will use the rounded corner synthesis channel dedicated to the rounded corner layer to synthesize the rounded corner layer, thereby making full use of the rounded corner synthesis channel of the processing chip, reserving more layer synthesis resources for non-rounded corner layers, and improving the possibility of electronic devices using hardware synthesis to synthesize layers.
[0053] In one possible implementation, after starting the recording of the recording application, the interface display method also includes: creating a display notification of the privacy indicator; using a general synthesis channel to synthesize the first rounded corner layer and the recording layer, including: based on the display notification of the privacy indicator, using a general synthesis channel to synthesize the first rounded corner layer and the recording layer.
[0054] By adopting the above technical solution, when the recording of the recording application is started, since the privacy indicator needs to be displayed, a display notification of the privacy indicator is created, so that SurfaceFlinger can respond to the display notification of the privacy indicator, and use the general synthesis channel to synthesize the first rounded corner layer and the recording layer. This can solve the layer synthesis abnormality problem caused by the inability of the rounded corner synthesis channel to synthesize the rounded corner layer with the privacy indicator drawn. Drawing the privacy indicator on the rounded corner layer can reserve more layer resources for the application layer, reducing the number of layers to be synthesized, thereby reducing the resource occupation of layer synthesis, and increasing the possibility of electronic devices using hardware synthesis to synthesize layers, thereby reducing the power consumption of electronic devices and improving the display performance of electronic devices. For example, the display notification of the privacy indicator can be created by the SystemUI thread, so that in the scenario where the privacy indicator needs to be displayed, the display notification of the privacy indicator can be sent to SurfaceFlinger accurately and timely.
[0055] In one possible implementation, the processing chip includes an HWC, and the HWC includes a rounded corner synthesis channel and a general synthesis channel. The HWC is used to use the rounded corner synthesis channel to synthesize the layer to be synthesized when the layer to be synthesized includes a rounded corner label, and based on the display notification of the privacy indicator, use the general synthesis channel to synthesize the first rounded corner layer and the recording layer, including: SurfaceFlinger removes the rounded corner label set for the first rounded corner layer in response to the display notification of the privacy indicator; SurfaceFlinger sends the first rounded corner layer and the recording layer that do not include the rounded corner label to the HWC; HWC uses the general synthesis channel to synthesize the first rounded corner layer and the recording layer.
[0056] By adopting the above technical solution, HWC determines whether to use the rounded corner synthesis channel for synthesis by identifying whether the layer to be synthesized includes a rounded corner label. When the layer to be synthesized includes a rounded corner label, the rounded corner synthesis channel is used to synthesize the layer to be synthesized. When the recording of the recording application is started, since the privacy indicator needs to be displayed, SurfaceFlinger can remove the rounded corner label set for the rounded corner layer based on the display notification of the privacy indicator, so that HWC will not use the rounded corner synthesis channel dedicated to the rounded corner layer to synthesize the rounded corner layer, and use the general synthesis channel to synthesize the rounded corner layer and the recording layer, thereby solving the layer synthesis abnormality problem caused by the rounded corner synthesis channel being unable to synthesize the rounded corner layer with a privacy indicator drawn.
[0057] In a fourth aspect, the present application provides an electronic device, comprising a touch screen, a memory and a processor; the touch screen, the memory and the processor are coupled; the memory is used to store program instructions; the processor is used to read the program instructions stored in the memory to implement the interface display method of the first aspect, the second aspect or the third aspect above.
[0058] In a fifth aspect, the present application provides a computer-readable storage medium, in which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor, the interface display method of the first aspect, the second aspect or the third aspect is implemented.
[0059] In a sixth aspect, the present application provides a chip coupled to a memory in an electronic device, and the chip is used to control the electronic device to implement the interface display method of the first aspect, the second aspect or the third aspect mentioned above.
[0060] In addition, the technical effects brought about by the fourth to sixth aspects can be found in the descriptions of the methods of each design in the above method part, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] FIG1A is a schematic diagram of a scene with rounded corners display provided by an embodiment of the present application;
[0062] FIG1B is a schematic diagram of pixel distribution of a rounded edge provided by an embodiment of the present application;
[0063] FIG2 is a schematic diagram showing how to improve jagged edges of rounded corners using a rounded corner layer according to an embodiment of the present application;
[0064] FIG3A is a schematic diagram showing an electronic device interface according to an embodiment of the present application;
[0065] FIG3B is a schematic diagram showing an interface of an electronic device according to another embodiment of the present application;
[0066] FIG3C is a schematic diagram showing an interface of an electronic device according to another embodiment of the present application;
[0067] FIG4 is an interactive flow chart of an interface display provided in an embodiment of the present application;
[0068] FIG5 is an interactive flow chart of an interface display provided by another embodiment of the present application;
[0069] FIG6 is an interactive flow chart of an interface display provided by another embodiment of the present application;
[0070] FIG7 is a schematic diagram of the software architecture for interaction between SurfaceFlinger and HWC provided in one embodiment of the present application;
[0071] FIG8 is a schematic diagram of a software architecture for interaction between SurfaceFlinger and HWC provided in another embodiment of the present application;
[0072] FIG9A is a flowchart of an interface display method provided in one embodiment of the present application;
[0073] FIG9B is a flowchart of an interface display method provided by another embodiment of the present application;
[0074] FIG9C is a flowchart of an interface display method provided by another embodiment of the present application;
[0075] FIG10 is a software architecture diagram of an electronic device provided in one embodiment of the present application;
[0076] FIG11 is a schematic diagram of an application scenario of an interface display method provided in an embodiment of the present application;
[0077] FIG12 is a schematic diagram of an application scenario of an interface display method provided by another embodiment of the present application;
[0078] FIG13 is a schematic diagram of an application scenario of an interface display method provided by another embodiment of the present application;
[0079] FIG14 is a hardware architecture diagram of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0080] The following will describe the technical solutions in the embodiments of this application in conjunction with the drawings in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0081] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of such features. In the description of the embodiments of the present application, words such as "exemplary", "or", and "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or design schemes. Specifically, the use of words such as "exemplary", "or", and "for example" is intended to present related concepts in a concrete way.
[0082] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application belongs. The terms used in the specification of this application are for the purpose of describing specific embodiments only and are not intended to limit this application. It should be understood that, unless otherwise specified in this application, " / " means or. For example, A / B can mean A or B. "And / or" in this application is merely a way to describe the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. "At least one" means one or more. "Multiple" means two or more than two. For example, at least one of a, b or c can mean: a, b, c, a and b, a and c, b and c, a, b and c. It should be understood that the order of the steps shown in the flowcharts herein can be changed, and some can be omitted.
[0083] To facilitate understanding of the various embodiments of the present application, the following first describes, with reference to FIG1A and FIG1B , how the four rounded corners of the display screen of the electronic device of the present application, which are physically cut and form a jagged phenomenon during display, may be present. The electronic device may be a mobile phone, tablet computer, smartwatch, or other terminal device.
[0084] The term "user interface (UI)" in the following embodiments of this application refers to a medium interface for interaction and information exchange between an application or operating system and a user, which realizes the conversion between the internal form of information and the form acceptable to the user. The user interface is a source code written in a specific computer language such as Java and extensible markup language (XML). The interface source code is parsed and rendered on an electronic device and finally presented as content that the user can recognize. The commonly used form of user interface is graphical user interface (GUI), which refers to a user interface related to computer operations that is displayed in a graphical manner. It can be a visual interface element such as text, icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, widgets, etc. displayed on the display screen of an electronic device.
[0085] As shown in FIG1A , an electronic device may include a display screen. To increase the screen-to-body ratio of the electronic device, the four corners of the display screen are curved to form four rounded corners 10. This creates a softer display effect at the four corners of the display area within the display screen. Because rounded corners 10 are created by physically cutting the display screen, the edges of rounded corners 10 may exhibit jagged edges when displaying images, resulting in a poor visual experience for users.
[0086] As shown in FIG1B , since each pixel unit arrayed in the display screen is rectangular, when the pixel points at the corners of the display screen are processed into an arc shape, the edges of the rounded corners 10 show obvious jagged edges, which not only affects the user experience but also reduces the display quality.
[0087] To solve this problem, electronic device manufacturers typically use software to draw a rounded corner layer with the same curvature as rounded corner 10 to block the aliasing caused by rounded corner 10. The general software implementation is as follows: create a rounded corner layer at the top and bottom of the user interface to be displayed. For example, the rounded corner layer at the top can be named ScreenDecorOverlay layer, and the rounded corner layer at the bottom can be named ScreenDecorOverlayBottom layer; use grayscale rendering to render the rounded corner layers (ScreenDecorOverlay layer and ScreenDecorOverlayBottom layer), and keep the edges of the rounded corner layers consistent with the curvature of rounded corner 10, thereby blocking aliasing and improving the user's visual experience.
[0088] As shown in Figure 2, to improve the jagged display effect of the rounded edge, the rounded layer can be rendered in grayscale, adjusting the uneven first arc 11 to a relatively smoother second arc 12. Electronic devices can use existing grayscale rendering algorithms to render the rounded layer in grayscale to adjust the brightness changes of the pixels near the first arc 11, resulting in a smoother second arc 12 and a visual effect of gradual brightness changes. During grayscale rendering, the jagged first arc 11 can be gradually changed from dark to light, making the originally harsh, jagged first arc 11 softer, thereby achieving a smoother rounded display effect.
[0089] The rounded corner layer in the embodiment of the present application can be considered as an additional layer superimposed to solve the jagged phenomenon that occurs when the rounded corners 10 of the display screen display are displayed. The rounded corner layer is mainly used for the rounded corner position of the display screen. Therefore, the rounded corner layer can be a complete layer that matches the size of the display screen, or it can be an incomplete layer that matches the size of the display screen. The "rounded corner" in the embodiment of the present application is described relative to the display screen. Any part with a curved edge on the display screen can be considered as a rounded corner on the display screen (or a screen rounded corner). For example, the position of the "rounded corner" includes not only the four corner areas of the display screen, but also the hollowed-out area on the screen. That is to say, as long as there is a curved position in the structure of the display screen, it can be considered as a rounded corner of the display screen. In addition, "rounded corners" include not only arcs, but also other streamlined designs, such as circles, Euler spirals, and other complex curves. The embodiment of the present application does not limit this.
[0090] Introducing rounded corner layers to mitigate aliasing may reduce the number of layers available for application display scenarios. For electronic devices, layers must be composited by the operating system's compositing service (SurfaceFlinger) before being displayed on the screen. This composited image frame is then sent to the screen.
[0091] SurfaceFlinger is used to perform layer synthesis, and the Hardware Composer (HWC) is used to provide hardware support for SurfaceFlinger. SurfaceFlinger may use hardware synthesis and / or software synthesis during layer synthesis. In this embodiment, the use of both hardware synthesis and software synthesis is referred to as a hybrid synthesis method.
[0092] Software compositing involves using a graphics processing unit (GPU) to redraw the contents of all layers to be composited onto a frame buffer, which is then sent to the display for display. Software compositing offers high compatibility and is applicable to all image display scenarios. However, since software compositing involves copying layers to the GPU and compositing them there, this consumes additional GPU bandwidth, resulting in higher power consumption and relatively slower compositing speeds. Hardware compositing involves compositing layers via the processor's integrated hardware processing unit (HWC). This allows the layers to be directly composited and sent to the display for display, without occupying additional GPU bandwidth. Consequently, it consumes less power and is relatively faster. However, HWCs are limited by processor chip specifications. For low-end processor chips, integrated HWCs generally support a maximum of four layer composites (e.g., four layer composite channels), while for high-end processor chips, they generally support a maximum of eight layer composites (e.g., eight layer composite channels). Furthermore, HWCs generally do not support composites with specialized display effects, such as rotatable or scalable image frames. Since software synthesis alone is relatively slow and consumes a lot of power, in order to increase the speed of layer synthesis and reduce the power consumption of electronic devices, in most cases, SurfaceFlinger uses hardware synthesis or a hybrid synthesis method. If the HWC can meet the layer synthesis requirements, SurfaceFlinger uses hardware synthesis. If the HWC cannot meet the layer synthesis requirements, SurfaceFlinger uses a hybrid synthesis method. The synthesis logic of the hybrid synthesis method is generally as follows: for multiple layers to be synthesized, some layers that cannot be synthesized by the HWC are handed over to the GPU for synthesis. The HWC synthesizes the other layers and the GPU synthesis results, and then sends them to the display. In other words, for most device usage scenarios, the probability of using hardware synthesis or a hybrid synthesis method is higher, and the probability of using software synthesis is lower. The scenarios where software synthesis alone is used are generally layer synthesis with specific display effects.
[0093] For privacy and security reasons, when an electronic device opens a camera application or a recording application in response to a user operation, a privacy indicator (Privacy Indicator) will be displayed at the top of the display screen to remind the user that the electronic device is using the camera shooting function or the recording function. For example, the privacy indicator can be a small green dot. The embodiment of the present application does not limit the color or shape of the privacy indicator. In the application display scenario where the privacy indicator needs to be displayed, compared to creating a separate layer for the privacy indicator, drawing the privacy indicator on the rounded corner layer can save a layer, thereby reserving more layer resources for the application display. For example, in a multi-layer display scenario, if a camera application or a recording application is turned on, a privacy indicator needs to be displayed. At this time, if the electronic device also opens a small window to play videos / WeChat video calls / floating windows, resulting in a large number of layers, creating a separate layer for the privacy indicator will have a negative impact on the display performance and power consumption of the electronic device.
[0094] In order to solve the problem of two rounded corner layers being permanently resident, resulting in a reduction in the number of available layers for application display scenarios, some chip manufacturers have opened up a dedicated rounded corner synthesis channel within the HWC, taking into account the characteristics of rounded corner layers that are not updated frequently and have single layer content and rendering colors. This rounded corner synthesis channel is specifically used for the synthesis of rounded corner layers, thereby releasing the original layer synthesis resources of the HWC for use by non-rounded corner layers, so that the rounded corner layers do not occupy the original layer synthesis channel of the HWC (hereinafter referred to as the general synthesis channel). The general synthesis channel can be used for the synthesis of rounded corner layers or non-rounded corner layers. The rounded corner synthesis channel provided by chips with rounded corner synthesis function generally only supports single-channel color mode, and does not support multi-channel color mode, that is, it does not support the synthesis of layers with color content, and does not support dynamic enabling / disabling of the rounded corner synthesis function. Therefore, when it is required to draw the privacy indicator on the rounded corner layer, since the privacy indicator is colored, the rounded corner layer cannot be synthesized using the rounded corner synthesis channel, and the privacy indicator needs to be created separately from the rounded corner layer, that is, a separate layer needs to be created for the privacy indicator.
[0095] In view of this, the interface display method provided in the embodiment of the present application can determine the synthesis method of the rounded corner layer according to whether the chip has the rounded corner synthesis function and whether the privacy indicator needs to be displayed. If the chip has the rounded corner synthesis function and does not need to display the privacy indicator, choose to use a dedicated rounded corner synthesis channel to synthesize the rounded corner layer. If the chip has the rounded corner synthesis function and needs to display the privacy indicator, choose to use a general synthesis channel to synthesize the rounded corner layer, so that the privacy indicator can be drawn on the rounded corner layer. If the chip does not have the rounded corner synthesis function (that is, does not include a rounded corner synthesis channel), use the general synthesis channel to synthesize the rounded corner layer, which can also allow the privacy indicator to be drawn on the rounded corner layer.
[0096] When using a general synthesis channel to synthesize rounded corner layers, the synthesis method of the rounded corner layers is decided by the HWC, that is, the HWC determines which synthesis method (hardware synthesis method, software synthesis method, or mixed synthesis method) to use based on its own synthesis capabilities.
[0097] As shown in Figure 3A, it is assumed that the screen of the electronic device displays the interface of a first application and a second application. Among them, the interface of the first application can be called a status bar. In Figure 3A, the first application can be a system-level application (SystemUI) and the second application can be a music application. The following description takes the Android operating system installed in the electronic device as an example, but this application is not limited to this, and the electronic device can also install other types of operating systems.
[0098] Figure 3A shows four layers: Layer A1, Layer A2, Layer A3, and Layer A4. Layer A1 is the ScreenDecorOverlay layer (the layer with rounded corners at the top), Layer A2 is the status bar layer, Layer A3 is the music application layer, and Layer A4 is the ScreenDecorOverlayBottom layer (the layer with rounded corners at the bottom).
[0099] The status bar interface is maintained by SystemUI. That is, the application that generates layer A2 (the status bar layer) is SystemUI, and layer A2 carries the image information of the status bar. In the Android system, the ScreenDecorOverlay layer and the ScreenDecorOverlayBottom layer are also generated by SystemUI. That is, the application that generates layer A1 and layer A4 is SystemUI. SystemUI can pass the generated layers (layer A1, layer A2, layer A4) to SurfaceFlinger. Layer A3 is generated by the music application. Layer A3 carries the image information of the music application. The music application can pass the generated layer A3 to SurfaceFlinger.
[0100] After receiving layer A1, layer A2, layer A3 and layer A4, SurfaceFlinger can perform layer synthesis on layer A1, layer A2, layer A3 and layer A4, and send the synthesized image frames to the display screen for display, thereby displaying the interface shown in Figure 3A.
[0101] If the processor chip or system-level chip of the electronic device has the rounded corner synthesis function, that is, the HWC includes two types of synthesis channels: a rounded corner synthesis channel dedicated to the rounded corner layer and a general layer synthesis channel (hereinafter referred to as the general synthesis channel). The general synthesis channel can be used to synthesize rounded corner layers or non-rounded corner layers. Assuming that the number of rounded corner synthesis channels in the HWC is 2 and the number of general synthesis channels is 4, SurfaceFlinger can call the 2 rounded corner synthesis channels and 2 general synthesis channels in the HWC to synthesize layer A1, layer A2, layer A3 and layer A4. Layer A1 and layer A4 use 2 rounded corner synthesis channels respectively, and layer A2 and layer A3 use 2 general synthesis channels respectively.
[0102] If the processor chip or system-level chip of the electronic device does not have rounded corner synthesis function, that is, the HWC includes only one type of synthesis channel: the general synthesis channel. Assuming that the number of general synthesis channels in the HWC is 4, it can support the synthesis of four layers. SurfaceFlinger can call the four general synthesis channels in the HWC to synthesize layer A1, layer A2, layer A3 and layer A4.
[0103] As shown in Figure 3B , assume that the screen of an electronic device displays the interfaces of a first application and a third application. The interface of the first application can be called a status bar, and the interface of the third application can be the interface of a recording application. Figure 3B illustrates five layers: layer A11, layer A12, layer A13, layer A14, and layer A15. Layer A11 is the ScreenDecorOverlay layer, layer A12 is the status bar layer, layer A13 is the recording application layer, layer A14 is the privacy indicator layer, and layer A15 is the ScreenDecorOverlayBottom layer.
[0104] In Figure 3B, layers A11, A12, A14, and A15 are generated by SystemUI. Layer A12 carries the image information of the status bar, and layer A14 carries the image information of the privacy indicator. SystemUI can pass the generated layers (layers A11, A12, A14, and A15) to SurfaceFlinger. Layer A13 is generated by the recording application. Layer A13 carries the image information of the recording application, and the recording application can pass layer A13 to SurfaceFlinger.
[0105] After receiving layer A11, layer A12, layer A13, layer A14 and layer A15, SurfaceFlinger can perform layer synthesis on layer A11, layer A12, layer A13, layer A14 and layer A15, and send the synthesized image frames to the display screen for display, thereby displaying the interface shown in Figure 3B.
[0106] If the processor chip or system-level chip of the electronic device has the rounded corner synthesis function, assuming that the number of rounded corner synthesis channels in HWC is 2 and the number of general synthesis channels is 4, SurfaceFlinger can call the 2 rounded corner synthesis channels and 3 general synthesis channels in HWC to synthesize layer A11, layer A12, layer A13, layer A14 and layer A15. Layer A11 and layer A15 use 2 rounded corner synthesis channels respectively, and layer A12, layer A13 and layer A14 use 3 general synthesis channels respectively.
[0107] If the processor chip or system-level chip of the electronic device does not have the rounded corner synthesis function. Assuming that the number of general synthesis channels in the HWC is 4, Figure 3B shows 5 layers, which exceeds the layer synthesis capability of the HWC, that is, it is impossible to synthesize layer A11, layer A12, layer A13, layer A14 and layer A15 using hardware synthesis alone, the HWC can notify SurfaceFlinger of the layers that cannot be synthesized. SurfaceFlinger can transfer these layers that cannot be synthesized to the GPU for synthesis based on the information notification of the HWC. The synthesis result of the GPU can be passed to the HWC, and the HWC can synthesize the GPU synthesis result with the remaining layers and send the synthesized image frame to the display for display. The rules for HWC to select layers that cannot be synthesized may be existing rules or rules customized by electronic device manufacturers, and the embodiments of the present application do not limit this. For example, the rules include: selecting layers that exceed the synthesis capabilities of the HWC (the HWC does not support the synthesis of layers with specific display effects); for layers that do not exceed the synthesis capabilities of the HWC, they can be selected randomly or according to the layer category (for example, the rounded corner layer is selected as the layer that cannot be synthesized, and the remaining non-rounded corner layers that do not exceed the synthesis capabilities of the HWC are synthesized by the HWC).
[0108] For example, SurfaceFlinger can call the GPU to synthesize layer A12 and layer A13 to obtain a first synthesis result, and the HWC then synthesizes the first synthesis result with layer A11, layer A14 and layer A15 to obtain the final image frame sent to the display screen.
[0109] As an example, if the layer synthesis capability of the HWC is exceeded, SurfaceFlinger can also transfer all layers to the GPU for synthesis, and the GPU synthesis results are then passed to the HWC, and the HWC then sends the synthesis results to the display for display. For example, SurfaceFlinger can call the GPU to redraw the contents of all layers to be synthesized (layer A11, layer A12, layer A13, layer A14, and layer A15) onto a Frame buffer, which is then sent by the HWC to the display for display.
[0110] As shown in FIG3C , assume that the screen of an electronic device displays interfaces of a first application and a third application. The third application may be a recording application. After the electronic device starts the recording application, a privacy indicator (a small dot) is displayed in the upper right corner of the display screen to remind the user that the electronic device is using the recording function.
[0111] Compared to Figure 3B , Figure 3C draws the privacy indicator on the ScreenDecorOverlay layer. Figure 3C illustrates four layers: Layer A21, Layer A22, Layer A23, and Layer A24. Layer A21 is the shared layer between ScreenDecorOverlay and the privacy indicator, Layer A22 is the status bar layer, Layer A23 is the recording application layer, and Layer A24 is the ScreenDecorOverlayBottom layer.
[0112] When the electronic device starts the recording application, SystemUI can obtain the information that the recording application is started, and draw and render the privacy indicator on the ScreenDecorOverlay layer while generating the ScreenDecorOverlay layer.
[0113] In Figure 3C, layers A21, A22, and A24 are generated by SystemUI. Compared to layer A1 in Figure 3A, layer A21 also carries image information for the privacy indicator, and layer A22 carries image information for the status bar. SystemUI can pass the generated layers (layers A21, A22, and A24) to SurfaceFlinger. Layer A23 is generated by the recording application. Layer A23 carries the image information of the recording application, and the recording application can pass layer A23 to SurfaceFlinger.
[0114] After receiving layer A21, layer A22, layer A23 and layer A24, SurfaceFlinger can perform layer synthesis on layer A21, layer A22, layer A23 and layer A24, and send the synthesized image frames to the display screen for display, thereby displaying the interface shown in Figure 3C.
[0115] If the processor chip or system-level chip of the electronic device has the rounded corner synthesis function, assuming that the number of rounded corner synthesis channels in the HWC is 2 and the number of general synthesis channels is 4, since the ScreenDecorOverlay layer is drawn with a privacy indicator, the ScreenDecorOverlay layer changes from a single-channel color mode to a multi-channel color mode, and the rounded corner synthesis channel does not support layer synthesis in multi-channel color mode, that is, the rounded corner synthesis channel cannot be used to synthesize the rounded corner layer. In this case, SurfaceFlinger can not use the rounded corner synthesis function of the chip, and treat the ScreenDecorOverlay layer (drawn with a privacy indicator) and the ScreenDecorOverlayBottom layer as ordinary layers, and use the general synthesis channel for layer synthesis, that is, SurfaceFlinger can call the 4 general synthesis channels in the HWC to synthesize layer A21, layer A22, layer A23 and layer A24.
[0116] If the processor chip or system-level chip of the electronic device does not have the rounded corner synthesis function, assuming that the number of general synthesis channels in HWC is 4, it can support the synthesis of four layers. SurfaceFlinger can directly call the 4 general synthesis channels in HWC to synthesize layer A21, layer A22, layer A23 and layer A24.
[0117] In order to further understand the synthesis method of the rounded corner layer of this application, the software processing flow for creating and synthesizing the rounded corner layer displayed on the electronic device is described in detail below in conjunction with Figure 4. Figure 4 takes the example of an electronic device with rounded corner layers including the ScreenDecorOverlay layer and the ScreenDecorOverlayBottom layer, the rounded corner layers are generated by a system-level application (SystemUI), and the processor chip or system-level chip of the electronic device has a rounded corner synthesis function. For the sake of ease of description, the ScreenDecorOverlay layer is referred to as rounded corner layer 1, and the ScreenDecorOverlayBottom layer is referred to as rounded corner layer 2.
[0118] S401: When SystemUI is started, SystemUI sends window creation requests for rounded corner layer 1 and rounded corner layer 2 to the window manager service (WMS).
[0119] In some embodiments, during the electronic device's startup process, the SystemUI can automatically start. The SystemUI is used to display system interfaces such as the status bar, notification bar, drop-down menu, and navigation bar. After starting, the SystemUI can initiate the creation of rounded corner layer 1 and rounded corner layer 2. This allows the electronic device to subsequently synthesize rounded corner layer 1, rounded corner layer 2, and another target layer to obtain an image frame to be displayed when the screen is turned on. The target layer can be a layer other than the rounded corner layer, and is used to display the content on the target layer on the display screen, such as an image, text, or table.
[0120] In some embodiments, the target layer can be created by other applications (non-system-level applications) installed on the electronic device, and the target layer carries the image information of the application. The target layer can also be created by SystemUI, and the target layer carries the image information of the status bar, the notification bar, the navigation bar, etc.
[0121] The process of creating the target layer is substantially the same as the process of creating the rounded corner layer. To avoid repetition, the embodiment of the present application only describes the process of creating the rounded corner layer in detail.
[0122] WMS can be used for window management, window animation management, surface management, and as a transit station for the input system. After SystemUI initiates the creation of rounded corner layer 1 and rounded corner layer 2, SystemUI can send window creation requests for rounded corner layer 1 and rounded corner layer 2 to WMS, allowing WMS to create corresponding windows for rounded corner layer 1 and rounded corner layer 2, so that SystemUI can subsequently draw the layer content of rounded corner layer 1 and rounded corner layer 2 in the corresponding windows.
[0123] S402 : The WMS creates corresponding windows for the rounded corner layer 1 and the rounded corner layer 2 based on the received window creation request.
[0124] In some embodiments, after receiving window creation requests for rounded corner layer 1 and rounded corner layer 2 from SystemUI, WMS can respond to the window creation requests and create corresponding windows for rounded corner layer 1 and rounded corner layer 2. For example, WMS can create a first window for rounded corner layer 1 and a second window for rounded corner layer 2.
[0125] S403, WMS sends a window creation notification of rounded corner layer 1 and a window creation notification of rounded corner layer 2 to SurfaceFlinger.
[0126] In some embodiments, after creating corresponding windows for rounded corner layer 1 and rounded corner layer 2, WMS may send a window creation notification to SurfaceFlinger to facilitate SurfaceFlinger to create layers corresponding to rounded corner layer 1 and rounded corner layer 2.
[0127] S404, SurfaceFlinger creates a first layer corresponding to rounded corner layer 1 based on the window creation notification of rounded corner layer 1, and creates a second layer corresponding to rounded corner layer 2 based on the window creation notification of rounded corner layer 2.
[0128] In some embodiments, after receiving a window creation notification for a layer sent by WMS, SurfaceFlinger can create a corresponding Layer for the layer. Layer is the basic operation unit for SurfaceFlinger to perform layer synthesis. There is a one-to-one correspondence between layers, that is, each application layer corresponds to a Layer in SurfaceFlinger, and each Layer corresponds to a buffer queue (BufferQueue). BufferQueue is used to connect the application and SurfaceFlinger. The application can be regarded as the producer of BufferQueue, and SurfaceFlinger can be regarded as the consumer of BufferQueue.
[0129] S405: WMS sends the handles of the first window and the second window to SystemUI.
[0130] In some embodiments, after creating corresponding windows for rounded corner layer 1 and rounded corner layer 2, WMS can send the window handles to SystemUI, so that SystemUI can subsequently determine the corresponding window based on the handles and draw the layer content in the corresponding window. For example, after WMS creates the first window for rounded corner layer 1, it sends the first window handle to SystemUI. After WMS creates the second window for rounded corner layer 2, it sends the second window handle to SystemUI.
[0131] In some embodiments, S405 and S403 may be executed simultaneously or in a sequential order, which is not limited in the embodiments of the present application.
[0132] S406 , SystemUI draws the layer content of rounded corner layer 1 based on the handle of the first window, and draws the layer content of rounded corner layer 2 based on the handle of the second window.
[0133] In some embodiments, SystemUI can operate the first window created by WMS based on the handle of the first window, and operate the second window created by WMS based on the handle of the second window, to achieve the drawing of rounded corner layer 1 and rounded corner layer 2. SystemUI operating a window may refer to drawing the layer content within the window. For example, SystemUI can position the first window based on the handle of the first window, and then draw the layer content of rounded corner layer 1 within the first window, position the second window based on the handle of the second window, and then draw the layer content of rounded corner layer 2 within the second window.
[0134] S407, SystemUI updates the layer content of rounded corner layer 1 to SurfaceFlinger, and updates the layer content of rounded corner layer 2 to SurfaceFlinger.
[0135] SystemUI uses BufferQueue to pass the layer content of the drawn rounded corner layer to SurfaceFlinger. For example, SystemUI can use one BufferQueue to update the layer content of rounded corner layer 1 to the first layer created by SurfaceFlinger, and use another BufferQueue to update the layer content of rounded corner layer 2 to the second layer created by SurfaceFlinger, thereby generating rounded corner layer 1 and rounded corner layer 2 on the SurfaceFlinger side.
[0136] Generating rounded corner layer 1 on the SurfaceFlinger side can be understood as the first Layer carrying the layer content of rounded corner layer 1 drawn by SystemUI, and generating rounded corner layer 2 on the SurfaceFlinger side can be understood as the second Layer carrying the layer content of rounded corner layer 2 drawn by SystemUI.
[0137] S408, SurfaceFlinger sends rounded corner layer 1 and rounded corner layer 2 to HWC.
[0138] S409, SurfaceFlinger calls the software interface provided by HWC to set rounded corner labels for rounded corner layer 1 and rounded corner layer 2.
[0139] After SurfaceFlinger sends rounded corner layer 1 and rounded corner layer 2 to HWC, it can call the software interface provided by HWC (for example, an AIDL interface specifically for rounded corner label setting) to set rounded corner labels for rounded corner layer 1 and rounded corner layer 2, so that HWC can subsequently determine which layer is the rounded corner layer based on the rounded corner label, and use the rounded corner synthesis channel to synthesize the rounded corner layers.
[0140] In some embodiments, if the processor chip or system-level chip of the electronic device has a rounded corner synthesis function, SurfaceFlinger can also call the software interface provided by HWC (for example, the setLayerAsMask interface) to set a rounded corner label for the rounded corner layer. The rounded corner label is used to identify rounded corner layer 1 and rounded corner layer 2 as rounded corner layers, making it easier for HWC to use the rounded corner synthesis channel to synthesize rounded corner layer 1 and rounded corner layer 2.
[0141] If the processor chip or system-level chip of the electronic device does not have the rounded corner synthesis function, that is, HWC does not provide a software interface for setting rounded corner labels for the rounded corner layer, SurfaceFlinger only performs the operation of sending rounded corner layer 1 and rounded corner layer 2 to HWC.
[0142] S410, HWC uses a rounded corner synthesis channel to synthesize rounded corner layer 1 and rounded corner layer 2 based on the rounded corner labels of rounded corner layer 1 and rounded corner layer 2.
[0143] SurfaceFlinger sets the rounded corner labels for rounded corner layer 1 and rounded corner layer 2 on the HWC side by calling the software interface provided by HWC. Based on the rounded corner labels of rounded corner layer 1 and rounded corner layer 2, HWC can determine that the currently received rounded corner layer 1 and rounded corner layer 2 are rounded corner layers, and then use a dedicated rounded corner synthesis channel to synthesize rounded corner layer 1 and rounded corner layer 2.
[0144] For electronic devices deployed with processor chips or system-level chips that do not have the rounded corner synthesis function, after generating rounded corner layer 1 and rounded corner layer 2 on the SurfaceFlinger side, SurfaceFlinger can directly send rounded corner layer 1 and rounded corner layer 2 to HWC. HWC can then use the general synthesis channel to synthesize rounded corner layer 1 and rounded corner layer 2, or use software synthesis to synthesize rounded corner layer 1 and rounded corner layer 2 (SurfaceFlinger calls the GPU to synthesize rounded corner layer 1 and rounded corner layer 2).
[0145] In the software processing flow shown in Figure 4, SurfaceFlinger calls the software interface provided by HWC to set rounded corner labels for rounded corner layer 1 and rounded corner layer 2, but the label does not support clearing. As a result, HWC still uses a dedicated rounded corner synthesis channel to synthesize rounded corner layer 1 and rounded corner layer 2 when the privacy indicator needs to be displayed. When a privacy indicator needs to be displayed and the privacy indicator needs to be drawn on the rounded corner layer, since the privacy indicator is in color and HWC does not support layer synthesis in multi-channel color mode, the rounded corner synthesis channel cannot be used to synthesize the rounded corner layer. The rounded corner label set for the rounded corner layer will prompt HWC to use a dedicated rounded corner synthesis channel to synthesize the rounded corner layer, which may cause HWC to have layer synthesis anomalies.
[0146] Based on this, the software processing flow shown in FIG5 and FIG6 is proposed to solve the problem of abnormal layer synthesis that may occur in the HWC with rounded corner synthesis function.
[0147] The following first describes in detail the software process flow for creating and synthesizing the rounded corner layer displayed by the electronic device in conjunction with Figure 5. Figure 5 takes the electronic device as an example where the privacy indicator is not displayed after the electronic device is powered on.
[0148] S501: When SystemUI is started, SystemUI sends window creation requests for rounded corner layer 1 and rounded corner layer 2 to WMS.
[0149] Step S501 of the embodiment of the present application is similar to step S401 of the aforementioned embodiment, and will not be described again here to avoid repetition.
[0150] S502 : The WMS creates corresponding windows for the rounded corner layer 1 and the rounded corner layer 2 based on the received window creation request.
[0151] Step S502 of the embodiment of the present application is similar to step S402 of the aforementioned embodiment, and will not be described again here to avoid repetition.
[0152] S503 , WMS sends a window creation notification of rounded corner layer 1 and a window creation notification of rounded corner layer 2 to SurfaceFlinger.
[0153] Step S503 of the embodiment of the present application is similar to step S403 of the aforementioned embodiment, and will not be described again here to avoid repetition.
[0154] S504, SurfaceFlinger creates a first layer corresponding to rounded corner layer 1 based on the window creation notification of rounded corner layer 1 and sets a rounded corner label for the first layer, and creates a second layer corresponding to rounded corner layer 2 based on the window creation notification of rounded corner layer 2 and sets a rounded corner label for the second layer.
[0155] In some embodiments, after receiving a window creation notification for a layer sent by WMS, SurfaceFlinger can create a corresponding Layer for the layer. Layer is the basic operation unit for SurfaceFlinger to perform layer synthesis. After creating the Layer corresponding to the rounded corner layer, SurfaceFlinger can also set a rounded corner label for the Layer corresponding to the rounded corner layer. The rounded corner label is used to identify the Layer as the layer corresponding to the rounded corner layer, so that the Layer corresponding to the rounded corner layer can be specified for synthesis through the rounded corner synthesis channel.
[0156] If the processor chip or system-level chip of the electronic device does not have the rounded corner synthesis function, SurfaceFlinger does not need to set a rounded corner label for the layer corresponding to the rounded corner layer. For the non-rounded corner layer, SurfaceFlinger will not set a rounded corner label for the layer either. The embodiment of the present application does not limit the form of the rounded corner label, as long as it can distinguish the layer corresponding to the rounded corner layer from the layer corresponding to the non-rounded corner layer. For example, SurfaceFlinger can distinguish the layer corresponding to the rounded corner layer from the layer corresponding to the non-rounded corner layer by configuring different attributes for the layer corresponding to the rounded corner layer and the layer corresponding to the non-rounded corner layer.
[0157] In some embodiments, WMS may also send a rounded corner label setting notification of the rounded corner layer to SurfaceFlinger. SurfaceFlinger, in response to the rounded corner label setting notification, sets a rounded corner label for the Layer corresponding to the rounded corner layer.
[0158] S505: WMS sends the handles of the first window and the second window to SystemUI.
[0159] Step S505 of the embodiment of the present application is similar to step S405 of the aforementioned embodiment, and will not be described again here to avoid repetition.
[0160] S506 , SystemUI draws the layer content of rounded corner layer 1 based on the handle of the first window, and draws the layer content of rounded corner layer 2 based on the handle of the second window.
[0161] Step S506 of the embodiment of the present application is similar to step S406 of the aforementioned embodiment, and will not be described again here to avoid repetition.
[0162] S507 , SystemUI updates the layer content of rounded corner layer 1 to SurfaceFlinger, and updates the layer content of rounded corner layer 2 to SurfaceFlinger.
[0163] Step S507 of the embodiment of the present application is similar to step S407 of the aforementioned embodiment, and will not be described again here to avoid repetition.
[0164] S508, SurfaceFlinger sends the rounded corner layer 1 and the rounded corner layer 2 containing the rounded corner label to the HWC.
[0165] The rounded corner layer 1 and the rounded corner layer 2 generated on the SurfaceFlinger side both contain rounded corner tags. SurfaceFlinger can send the rounded corner layer 1 and the rounded corner layer 2 containing the rounded corner tags to HWC, so that HWC can use the rounded corner synthesis channel to synthesize the rounded corner layer 1 and the rounded corner layer 2.
[0166] S509, HWC uses the rounded corner synthesis channel to synthesize the rounded corner layer 1 and the rounded corner layer 2 based on the rounded corner labels of the rounded corner layer 1 and the rounded corner layer 2.
[0167] Step S509 of the embodiment of the present application is similar to step S409 of the aforementioned embodiment, and will not be described again here to avoid repetition.
[0168] In situations where a privacy indicator needs to be displayed (e.g., when a camera or recording application is enabled on an electronic device), the software process flow for creating and compositing a rounded corner layer is shown in Figure 6. The software process flow for creating and compositing a rounded corner layer displayed on an electronic device is described in detail below with reference to Figure 6.
[0169] S601: SystemUI sends window creation requests for rounded corner layer 1 and rounded corner layer 2 to WMS.
[0170] When an electronic device is powered on and running, it may launch a camera application or a recording application in response to a user operation. In this case, a privacy indicator is generally displayed in the upper right corner of the display to remind the user. Since the privacy indicator needs to be drawn on the rounded corner layer and will cause the HWC to be unable to use the rounded corner synthesis channel to synthesize the rounded corner layer, SystemUI can re-initiate the drawing of the rounded corner layer, that is, SystemUI sends a window creation request for rounded corner layer 1 and rounded corner layer 2 to WMS.
[0171] S602: The WMS creates corresponding windows for the rounded corner layer 1 and the rounded corner layer 2 based on the received window creation request.
[0172] Step S602 of the embodiment of the present application is similar to step S402 of the aforementioned embodiment, and will not be described again here to avoid repetition.
[0173] S603 , WMS sends a window creation notification of rounded corner layer 1 and a window creation notification of rounded corner layer 2 to SurfaceFlinger.
[0174] Step S603 of the embodiment of the present application is similar to step S403 of the aforementioned embodiment, and will not be described again here to avoid repetition.
[0175] S604, SurfaceFlinger creates a first layer corresponding to rounded corner layer 1 based on the window creation notification of rounded corner layer 1 and sets a rounded corner label for the first layer, and creates a second layer corresponding to rounded corner layer 2 based on the window creation notification of rounded corner layer 2 and sets a rounded corner label for the second layer.
[0176] Step S605 of the embodiment of the present application is similar to step S504 of the aforementioned embodiment, and will not be described again here to avoid repetition.
[0177] S605: WMS sends the handles of the first window and the second window to SystemUI.
[0178] Step S605 of the embodiment of the present application is similar to step S405 of the aforementioned embodiment, and will not be described again here to avoid repetition.
[0179] S606: When SystemUI detects that a privacy indicator needs to be displayed, it sends a rounded corner label removal notification to SurfaceFlinger.
[0180] When it is detected that a privacy indicator needs to be displayed, since the privacy indicator is in color, the rounded corner layer with the privacy indicator drawn needs to be synthesized by a synthesis channel that supports multi-channel color mode. That is, the rounded corner synthesis channel cannot synthesize the rounded corner layer with the privacy indicator drawn. SystemUI removes the rounded corner label by sending a rounded corner label removal notification to SurfaceFlinger, so that subsequent HWC can use the general synthesis channel for synthesis.
[0181] S607 , SurfaceFlinger removes the rounded corner label set for the first layer based on the rounded corner label removal notification, and removes the rounded corner label set for the second layer.
[0182] After receiving the rounded corner label removal notification sent by SystemUI, SurfaceFlinger can remove the rounded corner label set for the first layer and remove the rounded corner label set for the second layer in response to the rounded corner label removal notification.
[0183] For example, SurfaceFlinger can modify the properties of the first layer and the second layer in response to the rounded corner label removal notification, so that the properties of the first layer and the second layer are the same as the properties of the layer corresponding to the non-rounded corner layer, so that HWC will not use the rounded corner synthesis channel to synthesize the rounded corner layer 1 and the rounded corner layer 2 containing the privacy indicator, but will use the general synthesis channel to synthesize the rounded corner layer 1 and the rounded corner layer 2 containing the privacy indicator, or use software synthesis to synthesize the rounded corner layer 1 and the rounded corner layer 2 containing the privacy indicator.
[0184] S608, SystemUI draws the layer content of rounded corner layer 1 and the layer content of the privacy indicator based on the handle of the first window, and draws the layer content of rounded corner layer 2 based on the handle of the second window.
[0185] In some embodiments, the need to display a privacy indicator generally occurs when a camera application or a recording application is launched on the electronic device. The SystemUI can determine whether the privacy indicator needs to be displayed by actively detecting (for example, once every preset time interval) whether the currently launched application is a camera application or a recording application. The electronic device can also configure the camera application or the recording application to actively send a notification message to the SystemUI when it is launched, so that the SystemUI can determine the need to display the privacy indicator in response to the notification message.
[0186] Taking the privacy indicator drawn on the ScreenDecorOverlay layer as an example, when SystemUI detects that the privacy indicator needs to be displayed, it can draw the layer content of the rounded corner layer 1 and the privacy indicator based on the handle of the first window, and draw the layer content of the rounded corner layer 2 based on the handle of the second window.
[0187] In some embodiments, S608 and S606 may be executed in parallel or in a sequential order, which is not limited in the embodiments of the present application.
[0188] S609, SystemUI updates the layer content of rounded corner layer 1 and the layer content of the privacy indicator to SurfaceFlinger, and updates the layer content of rounded corner layer 2 to SurfaceFlinger.
[0189] For example, SystemUI can use a BufferQueue to update the layer content of rounded corner layer 1 and the layer content of the privacy indicator to the first layer created by SurfaceFlinger, and use another BufferQueue to update the layer content of rounded corner layer 2 to the second layer created by SurfaceFlinger, thereby generating rounded corner layer 1 and rounded corner layer 2 containing the privacy indicator on the SurfaceFlinger side.
[0190] Generating the rounded corner layer 1 containing the privacy indicator on the SurfaceFlinger side can be understood as the first layer carrying the layer content of the rounded corner layer 1 drawn by SystemUI and the layer content of the privacy indicator. Generating the rounded corner layer 2 on the SurfaceFlinger side can be understood as the second layer carrying the layer content of the rounded corner layer 2 drawn by SystemUI.
[0191] At S610 , SurfaceFlinger sends rounded corner layer 1 and rounded corner layer 2 containing the privacy indicator to the HWC.
[0192] S611, HWC determines the synthesis method of rounded corner layer 1 containing the privacy indicator and rounded corner layer 2 based on its own synthesis capability, and adopts the corresponding synthesis method to synthesize rounded corner layer 1 containing the privacy indicator and rounded corner layer 2.
[0193] Because SurfaceFlinger removes the rounded corner labels of the first and second layers, after HWC receives the rounded corner layer 1 and rounded corner layer 2 containing the privacy indicator sent by SurfaceFlinger, it will identify the rounded corner layer 1 and rounded corner layer 2 containing the privacy indicator as non-rounded corner layers, and will not use a dedicated rounded corner synthesis channel to synthesize the rounded corner layer 1 and rounded corner layer 2 containing the privacy indicator.
[0194] HWC can determine the synthesis method of rounded corner layer 1 and rounded corner layer 2 containing the privacy indicator based on its own synthesis capability. The synthesis method includes the hardware synthesis method using the general synthesis channel of HWC or the software synthesis method (using GPU for synthesis). If the layers currently required to be synthesized do not exceed the synthesis capability of HWC (for example, the layers to be synthesized include rounded corner layers and other target layers, and the total number of layers does not exceed the synthesis capability of HWC), HWC can use the general synthesis channel to synthesize rounded corner layer 1 and rounded corner layer 2 containing the privacy indicator. If the layers currently required to be synthesized exceed the synthesis capability of HWC (for example, the total number of layers to be synthesized exceeds the synthesis capability of HWC), HWC will select some layers that cannot be synthesized and return them to SurfaceFlinger, which will call the GPU to synthesize these layers that cannot be synthesized. These layers that cannot be synthesized may include rounded corner layers (rounded corner layer 1 and rounded corner layer 2 containing the privacy indicator).
[0195] In some embodiments, SurfaceFlinger or HWC can also specify that the synthesis method of the rounded corner layer 1 and the rounded corner layer 2 containing the privacy indicator is a software synthesis method, that is, the general synthesis channel of HWC is not used by default to synthesize the rounded corner layer 1 and the rounded corner layer 2 containing the privacy indicator, and HWC does not need to determine the synthesis method of the rounded corner layer 1 and the rounded corner layer 2 containing the privacy indicator based on its own synthesis capability.
[0196] For example, S510 can be modified as follows: SurfaceFlinger calls the GPU to synthesize rounded corner layer 1 and rounded corner layer 2 containing the privacy indicator. Alternatively, S511 can be modified as follows: HWC returns the information that rounded corner layer 1 and rounded corner layer 2 containing the privacy indicator cannot be synthesized to SurfaceFlinger, and SurfaceFlinger calls the GPU to synthesize rounded corner layer 1 and rounded corner layer 2 containing the privacy indicator based on the information.
[0197] When the privacy indicator switches from being displayed to not needing to be displayed (for example, the electronic device has closed the camera application and / or the recording application, and no such application is currently running), the software processing flow shown in Figure 6 may also include the following interactive steps.
[0198] S612, when SystemUI detects that the display privacy indicator changes from needing to be displayed to not needing to be displayed, it sends a rounded corner label restoration notification to SurfaceFlinger, and updates the layer content of rounded corner layer 1 and the layer content of rounded corner layer 2 to SurfaceFlinger.
[0199] In some embodiments, the situation in which the display of the privacy indicator changes from being required to be displayed to not being required to be displayed is generally when the electronic device has closed the camera application and / or the recording application, and the electronic device currently has no camera application or recording application running. SystemUI can determine whether it is necessary to continue to display the privacy indicator by actively detecting (for example, once every preset time) whether the currently running application includes a camera application or a recording application. The electronic device can also configure the camera application or the recording application to actively send a notification message to SystemUI when exiting, so that SystemUI can determine whether it is necessary to display the privacy indicator in response to the notification message.
[0200] When it is determined that the privacy indicator does not need to be displayed, SystemUI sends a rounded corner label recovery notification to SurfaceFlinger, and updates the layer content of rounded corner layer 1 and the layer content of rounded corner layer 2 to SurfaceFlinger, so that the rounded corner layer generated on the SurfaceFlinger side does not include the privacy indicator.
[0201] S613, SurfaceFlinger sets a rounded corner label for the first layer based on the rounded corner label recovery notification, and sets a rounded corner label for the second layer.
[0202] After receiving the rounded corner label restoration notification sent by SystemUI, SurfaceFlinger sets the rounded corner label for the first Layer and the rounded corner label for the second Layer, so that when the privacy indicator does not need to be displayed, HWC can re-use the rounded corner synthesis channel to synthesize rounded corner layer 1 and rounded corner layer 2.
[0203] At S614 , SurfaceFlinger sends the rounded corner layer 1 and the rounded corner layer 2 containing the rounded corner labels to the HWC.
[0204] The rounded corner layer 1 and rounded corner layer 2 sent by SurfaceFlinger to HWC can be redrawn by SystemUI.
[0205] S615, HWC uses the rounded corner synthesis channel to synthesize the rounded corner layer 1 and the rounded corner layer 2 based on the rounded corner labels of the rounded corner layer 1 and the rounded corner layer 2.
[0206] Step S615 of the embodiment of the present application is similar to step S509 of the aforementioned embodiment, and will not be described again here to avoid repetition.
[0207] In some embodiments, to address the issue of layer composition anomalies that may occur in HWCs with rounded corner composition capabilities, a message transmission channel can be established between SurfaceFlinger and the HWC, allowing SurfaceFlinger to send rounded corner layer labels or notification information to the HWC. The composition strategy manager (CSM) in the HWC can dynamically decide how to handle the rounded corner layer based on the notification information sent by SurfaceFlinger.
[0208] As shown in Figure 7, it is a schematic diagram of the software architecture of the interaction between SurfaceFlinger and HWC in a scenario where a privacy indicator needs to be displayed.
[0209] A transmission interface specifically used for transmitting identification information (first identification information / second identification information) is constructed between SurfaceFlinger and HWC. For example, the transmission interface can be an AIDL interface. When a privacy indicator needs to be displayed and the privacy indicator is drawn on a rounded corner layer, SystemUI can send a display notification of the privacy indicator to SurfaceFlinger. SurfaceFlinger creates a second identification information in response to the display notification of the privacy indicator. HWC can disable the rounded corner synthesis channel based on the second identification information, so that HWC does not use the rounded corner synthesis channel to synthesize the rounded corner layer, but instead uses the general synthesis channel to synthesize the rounded corner layer. Alternatively, HWC does not disable the rounded corner synthesis channel, but sends all received layers to the general synthesis channel based on the second identification information. This can also prevent HWC from using the rounded corner synthesis channel to synthesize the rounded corner layer, which can solve the problem of layer synthesis anomalies caused by the inability of the rounded corner synthesis channel to synthesize the rounded corner layer with the privacy indicator drawn.
[0210] That is, when the privacy indicator needs to be displayed and the privacy indicator is drawn on the rounded corner layer, SurfaceFlinger can send the layer to be synthesized and the second identification information to the CSM of the HWC. The CSM can distribute the two rounded corner layers and all non-rounded corner layers to the general synthesis channel for synthesis based on the second identification information. For example, SurfaceFlinger can send the layer to be synthesized and the second identification information to the HWC through two communication interfaces.
[0211] Taking HWC including four general synthesis channels as an example, assuming that the number of non-rounded corner layers is less than or equal to two, that is, the number of layers to be synthesized is less than or equal to four, which does not exceed the synthesis capacity of the general synthesis channel of HWC, CSM distributes the two rounded corner layers and all non-rounded corner layers to the general synthesis channel for synthesis. Assuming that the number of non-rounded corner layers is greater than two, that is, the number of layers to be synthesized is greater than four, which exceeds the synthesis capacity of the general synthesis channel of HWC, CSM can select some layers from the received layers as layers that cannot be synthesized, and pass the information of the layers that cannot be synthesized back to SurfaceFlinger. SurfaceFlinger can call the GPU to synthesize these layers that cannot be synthesized. The synthesis results of the GPU can be passed to HWC, and HWC uses the general synthesis channel to synthesize the synthesis results of the GPU with the rest of the layers.
[0212] As shown in Figure 8, it is a schematic diagram of the software architecture of the interaction between SurfaceFlinger and HWC in a scenario where the privacy indicator does not need to be displayed.
[0213] When the privacy indicator does not need to be displayed, SystemUI can send a notification to cancel the display of the privacy indicator to SurfaceFlinger. SurfaceFlinger creates a first identification information in response to the notification. HWC uses the rounded corner synthesis channel to synthesize the rounded corner layer based on the first identification information. For example, the first identification information may include the identifier of the rounded corner layer, and then HWC can locate the rounded corner layer based on the first identification information and synthesize the rounded corner layer using the rounded corner synthesis channel dedicated to the rounded corner layer.
[0214] In Figure 8, the layers sent by SurfaceFlinger to HWC include two rounded corner layers and at least one non-rounded corner layer. The non-rounded corner layer can be a layer other than the rounded corner layer, and the non-rounded corner layer can be drawn by SystemUI or other applications installed on the electronic device. HWC includes two rounded corner synthesis channels and m general synthesis channels, where m is a positive integer. The number of general synthesis channels included in the existing HWC is generally four. This application does not limit the number of general synthesis channels included in the HWC. Generally speaking, the more powerful the HWC chip, the more general synthesis channels it contains.
[0215] In HWC, the CSM distributes the layers. Taking the HWC including four general synthesis channels as an example, when there is no need to display the privacy indicator, in order to release the general synthesis channel of the HWC for the non-rounded corner layer, the rounded corner layer is synthesized using a dedicated rounded corner synthesis channel. SurfaceFlinger can send the layers to be synthesized and the first identification information to the CSM of the HWC. The CSM can distribute the two rounded corner layers to the two rounded corner synthesis channels for synthesis based on the first identification information. If the number of non-rounded corner layers is less than or equal to four, that is, it does not exceed the synthesis capacity of the general synthesis channel of the HWC, the CSM will distribute all non-rounded corner layers to the general synthesis channel for synthesis.
[0216] In some embodiments, if the number of non-rounded corner layers sent by SurfaceFlinger to HWC is greater than four, that is, it exceeds the synthesis capability of the general synthesis channel of HWC, CSM can also select a part of the received non-rounded corner layers as layers that cannot be synthesized, and pass the information of the layers that cannot be synthesized back to SurfaceFlinger. SurfaceFlinger can call the GPU to synthesize these layers that cannot be synthesized. The synthesis results of the GPU can be passed to HWC, and HWC uses the general synthesis channel to synthesize the synthesis results of the GPU with the remaining layers.
[0217] Refer to FIG9A , which shows an interface display method provided in an embodiment of the present application. The interface display method can be applied to an electronic device, wherein the electronic device includes a processing chip and a display screen. The processing chip can be a central processing unit chip or a system-on-chip. The processing chip includes a general synthesis channel for layer synthesis and a rounded corner synthesis channel dedicated to rounded corner layers. The interface display method includes:
[0218] S91: Receive the user's first operation.
[0219] In some embodiments, the electronic device is installed with a first application, and the icon of the first application can be displayed on the desktop of the electronic device. The first operation can refer to clicking on the icon of the first application displayed on the desktop of the electronic device. The first application can be an application that has a privacy indicator display requirement. For example, the first application can be a camera application or a recording application. For a camera application, the electronic device generally displays the privacy indicator when the display screen displays the camera interface. When the camera application is closed or the camera application is switched to the background, the privacy indicator disappears. For a recording application, the electronic device generally displays the privacy indicator when recording is started. At this time, even if the recording application is switched to the background, the privacy indicator will not disappear. When recording is stopped, the privacy indicator disappears.
[0220] S92: In response to the first operation, start a first application.
[0221] In some embodiments, the user clicks on the icon of the first application, and the electronic device can launch the first application in response to the click operation.
[0222] S93: Draw a first rounded corner layer, where the first rounded corner layer includes a privacy indicator.
[0223] S94: Draw an application layer including image information of the first application.
[0224] During the process of launching the first application, by drawing a first rounded corner layer containing a privacy indicator and drawing an application layer containing image information of the first application, the first rounded corner layer and the application layer can be subsequently synthesized to obtain an image frame for display on the display screen, that is, after launching the first application, the first application interface can be displayed on the display screen.
[0225] In some embodiments, the rounded corners layer is typically drawn by a system-level application (SystemUI), which can be activated when the electronic device is powered on. Specifically, the SystemUI thread can draw the first rounded corners layer containing the privacy indicator, while the thread of the first application can draw the application image containing the image information of the first application. The first rounded corners layer can include a ScreenDecorOverlay layer and a ScreenDecorOverlayBottom layer, and the privacy indicator can be drawn on the ScreenDecorOverlay layer.
[0226] In some embodiments, step S93 and step S94 may be executed in parallel, or step S94 may be executed before step S93.
[0227] S95: Use a general synthesis channel to synthesize the first rounded corner layer and the application layer to obtain an image frame.
[0228] Since the first rounded corner layer includes a privacy indicator, in order to avoid the layer synthesis abnormality problem caused by the rounded corner synthesis channel being unable to synthesize the rounded corner layer with the privacy indicator drawn, a general synthesis channel is used to synthesize the first rounded corner layer and the application layer to obtain an image frame.
[0229] For example, the thread of the first application can pass the application layer containing the image information of the first application to SurfaceFlinger, and the thread of SystemUI passes the first rounded corner layer containing the privacy indicator to SurfaceFlinger. SurfaceFlinger uses a common synthesis channel to synthesize the first rounded corner layer and the application layer to obtain an image frame.
[0230] In some embodiments, when SystemUI determines that it needs to draw the first rounded corner layer containing the privacy indicator, or in the process of drawing the first rounded corner layer containing the privacy indicator, it can create a display notification of the privacy indicator to facilitate the subsequent notification of SurfaceFlinger to use the general synthesis channel to synthesize the rounded corner layer, thereby avoiding the layer synthesis anomaly problem caused by the inability of the rounded corner synthesis channel to synthesize the rounded corner layer drawn with the privacy indicator.
[0231] For example, when the layer to be synthesized includes a rounded corner tag, HWC uses the rounded corner synthesis channel to synthesize the layer to be synthesized. SurfaceFlinger can remove the rounded corner tag set for the rounded corner layer in response to the display notification of the privacy indicator. SurfaceFlinger sends the first rounded corner layer and the application layer that do not contain the rounded corner tag to HWC for synthesis. The first rounded corner layer that does not contain the rounded corner tag will be considered by HWC as a non-rounded corner layer, and then HWC will not use the rounded corner synthesis channel to synthesize the rounded corner layer, but use the general synthesis channel to synthesize the first rounded corner layer and the application layer.
[0232] For example, SurfaceFlinger can also create a second identification information in response to the display notification of the privacy indicator. HWC disables the rounded corner synthesis channel based on the second identification information, or does not disable the rounded corner synthesis channel, and sends all received layers to the general synthesis channel based on the second identification information, so that HWC does not use the rounded corner synthesis channel to synthesize the rounded corner layer, and uses the general synthesis channel to synthesize the first rounded corner layer and the application layer. In order to realize the transmission of identification information, a transmission interface specifically for transmitting the first identification information or the second identification information can be constructed between SurfaceFlinger and HWC.
[0233] In some embodiments, when the synthesis capability of the universal synthesis channel of the HWC meets the synthesis requirements of the first rounded corner layer and the application layer, directly using the universal synthesis channel to synthesize the first rounded corner layer and the application layer can reduce the power consumption of the electronic device and improve the display performance of the electronic device. When the synthesis capability of the universal synthesis channel does not meet the requirements of the first rounded corner layer and the application layer (for example, the number of layers to be synthesized exceeds the synthesis capability of the universal synthesis channel, or the layers to be synthesized contain layers with specific display effects that the universal synthesis channel cannot synthesize), the first rounded corner layer and the application layer can be synthesized by mixing the GPU and the universal synthesis channel. Compared with simply using the GPU for layer synthesis, the layer synthesis efficiency is higher and the device power consumption is lower.
[0234] In some embodiments, after launching the first application, the electronic device may also receive a second operation from the user, where the second operation may refer to an operation of exiting the first application, where the operation of exiting the first application may refer to switching the first application to the background or ending the operation of the first application; the electronic device may exit the first application in response to the second operation; SystemUI draws a second rounded corner layer, where the second rounded corner layer does not include a privacy indicator, and SurfaceFlinger may use a rounded corner synthesis channel to synthesize the second rounded corner layer.
[0235] For example, SystemUI can create a notification to cancel the display of the privacy indicator during the process of drawing the second rounded corner layer; SystemUI can send the notification to cancel the display of the second rounded corner layer and the privacy indicator to SurfaceFlinger, and SurfaceFlinger responds to the notification to cancel the display of the privacy indicator and uses the rounded corner synthesis channel to synthesize the second rounded corner layer.
[0236] For example, SurfaceFlinger adds a rounded corner label to the rounded corner layer in response to the notification of canceling the display of the privacy indicator, and SurfaceFlinger sends a second rounded corner layer containing the rounded corner label to HWC. HWC can use the rounded corner synthesis channel to synthesize the second rounded corner layer based on the rounded corner label of the second rounded corner layer.
[0237] For example, SurfaceFlinger creates first identification information in response to the notification of canceling the display of the privacy indicator. The first identification information may include the identification of the second rounded corner layer. SurfaceFlinger can send the second rounded corner layer, other application layers (application layers other than the first application) and the first identification information to HWC. HWC can synthesize the second rounded corner layer using the rounded corner synthesis channel based on the first identification information.
[0238] S96, displaying the image frame on a display screen.
[0239] After the image frame is synthesized, it can be sent for display to realize displaying the image frame on the display screen, so that the user can see the interface of the first application on the display screen after starting the first application.
[0240] Refer to FIG9B , which shows an interface display method provided by an embodiment of the present application. The interface display method can be applied to an electronic device, wherein the electronic device includes a processing chip and a display screen. The processing chip can be a central processing unit chip or a system-on-chip. The processing chip includes a general synthesis channel for layer synthesis and a rounded corner synthesis channel dedicated to rounded corner layers. The electronic device is installed with a camera application. The interface display method includes:
[0241] S901: Receive a first operation from a user.
[0242] The first operation may refer to clicking an icon of a camera application displayed on the desktop of the electronic device.
[0243] S902: In response to a first operation, start a camera application.
[0244] In some embodiments, the user clicks on the icon of the camera application, and the electronic device can launch the camera application in response to the click operation.
[0245] S903: Draw a first rounded corner layer, where the first rounded corner layer includes a privacy indicator.
[0246] S904: Draw a camera preview layer of the camera application.
[0247] During the process of launching the camera application, by drawing a first rounded corner layer containing a privacy indicator and a camera preview layer containing image information of the preview interface of the camera application, the first rounded corner layer and the camera preview layer can be subsequently synthesized to obtain a camera preview interface for display on the display screen, that is, after launching the camera application, the camera preview interface can be displayed on the display screen.
[0248] In some embodiments, step S903 and step S904 may be executed in parallel, or step S904 may be executed before step S903.
[0249] S905 , synthesize the first rounded corner layer and the camera preview layer using a general synthesis channel to obtain a camera preview interface.
[0250] Since the first rounded corner layer includes a privacy indicator, in order to avoid the layer synthesis abnormality problem caused by the rounded corner synthesis channel being unable to synthesize the rounded corner layer with the privacy indicator drawn, a general synthesis channel is used to synthesize the first rounded corner layer and the camera preview layer to obtain the camera preview interface.
[0251] S906, displaying a camera preview interface on the display screen.
[0252] After the camera preview interface is synthesized, the camera preview interface can be displayed on the display screen, so that the user can see the camera preview interface on the display screen after starting the camera application.
[0253] Refer to FIG9C , which shows an interface display method provided in an embodiment of the present application. The interface display method can be applied to an electronic device, wherein the electronic device includes a processing chip and a display screen. The processing chip can be a central processing unit chip or a system-on-chip. The processing chip includes a general synthesis channel for layer synthesis and a rounded corner synthesis channel dedicated to rounded corner layers. The electronic device is installed with a recording application. The interface display method includes:
[0254] S911: Receive a first operation from the user.
[0255] The first operation may refer to clicking on an icon of a recording application displayed on the desktop of the electronic device, and after entering the recording application interface, starting a recording operation of the recording application.
[0256] S912: In response to the first operation, start recording of the recording application.
[0257] In some embodiments, the electronic device may start recording using a recording application in response to the first operation.
[0258] S913: Draw a first rounded corner layer, where the first rounded corner layer includes a privacy indicator.
[0259] S914, drawing the recording layer of the recording application.
[0260] During the recording process of starting the recording application, by drawing a first rounded corner layer containing a privacy indicator and drawing a recording layer containing image information of the recording interface of the recording application, the first rounded corner layer and the recording layer can be synthesized later to obtain a recording interface for display on the display screen, that is, after starting the recording of the recording application, the recording interface can be displayed on the display screen (for example, the recording interface shown in Figure 3C).
[0261] In some embodiments, step S913 and step S914 may be executed in parallel, or step S914 may be executed before step S913.
[0262] S915: Use a general synthesis channel to synthesize the first rounded corner layer and the recording layer to obtain a recording interface.
[0263] Since the first rounded corner layer includes a privacy indicator, in order to avoid the layer synthesis abnormality problem caused by the rounded corner synthesis channel being unable to synthesize the rounded corner layer with the privacy indicator drawn, a general synthesis channel is used to synthesize the first rounded corner layer and the recording layer to obtain the recording interface.
[0264] S916, displaying the recording interface on the display screen.
[0265] After the recording interface is synthesized, the recording interface can be displayed on the display screen, so that the user can see the recording interface on the display screen after starting the recording of the recording application.
[0266] See Figure 10 for a diagram of the software architecture of an electronic device provided in an embodiment of the present application. A layered architecture divides software into several layers, each with distinct roles and responsibilities. Layers communicate with each other via software interfaces. The following description uses an Android operating system installed in an electronic device as an example, but this application is not limited to this, and electronic devices may also be installed with other types of operating systems.
[0267] For example, the Android system is divided into four layers, which are, from top to bottom, the application layer 101 , the framework layer 102 , the Android runtime and system library 103 , the kernel layer 104 , and the hardware layer 105 .
[0268] The application layer can include a series of application packages. For example, an application package can include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, device control service, etc.
[0269] The framework layer provides an application programming interface (API) and programming framework for applications in the application layer. The application framework layer includes some predefined functions. For example, the application framework layer may include a window manager, content provider, view system, telephony manager, resource manager, notification manager, etc.
[0270] The window manager manages window programs. It can obtain the display size, determine whether a status bar exists, lock the screen, and take screenshots. The content provider stores and retrieves data and makes it accessible to applications. This data can include video, images, audio, incoming and outgoing calls, browsing history and bookmarks, and the phone book. The view system includes visual controls, such as those for displaying text and images. The view system can be used to build applications. The display interface can consist of one or more views. For example, a display interface containing a text notification icon can include a view for displaying text and a view for displaying images. The call manager provides communication functions for electronic devices, such as managing call status (including connected and ended calls). The resource manager provides applications with various resources, such as localized strings, icons, images, layout files, and video files. The notification manager enables applications to display notifications in the status bar. These messages can be displayed briefly and then disappear automatically, without requiring user interaction. For example, the notification manager is used to notify download completions and message reminders. The notification manager can also be a notification that appears in the system's top status bar in the form of an icon or scrolling text bar, such as a notification from an application running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message may be displayed in the status bar, a notification sound may be emitted, an electronic device may vibrate, an indicator light may flash, etc.
[0271] The Android Runtime consists of a core library and a virtual machine. The Android runtime is responsible for scheduling and managing the Android system. The core library consists of two parts: one for the Java language's callable functions and the other for the Android core library.
[0272] The application and framework layers run in a virtual machine. The virtual machine executes Java files from the application and framework layers as binary files. The virtual machine manages object lifecycles, stack management, thread management, security and exception management, and garbage collection.
[0273] The system library can include multiple functional modules, such as a surface manager, media libraries, a 3D graphics processing library (such as OpenGL ES), and a 2D graphics engine (such as SGL).
[0274] The surface manager manages the display subsystem and provides fusion of 2D and 3D layers for multiple applications. The media library supports playback and recording of a variety of common audio and video formats, as well as static image files. The media library supports a variety of audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG. The 3D graphics processing library implements 3D graphics drawing, image rendering, compositing, and layer processing. The 2D graphics engine is the drawing engine for 2D drawing.
[0275] The kernel layer is the layer between hardware and software. The kernel layer includes at least display driver, camera driver, audio driver, and sensor driver.
[0276] The kernel layer is the core of an electronic device's operating system. It is the first layer of software expansion based on the hardware, providing the most basic operating system functions and forming the foundation of the operating system. It manages the system's processes, memory, device drivers, files, and network systems, and determines the system's performance and stability. For example, the kernel can determine when an application can operate on a certain piece of hardware.
[0277] The kernel layer includes programs closely related to the hardware, such as interrupt handlers and device drivers. It also includes basic, common, and high-frequency modules, such as the clock management module and the process scheduling module, as well as key data structures. The kernel layer can be installed in the processor or stored in internal memory.
[0278] The hardware layer is the hardware of the electronic device, and the hardware layer at least includes a display screen.
[0279] Please refer to FIG11 , which is a schematic diagram of an application scenario of the interface display method provided in one embodiment of the present application.
[0280] After the electronic device is started, at the application layer 101, SystemUI sends a window creation request for the rounded corner layer to the WMS of the framework layer 102. At the framework layer 102, WMS creates a corresponding window for the rounded corner layer and returns the window handle to SystemUI. WMS can also send a window creation notification for the rounded corner layer to SurfaceFlinger. SurfaceFlinger creates a layer corresponding to the rounded corner layer based on the window creation notification and sets a rounded corner label for the layer. At the application layer 101, SystemUI draws and renders the layer content of the rounded corner layer based on the window handle, and updates the layer content of the rendered rounded corner layer to SurfaceFlinger.
[0281] In the framework layer 102, SurfaceFlinger sends the rounded corner layer containing the rounded corner label to the hardware composition service (Hardware Composer HAL) of the kernel layer 104 for composition. In the kernel layer 104, the Hardware Composer HAL can call the rounded corner composition channel to synthesize the rounded corner layer, and transmit the composition result (including the rounded corner layer and at least one target layer) to the display layer of the display screen for caching. In the hardware layer 105, the display layer of the display screen can display the user interface under the display driver of the kernel layer 104. For example, SurfaceFlinger can transmit the current screen refresh rate of the display screen to the display driver, and the display driver can drive the display layer to refresh the display based on the screen refresh rate. At this time, the user can see the user interface with rounded corner jaggies occlusion on the display screen.
[0282] Refer to FIG12 , which is a schematic diagram of an application scenario of an interface display method provided in another embodiment of the present application.
[0283] In the scenario where the privacy indicator needs to be displayed, at the application layer 101, SystemUI sends a window creation request for the rounded corner layer to the WMS of the framework layer 102. At the framework layer 102, WMS creates a corresponding window for the rounded corner layer and passes the window handle back to SystemUI. WMS can also send a window creation notification for the rounded corner layer to SurfaceFlinger. SurfaceFlinger creates a layer corresponding to the rounded corner layer based on the window creation notification and sets a rounded corner label for the layer. At the application layer 101, SystemUI detects that the privacy indicator needs to be displayed. SystemUI sends a rounded corner label removal notification to SurfaceFlinger, and draws and renders the layer content of the rounded corner layer and the layer content of the privacy indicator based on the window handle. SystemUI can also update the rendered layer content of the rounded corner layer and the layer content of the privacy indicator to SurfaceFlinger.
[0284] In the framework layer 102, SurfaceFlinger removes the rounded corner label set for the Layer corresponding to the rounded corner layer based on the rounded corner label removal notification, and sends the rounded corner layer containing the privacy indicator to the Hardware Composer HAL of the kernel layer 104 for synthesis.
[0285] The Hardware Composer HAL can call a general compositing pipeline or use software compositing to composite the rounded corner layer, and transmit the composited result (including the rounded corner layer and at least one target layer) to the display layer of the display screen for caching. At the hardware layer 105, the display layer of the display screen can display the user interface under the display driver of the kernel layer 104. At this point, the user can see the user interface with the privacy indicator and rounded corner aliasing on the display screen.
[0286] When the privacy indicator is switched from display to not needing to be displayed, at the application layer 101, SystemUI sends a rounded corner label recovery notification to the SurfaceFlinger of the framework layer 102, and updates the layer content of the rounded corner layer (excluding the privacy indicator) to SurfaceFlinger. At the framework layer 102, SurfaceFlinger sets a rounded corner label for the Layer corresponding to the rounded corner layer based on the rounded corner label recovery notification, and sends the rounded corner layer containing the rounded corner label to the Hardware Composer HAL of the kernel layer 104 for synthesis. At the kernel layer 104, the Hardware Composer HAL can call the rounded corner synthesis channel to synthesize the rounded corner layer, and transfer the synthesis result (including the rounded corner layer and at least one target layer) to the display layer of the display screen for caching. At the hardware layer 105, the display layer of the display screen can display the user interface under the display driver of the kernel layer 104. At this time, the user can see the user interface that does not contain the privacy indicator and is occluded with rounded corners on the display screen.
[0287] Refer to FIG13 , which is a schematic diagram of an application scenario of an interface display method provided in another embodiment of the present application.
[0288] In the scenario where the privacy indicator needs to be displayed, at the application layer 101, SystemUI sends a window creation request for the rounded corner layer to the WMS of the framework layer 102. At the framework layer 102, WMS creates a corresponding window for the rounded corner layer and returns the window handle to SystemUI. WMS can also send a window creation notification for the rounded corner layer to SurfaceFlinger. SurfaceFlinger creates a layer corresponding to the rounded corner layer based on the window creation notification. At the application layer 101, SystemUI detects the need to display the privacy indicator. SystemUI sends a privacy indicator display notification to SurfaceFlinger, and draws and renders the layer content of the rounded corner layer and the layer content of the privacy indicator based on the window handle. SystemUI can also update the rendered layer content of the rounded corner layer and the layer content of the privacy indicator to SurfaceFlinger.
[0289] In the framework layer 102, SurfaceFlinger displays a notification based on the privacy indicator, and sends the rounded corner layer containing the privacy indicator and the second identification information to the Hardware Composer HAL of the kernel layer 104. In the kernel layer 104, the Hardware Composer HAL can call a general synthesis channel based on the second identification information or use software synthesis to synthesize the rounded corner layer, and transfer the synthesis result (including the rounded corner layer and at least one target layer) to the display layer of the display screen for caching. In the hardware layer 105, the display layer of the display screen can display the user interface under the display driver of the kernel layer 104. At this time, the user can see the user interface containing the privacy indicator and occluded with rounded corners on the display screen.
[0290] When the privacy indicator is switched from being displayed to not being displayed, at the application layer 101, SystemUI sends a notification that the privacy indicator is not displayed to SurfaceFlinger of the framework layer 102, and updates the layer content of the rounded corner layer (excluding the privacy indicator) to SurfaceFlinger. At the framework layer 102, SurfaceFlinger sends the rounded corner layer and the first identification information to the Hardware Composer HAL of the kernel layer 104 based on the notification that the privacy indicator is not displayed. At the kernel layer 104, the Hardware Composer HAL can call the rounded corner synthesis channel to synthesize the rounded corner layer based on the first identification information, and transfer the synthesis result (including the rounded corner layer and at least one target layer) to the display layer of the display screen for caching. At the hardware layer 105, the display layer of the display screen can display the user interface under the display driver of the kernel layer 104. At this time, the user can see the user interface that does not contain the privacy indicator and is occluded with rounded corners on the display screen.
[0291] Referring to FIG. 14 , the electronic device 100 according to an embodiment of the present application is described below. The electronic device according to the embodiment of the present application may be a mobile phone, tablet computer, desktop computer, laptop computer, handheld computer, notebook computer, ultra-mobile personal computer (UMPC), netbook computer, cellular phone, personal digital assistant (PDA), augmented reality (AR) or virtual reality (VR) device, or other device including a touch screen. The embodiment of the present application does not impose any particular restrictions on the specific form of the electronic device. Referring to FIG. 14 , FIG. 14 is a schematic diagram of the structure of the electronic device 100 according to an embodiment of the present application.
[0292] The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0293] It should be understood that the structure illustrated in the embodiments of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0294] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors.
[0295] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.
[0296] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use these instructions or data again, it can directly access them from the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.
[0297] In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, and a 12-bit 128 bit ...
[0298] receiver / transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input / output (GPIO) interface, subscriber identity module (SIM) interface, and / or universal serial bus (USB) interface, etc.
[0299] The I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple I2C busses. The processor 110 may be coupled to the touch sensor 180K, charger, flash, camera 193, etc. via different I2C bus interfaces. For example, the processor 110 may be coupled to the touch sensor 180K via the I2C interface, enabling communication between the processor 110 and the touch sensor 180K via the I2C bus interface, thereby implementing the touch function of the electronic device 100.
[0300] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the I2S interface, enabling the function of answering calls through a Bluetooth headset.
[0301] The PCM interface can also be used for audio communication, sampling, quantizing, and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface, enabling the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
[0302] The UART interface is a universal serial data bus used for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is typically used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 via the UART interface to implement Bluetooth functionality. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the UART interface, enabling the function of playing music through Bluetooth headphones.
[0303] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display 194 and the camera 193. MIPI interfaces include the camera serial interface (CSI) and the display serial interface (DSI). In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the camera function of the electronic device 100. The processor 110 and the display 194 communicate via the DSI interface to implement the display function of the electronic device 100.
[0304] The GPIO interface can be configured via software. The GPIO interface can be configured as either a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 to the camera 193, display 194, wireless communication module 160, audio module 170, sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
[0305] The USB interface 130 is an interface that complies with USB standards and may be a Mini USB interface, a Micro USB interface, a USB Type-C interface, or the like. The USB interface 130 can be used to connect a charger to charge the electronic device 100, or to transfer data between the electronic device 100 and peripheral devices. It can also be used to connect headphones to play audio. The interface can also be used to connect other electronic devices 100, such as AR devices.
[0306] It is understood that the interface connection relationship between the modules illustrated in the embodiment of the present invention is merely an illustrative illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods from the above embodiments, or a combination of multiple interface connection methods.
[0307] The charging management module 140 is configured to receive charging input from a charger. The charger can be either a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 can receive wireless charging input via the wireless charging coil of the electronic device 100. While charging the battery 142, the charging management module 140 can also provide power to the electronic device 100 via the power management module 141.
[0308] The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and provides power to the processor 110, the internal memory 121, the display 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage, impedance). In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.
[0309] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
[0310] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antennas can be used in conjunction with a tuning switch.
[0311] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
[0312] The modem processor may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After being processed by the baseband processor, the low-frequency baseband signal is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.) or displays an image or video through the display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.
[0313] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0314] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with a network and other devices through wireless communication technologies. The wireless communication technologies may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).
[0315] Electronic device 100 implements display functionality through a GPU, display screen 194, and an application processor. A GPU is a microprocessor for image processing that connects display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or modify display information.
[0316] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oled, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include one or N display screens 194, where N is a positive integer greater than 1. Among them, the display screen 194 in the embodiment of the present application can be a touch screen. That is, the touch sensor 180K is integrated into the display screen 194.
[0317] The electronic device 100 can implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.
[0318] The ISP processes data fed back by camera 193. For example, when taking a photo, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, which is then passed to the ISP for processing and converted into a visible image. The ISP can also perform algorithmic optimization on image noise, brightness, and skin tone. It can also optimize parameters such as exposure and color temperature of the captured scene. In some embodiments, the ISP can be located within camera 193.
[0319] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, and then passes the electrical signal to the ISP for conversion into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
[0320] The digital signal processor is used to process digital signals. In addition to processing digital image signals, it can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
[0321] Video codecs are used to compress or decompress digital video. Electronic device 100 may support one or more video codecs. This allows electronic device 100 to play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, and MPEG4.
[0322] The NPU is a neural network (NN) computing processor. Drawing on the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it rapidly processes input information and can continuously self-learn. The NPU can enable intelligent cognitive applications in electronic device 100, such as image recognition, face recognition, speech recognition, and text comprehension.
[0323] The internal memory 121 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM).
[0324] Random access memory may include static random-access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM, for example, the fifth generation of DDR SDRAM is generally referred to as DDR5 SDRAM), etc.
[0325] Non-volatile memory may include disk storage devices and flash memory.
[0326] Flash memory can be divided into NOR FLASH, NAND FLASH, 3D NAND FLASH, etc. according to the operating principle; single-level cell (SLC), multi-level cell (MLC), triple-level cell (TLC), quad-level cell (QLC), etc. according to the storage cell potential level; universal flash storage (UFS) and embedded multi media card (eMMC) can be divided into UFS and eMMC according to the storage specification.
[0327] The random access memory can be directly read and written by the processor 110, and can be used to store executable programs (such as machine instructions) of the operating system or other running programs, and can also be used to store user and application data.
[0328] The non-volatile memory may also store executable programs and user and application data, etc., and may be loaded into the random access memory in advance for direct reading and writing by the processor 110 .
[0329] The external memory interface 120 can be used to connect to an external non-volatile memory to expand the storage capacity of the electronic device 100. The external non-volatile memory communicates with the processor 110 via the external memory interface 120 to implement data storage. For example, files such as music and videos can be stored in the external non-volatile memory.
[0330] The electronic device 100 can implement audio functions such as media data playback and recording through the audio module 170 , the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0331] 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. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be provided in the processor 110, or some functional modules of the audio module 170 can be provided in the processor 110. The speaker 170A, also known as the "speaker", is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music or listen to hands-free calls through the speaker 170A.
[0332] The receiver 170B, also called a "handset", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or a voice message, the user can place the receiver 170B close to the ear to hear the voice.
[0333] Microphone 170C, also known as "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to the microphone 170C to input the sound signal into the microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify the source of sound, realize directional recording function, etc.
[0334] The headphone jack 170D is used to connect a wired headphone and can be a USB interface 130 or a 3.5mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.
[0335] The pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. In some embodiments, the pressure sensor 180A can be set on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. A capacitive pressure sensor can be composed of at least two parallel plates made of conductive material. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure based on the change in capacitance. When a touch operation is applied to the display screen 194, the electronic device 100 detects the intensity of the touch operation based on the pressure sensor 180A. The electronic device 100 can also calculate the position of the touch based on the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than a first pressure threshold is applied to the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to a first pressure threshold is applied to the short message application icon, an instruction for creating a new short message is executed.
[0336] The gyroscope sensor 180B can be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., x, y, and z axes) can be determined by the gyroscope sensor 180B. The gyroscope sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyroscope sensor 180B detects the angle of the electronic device 100 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the electronic device 100 through reverse movement to achieve anti-shake. The gyroscope sensor 180B can also be used for navigation and somatosensory game scenes.
[0337] The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude using the air pressure value measured by the air pressure sensor 180C to assist in positioning and navigation.
[0338] The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip case. In some embodiments, when the electronic device 100 is a flip phone, the electronic device 100 can detect the opening and closing of the flip cover based on the magnetic sensor 180D. Based on the detected opening and closing status of the case or flip cover, features such as automatic unlocking of the flip cover can be configured.
[0339] Accelerometer 180E can detect the magnitude of acceleration of electronic device 100 in all directions (generally three axes). When electronic device 100 is stationary, it can detect the magnitude and direction of gravity. It can also be used to identify the posture of electronic device 100, enabling applications such as switching between landscape and portrait modes and pedometers.
[0340] The distance sensor 180F is used to measure distance. The electronic device 100 can measure distance using infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180F to measure distance to achieve fast focusing.
[0341] The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light outward through the light emitting diode. The electronic device 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that there is no object near the electronic device 100. The electronic device 100 can use the proximity light sensor 180G to detect that the user is holding the electronic device 100 close to the ear to talk, so as to automatically turn off the screen to save power. The proximity light sensor 180G can also be used in leather case mode and pocket mode to automatically unlock and lock the screen.
[0342] Ambient light sensor 180L is used to sense ambient light brightness. Electronic device 100 can adaptively adjust the brightness of display screen 194 based on the perceived ambient light. Ambient light sensor 180L can also be used to automatically adjust white balance when taking photos. Ambient light sensor 180L can also work with proximity light sensor 180G to detect whether electronic device 100 is in a pocket to prevent accidental touches.
[0343] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.
[0344] The temperature sensor 180J is used to detect temperature. In some embodiments, the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device 100 reduces the performance of the processor located near the temperature sensor 180J to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to prevent the electronic device 100 from shutting down abnormally due to low temperature. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 boosts the output voltage of the battery 142 to prevent abnormal shutdown due to low temperature.
[0345] The touch sensor 180K is also referred to as a "touch device." The touch sensor 180K can be disposed on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also referred to as a "touch screen." The touch sensor 180K is used to detect touch operations applied thereto or in the vicinity thereof. The touch sensor can transmit the detected touch operations to the application processor to determine the type of touch event. Visual output related to the touch operations can be provided via the display screen 194. In other embodiments, the touch sensor 180K can also be disposed on the surface of the electronic device 100, at a location different from that of the display screen 194.
[0346] The bone conduction sensor 180M can obtain vibration signals. In some embodiments, the bone conduction sensor 180M can obtain vibration signals from the vibrating bones of the human body. The bone conduction sensor 180M can also contact the human pulse to receive blood pressure pulse signals. In some embodiments, the bone conduction sensor 180M can also be set in headphones to form bone conduction headphones. The audio module 170 can parse out voice signals based on the vibration signals of the vibrating bones of the human body obtained by the bone conduction sensor 180M to implement voice functions. The application processor can parse heart rate information based on the blood pressure pulse signals obtained by the bone conduction sensor 180M to implement heart rate detection functions.
[0347] The buttons 190 include a power button, a volume button, and the like. The buttons 190 may be mechanical buttons or touch-sensitive buttons. The electronic device 100 may receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 100.
[0348] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.
[0349] The indicator 192 may be an indicator light, which may be used to indicate the charging status, power level changes, messages, missed calls, notifications, etc.
[0350] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to or disconnected from the electronic device 100 by inserting it into or removing it from the SIM card interface 195. The electronic device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the electronic device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
[0351] The interface display methods in the above embodiments can all be implemented in the electronic device 100 having the above hardware structure.
[0352] This embodiment further provides a computer-readable storage medium, which stores computer instructions. When the computer instructions are executed on the electronic device 100, the electronic device 100 executes the above-mentioned related method steps to implement the interface display method in the above-mentioned embodiment.
[0353] This embodiment further provides a computer program product. When the computer program product is run on a computer, it enables the computer to execute the above-mentioned related steps to implement the interface display method in the above-mentioned embodiment.
[0354] In addition, an embodiment of the present application also provides a device, which can specifically be a chip, component or module, and the device may include a connected processor and memory; wherein the memory is used to store computer execution instructions, and when the device is running, the processor can execute the computer execution instructions stored in the memory to enable the chip to execute the interface display method in the above-mentioned method embodiments.
[0355] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0356] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0357] The units described as separate components may or may not be physically separate, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0358] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0359] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0360] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Citation Information
Patent Citations
Privacy aware camera and device status indicator system
CN104871170A
Layer processing method and device
CN112204619A
Methods and apparatus for processing layers
CN113412470B
Mobile terminal and method for controlling of the same
KR1020150048575A
Layer processing method and electronic device
WO2023174322A1