Display method, electronic device, and storage medium

WO2026179839A1PCT designated stage Publication Date: 2026-09-03HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2026/079572
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2025-02-28
Filing Date
2026-02-14
Publication Date
2026-09-03

Smart Images

  • Figure CN2026079572_03092026_PF_FP_ABST
    Figure CN2026079572_03092026_PF_FP_ABST
Patent Text Reader

Abstract

The present application provides a display method, an electronic device, and a storage medium. In an HDR interface, the number of SDR view controls is greater than the number of HDR view controls; when rendering a second interface, an electronic device only needs to perform brightening processing on the HDR view controls in the HDR interface, without performing brightening processing on the SDR view controls in the HDR interface. Upon obtaining the second interface, the electronic device 100 performs dimming processing on the second interface to obtain a first interface, so that the brightness values of HDR view controls in the first interface can be kept unchanged, and the brightness values of SDR view controls in the first interface can be reduced; and when displaying the first interface, the electronic device increases the brightness of the display screen. The method can not only reduce the workload of the electronic device rendering an HDR interface to be displayed, but also increase the speed at which the electronic device 100 displays the HDR interface.
Need to check novelty before this filing date? Find Prior Art

Description

A display method, an electronic device, and a storage medium

[0001] This application claims priority to Chinese Patent Application No. 202510256602.1, filed on February 28, 2025, entitled "A Display Method, Electronic Device and Storage Medium", the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of terminal technology, and in particular to a display method, electronic device and storage medium. Background Technology

[0003] For digital images, dynamic range (DR) refers to the ratio between the maximum and minimum brightness of an image, that is, the relative ratio between the brightest and darkest parts of the image. The greater the dynamic range of an image, the richer the brightness levels it can represent, and the higher the contrast. High Dynamic Range (HDR) images are images with a higher dynamic range than standard 8-bit digital images. In other words, HDR images have a higher dynamic range and more image detail, and can better reflect the brightness levels of the real world from bright to dark. Further research is needed to improve the display effect of HDR images. Summary of the Invention

[0004] This application provides a display method, an electronic device, and a storage medium. This method not only reduces the workload of the electronic device in drawing the HDR interface to be displayed, but also speeds up the display of the HDR interface by the electronic device.

[0005] In a first aspect, this application provides a display method. The method includes: an electronic device's display screen showing a user interface at a first brightness value; the electronic device receiving a first operation on the user interface and drawing a second interface; wherein the second interface includes a first view control and a second view control, the first view control being a high dynamic range (HDR) view control, the second view control being a non-HDR view control, the first view control being a view control processed based on the first brightness value and the maximum brightness value of pixels in the first view control, and the brightness value of the first view control in the second interface being greater than a preset brightness value of the first view control; the electronic device processing the second interface based on the first brightness value and the maximum brightness value of pixels in the first view control to obtain a first interface, the brightness value of the first interface being less than the brightness value of the second interface; the electronic device's display screen showing the first interface at a second brightness value; wherein the second brightness value is greater than the first brightness value.

[0006] Optionally, the non-HDR view control can also be referred to as the SDR view control.

[0007] Optionally, and not limited to, second view controls, the second interface may also include other non-HDR view controls.

[0008] Optionally, the display method provided in this application is applicable not only to scenarios where the display changes from an SDR interface to an HDR interface, but also to scenarios where the display changes from a first HDR interface to a second HDR interface. For example, switching between viewing HDR photos.

[0009] Optionally, the first operation could be taking an HDR image, taking an HDR video, playing an HDR video in a first application, viewing an HDR image in a gallery application, or viewing an HDR video in a gallery application, etc.

[0010] In some embodiments, the second interface and the first interface may also be referred to as the HDR interface.

[0011] In some scenarios, the number of SDR view controls in the HDR interface exceeds the number of HDR view controls. In such cases, the electronic device only needs to brighten the HDR view controls within the HDR interface, without needing to brighten the SDR view controls. After obtaining the second interface, the electronic device 100 then darkens the second interface to obtain the first interface. This method maintains the brightness values ​​of the HDR view controls in the first interface while simultaneously reducing the brightness values ​​of the SDR view controls. This not only reduces the workload of the electronic device in drawing the HDR interface to be displayed but also speeds up the display of the HDR interface by the electronic device 100.

[0012] In conjunction with the first aspect, in one possible implementation, the second view control is a view control that has not been processed based on the first brightness value and the maximum brightness value of the pixels in the first view control, and the brightness value of the second view control in the second interface is equal to the preset brightness value of the second view control.

[0013] In conjunction with the first aspect, in one possible implementation, the second brightness value is equal to the maximum brightness value of the pixel in the first view control.

[0014] Optionally, the electronic device may increase the brightness value of the display screen from a first brightness value to the maximum brightness value of the pixel in the first view control at one time, or the electronic device may increase the brightness value of the display screen to the maximum brightness value of the pixel in the first view control multiple times.

[0015] In this way, after the electronic device increases the brightness value of the display screen to the maximum brightness value of the pixels in the first view control, the electronic device can display the maximum brightness value of the pixels in the HDR interface, thereby improving the display effect of the HDR interface.

[0016] In conjunction with the first aspect, in one possible implementation, before the electronic device draws the second interface, the method further includes: the electronic device determining a first brightness enhancement value for the display screen based on a first brightness value and the maximum brightness value of pixels in the first view control; the electronic device determining a first grayscale discount coefficient based on the first brightness enhancement value; and the electronic device drawing the second interface specifically includes: the electronic device drawing the first view control in the second interface based on the attributes of the first view control and the first grayscale discount coefficient; and the electronic device drawing the second view control in the second interface based on the attributes of the second view control, thus obtaining the second interface.

[0017] Optionally, the first grayscale discount factor can be obtained based on the first brightness enhancement value. The first grayscale discount factor and the first brightness enhancement value can be inversely proportional; the larger the first brightness enhancement value, the smaller the value of the first grayscale discount factor, and vice versa. For example, the first grayscale discount factor can be the reciprocal of the first brightness enhancement value. The first grayscale discount factor can be a number greater than 0 and less than or equal to 1.

[0018] The properties of the first view control may include, but are not limited to, the shape, size, position, color, transparency, and preset brightness value of the first view control.

[0019] The properties of the second view control may include, but are not limited to, the shape, size, position, color, transparency, and preset brightness value of the second view control.

[0020] The electronic device draws the first view control in the second interface based on the properties of the first view control and the first grayscale discount factor. This can refer to the electronic device processing the properties of the first view control based on the first grayscale discount factor, reducing the preset brightness value in the properties of the first view control to obtain the processed properties of the first view control. The electronic device then draws the first view control based on the processed properties of the first view control.

[0021] Optionally, the electronic device processes the properties of the first view control based on the first grayscale discount coefficient, reducing the preset brightness value in the properties of the first view control to obtain the processed properties of the first view control. This can refer to the electronic device dividing the preset brightness values ​​of multiple pixels in the properties of the first view control by the first grayscale discount coefficient to obtain the processed properties of the first view control.

[0022] For SDR view controls, electronic devices do not need to process the properties of the SDR view controls; they can directly process and draw the SDR view controls based on the properties of the SDR view controls.

[0023] In conjunction with the first aspect, in one possible implementation, the display screen of the electronic device displays the first interface at a second brightness value, specifically including: the electronic device increases the brightness of the electronic device to the second brightness value based on the first brightness value and the first brightness enhancement value; the display screen of the electronic device displays the first interface at the second brightness value.

[0024] Optionally, the electronic device increases its brightness to a second brightness value based on a first brightness value and a first brightness enhancement value. This can mean that the electronic device increases its brightness to the second brightness value by multiplying the first brightness value by the first brightness enhancement value.

[0025] In conjunction with the first aspect, in one possible implementation, the second interface is stored in the first buffer; the electronic device processes the second interface based on the first brightness value and the maximum brightness value of the pixels in the first view control to obtain the first interface, specifically including: the electronic device processes the second interface in the first buffer based on the first brightness value and the maximum brightness value of the pixels in the first view control to obtain the first interface.

[0026] In this way, the electronic device can draw the second interface within a buffer (e.g., the first buffer) and process the second interface within the same buffer to obtain the first interface. In other embodiments, the electronic device can also draw the second interface within different buffers.

[0027] In conjunction with the first aspect, in one possible implementation, after the electronic device obtains the first interface, the method further includes: the electronic device acquiring the first interface from the first buffer and then storing the first interface in the second buffer; wherein the first buffer and the second buffer are different, and the amount of data of a single pixel in the first buffer is greater than the amount of data of a single pixel in the second buffer.

[0028] Based on the above description, the electronic device can increase the brightness value of the first view control based on the first brightness value and the maximum brightness value of the pixels in the first view control. This may result in the RGBA value of the pixels in the first view control being greater than 1. Therefore, the first buffer is a buffer capable of storing RGBA values ​​greater than 1. For example, the first buffer can be a buffer with a bit depth of 32 bits or more. For example, the first buffer can be a 34-bit, 36-bit, 38-bit, 40-bit, 44-bit, 48-bit, 52-bit, 56-bit, 60-bit, 64-bit, or 128-bit buffer or a buffer of other bit depths.

[0029] Thus, if the electronic device has specific requirements regarding the bit depth of the buffer storing the first interface to be displayed, it can first store the second interface using a buffer with a larger data volume for each pixel. After obtaining the first interface, before displaying it, the electronic device stores the first interface in a buffer that meets the display requirements.

[0030] For example, the first buffer can be a 64-bit buffer and the second buffer can be a 32-bit buffer.

[0031] In other embodiments, if the electronic device does not have a specific requirement for the number of bits in the buffer storing the first interface to be displayed, the first buffer and the second buffer can be the same. For example, both the first buffer and the second buffer can be 34-bit, 36-bit, 38-bit, 40-bit, 44-bit, 48-bit, 52-bit, 56-bit, 60-bit, 64-bit, or 128-bit buffers or buffers of other bit lengths.

[0032] In conjunction with the first aspect, in one possible implementation, the electronic device draws the second interface, specifically including: the electronic device draws the second view control in the second interface within the third buffer; the electronic device retrieves the second view control from the third buffer and then saves the second view control in the first buffer; the electronic device draws the first view control in the second interface within the first buffer to obtain the second interface.

[0033] The third buffer differs from the first buffer. Before drawing SDR view controls, the electronic device can request a third buffer. The electronic device can draw SDR view controls within the third buffer, which is used to cache them. The cached SDR view controls in the third buffer are reused when the electronic device draws other interfaces. For example, the electronic device can save the second view control in the third buffer. Then, the electronic device retrieves the second view control from the third buffer and saves it in the first buffer. When drawing the second view control, the electronic device does not adjust its brightness value. When drawing other HDR or SDR interfaces, if the second view control also exists in those interfaces, the electronic device can reuse the second view control saved in the third buffer without redrawing it. This saves power and speeds up the display of other HDR or SDR interfaces.

[0034] In conjunction with the first aspect, in one possible implementation, after the electronic device's display shows the first interface with a second brightness value, the method further includes: the electronic device drawing a fourth interface, the fourth interface including a third view control and a second view control, the third view control being an HDR view control, the third view control being a view control processed based on the second brightness value and the maximum brightness value of the pixels in the third view control, the brightness value of the third view control in the fourth interface being different from the preset brightness value of the third view control, the second view control being obtained by the electronic device from a third buffer; the electronic device processing the fourth interface based on the second brightness value and the maximum brightness value of the pixels in the third view control to obtain a third interface, the brightness value of the third interface being different from the brightness value of the fourth interface; and the electronic device's display showing the third interface with the third brightness value.

[0035] Optionally, the third-view control and the first-view control can refer to the same view control, but the content displayed in the third-view control is different from the content displayed in the first-view control. For example, both the third-view control and the first-view control can be controls that display video content.

[0036] Optionally, the third-view control and the first-view control can also be different controls.

[0037] Optionally, the brightness value of the third view control in the fourth interface is different from the preset brightness value of the third view control. It can mean that the brightness value of the third view control in the fourth interface is equal to the preset brightness value of the third view control, or it can mean that the brightness value of the third view control in the fourth interface is less than the preset brightness value of the third view control, or it can mean that the brightness value of the third view control in the fourth interface is greater than the preset brightness value of the third view control.

[0038] Optionally, the brightness value of the third interface is different from the brightness value of the fourth interface. It can mean that the brightness value of the third interface is equal to the brightness value of the fourth interface, or it can mean that the brightness value of the third interface is less than the brightness value of the fourth interface, or it can mean that the brightness value of the third interface is greater than the brightness value of the fourth interface.

[0039] In this way, when drawing the fourth interface, if the fourth interface also has a second view control, the electronic device can obtain the already drawn second view control from the third buffer, without having to draw the second view control again. This can save the power consumption of the electronic device and speed up the display time of the third interface.

[0040] In conjunction with the first aspect, in one possible implementation, the third brightness value is different from the second brightness value.

[0041] Optionally, the third brightness value is different from the second brightness value. It can mean that the third brightness value is greater than the second brightness value, or it can mean that the third brightness value is less than the second brightness value.

[0042] In other possible implementations, the third brightness value and the second brightness value can also be the same. For example, in a scenario where an HDR interface is continuously displayed, the brightness of the terminal device's display can remain consistent. This could be used when displaying HDR video or switching to display HDR photos.

[0043] If the third brightness value and the second brightness value can also be the same, the maximum brightness value of the pixel in the third interface is the same as the maximum brightness value of the pixel in the first interface.

[0044] In conjunction with the first aspect, in one possible implementation, the electronic device draws a fourth interface, specifically including: the electronic device receiving and responding to the second operation, and drawing the fourth interface.

[0045] In this way, the electronic device can begin drawing the fourth interface and displaying the third interface only after receiving the user's second operation. For example, in a scene where HDR images are being switched to display, after displaying the first interface, the electronic device can begin drawing the fourth interface and displaying the third interface only after receiving the user's second operation.

[0046] In other possible implementations, the electronic device can also automatically draw a fourth interface and display the third interface. For example, in playing or shooting an HDR video scene, after displaying the first interface, the electronic device can automatically draw a fourth interface and display the third interface.

[0047] In conjunction with the first aspect, in one possible implementation, the second view control is either a view control in the navigation bar of the first interface, or the second view control is a view control in the status bar of the first interface.

[0048] Optionally, the types of view controls in the navigation bar and the status bar may differ in different HDR interfaces.

[0049] In conjunction with the first aspect, in one possible implementation, the second view control is a view control in the top fixed area of ​​the first interface, or the second view control is a view control in the bottom fixed area of ​​the first interface.

[0050] Optionally, the view controls in the top fixed area and the bottom fixed area may be of different types in different HDR interfaces.

[0051] In conjunction with the first aspect, in one possible implementation, the second interface further includes a fourth view control, which is a non-HDR control; the method further includes: the electronic device drawing the second interface, specifically including: the electronic device drawing the first view control in the second interface based on the properties of the first view control and the first grayscale discount coefficient; the electronic device drawing the second view control in the second interface based on the properties of the second view control; the electronic device drawing the fourth view control in the second interface based on the properties of the fourth view control, thereby obtaining the second interface.

[0052] In this way, when the second interface includes multiple SDR view controls, the electronic device only needs to draw the SDR view controls according to the properties of each SDR view control, without needing to adjust the brightness of the SDR view controls.

[0053] In a second aspect, this application provides an electronic device, including a memory and a processor; wherein the memory and the processor are coupled, the memory is used to store a computer program, and when the processor executes and calls the computer program, the electronic device performs a display method provided in any possible implementation of the first aspect.

[0054] Thirdly, this application provides a computer-readable storage medium including instructions that, when executed on an electronic device, cause the electronic device to perform a display method provided in any possible implementation of the first aspect above.

[0055] Fourthly, this application provides a chip system including one or more processors, which are used to invoke computer instructions to cause an electronic device to execute a display method provided in any possible implementation of any of the above aspects.

[0056] Fifthly, this application provides a computer program product containing instructions that, when the computer program product is run on an electronic device, causes the electronic device to execute a display method provided in any possible implementation of any of the above aspects.

[0057] For a description of the beneficial effects in aspects two through five, please refer to the description of the beneficial effects in aspect one; this application will not repeat them here. Attached Figure Description

[0058] Figure 1 shows a schematic diagram of multiple view controls displayed in an interface;

[0059] Figure 2 shows a schematic diagram of an interface that includes multiple layers;

[0060] Figure 3 shows a schematic diagram of an electronic device 100 displaying an HDR interface;

[0061] Figure 4 shows a schematic diagram of another electronic device 100 displaying an HDR interface;

[0062] Figure 5 shows a schematic diagram of the hardware structure of an electronic device 100;

[0063] Figure 6 illustrates an exemplary software structure block diagram of the electronic device 100;

[0064] Figures 7A-7E illustrate a set of electronic devices 100 acquiring and displaying HDR video frames;

[0065] Figure 8 shows a schematic diagram of another electronic device 100 displaying an HDR interface;

[0066] Figure 9 shows a schematic diagram of an electronic device 100 adjusting the brightness values ​​of the HDR view control and the SDR view control;

[0067] Figure 10 shows a schematic flowchart of a method for displaying an HDR interface on an electronic device 100;

[0068] Figure 11 shows a schematic diagram of another electronic device 100 displaying an HDR interface;

[0069] Figure 12 shows a schematic flowchart of a method for displaying an HDR interface in another electronic device 100;

[0070] Figure 13 shows a flowchart of a display method. Detailed Implementation

[0071] The technical solutions in the embodiments of this application will be clearly and thoroughly described below with reference to the accompanying drawings. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B; the word "and / or" in the text is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of the embodiments of this application, "multiple" refers to two or more than two.

[0072] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Therefore, features defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.

[0073] The term "user interface (UI)" used in the following embodiments of this application refers to the medium interface through which an application or operating system interacts and exchanges information with a user. It realizes the conversion between the internal form of information and the form that the user can accept. The most common form of user interface is the graphical user interface (GUI), which refers to a user interface related to computer operation displayed in a graphical manner. It can be visual interface elements such as text, icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, and widgets displayed on the screen of a wearable device.

[0074] First, the terminology used in this application will be explained.

[0075] 1. Dynamic Range (DR), Standard Dynamic Range (SDR), High Dynamic Range (HDR)

[0076] Dynamic range refers to the ratio between the maximum and minimum brightness of an image, that is, the relative ratio between the brightest and darkest parts of the image. The greater the dynamic range of an image, the richer the brightness levels it can represent, and the higher the contrast.

[0077] For example, the expression for dynamic range can be: DR = 20log10(bright / dark); where DR refers to the dynamic range, bright can refer to the maximum brightness of the image, and dark can refer to the minimum brightness of the image. This expression establishes the correspondence between the dynamic range of an image and its brightness.

[0078] Standard dynamic range refers to the dynamic range of an image between a first value and a second value. For example, the first value could be 20dB, the second value could be 78dB, and the standard dynamic range could include 20dB to 78dB.

[0079] High dynamic range (HDR) refers to an image's dynamic range falling between the third and fourth values, where the third value is less than the first value and the fourth value is greater than the second value. For example, the third value could be 1 dB and the fourth value could be 100 dB. Standard dynamic range can range from 1 dB to 100 dB. HDR images can contain more image detail and better reflect the brightness levels from light to dark in an image.

[0080] 2. View Controls

[0081] View controls are used to layout elements (or objects, or data, etc.) in an interface. In this embodiment, if the view control is used as a container, then the objects placed within it (such as text or images) are called elements. Elements can include, but are not limited to, text, icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, and widgets.

[0082] Because view controls can be nested, a parent view control can have one or more child view controls. Optionally, a parent view control may not contain any child view controls.

[0083] Figure 1 shows a schematic diagram of multiple view controls displayed in an interface.

[0084] As shown in Figure 1, the interface displays multiple view controls, such as view control 1, view control 2, view control 3, and view control 4.

[0085] A view control can include multiple pixels, each with a different brightness value. View controls can be categorized into standard dynamic range view controls and high dynamic range view controls based on the dynamic range of the brightness values ​​of the pixels within them.

[0086] In a standard dynamic range view control, the brightness value of an element point within the view control is greater than a first value but less than a second value. A high dynamic range view control, on the other hand, can have a brightness value of an element point that is either less than a first value or greater than a second value.

[0087] 3. Layers

[0088] An interface can include one or more layers. A layer can include one or more view controls. Multiple layers can be stacked to form a single interface.

[0089] As shown in Figure 2, Layer 1 includes View Control 1 and View Control 2, Layer 2 includes View Control 3, and Layer 3 includes View Control 4. Layers 1, 2, and 3 can be stacked sequentially to form the interface shown in Figure 1.

[0090] In some embodiments, layers can be categorized into standard dynamic range layers and high dynamic range layers based on the type of view controls within the layer.

[0091] In this context, a standard dynamic range layer can refer to a layer that includes standard dynamic range view controls but excludes high dynamic range view controls. A high dynamic range view control can refer to a layer that includes high dynamic range view controls but excludes standard dynamic range view controls.

[0092] First, we will introduce two ways to display an HDR interface on electronic devices 100.

[0093] An HDR interface can refer to an interface that includes HDR images, which have a high dynamic range. An HDR interface can also include SDR images, which have a standard dynamic range.

[0094] Generally, an HDR interface may include one HDR view control and multiple SDR view controls.

[0095] Method 1

[0096] Before displaying the HDR interface on the electronic device 100, the electronic device 100 can obtain the current brightness value of the display screen and the maximum brightness value of the HDR view control in the HDR interface. In order for the brightness of the display screen of the electronic device 100 to reach the maximum brightness value of the HDR view control in the HDR interface, the electronic device 100 can determine the brightness enhancement value of the display screen based on the current brightness value of the display screen and the maximum brightness value of the HDR view control in the HDR interface. The brightness enhancement value of the display screen is used to set the brightness value of the display screen to the maximum brightness value of the HDR view control in the HDR interface.

[0097] In some embodiments, the HDR interface may include multiple layers, each of which may include an SDR layer or an HDR layer. After determining the brightness enhancement value of the display screen, the electronic device 100 may determine a grayscale discount factor based on the brightness enhancement value of the display screen. The grayscale discount factor is used to process one or more SDR layers in the HDR interface, for example, multiplying the brightness value of each pixel in the SDR layer by the grayscale discount factor to obtain a processed SDR layer, in which the brightness value of the pixels is less than that of the pixels in the SDR layer. The electronic device 100 then combines the processed SDR layer and the HDR layer to obtain the HDR interface.

[0098] After acquiring the HDR interface, the electronic device 100 can adjust the brightness of the display screen based on the brightness boost value of the display screen to set the brightness of the display screen to the maximum brightness value of the image in the HDR interface, and then display the HDR interface.

[0099] The reason why electronic device 100 processes one or more SDR layers in the HDR interface based on the grayscale discount factor is that electronic device 100 adjusts the brightness of the display screen before displaying the HDR interface. In order to ensure that the brightness values ​​of the pixels in the SDR layer displayed by electronic device 100 remain unchanged, the brightness values ​​of the pixels in the SDR layer need to be darkened.

[0100] Figure 3 shows a schematic diagram of an electronic device 100 displaying an HDR interface.

[0101] As shown in Figure 3, the HDR interface of the first application includes Layer 1, Layer 2, and Layer 3. Layer 1 and Layer 2 can be SDR layers, and Layer 3 can be an HDR layer. The process of the first application can obtain the grayscale discount factor, darken the pixels in Layer 1 based on the grayscale discount factor, obtain the processed Layer 1, and save the processed Layer 1 in buffer1. The process of the first application can also darken the pixels in Layer 2 based on the grayscale discount factor, obtain the processed Layer 2, and save the processed Layer 2 in buffer1. The process of the first application does not need to process Layer 3 based on the grayscale discount factor; it can draw Layer 3 and save it in buffer3. The rendering service can obtain the processed Layer 1 from buffer1, the processed Layer 2 from buffer2, and the processed Layer 3 from buffer3, composite the processed Layer 1, processed Layer 2, and Layer 3 to obtain the HDR interface, and save the HDR interface in buffer4. When displaying the HDR interface, the electronic device 100 retrieves the HDR interface from buffer4 and sends it to the display device.

[0102] However, in Method 1, on the one hand, if there are many SDR layers in the HDR interface, the electronic device 100 needs to process each SDR layer in the HDR interface based on the grayscale discount factor, which will increase the power consumption of the electronic device 100 and the time required to obtain the HDR interface. On the other hand, the application process needs to draw, render, and composite the SDR layers and HDR layers in the HDR interface separately. If the application does not support drawing, rendering, and compositing the SDR layers and HDR layers in the HDR interface separately, the application cannot obtain the HDR interface according to Method 1.

[0103] Method 2

[0104] In some embodiments, the HDR interface may include multiple view controls, which may include SDR view controls and HDR view controls. After determining the brightness enhancement value of the display screen, the electronic device 100 can determine the grayscale discount factor based on the brightness enhancement value of the display screen. When drawing the SDR view control, the electronic device 100 can darken the SDR view control based on the grayscale discount factor, for example, by multiplying the brightness value of the SDR view control by the grayscale discount factor. The electronic device 100 can obtain the HDR interface based on the drawn SDR view control and HDR view control.

[0105] A view control comprises multiple pixels, and its brightness value can be represented by the brightness values ​​of these pixels. In this embodiment, the brightness value of an SDR view control can refer to the brightness values ​​of the multiple pixels within the SDR view control. Similarly, the brightness value of an HDR view control can refer to the brightness values ​​of the multiple pixels within the HDR view control. Multiplying the brightness value of an SDR view control by a grayscale discount factor can be achieved by multiplying the brightness values ​​of the multiple pixels in the SDR view control by the grayscale discount factor individually. Likewise, multiplying the brightness value of an HDR view control by a grayscale discount factor can be achieved by multiplying the brightness values ​​of the multiple pixels in the HDR view control by the grayscale discount factor individually.

[0106] After acquiring the HDR interface, the electronic device 100 can adjust the brightness of the display screen based on the brightness boost value of the display screen to set the brightness of the display screen to the maximum brightness value of the HDR view control in the HDR interface, and then display the HDR interface.

[0107] The electronic device 100 darkens the SDR view controls based on the grayscale discount factor because when displaying an HDR interface, the electronic device 100 adjusts the screen brightness. To ensure that the brightness values ​​of the SDR view controls remain unchanged, the electronic device 100 needs to darken the brightness values ​​of the SDR view controls.

[0108] Figure 4 shows a schematic diagram of another electronic device 100 displaying an HDR interface.

[0109] As shown in Figure 4, the HDR interface of the first application includes view control 1, view control 2, view control 3, and view control 4. View control 1, view control 2, and view control 3 can be SDR view controls. View control 4 can be an HDR view control.

[0110] Before rendering the HDR interface of the first application, the rendering service can obtain the grayscale discount factor. The rendering service then renders view control 1, view control 2, and view control 3 separately within buffer1 based on the grayscale discount factor, obtaining the HDR interface, and saves the HDR interface within buffer1. Specifically, the rendering service rendering view control 1, view control 2, and view control 3 separately based on the grayscale discount factor can mean that when rendering view control 1, view control 2, and view control 3, the rendering service can multiply the brightness values ​​of the pixels in view control 1, view control 2, and view control 3 by the grayscale discount factor respectively, to reduce the brightness values ​​of the pixels in the SDR view controls.

[0111] When displaying an HDR interface, the display service can obtain the HDR interface from buffer1 and display the HDR interface.

[0112] However, in Method 2, on the one hand, if there are many SDR view controls in the HDR interface, the electronic device 100 needs to darken each SDR view control in the HDR interface based on the grayscale discount factor, which will increase the power consumption of the electronic device 100 and the time required to obtain the HDR interface. On the other hand, since each SDR view control in the HDR interface is processed based on the grayscale discount factor, and different HDR interfaces have different grayscale discount factors, if two consecutive HDR interfaces have the same SDR view controls, the subsequent HDR interface cannot reuse the SDR view controls from the previous HDR interface.

[0113] Based on the above analysis, this application provides a display method. The electronic device 100 can draw multiple view controls in a second interface. These view controls may include a first view control and a second view control. The first view control may be an HDR view control, and the second view control may be an SDR view control. When drawing the first view control, the electronic device 100 can obtain the maximum brightness value of the pixels in the first view control and, based on the first brightness value of the display screen and the maximum brightness value of the pixels in the first view control, brighten the first view control. When drawing the second view control, the electronic device 100 does not need to brighten the second view control. After obtaining the second interface, the electronic device 100 then darkens the second interface based on the first brightness value of the display screen and the maximum brightness value of the pixels in the first view control, obtaining the first interface, where the brightness value of the first interface is less than the brightness value of the second interface. When the electronic device 100 displays the first interface, it can adjust the brightness value of the display screen to the second brightness value, where the second brightness value is greater than the first brightness value.

[0114] Optionally, not limited to the second view control, the second interface may also include other SDR view controls. The electronic device 100 can draw other SDR view controls in the second interface in the same way as the second view control.

[0115] Specifically, when drawing the first view control, after the electronic device 100 brightens the first view control based on the first brightness value of the display screen and the maximum brightness value of the pixels in the first view control, the electronic device 100 then darkens the second interface based on the first brightness value of the display screen and the maximum brightness value of the pixels in the first view control to obtain the first interface, which can keep the brightness value of the first view control in the first interface unchanged.

[0116] After the electronic device 100 darkens the second interface based on the first brightness value of the display screen and the maximum brightness value of the pixels in the first view control, the electronic device 100 can then adjust the brightness of the display screen based on the first brightness enhancement value, so that the brightness value of the second view control displayed by the electronic device 100 remains unchanged.

[0117] In some scenarios, the number of SDR view controls in the HDR interface exceeds the number of HDR view controls. In such cases, the electronic device 100 only needs to brighten the HDR view controls within the HDR interface, without needing to brighten the SDR view controls. After obtaining the second interface, the electronic device 100 then darkens the second interface to obtain the first interface. This method maintains the brightness values ​​of the HDR view controls in the first interface while simultaneously reducing the brightness values ​​of the SDR view controls. This not only reduces the workload of the electronic device 100 in drawing the HDR interface to be displayed but also speeds up the display of the HDR interface.

[0118] Optionally, the display method provided in this application is applicable not only to scenarios where the display of an SDR interface is switched to the display of an HDR interface, but also to scenarios where the display of an HDR interface is switched to the display of an HDR interface.

[0119] Figure 5 shows a schematic diagram of the hardware structure of an electronic device 100.

[0120] 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, antenna 1, 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, a sensor module 180, a display screen 194, a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include one or more sensors, such as a gyroscope sensor 180B, a magnetic sensor 180D, an accelerometer sensor 180E, a proximity sensor 180F, a touch sensor 180K, etc. In some embodiments, the sensor module 180 may also include one or more of the following sensors: a pressure sensor, a barometric pressure sensor, a proximity sensor, a fingerprint sensor, a temperature sensor, an ambient light sensor, a bone conduction sensor, etc.

[0121] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0122] Processor 110 may include one or more processing units, such as application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU). These different processing units may be independent devices or integrated into one or more processors.

[0123] The controller can generate operation control signals based on the instruction opcode and timing signals to complete the control of instruction fetching and execution.

[0124] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can directly retrieve it from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system. In some embodiments, the processor 110 may include one or more interfaces, such as a universal serial bus (USB) interface.

[0125] USB interface 130 is a USB standard compliant interface, specifically a MiniUSB interface, MicroUSB interface, USB Type-C interface, etc. USB interface 130 can be used to connect a charger to charge electronic device 100, and can also be used for data transfer between electronic device 100 and peripheral devices. Charging management module 140 receives charging input from the charger. Power management module 141 connects battery 142, charging management module 140, and processor 110. Power management module 141 receives input from battery 142 and / or charging management module 140 to power processor 110, internal memory 121, display screen 194, and wireless communication module 160, etc.

[0126] The wireless communication function of electronic device 100 can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.

[0127] 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 one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with tuning switches.

[0128] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 150 may be housed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be housed in the same device.

[0129] Wireless communication module 160 can provide applications on electronic device 100 including wireless local area networks (WLAN) (such as wireless fidelity). Network), Bluetooth Solutions for wireless communication include BT (Browser-Based Telecommunications), Global Navigation Satellite System (GNSS), Frequency Modulation (FM), Near Field Communication (NFC), and Infrared (IR). The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, demodulates and filters the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, frequency-modulate and amplify them, and then convert them into electromagnetic waves for radiation via antenna 2.

[0130] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, so that electronic device 100 can communicate with networks and other devices through wireless communication technology.

[0131] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.

[0132] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel.

[0133] In this application, the display screen 194 can be used to display an HDR interface or an SDR interface. When the electronic device 100 displays an HDR interface, the electronic device 100 can adjust the display brightness of the display screen 194.

[0134] Internal memory 121 may include one or more random access memory (RAM) and one or more non-volatile memory (NVM).

[0135] The random access memory can be directly read and written by the processor 110. It can be used to store executable programs (such as machine instructions) of the operating system or other running programs, as well as user and application data.

[0136] Non-volatile memory can also store executable programs and user and application data, and can be pre-loaded into random access memory for direct reading and writing by the processor 110.

[0137] The external memory interface 120 can be used to connect to external non-volatile memory, thereby expanding the storage capacity of the electronic device 100. The external non-volatile memory communicates with the processor 110 through the external memory interface 120 to perform data storage functions. For example, music, video, and other files can be stored in the external non-volatile memory.

[0138] Electronic device 100 can implement audio functions, such as making calls and recording, through audio module 170, speaker 170A, receiver 170B, microphone 170C, and application processor.

[0139] Audio module 170 is used to convert digital audio information into analog audio signal output, and also to convert analog audio input into digital audio signal. Audio module 170 can also be used for encoding and decoding audio signals. In some embodiments, audio module 170 may be located in processor 110, or some functional modules of audio module 170 may be located in processor 110. Speaker 170A, also called a "loudspeaker," is used to convert audio electrical signals into sound signals. Electronic device 100 can listen to music or hands-free calls through speaker 170A. Receiver 170B, also called a "handpiece," is used to convert audio electrical signals into sound signals. When electronic device 100 answers a phone call or voice message, it can listen to the voice by bringing receiver 170B close to the user's ear. Microphone 170C, also called a "microphone" or "voice transducer," is used to convert sound signals into electrical signals. When making a phone call or sending a voice message, the user can speak by bringing their mouth close to microphone 170C, inputting sound signals into microphone 170C.

[0140] The gyroscope sensor 180B can be used to determine the motion attitude of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 about three axes (i.e., the x, y, and z axes) can be determined by the gyroscope sensor 180B. The gyroscope sensor 180B can be used for image stabilization.

[0141] 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 cover.

[0142] The 180E accelerometer can detect the magnitude of acceleration of electronic device 100 in various directions (typically 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 devices and applied to applications such as screen orientation switching and pedometers.

[0143] A distance sensor 180F is used to measure distance. Electronic device 100 can measure distance via infrared or laser. In some embodiments, during a shooting scene, electronic device 100 can utilize the distance sensor 180F to measure distance for rapid focusing.

[0144] The touch sensor 180K is also known as a "touch device". The touch sensor 180K can be set on the display screen 194. The touch sensor 180K and the display screen 194 together form a touch screen, also known as a "touch screen".

[0145] In some embodiments, the electronic device 100 may further include one or more of buttons, a motor, and an indicator. Buttons may include a power button, volume buttons, etc. Buttons may be mechanical buttons or touch buttons. The electronic device 100 can receive button input and generate key signal inputs related to user settings and function control of the electronic device 100. The motor may generate vibration cues. The indicator may be an indicator light, which can be used to indicate charging status, battery level changes, and can also be used to indicate messages, missed calls, notifications, etc.

[0146] The SIM card interface 195 is used to connect the SIM card.

[0147] Please refer to Figure 6, which exemplarily illustrates the software structure block diagram of electronic device 100.

[0148] The electronic device provided in this application embodiment can run an operating system (OS). This operating system can be various operating systems used in the industry, such as an operating system based on OpenHarmony, like HarmonyOS; or other operating systems such as Android. TM An operating system can refer to the iOS mobile operating system; it can also refer to various open-source operating systems or their derivatives, such as Linux OS and other embedded operating systems; or it can refer to future new operating systems, such as AI operating systems based on artificial intelligence. An operating system is a set of interconnected system software programs that manage and control the operation of electronic devices, utilize and run hardware and software resources, and provide public services to organize user interactions. In electronic devices, the operating system connects downwards to the physical devices at the hardware layer and upwards to provide a runtime environment for application software.

[0149] An operating system typically includes a kernel layer, a middleware layer, and an application layer. The application layer includes applications, which can include system applications and third-party applications. The middleware layer includes a suite of software providing various services to application developers, or frameworks providing services such as databases, multimedia, and graphics, or capabilities such as distributed scheduling and system scaling. For example, the middleware layer may include a framework layer and / or a system service layer. The framework layer provides application programming interfaces (APIs) and programming frameworks for applications in the application layer. The system service layer includes the system's core capabilities, providing services to applications through the framework layer. The kernel layer is the layer between hardware and software. The kernel layer may include hardware drivers and the operating system kernel. In addition to providing hardware drivers, the kernel layer also supports functions such as memory management and system process management.

[0150] The electronic devices we use in our daily lives come in various types and forms, and are applied in a wide range of scenarios. Therefore, based on the different forms and functions of electronic devices, different application scenarios, and different user needs, the operating systems used in these devices may also differ. The basic functions implemented by the electronic device provided in this application can be implemented using a general-purpose operating system or a dedicated operating system. To more clearly illustrate the implementation of the embodiments of this application under a specific operating system, the architecture of HarmonyOS is shown below. Those skilled in the art can deduce the implementation of the embodiments of this application under other specific operating systems, such as Android™.

[0151] As shown in Figure 6, the software architecture of an electronic device can be divided into several layers. In some embodiments, from bottom to top, these layers are: kernel layer, system service layer, framework layer, and application layer. Layers communicate with each other through software interfaces. System functions can be tailored, added, or combined at the subsystem level in different device deployment scenarios, and each subsystem can also be tailored, added, or combined at the functional level.

[0152] The Kernel Abstraction Layer (KAL) provides basic kernel capabilities to upper layers by shielding the differences between multiple kernels, including but not limited to process / thread management, memory management, file system, network management, and peripheral device management.

[0153] Kernel Subsystem: Supports the selection of a suitable OS kernel for different resource-constrained devices, including but not limited to Linux kernel, HarmonyOS kernel, LiteOS (Lite Operating System), etc.

[0154] Driver Subsystem: The driver framework is the foundation for the open system hardware ecosystem, providing unified peripheral access capabilities and a framework for driver development and management. The driver framework includes: display drivers, camera drivers, audio drivers, Bluetooth drivers, sensor drivers, etc.

[0155] The system service layer comprises the core capabilities of the system, providing services to applications through the framework layer. This layer includes, but is not limited to, the following subsystems:

[0156] The system's basic capability subsystem set provides fundamental capabilities for the operation, scheduling, and migration of distributed applications across multiple devices. This set may include distributed soft bus, distributed data management, distributed task scheduling, and Ark multi-language runtime; it may also include multi-modal input subsystem, graphics subsystem, security subsystem, and AI business subsystem.

[0157] Basic software service subsystem set: provides public and general software services; the basic software service subsystem set may include event notification subsystem, telephone service subsystem, multimedia subsystem, etc.

[0158] Enhanced software service subsystem suite: Provides differentiated enhanced software services for different devices; the enhanced software service subsystem suite may include smart screen proprietary business subsystem, wearable proprietary business subsystem, IoT proprietary business subsystem, etc.

[0159] Hardware service subsystem set: Provides hardware services; the hardware service subsystem set may include location service subsystem, user IAM (Identity and Access Management) subsystem, wearable proprietary hardware service subsystem, biometric identification, IoT proprietary hardware service subsystem, etc.

[0160] Distributed task scheduling enables distributed service management (discovery, synchronization, registration, and invocation), supporting remote startup, remote invocation, remote connection, and migration of applications across devices.

[0161] Distributed data management enables data synchronization, data storage, data sharing, and data access across all scenarios and devices.

[0162] The distributed soft bus provides communication-related capabilities for seamless interconnection between multiple devices, including: WLAN service capabilities, Bluetooth service capabilities, soft bus, inter-process communication (IPC), and StarFlash communication capabilities.

[0163] Ark Multilingual Runtime is a unified compilation runtime platform designed to support the joint compilation and execution of multiple programming languages ​​and multiple chip platforms.

[0164] The framework layer provides application programming interfaces (APIs) and programming frameworks for applications in the application layer. The framework layer includes: the ArkUI framework (which provides a complete infrastructure for UI development of system applications, including UI functions such as components, layouts, animations, and interactive events, as well as a real-time interface preview tool), the user application framework, and the Ability framework (an Ability is a lightweight application; the Ability framework schedules and manages the operation and lifecycle of Abilities). Different devices may have different operating systems, and therefore support different APIs.

[0165] The HarmonyOS API is a series of open capabilities provided to support HarmonyOS application development. The HarmonyOS API can be set at the framework layer or independently of the framework layer. The HarmonyOS API includes the Audio API (audio service), Push API (push service), and Account API (account service), among others.

[0166] Applications can include system apps and extended / third-party apps. System apps can include the desktop, control bar, settings, contacts, phone, camera, etc., while extended / third-party apps can include social apps, travel apps, etc.

[0167] This application can be applied to HDR video shooting scenarios, and the electronic device 100 can acquire and display HDR video frames.

[0168] Figures 7A-7E illustrate a set of electronic devices 100 acquiring and displaying HDR video frames.

[0169] Figure 7A illustrates an exemplary user interface 710 on an electronic device 100 for displaying applications installed on the electronic device 100.

[0170] User interface 710 displays a page with application icons, which may include multiple application icons (e.g., weather app icon, calendar app icon, photo album app icon, notepad app icon, email app icon, app store app icon, settings app icon, etc.). Below these application icons, a page indicator may also be displayed to show the positional relationship between the currently displayed page and other pages. Below the page indicator are multiple application icons (e.g., camera app icon 711, browser app icon, messaging app icon, dialer app icon). The application icons remain displayed when switching pages.

[0171] It is understood that camera app icon 711 is the icon for a camera application. Camera app icon 711 can be used to trigger the launch of the camera application. A camera application is a photo / video shooting application on electronic devices such as smartphones and tablets, and this application does not limit the name of the application.

[0172] It should be noted that the user interface 710 shown in Figure 7A is merely an example provided in this application and should not be considered as a limitation thereof. That is to say, the user interface 710 may display more or less content, and this application does not limit it in this regard.

[0173] Electronic device 100 can detect user actions (such as touch / click) applied to camera application icon 711, and in response to such actions, electronic device 100 can display shooting interface 720 as shown in FIG. 7B. Shooting interface 720 can be the user interface of the default shooting mode of the camera application, on which the user can preview images and take photos. That is, the user can open the shooting interface 720 of the camera application by clicking the camera application icon 711.

[0174] It is understood that the user operations mentioned in this application may include, but are not limited to, touch, click, voice control, gesture, etc., and this application does not impose any restrictions on them.

[0175] As shown in Figure 7B, the shooting interface 720 may include a mode bar 721, shooting controls 722, a preview window 723, a playback control 724, a camera flip control 725, and a quick function area 726.

[0176] The mode bar 721 may include multiple shooting mode options, such as "Night Scene," "Portrait," "Photo," and "Video." Different shooting modes provide users with different shooting effects. Users can select any of the multiple shooting modes to shoot according to different needs. For example, "Photo" can be the default shooting mode for taking photos. "Video" is used for recording videos. "Night Scene" mode is suitable for shooting scenes with low light, such as at night. "Portrait" mode is suitable for shooting scenes where the subject is a person. Electronic device 100 may also provide more shooting modes, such as "Large Aperture," "Movie," and "Professional," which will not be listed here.

[0177] The shooting control 722 is used to trigger taking a picture. The electronic device 100 can detect whether there is a user operation on the shooting control 722, such as a click operation. When a user operation on the shooting control 722 is detected, the electronic device 100 can generate a photo-taking command. The electronic device 100 can acquire the image reported by the camera with the corresponding timestamp according to the photo-taking command, and then save it as a photo.

[0178] The preview window 723 can be used to display images reported by the camera in real time. In different shooting modes, the electronic device 100 can process the images reported by the camera to improve the image display effect. For example, in "portrait" mode, the electronic device 100 can blur the background in the image reported by the camera to highlight the portrait. Here, the preview window 723 can display the images processed by the image processing algorithms corresponding to different shooting modes in real time, allowing the user to perceive the shooting effects corresponding to different shooting modes in real time.

[0179] The playback control 724 can be used to browse thumbnails of previously taken photos / videos. When a user action is detected on the playback control 724, the electronic device 100 can also display the best photo corresponding to that thumbnail.

[0180] The camera flip control 725 can be used to monitor user operations that trigger the camera flip. The electronic device 100 can detect user operations, such as touch operations, applied to the camera flip control 725. In response to such operations, the electronic device 100 can flip the camera used for shooting, for example, switching the rear camera to the front camera, or switching the front camera to the rear camera.

[0181] The quick access area 726 may include controls 726A for the main character recording mode, 726B for HDR view, 726C for flash, 726D for color mode, and 726E for settings. The main character recording mode control 726A can be used to trigger the electronic device 100 to identify the main character among multiple people in the preview screen when enabled. The HDR view control 726B can be used to trigger the electronic device 100 to capture HDR images or HDR videos when enabled; currently, the HDR view control 726B is enabled. The flash control 726C can be used to trigger the electronic device 100 to turn the flash on or off. The color mode control 726D can be used to trigger the electronic device 100 to process the image captured by the camera using a color filter. The settings control 726E can be used to set the shooting parameters of the electronic device 100 (e.g., image size, image storage format, etc.).

[0182] The shooting interface 720 may also contain more or fewer controls, and this application embodiment does not limit this.

[0183] Optionally, if the HDR view control 726B is enabled, the multiple view controls in the mode bar 721, the shooting control 722, the playback control 724, the camera flip control 725, and the multiple view controls in the quick function area 726 are all SDR view controls. The view control corresponding to the preview window 723 is an HDR view control.

[0184] Optionally, if the HDR view control 726B is closed, the multiple view controls in the mode bar 721, the shooting control 722, the playback control 724, the camera flip control 725, and the multiple view controls in the quick function area 726 are all SDR view controls. The view control corresponding to the preview window 723 is also an SDR view control.

[0185] The electronic device 100 can detect user operations performed on the shooting mode options in the mode bar 721, and change the currently used shooting mode according to the user operations. These user operations include, for example, left / right swipes. For instance, when the device detects a left swipe (left swipe) on the mode bar 721, causing the cursor to stop at the "Video" option, the electronic device 100 can switch to "Video" mode and display the video recording interface 810 shown in FIG. 7C. The video recording interface 810 can also be referred to as a video recording preview interface.

[0186] As shown in Figure 7C, after entering the "recording" mode, the electronic device 100 can display preview HDR video frames in the preview window 723. The electronic device 100 can switch the preview interface corresponding to the original "photo taking" mode to the preview interface corresponding to the "recording" mode. Specifically, the electronic device 100 can switch the shooting control 722 of the original "photo taking" mode to the start recording control 812 of the "recording" mode. Simultaneously, the electronic device 100 can display a timestamp control 811 in the preview window 723. The timestamp control 811 is used to indicate the duration of the recorded video. Before starting video recording, the time displayed in the timestamp control 811 is 0. After starting video recording, the time displayed in the timestamp control 811 increases as the recording video duration increases.

[0187] The electronic device 100 can receive user input to the start recording control 812 and start recording HDR video.

[0188] As shown in Figure 7D, the electronic device 100 can detect user operations applied to the start recording control 812. In response to the operation, the electronic device 100 can start recording HDR video. Correspondingly, the electronic device 100 can display the video recording interface shown in Figure 7E. The electronic device 100 can switch the original start recording control 812 to the end recording control 814.

[0189] As shown in Figure 7E, the image sensor in the electronic device 100 can acquire HDR video frames and display the HDR video frames in the preview window 723 shown in Figure 7E.

[0190] In some embodiments, the electronic device 100 may receive a user's operation on the end recording control 814 to stop recording video, generate an HDR video based on HDR video frames acquired before receiving the user's operation on the end recording control 814, and save the HDR video in the gallery application.

[0191] Optionally, this application is not limited to the above-mentioned scenarios of shooting HDR images or HDR videos. It can also be applied to scenarios of playing HDR videos in the first application, viewing HDR images in a gallery application, and viewing HDR videos in a gallery application.

[0192] The following section provides a detailed explanation of how the electronic device 100 displays the HDR interface.

[0193] Figure 8 shows a schematic diagram of another electronic device 100 displaying an HDR interface.

[0194] As shown in Figure 8, the process of displaying an HDR interface by an electronic device 100 may include, but is not limited to, the following three steps, which will be described in detail in this application.

[0195] Step 1: The rendering service draws the view controls in the first interface and brightens the HDR view controls in the first interface.

[0196] Before displaying the HDR interface on the electronic device 100, the electronic device 100 can obtain the current brightness value of the display screen (e.g., a first brightness value) and the maximum brightness value of the HDR view control in the HDR interface. In order to make the brightness of the display screen of the electronic device 100 reach the maximum brightness of the HDR view control in the HDR interface, the electronic device 100 can determine a first brightness enhancement value of the display screen based on the first brightness value of the display screen and the maximum brightness of the pixels of the view control in the HDR interface. The first brightness enhancement value is used to adjust the brightness value of the display screen to the maximum brightness of the HDR view control in the HDR interface.

[0197] In some embodiments, the first interface is an HDR interface, which may include multiple view controls, including SDR view controls and HDR view controls. After determining the first brightness enhancement value of the display screen, the electronic device 100 can determine a first grayscale discount factor based on the first brightness enhancement value. The first grayscale discount factor is related to the first brightness enhancement value. The first grayscale discount factor is greater than 0 and less than or equal to 1. The electronic device 100 can use the first grayscale discount factor to brighten the HDR view control without needing to brighten the SDR view control.

[0198] As shown in Figure 8, the first interface may include, but is not limited to, view control 1, view control 2, view control 3, and view control 4. View control 1, view control 2, and view control 3 may be SDR view controls. View control 4 may be an HDR view control.

[0199] The first application's process can obtain properties of multiple view controls in the first interface. These properties can include, but are not limited to, the view control's shape, size, position, color, transparency, and preset brightness value. Optionally, the preset brightness value in the view control's properties can refer to the preset brightness value of multiple pixels within the view control.

[0200] The first application process then sends the properties of multiple view controls in the first interface to the rendering service. The rendering service can then draw the multiple view controls in the first interface based on their properties, thus obtaining the second interface. In some embodiments, drawing the second interface can also be described as drawing the multiple view controls within the second interface.

[0201] As shown in Figure 8, the rendering service can obtain the properties of view control 1, view control 2, view control 3, and view control 4.

[0202] When the rendering service draws view control 1, view control 2, and view control 3, the rendering service does not need to perform any highlighting on view control 1, view control 2, and view control 3, and saves the drawn view control 1, view control 2, and view control 3 in the first buffer.

[0203] When the rendering service draws view control 4, it can brighten view control 4 based on the first grayscale discount factor. For example, when drawing view control 4, the rendering service can divide the brightness value of view control 4 by the first grayscale discount factor to obtain view control 4. The rendering service then saves the drawn view control 4 in the first buffer.

[0204] Optionally, the brightness value of view control 4 can be divided by the first grayscale discount factor. This can refer to dividing the preset brightness values ​​of multiple pixels in the properties of view control 4 by the first grayscale discount factor to obtain the processed properties of view control 4. The rendering service then draws view control 4 based on the processed properties of view control 4.

[0205] After obtaining the drawn view control 1, view control 2, view control 3 and view control 4, the rendering service can obtain the second interface, which is stored in the first buffer.

[0206] It should be noted that the first interface may also include other SDR view controls. This application only uses view control 1, view control 2, view control 3, and view control 4 as examples for illustration, and does not constitute a limitation.

[0207] In some embodiments, before drawing the SDR view control, the rendering service can request a third buffer. The rendering service can draw the SDR view control within the third buffer, which is used to cache the SDR view control. For example, the rendering service can save view control 1 in the third buffer. The rendering service then retrieves view control 1 from the third buffer and saves it in the first buffer. When drawing view control 1, the rendering service does not adjust the brightness value of view control 1 based on the first grayscale discount factor. When drawing other HDR or SDR interfaces, if view control 1 also exists in other HDR or SDR interfaces, the rendering service can reuse the view control 1 saved in the third buffer without having to draw view control 1 again. This can save the power consumption of the electronic device 100 and speed up the display time of other HDR or SDR interfaces by the electronic device 100.

[0208] In other examples, in step one, the process of the first application may also draw multiple view controls in the first interface based on the properties of multiple view controls in the first interface to obtain a second interface, and save the second interface in the first buffer.

[0209] For example, the process of the first application can draw view control 1, view control 2, and view control 3 in the first buffer without highlighting view control 1, view control 2, and view control 3, and save the drawn view control 1, view control 2, and view control 3 in the first buffer.

[0210] The process of the first application can draw view control 4 in the first buffer and brighten view control 4 based on the first grayscale discount factor, for example, by dividing the brightness value of view control 4 by the first grayscale discount factor to obtain view control 4. The process of the first application then saves view control 4 in the first buffer.

[0211] After obtaining the drawn view control 1, view control 2, view control 3 and view control 4, the first application can obtain the second interface, which is stored in the first buffer.

[0212] Step 2: The rendering service dims the second interface to obtain the first interface.

[0213] After the second interface is drawn, that is, after the multiple view controls in the second interface are drawn, the rendering service can darken the second interface based on the first grayscale discount factor to obtain the first interface, and save the first interface in the second buffer. The brightness value of the first interface is less than the brightness value of the second interface. For example, the rendering service can multiply the brightness value of the second interface by the first grayscale discount factor to obtain the first interface.

[0214] In this way, after the electronic device 100 brightens the HDR view control based on the first grayscale discount factor, the electronic device 100 then darkens the second interface based on the first grayscale discount factor to obtain the first interface, which can make the brightness value of the HDR view control in the first interface the same as the preset brightness value of the HDR view control.

[0215] After the electronic device 100 darkens the second interface based on the first grayscale discount factor to obtain the first interface, the brightness value of the SDR view control in the first interface can be reduced.

[0216] Figure 9 shows a schematic diagram of an electronic device 100 adjusting the brightness values ​​of the HDR view control and the SDR view control.

[0217] Figure 9(a) shows a schematic diagram of an electronic device 100 adjusting the brightness value of an SDR view control.

[0218] In some embodiments, the brightness value of a view control can be determined by the RGBA values ​​of the pixels in the view control.

[0219] The RGBA values ​​of a pixel can be represented by the values ​​of channels R, G, B, and A. Channel R represents the red value, and its value ranges from 0 to 255. Channel G represents the green value, and its value ranges from 0 to 255. Channel B represents the blue value, and its value ranges from 0 to 255. Channel A represents the transparency, and its value ranges from 0 to 1.

[0220] For example, RGBA(255, 0, 0, 0.5) represents a semi-transparent red. In some embodiments, the values ​​of channel R, channel G, and channel B can also be normalized, for example, by dividing the original values ​​of channel R, channel G, and channel B by 255 to obtain the normalized RGBA value, such as RGBA(1, 0, 0, 0.5), which also represents a semi-transparent red.

[0221] It should be noted that the value of channel A represents transparency, and normalization of the value of channel A is not required.

[0222] This application uses normalized RGBA values ​​to represent the brightness values ​​of pixels in a view control for illustrative purposes. The maximum value of the normalized RGBA value is (1, 1, 1, 1), and the minimum value is (0, 0, 0, 0). In other words, the value of each channel in the RGBA value is greater than or equal to 0 and less than or equal to 1.

[0223] The brightness value of a pixel in view control 1 shown in Figure 9(a) can be represented by RGBA(0.56, 0.32, 0.18, 1.00).

[0224] In step one shown in Figure 8, the process of the first application does not brighten the SDR view control based on the first grayscale discount factor, and the brightness value of the SDR view control in the second interface does not change.

[0225] In step two shown in Figure 8, after the rendering process draws the second interface, the rendering process can darken the second interface based on the first grayscale discount factor to obtain the first interface. The brightness value of the SDR view control in the first interface is less than the preset brightness value of the SDR view control.

[0226] For example, the rendering process can multiply the brightness value of the second interface by the first grayscale discount factor to obtain the first interface, which is equivalent to multiplying the brightness value of each pixel in the second interface by the first grayscale discount factor.

[0227] As shown in Figure 9(a), the rendering process can multiply the RGBA values ​​of the pixels in the view control 1 in the second interface with the first grayscale discount factor. That is, the values ​​of channel R, channel G, and channel B in the RGBA values ​​of the pixels in the view control 1 are multiplied by the first grayscale discount factor to obtain RGBA(0.48, 0.27, 0.15, 1.00).

[0228] It should be noted that the value of channel A in the RGBA value represents the transparency and does not need to be multiplied by the first grayscale discount factor.

[0229] As can be seen from Figure 9(a), after obtaining the first interface, the brightness value of the view control 1 in the first interface will become darker.

[0230] Figure 9(b) shows a schematic diagram of an electronic device 100 adjusting the brightness value of an HDR view control.

[0231] As shown in Figure 9(b), the brightness value of the pixels in view control 4 can be represented by RGBA(0.06, 1.00, 0.12, 1.00). In step one shown in Figure 8, the rendering service can brighten the HDR view control based on the first grayscale discount factor, and the brightness of the HDR view control will increase.

[0232] As shown in Figure 9(b), the rendering service can divide the RGBA value of the pixel in the view control 4 by the first grayscale discount factor, that is, divide the value of channel R, channel G and channel B of the RGBA value of the pixel in the view control 4 by the first grayscale discount factor to obtain RGBA(0.07, 1.16, 0.14, 1.00).

[0233] It should be noted that the value of channel A in the RGBA value represents the transparency, and it is not necessary to divide it by the first grayscale discount factor.

[0234] In step two shown in Figure 8, after the rendering process draws the second interface, the rendering process darkens the second interface based on the first grayscale discount factor, and the brightness of the HDR view control in the second interface will become darker.

[0235] As shown in Figure 9(b), the rendering process can multiply the RGBA values ​​of the pixels in the view control 4 in the second interface with the first grayscale discount factor. That is, the values ​​of channel R, channel G, and channel B in the RGBA values ​​of the pixels in the view control 4 are multiplied by the first grayscale discount factor to obtain RGBA(0.06, 1.00, 0.12, 1.00).

[0236] As can be seen from Figure 9(b), after obtaining the first interface, the brightness value of the HDR view control in the first interface remains unchanged.

[0237] In some embodiments, in step one shown in Figure 8, the process of the first application needs to divide the RGBA value of the pixel in the HDR view control by a first grayscale discount factor. The first grayscale discount factor is less than 1, which may cause the RGBA value of the pixel in the HDR view control to be greater than 1. Therefore, the first buffer is a buffer capable of storing RGBA values ​​greater than 1. For example, the first buffer can be a buffer with a bit depth of 32 bits or more. Exemplarily, the first buffer can be a 34-bit, 36-bit, 38-bit, 40-bit, 44-bit, 48-bit, 52-bit, 56-bit, 60-bit, 64-bit, or 128-bit buffer, or a buffer of other bit depths.

[0238] In some embodiments, if the electronic device 100 does not have a specific requirement for the number of bits in the buffer storing the first interface to be displayed, the second buffer and the first buffer can be the same buffer. For example, both the first buffer and the second buffer can be 34-bit, 36-bit, 38-bit, 40-bit, 44-bit, 48-bit, 52-bit, 56-bit, 60-bit, 64-bit, or 128-bit buffers or buffers of other bit lengths.

[0239] In some examples, for a pixel of an HDR view control, in the first buffer, the values ​​of channel R, channel G, and channel B in its RGBA value can be stored in 11 bits, 12 bits, 13 bits, 14 bits, 15 bits, or 16 bits or higher, respectively; and the value of channel A in its RGBA value can be stored in 1 bit, 2 bits, 8 bits, 10 bits, or 16 bits, etc.

[0240] In other examples, for a pixel of an HDR view control, its A value may not be stored in the first buffer.

[0241] In some embodiments, if the electronic device 100 has specific requirements for the number of bits of the buffer storing the first interface to be displayed, for example, the number of bits of the buffer storing the first interface to be displayed is 32-bit buffer, and if the first buffer is 64-bit buffer, then after the rendering process obtains the first interface based on the second interface and the first grayscale discount factor in the first buffer, the rendering process can store the first interface in the second buffer, which is a 32-bit buffer, and the second buffer is different from the first buffer.

[0242] In other examples, the second buffer can be a 34-bit buffer, a 36-bit buffer, a 38-bit, 40-bit, 44-bit, 48-bit, 52-bit, 56-bit, 60-bit, 64-bit buffer, a 128-bit buffer, or a buffer of other bit lengths.

[0243] Step 3: The display service adjusts the screen brightness based on the first brightness boost value, and obtains and displays the first interface.

[0244] After the rendering service stores the first interface in the second buffer, the display service can adjust the brightness of the display screen to the second brightness value, which is greater than the first brightness value.

[0245] Optionally, the display service can adjust the brightness of the display screen to a second brightness value based on a first brightness increase value, thereby increasing the brightness of the display screen to the maximum brightness value of the view controls in the first interface. Afterward, the display service can acquire and display the first interface.

[0246] After the electronic device 100 processes the second interface based on the first grayscale discount factor, the electronic device 100 then adjusts the brightness of the display screen based on the first brightness enhancement value, so that the brightness value of the SDR view control remains unchanged, and the electronic device 100 can also display the maximum brightness value of the HDR view control in the HDR interface.

[0247] Optionally, the HDR view control may include multiple pixels, each with a different brightness value. Before displaying the first interface, the electronic device 100 can obtain preset brightness values ​​for multiple pixels in the HDR view control. As described in Figure 8, the brightness values ​​of the multiple pixels in the HDR view control remain unchanged after obtaining the first interface. In step three shown in Figure 8, the electronic device 100 can adjust the brightness of the display screen based on the first brightness boost value, thus increasing the brightness values ​​of all pixels in the HDR view control. To enable the electronic device 100 to display the preset brightness values ​​of the multiple pixels in the HDR view control, the electronic device 100 can adjust the brightness values ​​of the multiple pixels in the HDR view control based on the preset brightness values ​​and the first brightness boost value, so that the brightness values ​​of different pixels in the HDR view control displayed on the first interface are different, and the preset brightness values ​​of different pixels in the HDR view control on the first interface can be displayed.

[0248] For example, view control 4 includes a first pixel and a second pixel. The preset brightness value of the first pixel is A, the preset brightness value of the second pixel is B, and the maximum brightness value of the HDR view control in the HDR interface is B. Therefore, for the second pixel, electronic device 100 does not need to adjust its brightness value. For the first pixel, electronic device 100 can reduce its brightness value based on its preset brightness value and a first brightness enhancement value. When displaying the first interface, electronic device 100 can increase the brightness of the display screen based on the first brightness enhancement value; the two values ​​cancel each other out, and electronic device 100 can display the preset brightness value of the first pixel.

[0249] Figure 10 shows a schematic flowchart of a method for displaying an HDR interface on an electronic device 100.

[0250] As shown in Figure 10, the electronic device 100 includes, but is not limited to, a first application, a rendering service, a display service, and hardware.

[0251] The method shown in Figure 10 may include, but is not limited to, the following steps:

[0252] S1001. The first application receives the first operation and obtains the properties of the first view control and the second view control in the first interface. The first view control is an HDR view control and the second view control is an SDR view control.

[0253] The properties of the first view control may include, but are not limited to, the shape, size, position, color, transparency, and preset brightness value of the first view control.

[0254] The properties of the second view control may include, but are not limited to, the shape, size, position, color, transparency, and preset brightness value of the second view control.

[0255] Optionally, the preset brightness value in the properties of the first view control can refer to the preset brightness values ​​of multiple pixels in the first view control. Similarly, the preset brightness value in the properties of the second view control can refer to the preset brightness values ​​of multiple pixels in the second view control.

[0256] For example, the first view control is an HDR view control, and the second view control is an SDR view control.

[0257] It should be noted that the first interface may include other SDR view controls, not just the first view control and the second view control. This application only uses the example of the first view control being an HDR view control and the second view control being an SDR view control for illustration.

[0258] For example, the first operation can be any one of the following: playing an HDR video in a first application, viewing an HDR image in a gallery application, viewing an HDR video in a gallery application, taking an HDR image in a camera application, or taking an HDR video in a camera application.

[0259] S1002, The first application sends the properties of the first view control and the properties of the second view control to the rendering service.

[0260] After obtaining the properties of the first view control and the second view control, the first application can send the properties of the first view control and the second view control to the rendering service. The properties of the first view control and the second view control are used by the rendering service to draw the second interface, that is, to draw the first view control and the second view control in the second interface.

[0261] In some embodiments, if the first view control and the second view control are drawn by the first application, S1002 may not be executed.

[0262] S1003, Rendering service requests the first buffer.

[0263] S1004, Rendering service requests a second buffer.

[0264] The first buffer stores the view controls drawn by the rendering service. The second buffer stores the user interface drawn by the rendering service.

[0265] In some embodiments, S1004 may not be executed, and the rendering service may store the drawn user interface in the first buffer. For details, please refer to the description in S1016.

[0266] S1005, Rendering service requests third buffer.

[0267] The third buffer is used to cache SDR view controls drawn by the rendering service. This allows the electronic device 100 to reuse the SDR view control stored in the third buffer when drawing other HDR or SDR interfaces, if the same SDR view control also exists in other HDR or SDR interfaces. This eliminates the need to draw the SDR view control again, saving power consumption and speeding up the display time of other HDR or SDR interfaces.

[0268] In some embodiments, S1005 may not be executed.

[0269] In other examples, if multiple view controls in the second interface are drawn by the process of the first application, the first buffer, second buffer, and third buffer may also be requested by the first application. Figure 10 illustrates an embodiment where multiple view controls in the first interface are drawn by a rendering service.

[0270] S1006. The first application obtains the first brightness value of the display screen and the maximum brightness value of the view control in the first interface.

[0271] S1007. The first application confirms the first brightness enhancement value of the display screen based on the first brightness value of the display screen and the maximum brightness value of the HDR view control in the first interface.

[0272] The first application can obtain the current brightness value of the display screen (e.g., the first brightness value) and the maximum brightness value of the view control in the first interface, and determine the first brightness enhancement value of the display screen based on the first brightness value of the display screen and the maximum brightness value of the HDR view control in the first interface.

[0273] For example, the first brightness value of the display screen could be 250 candela per square meter (cd / m²). 2 The maximum brightness value of the HDR view control in the first interface can be 465 cd / m². 2 The first brightness increase value of the display screen is 1.86.

[0274] S1008, The first application sends the first brightness enhancement value to the rendering service.

[0275] After obtaining the first brightness boost value, the first application can send the first brightness boost value to the rendering service.

[0276] S1009, The first application sends the first brightness increase value to the display service.

[0277] S1010, Display Service adjusts the brightness of the display screen based on the first brightness boost value.

[0278] After obtaining the first brightness increase value, the first application can send the first brightness increase value to the display service. Upon receiving the first brightness increase value sent by the first application, the display service can adjust the brightness of the display screen based on the first brightness increase value.

[0279] For example, the display service can adjust the brightness of the display screen based on a first brightness value and an increase in brightness, such as adjusting the brightness to a second brightness value that is greater than the first brightness value. In some embodiments, the second brightness value may be the maximum brightness value of the HDR view control in the first interface.

[0280] For example, the first brightness value of the display screen can be 250 cd / m². 2 The first brightness enhancement value can be 1.16, and the second brightness value can be 290 cd / m². 2 .

[0281] Optionally, S1008 can be omitted, and S1006-S1007 can also be executed by the rendering service. S1009 can also be executed by the rendering service.

[0282] Optionally, S1006-S1007 and S1009-S1010 are not limited to being executed after S1005. S1006-S1007 and S1009-S1010 can also be executed before S1018, before any step after S1001, or simultaneously.

[0283] Optionally, S1006-S1007 and S1009-S1010 can also be executed simultaneously with S1001.

[0284] S1011. The rendering service determines the first grayscale discount coefficient based on the first brightness enhancement value.

[0285] After obtaining the first brightness enhancement value, the rendering service can determine the first grayscale discount factor based on the first brightness enhancement value.

[0286] Optionally, the first grayscale discount factor can be obtained based on the first brightness enhancement value. The first grayscale discount factor and the first brightness enhancement value can be inversely proportional; the larger the first brightness enhancement value, the smaller the value of the first grayscale discount factor, and vice versa. For example, the first grayscale discount factor can be the reciprocal of the first brightness enhancement value. The first grayscale discount factor can be a number greater than 0 and less than or equal to 1.

[0287] For example, the first brightness enhancement value is 1.16, and the first grayscale discount factor is also 0.86.

[0288] Optionally, S1011 can also be executed by the first application. The first application then sends the first grayscale discount factor to the rendering service.

[0289] S1012. The rendering service draws the first view control within the first buffer based on the first grayscale discount factor and the properties of the first view control.

[0290] After obtaining the first grayscale discount factor, when the rendering service draws the first view control based on its properties, it can brighten the first view control based on the first grayscale discount factor. For example, when drawing the first view control, the rendering service can divide the brightness value of the first view control by the first grayscale discount factor to obtain the first view control. The rendering service then saves the drawn first view control in the first buffer.

[0291] Optionally, dividing the brightness value of the first view control by the first grayscale discount factor can refer to dividing the preset brightness values ​​of multiple pixels in the properties of the first view control by the first grayscale discount factor to obtain the processed properties of the first view control. The rendering service then draws the first view control based on the processed properties of the first view control.

[0292] In some embodiments, the brightness value of a view control can be represented by the RGBA values ​​of the pixels in the view control.

[0293] In S1012, the rendering service needs to divide the RGBA value of the pixel in the HDR view control by the first grayscale discount factor. Since the first grayscale discount factor is less than 1, it may cause the RGBA value of the pixel in the HDR view control to be greater than 1. Therefore, the first buffer must be able to store RGBA values ​​greater than 1. For example, the first buffer can be a 34-bit, 36-bit, 38-bit, 40-bit, 44-bit, 48-bit, 52-bit, 56-bit, 60-bit, 64-bit, or 128-bit buffer, or a buffer of other bit lengths.

[0294] For example, reference can be made to the description in the embodiment of FIG9.

[0295] S1013. The rendering service draws the second view control within the third buffer based on the properties of the second view control.

[0296] S1014. The rendering service retrieves the second view control from the third buffer and saves it in the first buffer to obtain the second interface.

[0297] When the rendering service draws the second view control, it does not need to brighten the second view control based on the first grayscale discount factor. It only needs to draw the second view control according to its properties and save the drawn second view control in a third buffer, which is different from the first buffer. In this way, when the electronic device 100 draws other HDR or SDR interfaces, if the other HDR or SDR interfaces also contain second view controls, the electronic device 100 can reuse the second view controls in the third buffer without redrawing them.

[0298] After the rendering service saves the second view control in the third buffer, the rendering service can retrieve the second view control from the third buffer and save the second view control in the first buffer.

[0299] Optionally, S1013 can be omitted, and the rendering service can directly save the drawn second view control in the first buffer.

[0300] The rendering service did not brighten the second view control based on the first grayscale discount factor, so the brightness value of the second view control stored in the third buffer or the first buffer did not change.

[0301] After the first view control and the second view control are drawn, the rendering service can obtain the second interface, which is also stored in the first buffer.

[0302] S1015. The rendering service processes the second interface within the first buffer based on the first grayscale discount factor to obtain the first interface.

[0303] The rendering service can darken the second interface within the first buffer based on a first grayscale discount factor to obtain the first interface, where the brightness value of the first interface is less than that of the second interface. For example, the rendering service can multiply the brightness value of the second interface by the first grayscale discount factor to obtain the first interface.

[0304] The second interface may include multiple pixels. The brightness value of the second interface multiplied by the first grayscale discount factor can refer to multiplying the brightness values ​​of multiple pixels in the second interface by the first grayscale discount factor respectively.

[0305] In this way, after the electronic device 100 brightens the first view control based on the first grayscale discount factor, the electronic device 100 then darkens the second interface based on the first grayscale discount factor to obtain the first interface, which can make the brightness value of the first view control in the first interface the same as the preset brightness value of the first view control.

[0306] After the electronic device 100 darkens the second interface based on the first grayscale discount coefficient to obtain the first interface, the brightness value of the SDR view control in the first interface can be reduced, and the brightness value of the SDR view control in the first interface is less than the preset brightness value of the SDR view control.

[0307] S1016, The rendering service saves the first interface in the second buffer.

[0308] After obtaining the first interface, the rendering service can save the first interface in the second buffer.

[0309] In some embodiments, the second buffer and the first buffer may be the same. If the electronic device 100 does not have a specific requirement for the bit depth of the buffer storing the first interface to be displayed, then the second buffer and the first buffer may be the same buffer. For example, both the first buffer and the second buffer may be 34-bit, 36-bit, 38-bit, 40-bit, 44-bit, 48-bit, 52-bit, 56-bit, 60-bit, 64-bit, or 128-bit buffers, or buffers of other bit depths.

[0310] In some embodiments, the second buffer and the first buffer may be different. If the electronic device 100 has specific requirements for the bit width of the buffer storing the first interface to be displayed, for example, the buffer storing the first interface to be displayed is a 32-bit buffer, and if the first buffer is a 64-bit buffer, then after the rendering process obtains the first interface based on the second interface and the first grayscale discount factor in the first buffer, the rendering process can store the first interface in the second buffer, which is a 32-bit buffer, and the second buffer is different from the first buffer.

[0311] In other examples, the second buffer can be a 34-bit buffer, a 36-bit buffer, a 38-bit, 40-bit, 44-bit, 48-bit, 52-bit, 56-bit, 60-bit, 64-bit buffer, a 128-bit buffer, or a buffer of other bit lengths.

[0312] S1017, The display service retrieves the first screen from the second buffer.

[0313] S1018, Display Service displays the first interface.

[0314] After the rendering service saves the first interface in the second buffer, the display service can retrieve the first interface from the second buffer and display the first interface.

[0315] In S1009-S1010, the electronic device 100 can increase the brightness of the display screen based on the first brightness enhancement value. In S1015, after the electronic device 100 processes the second interface based on the first grayscale discount coefficient, the two cancel each other out, so that the brightness value of the second view control displayed by the electronic device 100 is the same as the preset brightness value of the second view control.

[0316] Optionally, the first view control may include multiple pixels, each with a different brightness value. Before displaying the first interface, the electronic device 100 can obtain preset brightness values ​​for the multiple pixels in the first view control. As described in S1015, the brightness values ​​of the multiple pixels in the first view control do not change after obtaining the first interface. In S1009-S1010, the electronic device 100 can adjust the brightness of the display screen based on a first brightness boost value. Therefore, when displaying the first interface, the brightness values ​​of the multiple pixels in the first view control will all increase. To enable the electronic device 100 to display the preset brightness values ​​of the multiple pixels in the first view control, before displaying the first interface, the electronic device 100 can adjust the brightness values ​​of the multiple pixels in the first view control based on the preset brightness values ​​and the first brightness boost value. This ensures that when displaying the first interface, the brightness values ​​of different pixels in the first view control displayed by the electronic device 100 are different, and the preset brightness values ​​of different pixels in the first view control in the first interface can be displayed.

[0317] For example, a first view control includes a first pixel and a second pixel. The preset brightness value of the first pixel is A, the preset brightness value of the second pixel is B, and the maximum brightness value of the pixels in the first view control is B. Therefore, for the second pixel, the electronic device 100 does not need to adjust its brightness value. For the first pixel, the electronic device 100 can reduce its brightness value based on its preset brightness value and a first brightness enhancement value. When displaying the first interface, the electronic device 100 can increase the brightness of the display screen based on the first brightness enhancement value; the two values ​​cancel each other out, and the electronic device 100 can display the preset brightness value of the first pixel.

[0318] Using the method shown in Figure 10, in some scenarios, the number of SDR view controls in the HDR interface exceeds the number of HDR view controls. The electronic device 100 only needs to brighten the HDR view controls in the HDR interface, without needing to brighten the SDR view controls. After obtaining the second interface, the electronic device 100 then darkens the second interface to obtain the first interface. This method maintains the brightness values ​​of the HDR view controls in the first interface while reducing the brightness values ​​of the SDR view controls. This not only reduces the workload of the electronic device 100 in drawing the HDR interface to be displayed but also speeds up the display of the HDR interface.

[0319] It should be noted that the various method steps in Figure 10 are only used to explain this application, and this application does not limit the execution order of the various method steps in Figure 10.

[0320] In some embodiments, when drawing the first interface, the electronic device 100 can save the SDR view controls (second view controls) in the first interface in a third buffer. After the electronic device 100 displays the first interface, when drawing the third interface, if the third interface also includes the second view controls, the electronic device 100 can directly obtain the second view controls from the third buffer to draw the third interface, without having to draw the second view controls again. This can save the power consumption of the electronic device 100 and speed up the display of the third interface.

[0321] Figure 11 shows a schematic diagram of another electronic device 100 displaying an HDR interface.

[0322] As shown in Figure 11, the process of displaying an HDR interface by an electronic device 100 may include, but is not limited to, the following three steps, which will be described in detail in this application.

[0323] Step 1: The rendering service draws the view controls in the third interface and brightens the HDR view controls in the third interface.

[0324] Step one in Figure 11 is similar to step one in Figure 8. The rendering service can determine the second brightness enhancement value and the second grayscale discount coefficient of the display screen. The implementation of how the rendering service determines the second brightness enhancement value and the second grayscale discount coefficient of the display screen is similar to how the rendering service determines the first brightness enhancement value and the first grayscale discount coefficient of the display screen. Please refer to the description in the embodiments of Figure 8 or Figure 10, which will not be repeated here.

[0325] Optionally, the second application can be the same as or different from the first application.

[0326] The difference between step one in Figure 11 and step one in Figure 8 is that, in step one of Figure 11, if the third interface also includes view control 1, the rendering service does not need to redraw view control 1 and can reuse the view control 1 stored in the third buffer. That is, the rendering service can obtain the drawn view control 1 from the third buffer and save view control 1 to the fourth buffer.

[0327] Optionally, the fourth buffer and the first buffer can be the same or different.

[0328] When the rendering service draws view control 5 and view control 6, the rendering service does not need to perform any highlighting on view control 5 and view control 6, and saves the drawn view control 5 and view control 6 in the first buffer.

[0329] When the rendering service draws view control 7, it can brighten view control 7 based on the second grayscale discount factor, for example, by dividing the brightness value of view control 7 by the first grayscale discount factor. The rendering service then saves the drawn view control 7 in the fourth buffer.

[0330] After obtaining the drawn view controls 1, 5, 6, and 7, the rendering service can obtain the fourth interface, which is stored in the fourth buffer.

[0331] It should be noted that the third interface may include other SDR view controls. This application only uses view control 1, view control 5, view control 6, and view control 7 as examples for illustration, and does not constitute a limitation.

[0332] Step 2: The rendering service darkens the fourth interface to obtain the third interface.

[0333] Step two in Figure 11 is similar to step two in Figure 8, except that in Figure 11, after drawing the fourth interface, the rendering service can darken the fourth interface based on the second grayscale discount factor to obtain the third interface. For example, the rendering service can multiply the brightness value of the fourth interface by the second grayscale discount factor to obtain the third interface, and save the third interface in the fifth buffer. For details, please refer to the description in step two of Figure 8; this application will not repeat it here.

[0334] Optionally, the fifth buffer and the first buffer can be the same or different.

[0335] Step 3: The display service adjusts the screen brightness based on the second brightness boost value, and obtains and displays the third interface.

[0336] After the rendering service stores the third interface in the fifth buffer, the display service can adjust the brightness of the display screen to the third brightness value.

[0337] Optionally, the third brightness value and the second brightness value can be the same or different. If the third brightness value and the second brightness value are different, the third brightness value can be greater than the second brightness value, or the third brightness value can be less than the second brightness value.

[0338] Optionally, the display service can adjust the screen brightness based on the second brightness boost value, increasing the screen brightness to the maximum brightness value of the view controls in the third interface. Afterward, the display service can acquire and display the third interface.

[0339] For details, please refer to the description in step three of Figure 8, which will not be repeated here.

[0340] Figure 12 shows a schematic diagram of a method for displaying an HDR interface on another electronic device 100.

[0341] As shown in Figure 12, the electronic device 100 includes, but is not limited to, a second application, a rendering service, a display service, and hardware. The second application and the first application may be the same or different.

[0342] The method shown in Figure 12 may include, but is not limited to, the following steps:

[0343] S1201, Electronic device 100 displays the first interface.

[0344] S1202. The second application obtains the properties of the third view control and the second view control in the third interface. The third view control is an HDR view control, and the second view control is an SDR view control.

[0345] S1203, The second application sends the properties of the first view control and the properties of the second view control to the rendering service.

[0346] After the electronic device 100 displays the first interface and before the third interface is displayed, the second application can draw a third view control in the third interface, which can be an HDR view control.

[0347] Optionally, the second application can obtain the properties of the third view control and the second view control in the third interface after receiving the user's second operation. Alternatively, it can automatically obtain the properties of the third view control and the second view control in the third interface. The properties of the three view controls and the second view controls are used to draw the third interface.

[0348] The second application can be the same as or different from the first application.

[0349] S1204. The second application obtains the second brightness value of the display screen and the maximum brightness value of the view control in the third interface.

[0350] S1205, The second application confirms the second brightness enhancement value of the display screen based on the second brightness value of the display screen and the maximum brightness value of the pixels in the third view control.

[0351] S1206, The second application sends the second brightness enhancement value to the rendering service.

[0352] S1207, The second application sends the second brightness enhancement value to the display service.

[0353] S1208, The display service adjusts the brightness of the display screen based on the second brightness enhancement value.

[0354] Optionally, the second brightness enhancement value and the first brightness enhancement value can be the same or different.

[0355] For a description of S1204-S1208, please refer to the introduction of S1006-S1010, which will not be repeated here.

[0356] S1209. The rendering service determines the second grayscale discount coefficient based on the second brightness enhancement value.

[0357] Optionally, the discount factor for the second grayscale level can be the same as or different from that for the first grayscale level.

[0358] For a description of S1209, please refer to the introduction of S1011; this application will not repeat it here.

[0359] S1210. The rendering service draws the third view control within the fourth buffer based on the second grayscale discount factor and the properties of the third view control.

[0360] For a description of S1210, please refer to the introduction of S1012; this application will not repeat it here.

[0361] Optionally, the fourth buffer and the first buffer can be the same or different.

[0362] S1211, The rendering service retrieves the second view control from the third buffer and saves it in the fourth buffer to obtain the fourth interface.

[0363] When drawing the third interface, if the third interface also includes the second view control, the rendering service can directly obtain the already drawn second view control from the third buffer, without having to draw the second view control again. This can save the power consumption of the electronic device 100 and speed up the drawing speed of the electronic device 100 of the fourth interface.

[0364] After obtaining the second view control and drawing the third view control, the fourth interface can be obtained and saved in the fourth buffer.

[0365] S1212, The rendering service processes the fourth interface within the fourth buffer based on the second grayscale discount factor to obtain the third interface.

[0366] S1213, The rendering service saves the third interface in the fifth buffer.

[0367] Optionally, the fifth buffer and the second buffer can be the same or different.

[0368] Optionally, the fifth buffer and the fourth buffer can be the same or different.

[0369] S1214, The display service retrieves the third interface from the fifth buffer.

[0370] S1215, Display Service displays the third interface.

[0371] For the description of S1211-S1215, please refer to the introduction of S1014-S1018, which will not be repeated here.

[0372] As described in the embodiment of Figure 10, when drawing the first interface, the electronic device 100 can save the SDR view control (second view control) in the first interface in the third buffer. After the electronic device 100 displays the first interface, when drawing the third interface, if the third interface also includes the second view control, the electronic device 100 can directly obtain the second view control from the third buffer to draw the third interface, without having to draw the second view control again. This can save the power consumption of the electronic device 100 and speed up the display of the third interface.

[0373] It should be noted that the various method steps in Figure 12 are only used to explain this application, and this application does not limit the execution order of the various method steps in Figure 12.

[0374] Figure 13 shows a flowchart of a display method.

[0375] S1301, The display screen of the electronic device displays the user interface at a first brightness value.

[0376] S1302. The electronic device receives a first operation on the user interface and draws a second interface; wherein, the second interface includes a first view control and a second view control, the first view control is a high dynamic range (HDR) view control, the second view control is a non-HDR view control, the first view control is a view control processed based on a first brightness value and the maximum brightness value of the pixels in the first view control, and the brightness value of the first view control in the second interface is greater than the preset brightness value of the first view control.

[0377] S1303. The electronic device processes the second interface based on the first brightness value and the maximum brightness value of the pixels in the first view control to obtain the first interface, wherein the brightness value of the first interface is less than the brightness value of the second interface.

[0378] S1304. The display screen of the electronic device displays the first interface with a second brightness value; wherein the second brightness value is greater than the first brightness value.

[0379] Optionally, the non-HDR view control can also be referred to as the SDR view control.

[0380] Optionally, and not limited to, second view controls, the second interface may also include other non-HDR view controls.

[0381] Optionally, the display method provided in this application is applicable not only to scenarios where the display of an SDR interface is switched to the display of an HDR interface, but also to scenarios where the display of an HDR interface is switched to the display of an HDR interface.

[0382] The first HDR interface switches to display the second HDR interface scene. For example, switching the HDR photo being viewed.

[0383] Optionally, the first operation could be taking an HDR image, taking an HDR video, playing an HDR video in a first application, viewing an HDR image in a gallery application, or viewing an HDR video in a gallery application, etc.

[0384] In some embodiments, the second interface and the first interface may also be referred to as the HDR interface.

[0385] In some scenarios, the number of SDR view controls in the HDR interface exceeds the number of HDR view controls. In such cases, the electronic device only needs to brighten the HDR view controls within the HDR interface, without needing to brighten the SDR view controls. After obtaining the second interface, the electronic device 100 then darkens the second interface to obtain the first interface. This method maintains the brightness values ​​of the HDR view controls in the first interface while simultaneously reducing the brightness values ​​of the SDR view controls. This not only reduces the workload of the electronic device in drawing the HDR interface to be displayed but also speeds up the display of the HDR interface by the electronic device 100.

[0386] In one possible implementation, the second view control is a view control that has not been processed based on the first brightness value and the maximum brightness value of the pixels in the first view control, and the brightness value of the second view control in the second interface is equal to the preset brightness value of the second view control.

[0387] In one possible implementation, the second brightness value is equal to the maximum brightness value of the pixel in the first view control.

[0388] Optionally, the electronic device may increase the brightness value of the display screen from a first brightness value to the maximum brightness value of the pixel in the first view control at one time, or the electronic device may increase the brightness value of the display screen to the maximum brightness value of the pixel in the first view control multiple times.

[0389] In this way, after the electronic device increases the brightness value of the display screen to the maximum brightness value of the pixels in the first view control, the electronic device can display the maximum brightness value of the pixels in the HDR interface, thereby improving the display effect of the HDR interface.

[0390] In one possible implementation, before the electronic device draws the second interface, the method further includes: the electronic device determining a first brightness enhancement value for the display screen based on a first brightness value and the maximum brightness value of pixels in the first view control; the electronic device determining a first grayscale discount coefficient based on the first brightness enhancement value; and the electronic device drawing the second interface specifically includes: the electronic device drawing the first view control in the second interface based on the attributes of the first view control and the first grayscale discount coefficient; and the electronic device drawing the second view control in the second interface based on the attributes of the second view control, thus obtaining the second interface.

[0391] Optionally, the first grayscale discount factor can be obtained based on the first brightness enhancement value. The first grayscale discount factor and the first brightness enhancement value can be inversely proportional; the larger the first brightness enhancement value, the smaller the value of the first grayscale discount factor, and vice versa. For example, the first grayscale discount factor can be the reciprocal of the first brightness enhancement value. The first grayscale discount factor can be a number greater than 0 and less than or equal to 1.

[0392] The properties of the first view control may include, but are not limited to, the shape, size, position, color, transparency, and preset brightness value of the first view control.

[0393] The properties of the second view control may include, but are not limited to, the shape, size, position, color, transparency, and preset brightness value of the second view control.

[0394] The electronic device draws the first view control in the second interface based on the properties of the first view control and the first grayscale discount factor. This can refer to the electronic device processing the properties of the first view control based on the first grayscale discount factor, reducing the preset brightness value in the properties of the first view control to obtain the processed properties of the first view control. The electronic device then draws the first view control based on the processed properties of the first view control.

[0395] Optionally, the electronic device processes the properties of the first view control based on the first grayscale discount coefficient, reducing the preset brightness value in the properties of the first view control to obtain the processed properties of the first view control. This can refer to the electronic device dividing the preset brightness values ​​of multiple pixels in the properties of the first view control by the first grayscale discount coefficient to obtain the processed properties of the first view control.

[0396] For SDR view controls, electronic devices do not need to process the properties of the SDR view controls; they can directly process and draw the SDR view controls based on the properties of the SDR view controls.

[0397] In one possible implementation, the display screen of the electronic device displays the first interface at a second brightness value, specifically including: the electronic device increasing the brightness of the electronic device to the second brightness value based on the first brightness value and the first brightness enhancement value; and the display screen of the electronic device displaying the first interface at the second brightness value.

[0398] Optionally, the electronic device increases its brightness to a second brightness value based on a first brightness value and a first brightness enhancement value. This can mean that the electronic device increases its brightness to the second brightness value by multiplying the first brightness value by the first brightness enhancement value.

[0399] In one possible implementation, the second interface is stored in the first buffer; the electronic device processes the second interface based on the first brightness value and the maximum brightness value of the pixels in the first view control to obtain the first interface, specifically including: the electronic device processes the second interface in the first buffer based on the first brightness value and the maximum brightness value of the pixels in the first view control to obtain the first interface.

[0400] In this way, the electronic device can draw the second interface within a buffer (e.g., the first buffer) and process the second interface within the same buffer to obtain the first interface. In other embodiments, the electronic device can also draw the second interface within different buffers.

[0401] In one possible implementation, after the electronic device obtains the first interface, the method further includes: the electronic device acquiring the first interface from the first buffer and then storing the first interface in the second buffer; wherein the first buffer and the second buffer are different, and the amount of data of a single pixel in the first buffer is greater than the amount of data of a single pixel in the second buffer.

[0402] Based on the above description, the electronic device can increase the brightness value of the first view control based on the first brightness value and the maximum brightness value of the pixels in the first view control. This may result in the RGBA value of the pixels in the first view control being greater than 1. Therefore, the first buffer is a buffer capable of storing RGBA values ​​greater than 1. For example, the first buffer can be a buffer with a bit depth of 32 bits or more. For example, the first buffer can be a 34-bit, 36-bit, 38-bit, 40-bit, 44-bit, 48-bit, 52-bit, 56-bit, 60-bit, 64-bit, or 128-bit buffer or a buffer of other bit depths.

[0403] Thus, if the electronic device has specific requirements regarding the bit depth of the buffer storing the first interface to be displayed, it can first store the second interface using a buffer with a larger data volume for each pixel. After obtaining the first interface, before displaying it, the electronic device stores the first interface in a buffer that meets the display requirements.

[0404] For example, the first buffer can be a 64-bit buffer and the second buffer can be a 32-bit buffer.

[0405] In other embodiments, if the electronic device does not have a specific requirement for the number of bits in the buffer storing the first interface to be displayed, the first buffer and the second buffer can be the same. For example, both the first buffer and the second buffer can be 34-bit, 36-bit, 38-bit, 40-bit, 44-bit, 48-bit, 52-bit, 56-bit, 60-bit, 64-bit, or 128-bit buffers or buffers of other bit lengths.

[0406] In one possible implementation, the electronic device draws the second interface, specifically including: the electronic device draws the second view control in the second interface in the third buffer; the electronic device obtains the second view control from the third buffer and then saves the second view control in the first buffer; the electronic device draws the first view control in the second interface in the first buffer to obtain the second interface.

[0407] The third buffer differs from the first buffer. Before drawing SDR view controls, the electronic device can request a third buffer. The electronic device can draw SDR view controls within the third buffer, which is used to cache them. The cached SDR view controls in the third buffer are reused when the electronic device draws other interfaces. For example, the electronic device can save the second view control in the third buffer. Then, the electronic device retrieves the second view control from the third buffer and saves it in the first buffer. When drawing the second view control, the electronic device does not adjust its brightness value. When drawing other HDR or SDR interfaces, if the second view control also exists in those interfaces, the electronic device can reuse the second view control saved in the third buffer without redrawing it. This saves power and speeds up the display of other HDR or SDR interfaces.

[0408] In one possible implementation, after the electronic device's display shows the first interface with a second brightness value, the method further includes: the electronic device drawing a fourth interface, the fourth interface including a third view control and a second view control, the third view control being an HDR view control, the third view control being a view control processed based on the second brightness value and the maximum brightness value of the pixels in the third view control, the brightness value of the third view control in the fourth interface being different from the preset brightness value of the third view control, the second view control being obtained by the electronic device from a third buffer; the electronic device processing the fourth interface based on the second brightness value and the maximum brightness value of the pixels in the third view control to obtain a third interface, the brightness value of the third interface being different from the brightness value of the fourth interface; and the electronic device's display showing the third interface with the third brightness value.

[0409] Optionally, the third-view control and the first-view control can refer to the same view control, but the content displayed in the third-view control is different from the content displayed in the first-view control. For example, both the third-view control and the first-view control can be controls that display video content.

[0410] Optionally, the third-view control and the first-view control can also be different controls.

[0411] Optionally, the brightness value of the third view control in the fourth interface is different from the preset brightness value of the third view control. It can mean that the brightness value of the third view control in the fourth interface is equal to the preset brightness value of the third view control, or it can mean that the brightness value of the third view control in the fourth interface is less than the preset brightness value of the third view control, or it can mean that the brightness value of the third view control in the fourth interface is greater than the preset brightness value of the third view control.

[0412] Optionally, the brightness value of the third interface is different from the brightness value of the fourth interface. It can mean that the brightness value of the third interface is equal to the brightness value of the fourth interface, or it can mean that the brightness value of the third interface is less than the brightness value of the fourth interface, or it can mean that the brightness value of the third interface is greater than the brightness value of the fourth interface.

[0413] In this way, when drawing the fourth interface, if the fourth interface also has a second view control, the electronic device can obtain the already drawn second view control from the third buffer, without having to draw the second view control again. This can save the power consumption of the electronic device and speed up the display time of the third interface.

[0414] In one possible implementation, the third brightness value is different from the second brightness value.

[0415] Optionally, the third brightness value is different from the second brightness value. It can mean that the third brightness value is greater than the second brightness value, or it can mean that the third brightness value is less than the second brightness value.

[0416] In other possible implementations, the third brightness value and the second brightness value can also be the same. For example, in a scenario where an HDR interface is continuously displayed, the brightness of the terminal device's display can remain consistent. This could be used when displaying HDR video or switching to display HDR photos.

[0417] If the third brightness value and the second brightness value can also be the same, the maximum brightness value of the pixel in the third interface is the same as the maximum brightness value of the pixel in the first interface.

[0418] In one possible implementation, the electronic device draws a fourth interface, specifically including: the electronic device receiving and responding to a second operation, and drawing a fourth interface.

[0419] In this way, the electronic device can begin drawing the fourth interface and displaying the third interface only after receiving the user's second operation. For example, in a scene where HDR images are being switched to display, after displaying the first interface, the electronic device can begin drawing the fourth interface and displaying the third interface only after receiving the user's second operation.

[0420] In other possible implementations, the electronic device can also automatically draw a fourth interface and display the third interface. For example, in playing or shooting an HDR video scene, after displaying the first interface, the electronic device can automatically draw a fourth interface and display the third interface.

[0421] In one possible implementation, the second view control is a view control in the navigation bar of the first interface, or the second view control is a view control in the status bar of the first interface.

[0422] Optionally, the types of view controls in the navigation bar and the status bar may differ in different HDR interfaces.

[0423] In one possible implementation, the second view control is a view control in the top fixed area of ​​the first interface, or the second view control is a view control in the bottom fixed area of ​​the first interface.

[0424] Optionally, the view controls in the top fixed area and the bottom fixed area may be of different types in different HDR interfaces.

[0425] In one possible implementation, the second interface further includes a fourth view control, which is a non-HDR control; the method further includes: the electronic device drawing the second interface, specifically including: the electronic device drawing the first view control in the second interface based on the properties of the first view control and the first grayscale discount coefficient; the electronic device drawing the second view control in the second interface based on the properties of the second view control; the electronic device drawing the fourth view control in the second interface based on the properties of the fourth view control, thereby obtaining the second interface.

[0426] In this way, when the second interface includes multiple SDR view controls, the electronic device only needs to draw the SDR view controls according to the properties of each SDR view control, without needing to adjust the brightness of the SDR view controls.

[0427] This application provides an electronic device, including a memory and a processor; wherein the memory and the processor are coupled, the memory is used to store computer programs, and when the processor executes and calls the computer programs, the electronic device performs a display method as shown in FIG13.

[0428] This application provides a computer-readable storage medium including instructions that, when executed on an electronic device, cause the electronic device to perform a display method as shown in FIG13.

[0429] This application provides a chip system including one or more processors, which are used to invoke computer instructions to cause an electronic device to execute a display method shown in FIG13.

[0430] This application provides a computer program product containing instructions that, when run on an electronic device, causes the electronic device to execute a display method as shown in FIG13.

[0431] The above are merely some embodiments and implementation methods of this application. The scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0432] It is understood that the user interfaces described in the embodiments of this application are merely example interfaces and do not constitute a limitation on the solution of this application. In other embodiments, the user interface may adopt different interface layouts, may include more or fewer controls, and may add or remove other functional options, as long as they are based on the same inventive concept provided in this application, they are all within the protection scope of this application.

[0433] It should be noted that, without causing contradictions or conflicts, any feature in any embodiment of this application, or any part of any feature, can be combined, and the combined technical solution is also within the scope of the embodiments of this application.

[0434] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

Claims

1. A display method, characterized in that, The method includes: The electronic device's display screen shows the user interface at a first brightness value; The electronic device receives a first operation on the user interface and draws a second interface; wherein the second interface includes a first view control and a second view control, the first view control is a high dynamic range (HDR) view control, the second view control is a non-HDR view control, the first view control is a view control processed based on the first brightness value and the maximum brightness value of the pixels in the first view control, and the brightness value of the first view control in the second interface is greater than the preset brightness value of the first view control. The electronic device processes the second interface based on the first brightness value and the maximum brightness value of the pixels in the first view control to obtain the first interface, wherein the brightness value of the first interface is less than the brightness value of the second interface. The electronic device displays the first interface at a second brightness value; wherein the second brightness value is greater than the first brightness value.

2. The method according to claim 1, characterized in that, The second view control is a view control that has not been processed based on the first brightness value and the maximum brightness value of the pixels in the first view control. The brightness value of the second view control in the second interface is equal to the preset brightness value of the second view control.

3. The method according to claim 1 or 2, characterized in that, The second brightness value is equal to the maximum brightness value of the pixel in the first view control.

4. The method according to any one of claims 1-3, characterized in that, Before the electronic device draws the second interface, the method further includes: The electronic device determines the first brightness enhancement value of the display screen based on the first brightness value and the maximum brightness value of the pixels in the first view control; The electronic device determines a first grayscale discount coefficient based on the first brightness enhancement value; The electronic device draws the second interface, specifically including: The electronic device draws the first view control in the second interface based on the properties of the first view control and the first grayscale discount coefficient; The electronic device draws the second view control in the second interface based on the properties of the second view control, thereby obtaining the second interface.

5. The method according to claim 4, characterized in that, The electronic device displays the first interface at a second brightness value, specifically including: The electronic device increases its brightness to the second brightness value based on the first brightness value and the first brightness increase value. The electronic device's display screen shows the first interface at the second brightness value.

6. The method according to any one of claims 1-5, characterized in that, The second interface is stored in the first buffer; The electronic device processes the second interface based on the first brightness value and the maximum brightness value of the pixels in the first view control to obtain the first interface, specifically including: The electronic device processes the second interface within the first buffer based on the first brightness value and the maximum brightness value of the pixels in the first view control, and obtains the first interface.

7. The method according to claim 6, characterized in that, After the electronic device obtains the first interface, the method further includes: The electronic device obtains the first interface from the first buffer and then saves the first interface in the second buffer. The first buffer is different from the second buffer, and the amount of data for a single pixel in the first buffer is greater than the amount of data for a single pixel in the second buffer.

8. The method according to claim 6, characterized in that, The electronic device draws the second interface, specifically including: The electronic device draws the second view control in the second interface within the third buffer; The electronic device retrieves the second view control from the third buffer and then saves the second view control in the first buffer; The electronic device draws the first view control in the second interface within the first buffer to obtain the second interface.

9. The method according to claim 8, characterized in that, After the display screen of the electronic device displays the first interface at a second brightness value, the method further includes: The electronic device draws a fourth interface, which includes a third view control and a second view control. The third view control is an HDR view control, which is a view control processed based on the second brightness value and the maximum brightness value of the pixels in the third view control. The brightness value of the third view control in the fourth interface is different from the preset brightness value of the third view control. The second view control is obtained by the electronic device from the third buffer. The electronic device processes the fourth interface based on the second brightness value and the maximum brightness value of the pixels in the third view control to obtain the third interface, wherein the brightness value of the third interface is different from the brightness value of the fourth interface. The electronic device's display screen shows the third interface at a third brightness value.

10. The method according to claim 9, characterized in that, The third brightness value is the same as the second brightness value.

11. The method according to claim 9 or 10, characterized in that, The electronic device draws a fourth interface, specifically including: The electronic device receives and responds to the second operation, and draws the fourth interface.

12. The method according to any one of claims 8-11, characterized in that, The second view control is either a view control in the navigation bar of the first interface, or a view control in the status bar of the first interface.

13. The method according to any one of claims 8-11, characterized in that, The second view control is a view control in the fixed top area of ​​the first interface, or the second view control is a view control in the fixed bottom area of ​​the first interface.

14. The method according to claim 4 or 5, characterized in that, The second interface also includes a fourth view control, which is a non-HDR control; the method further includes: The electronic device draws the second interface, specifically including: The electronic device draws the first view control in the second interface based on the properties of the first view control and the first grayscale discount coefficient; The electronic device draws the second view control in the second interface based on the properties of the second view control; The electronic device draws the fourth view control in the second interface based on the properties of the fourth view control, thus obtaining the second interface.

15. An electronic device, characterized in that, The wearable device includes a memory and a processor; wherein the memory and the processor are coupled, the memory is used to store a computer program, and when the processor executes the computer program, the electronic device performs the method of any one of claims 1-14.

16. A computer-readable storage medium, characterized in that, Includes instructions that, when executed on an electronic device, cause the electronic device to perform the method of any one of claims 1-14.

17. A chip system, characterized in that, The chip system includes a processing circuit and an interface circuit. The interface circuit is used to receive code instructions and transmit them to the processing circuit. The processing circuit is used to execute the code instructions to cause the electronic device to perform the method as described in any one of claims 1-14.

18. A computer program product, characterized in that, Includes a computer program that, when run on an electronic device, causes the electronic device to perform the method as described in any one of claims 1-14.