Application picture display method and device and electronic equipment

CN120677463APending Publication Date: 2025-09-19HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202480012200.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-07-12
Filing Date
2024-03-22
Publication Date
2025-09-19

AI Technical Summary

Technical Problem

When users adjust the display ratio of the electronic device window, screen stretching, screen compression and other phenomena may occur, affecting the user experience.

Method used

By intercepting the rendering instructions issued to libEGL by applying the application, correcting the instructions to adapt to the new aspect ratio, ensuring that the screen is displayed in the window in proportion to avoid proportion changes.

Benefits of technology

It effectively solves the problem of screen stretching and compression during window adjustment and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120677463A_ABST
    Figure CN120677463A_ABST
Patent Text Reader

Abstract

The invention discloses an application picture display method and device and electronic equipment. The method comprises the steps that in response to a first operation of a user, the electronic equipment displays a first window and displays a first picture of a first application in the first window, the first picture is obtained through rendering, the first window has a preset first aspect ratio, and the first aspect ratio is the ratio of the width to the height of a visible area of the first window; the first window is a window in a split screen form or a window in a floating window form (S10); in response to an adjustment operation of the user on the first window, the electronic device displays the first window at a second aspect ratio, determines a target screen having the second aspect ratio from the first screen, and displays the target screen in the first window, where the second aspect ratio is different from the first aspect ratio (S20). The problems of picture stretching, picture compression and the like caused by the fact that a user adjusts the window display scale in part of scenes can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Application screen display method, device and electronic equipment

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on July 12, 2023, with application number 202310862682.6 and invention name “A method, device and electronic device for displaying an application screen”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of terminal technology, and in particular to an application screen display method, device, and electronic device. Background Art

[0003] With the widespread adoption and development of the internet, users are demanding more diverse functionalities from electronic devices. For example, to meet users' needs for using multiple applications simultaneously, electronic devices now offer a variety of display options, such as floating windows and split-screen displays. This allows multiple applications to be displayed simultaneously on the display, enabling multitasking and improving user efficiency.

[0004] However, when an electronic device displays multiple windows in the above-mentioned manner, when a user adjusts the display ratio of the windows, phenomena such as screen stretching and screen compression may occur, affecting the user's experience.

[0005] Summary of the Invention

[0006] The embodiments of the present application provide an application screen display method, device, and electronic device to solve the problem of screen stretching, screen compression, etc. caused by users adjusting the window display ratio in some scenarios.

[0007] In a first aspect, an embodiment of the present application provides an application screen display method, which is applied to an electronic device, including: in response to a first operation of a user, the electronic device displays a first window and displays a first screen of a first application in the first window, wherein the first screen is rendered, and the first window has a preset first aspect ratio, the first aspect ratio is the ratio of the width to the height of the visible area of ​​the first window, and the first window is a split-screen window or a floating window; in response to the user's adjustment operation on the first window, the electronic device displays the first window with a second aspect ratio, and determines a target screen with the second aspect ratio from the first screen, and displays the target screen in the first window, wherein the second aspect ratio is different from the first aspect ratio.

[0008] The application screen display method shown in the embodiment of the present application can solve the problems of screen stretching, screen compression, etc. that occur when the user adjusts the window display ratio when the electronic device displays the first window in split-screen form or displays the first window in floating window form.

[0009] In one implementation, in response to a user adjusting a first window, an electronic device displays the first window with a second aspect ratio, determines a target image corresponding to the second aspect ratio from the first image, and displays the target image in the first window. This includes: in response to the user adjusting the first aspect ratio, the electronic device displays the first window with the second aspect ratio, intercepts a first instruction sent by a first application to a graphics library, libEGL, located in a system library of the electronic device, the first instruction instructing the electronic device to stretch or compress the first image so that the first image has a second aspect ratio that is different from the first aspect ratio; the electronic device modifies the first instruction to generate a modified instruction instructing the electronic device to capture the target image in the first image with the second aspect ratio; the electronic device controls libEGL to execute the modified instruction; and the electronic device displays the target image in the first window. Using this implementation, the electronic device can intercept the first instruction sent by the first application to libEGL, thereby preventing the ratio of the first image from changing.

[0010] In one implementation, in response to a first user operation, an electronic device displays a first window and displays a first screen of a first application in the first window, including: in response to the user's first operation, the electronic device identifies the current scene of the foreground page; if the current scene is a split-screen scene, the electronic device displays the first window and the second window in split-screen form, and displays the first screen of the first application in the first window, and displays the second screen of the second application in the second window. Using this implementation, the electronic device can identify the current scene as a split-screen scene and solve problems such as screen stretching and screen compression that occur in this scene.

[0011] In one implementation, the first application is a game application, and the second application is any one of a game application, a social application, a music application, a video application, a communication application, a productivity application, a news application, a reading application, a health application, an education application, and a tool application. Using this implementation, the electronic device can avoid the phenomenon of screen stretching and screen compression in both game applications when two game applications are split-screen, and can also avoid the phenomenon of screen stretching and screen compression in the game application when a game application and a non-game application are split-screen. In one implementation, when the first application is a game application and the second application is a non-game application, the second screen is not obtained based on rendering; in response to the user's adjustment operation on the first window, the electronic device displays the first window with a second aspect ratio, including: in response to the user's adjustment operation on the first window, the electronic device adjusts the aspect ratio of the second window so that the second window has a target aspect ratio, and the aspect ratio of the second screen is the same as the target aspect ratio. By adopting this implementation method, the electronic device can change the aspect ratio of the first window without changing the display ratio of the second screen in the second window. That is to say, for non-gaming applications, there will be no screen stretching or compression in the split-screen scene of the electronic device.

[0012] In one implementation, an electronic device identifies the current scene of a foreground page, including: the electronic device calls a package manager service PMS to determine a first package name of a first application and a second package name of a second application; the electronic device determines a first running state of the first application based on the first package name, and determines a second running state of the second application based on the second package name, wherein the running state is used to determine whether the application is in a foreground running state or a background running state; if the first running state is a foreground running state, and the second running state is a foreground running state, the electronic device calls a window manager service WMS to determine a first window size of the first window and a second window size of the second window; if the electronic device determines that the sum of the first window size and the second window size is equal to a preset first threshold, the electronic device determines that the current scene is a split-screen scene. This implementation shows a specific method for the electronic device to identify the current scene, so that the electronic device can identify the current scene as a split-screen scene and solve problems such as screen stretching and screen compression that occur in this scene.

[0013] In one implementation, a framework layer of an electronic device includes a rendering instruction interception module and a first function pointer list, the first function pointer list including a first function pointer, the first function pointer pointing to the rendering instruction interception module, the first function pointer being used to cause the rendering instruction interception module to intercept a first instruction, wherein the first instruction is one of the OpenGL instructions. In response to a user adjusting a first aspect ratio, the electronic device displays a first window at a second aspect ratio and intercepts a first instruction issued by a first application to libEGL, including: if the electronic device determines that the current scene is a split-screen scene, the electronic device controls the first application to issue the first instruction to the first function pointer; and the electronic device controls the rendering instruction interception module to intercept the first instruction. Using this implementation, the electronic device addresses issues such as screen stretching and compression that occur in split-screen scenarios by intercepting and modifying rendering instructions.

[0014] In one implementation, in response to a user adjusting a first aspect ratio, the electronic device displays the first window at a second aspect ratio and intercepts a first instruction issued by the first application, including: in response to the user adjusting the first aspect ratio, the electronic device displays the first window at the second aspect ratio, and displays the second window at a third aspect ratio, and intercepts the first instruction issued by the first application, and intercepts the second instruction issued by the second application, wherein the second instruction is one of OpenGL instructions. Using this implementation, if the second application is of the same type as the first application and also suffers from problems such as screen stretching and screen compression, the electronic device can simultaneously resolve the problems such as screen stretching and screen compression in both windows.

[0015] In one implementation, a first function pointer list includes a first graphics context glContext function and a second glContext function, the first glContext function corresponds to the first function pointer, the second glContext function corresponds to the second function pointer, and the second function pointer is used to cause a rendering instruction interception module to intercept the second instruction. The electronic device intercepts the first instruction issued by the first application and intercepts the second instruction issued by the second application, including: if the electronic device determines that the current scene is a split-screen scene, the electronic device controls the first application to issue the first instruction to the first function pointer, and controls the second application to issue the second instruction to the second function pointer; the electronic device activates the first glContext function to call the first function pointer, and activates the second glContext function to call the second function pointer; and the electronic device controls the rendering instruction interception module to intercept the first instruction and the second instruction. Using this implementation, the electronic device can distinguish different rendering instructions and perform different operations on different windows. In this way, the electronic device can simultaneously solve problems such as screen stretching and screen compression in two windows.

[0016] In one implementation, the framework layer of the electronic device further includes a window monitoring module and a rendering scale calibration module. Before the electronic device corrects the first instruction, the following steps are performed: the window monitoring module obtains the first window size from the WMS based on a registration callback or periodic query; and the window monitoring module sends the first window size to the rendering scale calibration module. This implementation illustrates a specific method by which the electronic device corrects the first instruction by obtaining the first window size. This allows the electronic device to address issues such as screen stretching and compression that occur in split-screen scenarios.

[0017] In one implementation, before the electronic device corrects the first instruction, the rendering instruction interception module further includes sending the first instruction to the rendering scale calibration module. This implementation illustrates a specific method for the electronic device to intercept and send the first instruction to correct the first instruction. In this way, the electronic device can resolve issues such as screen stretching and compression in split-screen scenarios.

[0018] In one implementation, the first instruction includes a glViewport function instruction and a glScissor function instruction. The glViewport function instruction is used to give the first image a second aspect ratio, and the glScissor function instruction is used to crop the first image at the second aspect ratio. Before the electronic device corrects the first instruction, the steps further include: the electronic device obtaining the second aspect ratio in the glViewport function instruction; the electronic device determining whether the first aspect ratio and the second aspect ratio are the same; and if the first aspect ratio and the second aspect ratio are different, the electronic device executing the step of correcting the first instruction. In this implementation, the electronic device calibrates the current display ratio of the first image to determine whether the first instruction needs to be corrected.

[0019] In one implementation, the electronic device corrects the first instruction, including: a rendering scale calibration module determining a second aspect ratio based on the first window size; the rendering scale calibration module cropping a first area within the first screen at the second aspect ratio; and the rendering scale calibration module correcting a glViewport function instruction and a glScissor function instruction, wherein the corrected glViewport function instruction is used to set the first area to the second aspect ratio, and the corrected glScissor function instruction is used to crop the first area at the second aspect ratio. Using this implementation, the electronic device demonstrates a specific method for correcting the first instruction to address issues such as screen stretching and compression in split-screen scenarios.

[0020] In a second aspect, the present application provides an electronic device comprising: a processor, a memory and a touch screen; the memory stores program instructions, and when the program instructions are executed by the processor, the electronic device executes the application screen display method in any implementation method of the above-mentioned first aspect.

[0021] In a third aspect, the present application further provides a computer-readable storage medium, in which instructions are stored. When the instructions are executed on an electronic device, the electronic device executes the application screen display method in any implementation of the first aspect.

[0022] In a fourth aspect, the present application further provides a computer program product, which, when executed on an electronic device, enables the electronic device to execute the application screen display method in any implementation of the first aspect.

[0023] It can be understood that the electronic device of the second aspect, the computer storage medium of the third aspect, and the computer program product of the fourth aspect provided above are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] FIG1 is a schematic diagram of a first scenario in which an electronic device displays an application in a floating window;

[0025] FIG2 is a schematic diagram of a second scenario in which an electronic device displays an application in a floating window;

[0026] FIG3 is a schematic diagram of a floating window of an electronic device;

[0027] FIG4 is a schematic diagram of a first scenario in which an electronic device displays an application in a split-screen format;

[0028] FIG5 is a schematic diagram of a second scenario in which an electronic device displays an application in a split-screen format;

[0029] FIG6 is a schematic diagram of a split-screen form of an electronic device;

[0030] FIG7 is a schematic diagram of a first scenario in which an electronic device adjusts a window display ratio during a split-screen process;

[0031] FIG8 is a schematic diagram of a second scenario in which an electronic device adjusts a window display ratio during a split-screen process;

[0032] FIG9 is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;

[0033] FIG10 is a block diagram of the software structure of the electronic device provided in an embodiment of the present application;

[0034] FIG11 is a first flow chart of the application screen display method provided in an embodiment of the present application;

[0035] FIG12 is a second flow chart of the application screen display method provided in an embodiment of the present application;

[0036] 13 is a schematic diagram of module interaction of an application screen display method provided in an embodiment of the present application;

[0037] FIG14 is a schematic diagram of the process interaction of the application screen display method provided in an embodiment of the present application;

[0038] FIG15 is a third flow chart of the application screen display method provided in an embodiment of the present application;

[0039] FIG16 is a schematic diagram of a conventional rendering process of an electronic device;

[0040] FIG17 is a schematic diagram of a rendering process of an electronic device provided in an embodiment of the present application;

[0041] FIG18 is a schematic diagram of a first picture correction scenario provided by an embodiment of the present application;

[0042] FIG19 is a first interactive diagram of an application screen display method provided in an embodiment of the present application;

[0043] FIG20 is a second interactive diagram of an application screen display method provided in an embodiment of the present application;

[0044] FIG21 is a third interactive diagram of an application screen display method provided in an embodiment of the present application;

[0045] FIG22 is a schematic structural diagram of an application screen display device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0046] The following will clearly describe the technical solutions in the embodiments of the present application in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments of the present application, other embodiments obtained by ordinary technicians in this field without making any creative work are all within the scope of protection of this application.

[0047] The terms "first," "second," and "third" in this specification and claims are used to distinguish between different objects, not to limit a specific order. In the description of this application, unless otherwise specified, "at least one" means one, two, or more than two.

[0048] In the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplary" or "for example" in the embodiments of this application should not be interpreted as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.

[0049] The terms used in the implementation section of this application are only used to explain the specific embodiments of this application and are not intended to limit this application. The embodiments of this application will be described in detail below with reference to the accompanying drawings.

[0050] With the widespread adoption and development of the internet, users are demanding more diverse functionalities from electronic devices. For example, to meet users' needs for using multiple applications simultaneously, electronic devices now offer a variety of display options, such as floating windows and split-screen displays. This allows multiple applications to be displayed simultaneously on the display, enabling multitasking and improving user efficiency.

[0051] FIG1 is a schematic diagram of a first scenario in which an electronic device displays an application in a floating window.

[0052] As shown in Figure 1, for example, the electronic device is a foldable screen mobile phone or tablet computer. In response to a user clicking a first icon 1, the electronic device starts a first application and displays a first application window 2 corresponding to the first application. The electronic device can display the first application window 2 in full screen form.

[0053] FIG2 is a schematic diagram of a second scenario in which an electronic device displays an application in a floating window.

[0054] As shown in Figure 2, for example, in response to a user swiping left on first screen edge 3, the electronic device displays an application bar 4, which may include a second icon 5. In response to the user dragging the second icon 5 toward the first application window 2, the electronic device launches the second application and displays a second application window 6 corresponding to the second application in the form of a floating window above a portion of the first application window 2.

[0055] There are many types of applications, such as video applications, game applications, browser applications, etc. Depending on the type of application, the direction of the floating window displayed by the electronic device is different.

[0056] FIG3 is a schematic diagram of a floating window of an electronic device.

[0057] As shown in (a) of FIG3 , the electronic device includes a floating window displayed horizontally. For example, when the second application is a game application, the electronic device displays the second application window 6 horizontally.

[0058] As shown in (b) of FIG3 , the electronic device includes a floating window displayed vertically. For example, when the second application is a chat application, the electronic device displays the second application window 6 vertically.

[0059] In this way, different applications display floating windows in more suitable directions, which can improve the user experience.

[0060] FIG4 is a schematic diagram of a first scenario in which an electronic device displays an application in a split-screen format.

[0061] As shown in Figure 4, the top area of ​​the second application window 6 includes a first floating button (Bar) 61. In response to a user clicking on the first floating button 61, the electronic device displays a first capsule element 62, which includes a first split-screen button 621. In response to the user clicking on the first split-screen button 621, the electronic device displays the first application window 2 and the second application window 6 in a split-screen format.

[0062] In the process of the electronic device changing from a floating window form to a split-screen form, the first application window 2 changes from a full-screen form to a split-screen form, and the second application window 6 changes from a floating window form to a split-screen form. In addition, the electronic device displays the first application window 2 in a default first window size and displays the second application window 6 in a default second window size. The window size can be expressed in pixels. For example, the window size can be 800×600, indicating a width of 800 pixels and a height of 600 pixels.

[0063] Electronic devices can also implement the split-screen function through other operating methods.

[0064] FIG5 is a schematic diagram of a second scenario in which an electronic device displays an application in a split-screen format.

[0065] As shown in Figure 5, when the electronic device displays the first application window 2 in full screen mode, the top area of ​​the first application window 2 includes a second floating button 210. In response to the user dragging the second floating button 210 to the left, the electronic device displays the first application window 2 in split-screen mode. At this time, the user can launch the second application in the area of ​​the electronic device's display screen that is not covered by the first application window 2. The embodiments of the present application do not limit the specific operation method of the electronic device to implement the split-screen function.

[0066] FIG6 is a schematic diagram of a split-screen form of an electronic device.

[0067] As shown in FIG6(a), the electronic device includes a top-bottom split screen mode. For example, when a user splits the screen between a game application and a chat application, the electronic device can display the game application and the chat application in a top-bottom split screen mode. Whether an application is displayed at the top or the bottom can be determined by the application type or the user's operation mode, and this embodiment of the application is not limited in this regard.

[0068] As shown in (b) of Figure 6, the electronic device also includes a left-right split screen format. When the user splits the screen for a short video application and a chat application, the electronic device can display the short video application and the chat application in a left-right split screen format. Whether an application is displayed on the left or right side can be determined based on the application type or the user's operation method, and this embodiment of the application is not limited to this. In this way, different applications can be split in a more suitable form, which can improve the user experience.

[0069] Therefore, the electronic device displays the first application window 2 and the second application window 6 simultaneously, enabling the user to perform multiple tasks in parallel.

[0070] When an electronic device displays an application in a floating window or a split screen, it provides a function of adjusting the window display ratio.

[0071] FIG7 is a schematic diagram of a first scenario in which an electronic device adjusts the window display ratio during the split-screen process.

[0072] As shown in FIG7 , when the electronic device displays a first application window 2 and a second application window 6 in a top-bottom split-screen format, the electronic device displays a first split-screen boundary 7 between the first application window 2 and the second application window 6. In response to a user dragging operation on the first split-screen boundary 7, the electronic device can change the first window size of the first application window 2 and the second window size of the second application window 6.

[0073] Thus, due to the change in the size of the second window, the aspect ratio of the display image in the second application window 6 may become abnormal.

[0074] In response to the user dragging the first split-screen boundary 7 downward, the electronic device enlarges and displays the second application window 6 and adjusts the initial display ratio of the first display screen displayed in the second application window 6 so that the first display screen is displayed at the first display ratio. In this way, the first display screen appears stretched.

[0075] FIG8 is a schematic diagram of a second scenario in which an electronic device adjusts the window display ratio during the split-screen process.

[0076] As shown in FIG8 , in response to the user dragging the first split-screen boundary 7 upward, the electronic device shrinks the second application window 6 and adjusts the initial display ratio of the first display screen displayed in the second application window 6 so that the first display screen is displayed at the second display ratio. Thus, the first display screen appears compressed.

[0077] It should be noted here that for different types of applications, the display screen of game applications is usually obtained by rendering each frame of the screen, so the above-mentioned screen stretching and compression phenomena usually occur, while the display screen of video applications is based on the limitations of the video format, and the above-mentioned screen stretching and compression phenomena usually do not occur. In other words, in game scenarios, the above-mentioned electronic device usually displays an abnormal display screen. Other rendering scenarios similar to game scenarios may also have such problems, and the embodiments of this application do not limit the specific scenarios involved.

[0078] In addition, when the second application window 6 changes from full-screen form to split-screen form and is displayed in the default second window size, the initial display ratio of the first display screen allows the user to have a normal visual experience. Only after the user adjusts the second window size will the electronic device have the problem of abnormal display screen.

[0079] Correspondingly, when the electronic device adjusts the window display ratio of the floating window, similar screen stretching and compression phenomena will occur. When the second application window 6 changes from full screen to floating screen, the initial display ratio of the first display screen also allows the user to have a normal visual experience. After the user adjusts the size of the floating window, the electronic device will have an abnormal display screen problem. In the embodiments of the present application, the various embodiments of the electronic device displaying the second application window 6 in split-screen form or in floating window form can refer to each other. This application only provides an exemplary description of the situation where the electronic device displays the second application window 6 in split-screen form and an abnormal display screen occurs.

[0080] Specifically, taking the second application as a game application as an example, in response to the user's split-screen operation, the electronic device, when running the game application in the second application window 6, renders at least one frame of the game application and displays the rendered frame. The second application window 6 has a second window size.

[0081] When the electronic device starts rendering each frame, it needs to set the viewport to determine the display position and size of the rendering result on the display screen. In a specific implementation, the electronic device can call the glViewport function to initialize the size of the Viewport. The glViewport function is a function in the Open Graphics Library (OpenGL) that is used to set the position and size of the Viewport. The Viewport defines the target window or visible area of ​​the frame buffer rendered by OpenGL. At this time, the size of the Viewport matches the size of the second window.

[0082] When the electronic device finishes rendering each frame, it calls the glScissor function to crop a rectangular area in the Viewport that matches the size of the second window. The glScissor function is an OpenGL function that defines a rectangular area. Pixels within the rectangular area are retained, while pixels outside the area are cropped. Thus, when the electronic device changes the second application window 6 from full-screen to split-screen, the size of the Viewport is the same as the size of the rectangular area. The image rendered within the rectangular area is displayed at its initial display ratio, ensuring a normal visual experience for the user.

[0083] For example, the size of the Viewport is 1620×922, the size of the rectangular area is 1620×922, and the first display image is displayed in a normal display ratio.

[0084] In response to the user dragging the first split-screen boundary 7 upward, the electronic device enlarges and displays the second application window 6 and sets the size of the Viewport to match the second window size when the electronic device starts rendering each frame.

[0085] When the electronic device finishes rendering each frame, due to the change in the size of the second window, the size of the rectangular area defined by the glScissor function is equal to the changed size of the second window. In this way, the size of the Viewport is different from the size of the rectangular area. The image rendered in the rectangular area is displayed in the first display ratio, and the first display image appears stretched.

[0086] For example, the size of the Viewport is 1620×922, the size of the rectangular area is 1579×1094, and the first display image is displayed in the display ratio shown in FIG7 .

[0087] Similarly, when the user drags the first split-screen boundary 7 downward, the first display screen is compressed, and the first display screen is displayed in the display ratio shown in Figure 8. This embodiment of the present application will not be described in detail.

[0088] In order to solve the problem that when an electronic device displays an application in a floating window or a split screen, adjusting the window display ratio may cause screen stretching, screen compression, etc., an embodiment of the present application provides an application screen display method.

[0089] The application screen display method provided in the embodiments of the present application can be applied to various types of electronic devices that support game applications. Among them, electronic devices include but are not limited to mobile phones, tablets, personal computers, workstations, large-screen devices (such as smart screens, smart TVs, etc.), wearable devices (such as smart bracelets, smart watches), handheld game consoles, home game consoles, virtual reality devices, augmented reality devices, mixed reality devices, etc., in-vehicle smart terminals, etc.

[0090] FIG9 is a schematic diagram of the hardware structure of the electronic device provided in an embodiment of the present application.

[0091] As shown in FIG9 , the electronic device 100 may include a processor 110, a memory 120A, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 01, an antenna 02, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, a camera 192, a display 193, and a subscriber identification module (SIM) card interface 194. The sensor module 180 may include a touch sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a geomagnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, and the like. Among them, the gyroscope sensor 180B, the air pressure sensor 180C, the geomagnetic sensor 180D, the acceleration sensor 180E, etc. can all be used to detect the motion state of the electronic device, and therefore, can also be called motion sensors.

[0092] It should be understood that the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0093] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors.

[0094] The memory 120A can be used to store computer executable program codes, and the executable program codes include instructions. The memory 120A may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the memory 120A may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the electronic device 100 by running instructions stored in the memory 120A, and / or instructions stored in a memory provided in the processor.

[0095] The USB interface 130 is an interface that complies with USB standards and may be a Mini USB interface, a Micro USB interface, a USB Type-C interface, or the like. The USB interface 130 can be used to connect a charger to charge the electronic device 100, or to transfer data between the electronic device 100 and peripheral devices. It can also be used to connect headphones to play audio. This interface can also be used to connect other electronic devices, such as augmented reality devices.

[0096] It is understood that the interface connection relationship between the modules illustrated in the embodiments of the present application is merely an illustrative illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods from the above embodiments, or a combination of multiple interface connection methods.

[0097] The charging management module 140 is configured to receive charging input from a charger.

[0098] The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to provide power to the processor 110, the memory 120A, the display 193, the camera 192, and the wireless communication module 160.

[0099] The wireless communication function of the electronic device 100 can be implemented through the antenna 01, the antenna 02, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

[0100] Antenna 01 and antenna 02 are used to transmit and receive electromagnetic wave signals.

[0101] The mobile communication module 150 can provide wireless communication solutions including 2G / 3G / 4G / 5G applied on the electronic device 100.

[0102] A modem processor may include a modulator and a demodulator.

[0103] The wireless communication module 160 can provide wireless communication solutions for application on the electronic device 100, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication technology (NFC), infrared technology (IR), etc.

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

[0105] Display screen 193 is used to display images, videos, etc. Display screen 193 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-oLed, or a quantum dot light-emitting diode (QLED). In some embodiments, electronic device 100 may include one or N display screens 193, where N is a positive integer greater than one.

[0106] The electronic device 100 can implement a shooting function through an ISP, a camera 192, a video codec, a GPU, a display screen 193, and an application processor.

[0107] The ISP is used to process data fed back by the camera 192 .

[0108] The camera 192 is used to capture still images or videos.

[0109] The electronic device 100 can implement audio functions such as music playback and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0110] Touch sensor 180A, also known as a "touch device," can be disposed on display screen 193. Touch sensor 180A and display screen 193 form a touch screen, also known as a "touch screen." Touch sensor 180A is used to detect touch operations applied thereto or in the vicinity thereof. The touch sensor can transmit the detected touch operations to an application processor to determine the type of touch event. Visual output related to the touch operations can be provided via display screen 193. In other embodiments, touch sensor 180A can also be disposed on the surface of electronic device 100, at a location different from that of display screen 193.

[0111] The gyro sensor 180B may be used to determine the motion posture of the electronic device 100 .

[0112] The air pressure sensor 180C is used to measure air pressure.

[0113] The geomagnetic sensor 180D includes a Hall sensor.

[0114] The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes).

[0115] The distance sensor 180F is used to measure distance.

[0116] The proximity light sensor 180G is used to determine whether there is an object near the electronic device 100 .

[0117] The fingerprint sensor 180H is used to collect fingerprints.

[0118] The temperature sensor 180J is used to detect temperature.

[0119] The buttons 190 include a power button, a volume button, and the like.

[0120] Motor 191 can generate vibration prompts.

[0121] The SIM card interface 194 is used to connect a SIM card.

[0122] The software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. In the embodiment of the present application, the Android system with a layered architecture is used as an example to illustrate the software structure of the electronic device 100.

[0123] FIG10 is a block diagram of the software structure of the electronic device provided in an embodiment of the present application.

[0124] A layered architecture divides software into several layers, each with distinct roles and responsibilities. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers: the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer.

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

[0126] As shown in FIG10 , the application package may include applications such as battery management, camera, gallery, calendar, call, map, navigation, music, video, short message, and game.

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

[0128] As shown in FIG10 , the application framework layer may include a window manager, an input manager, a sensor manager, a telephony manager, a resource manager, a notification manager, and the like.

[0129] The input manager can be used to monitor user input events, such as click events and slide events performed by the user's finger on the display screen 193 of the electronic device 100. By monitoring the input events, the electronic device 100 can determine whether the electronic device is being used.

[0130] The sensor manager is used to monitor the data returned by various sensors in the electronic device, such as motion sensor data, proximity sensor data, temperature sensor data, etc. Using the data returned by each sensor, the electronic device can determine whether it is shaking or whether the display screen 193 is blocked.

[0131] Furthermore, the application framework layer includes a scene recognition module for identifying multi-window scenarios of the foreground page, such as split-screen scenarios. Specifically, the scene recognition module can perform scene recognition based on information provided by the Package Manager Service (PMS) and Window Manager Service (WMS) of the application framework layer.

[0132] Android Runtime includes core libraries and a virtual machine. Android runtime is responsible for scheduling and management of the Android system.

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

[0134] The application layer and application framework layer run in a virtual machine. The virtual machine executes Java files in the application layer and application framework layer as binary files. The virtual machine manages object lifecycles, stack management, thread management, security and exception management, and garbage collection.

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

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

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

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

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

[0140] Furthermore, the system library also includes a rendering command interception module, a window monitoring module, and a rendering scale calibration module. The rendering command interception module is used to intercept rendering commands issued by the application, the window monitoring module is used to monitor and respond to window events, and the rendering scale calibration module is used to calibrate the scale of the rendered image.

[0141] The system library also includes the Embedded-System Graphics Library (libEGL), which provides an interface for rendering and displaying graphics in embedded systems. Applications can also send commands to libEGL, which then adjusts the displayed image based on the application's commands, such as stretching or compressing the image.

[0142] The system library also includes a system-level compositor (SurfaceFlinger), which is used to manage and synthesize the application's graphical interface and display it on the device's display. For example, an application can provide image data to SurfaceFlinger. After receiving the image data from the application, SurfaceFlinger can put it into a queue to be processed. SurfaceFlinger can traverse the queue to be processed in a specific order and perform image synthesis based on the properties of each image data. When the image synthesis is completed, SurfaceFlinger can send the image to the hardware display pipeline, which transmits the image to the screen for display.

[0143] The system library also includes a hardware compositor (HWC), which performs graphics composition and display operations. It interacts with the underlying hardware drivers to achieve efficient graphics display and rendering. For example, the hardware compositor receives image data from applications, the system UI, and other input sources in the form of layers. Each layer consists of a frame buffer or texture, which is composited in a specific order. The hardware compositor sorts the layers based on their properties and priority to ensure the correct stacking order. Furthermore, the hardware compositor performs cropping operations, discarding image data that exceeds the screen boundaries to improve rendering efficiency. The hardware compositor also performs a series of image blending operations, such as transparency blending and color blending. Furthermore, it can transform, scale, and rotate layers to suit different display requirements. The hardware compositor composites the sorted, cropped, and transformed image data from each layer into one or more frame buffers. The hardware compositor then outputs the composited image data to a display device, typically sending the image to a display screen via a video controller.

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

[0145] The graphics driver can be used to manage and control a graphics processing unit (GPU) in a computer system and related graphics functions and display devices.

[0146] It should be understood that the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0147] FIG11 is a first flow chart of the application screen display method provided in an embodiment of the present application.

[0148] As shown in FIG. 11 , the application screen display method includes steps S10 - S20 .

[0149] Step S10: In response to a first operation by the user, the electronic device displays a first window, and displays a first screen of a first application in the first window.

[0150] Among them, the first picture is rendered, the first window has a preset first aspect ratio, the first aspect ratio is the ratio of the width and height of the visible area of ​​the first window, and the first window is a split-screen window or a floating window.

[0151] Step S20: In response to the user adjusting the first window, the electronic device displays the first window with a second aspect ratio, determines a target picture with the second aspect ratio from the first picture, and displays the target picture in the first window, wherein the second aspect ratio is different from the first aspect ratio.

[0152] The application screen display method shown in the embodiment of the present application can solve the problems of screen stretching, screen compression, etc. that occur when the user adjusts the window display ratio when the electronic device displays the first window in split-screen form or displays the first window in floating window form.

[0153] FIG12 is a second flow chart of the application screen display method provided in an embodiment of the present application.

[0154] FIG13 is a schematic diagram of module interaction of the application screen display method provided in an embodiment of the present application.

[0155] FIG14 is a flow chart of the interaction of the application screen display method provided in an embodiment of the present application.

[0156] As shown in FIG. 12 , FIG. 13 and FIG. 14 , the application screen display method may specifically include steps S101 - S105 .

[0157] Step S101 : In response to a first operation of a user, the electronic device displays a first window, and displays a first screen of a first application in the first window.

[0158] The first window is a split-screen window or a floating window.

[0159] Because the first window is a split-screen window or a floating window, the electronic device typically displays another window on the page where the first window is located. That is, step S101 includes: in response to a first operation by the user, the electronic device displays the first window and the second window on the first page, and displays the first screen of the first application in the first window, and displays the second screen of the second application in the second window.

[0160] The first application may be a game application. The second application may be a game application or a non-game application, such as any one of a social application, a music application, a video application, a communication application, a productivity application, a news application, a reading application, a health application, an education application, and a tool application. The first application may also be another type of application that has the same rendering method as the game application. The embodiment of the present application does not limit the specific type of application. In this way, the embodiment of the present application can be used to solve the problem of screen stretching and screen compression caused by the user adjusting the display ratio of the game application window when the electronic device displays multiple windows and at least one window displays a game application.

[0161] The first operation is used to enable the electronic device to display the first window in a split-screen format or in a floating window format.

[0162] Specifically, the first operation includes the following operations:

[0163] As further shown in FIG2 , taking the example of a first operation for causing the electronic device to display the first window in a floating window format, the first operation may include: a user swiping left on the first screen edge 3, and a user dragging the second icon 5 toward the first application window 2 (which can be regarded as the first window). In this way, the electronic device can display the first window in a floating window format.

[0164] As further shown in FIG4 , taking the example of a first operation for causing the electronic device to display the first window in split-screen form, the first operation may also include: a user clicking the first floating button 61, and a user clicking the first split-screen button 621. In this way, the electronic device may display the first window and the second window in split-screen form.

[0165] As further shown in FIG5 , taking the example of the first operation for causing the electronic device to display the first window in split-screen form, the first operation may also include: the user dragging the second floating button 210 to the left or to the right. In this way, the electronic device may display the first window in split-screen form.

[0166] The first operation may also include other operation modes, and the embodiment of the present application does not limit the specific form of the first operation.

[0167] The first window has a preset first aspect ratio. For example, the first aspect ratio is 1620:922. Aspect ratio refers to the proportional relationship between width and height. In images, videos, display screens and windows, aspect ratio is a commonly used concept to describe size ratios. The first aspect ratio is the ratio of the width to the height of the visible area of ​​the first window. In this way, when the electronic device displays the first window, the first window size of the first window is determined. For example, the first window size is 1620×922. The corresponding second window size of the second window is also determined. Among them, 1620 means that the width of the first window is 1620 pixels, and 922 means that the height of the first window is 922 pixels.

[0168] When the first window is a split-screen window, the sum of the first window size of the first window and the second window size of the second window is equal to the display area size of the display screen. When the first window is a floating screen window, the second window is usually displayed in full screen mode, and the first window usually covers a portion of the second window. Although the first window has a preset first aspect ratio when it is a split-screen window or a floating window, the preset first aspect ratios corresponding to the two forms are different.

[0169] Furthermore, because the first and second window sizes are fixed, when the electronic device displays the first image and begins rendering each frame, the size of the Viewport initialized by the glViewport function is set based on the first window size, and the glScissor function crops the first image based on the first window size. Thus, after the first operation, the first and second images have a normal display ratio.

[0170] Step S102 : In response to the user adjusting the first aspect ratio, the electronic device displays the first window 14 with the second aspect ratio, and intercepts the first instruction sent by the first application to libEGL.

[0171] The adjustment operation is used to enable the electronic device to adjust the display ratio of the first window and the display ratio of the second window.

[0172] Taking the first window as a floating window as an example, the adjustment operation may include: the user dragging the left edge of the first window, the user dragging the right edge of the first window, the user dragging the lower left corner of the first window, and the user dragging the lower right corner of the first window.

[0173] As further shown in FIG7 , taking the first window as a split-screen window as an example, the adjustment operation may further include: the user dragging the first split-screen boundary downwards, so that the electronic device can enlarge and display the first window.

[0174] As further shown in FIG8 , taking the first window as a split-screen window as an example, the adjustment operation may further include: the user dragging the first split-screen boundary upwards, so that the electronic device can reduce the size of the first window.

[0175] The adjustment operation may also include other operation modes, and the embodiments of the present application do not limit the specific form of the adjustment operation. It should be noted here that when the electronic device adjusts the aspect ratio of the first window, the aspect ratio of the second window is also adjusted accordingly, wherein, if the first application is a game application and the second application is also a game application, the first screen and the second screen in the two game applications are both rendered, and there may be a phenomenon of screen stretching and screen compression. Therefore, it is necessary to correct it based on the technical solution in the embodiments of the present application. If the first application is a game application and the second application is a non-game application, the second screen in the second application is not based on rendering, so there is no phenomenon of screen stretching and screen compression. Specifically, in response to the user's adjustment operation on the first window, the electronic device adjusts the aspect ratio of the second window so that the second window has a target aspect ratio, and the aspect ratio of the second screen is the same as the target aspect ratio.

[0176] In this way, the electronic device displays the first window in a second aspect ratio different from the first aspect ratio.

[0177] For example, the first aspect ratio is 1620:922, and the second aspect ratio is 1579:1094.

[0178] At this time, the electronic device intercepts the first instruction sent by the first application to libEGL. The first instruction can be one of the OpenGL instructions. The interception process of the electronic device is specifically implemented through the first function pointer list of the system library and the rendering instruction interception module.

[0179] Among them, libEGL is located in the system library of the electronic device, which is used to provide an interface between the rendering application programming interface (API) (for example, OpenGL) and the underlying window system. It provides the necessary functions required to create and manage the context of the embedded system graphics library, query available configurations, create rendering surfaces, and handle context-related operations.

[0180] Typically, electronic devices contain a list of function pointers in the native OpenGL mechanism, referred to as the native function pointer list. In this list, all function pointers point to libEGL. This allows applications to issue instructions to libEGL that call functions in libEGL, causing libEGL to execute the relevant functionality.

[0181] The first function pointer list libEGL-Functable in the embodiment of the present application is different from the native function pointer list. The libEGL-Functable may include at least one first function pointer, and the first function pointer points to the rendering instruction interception module.

[0182] The first function pointer may be a preset pointer in the first function pointer list pointing to the rendering instruction interception module. The first function pointer points to the rendering instruction interception module, and in essence indirectly calls a function in the rendering instruction interception module.

[0183] That is, the first function pointer list replaces the relevant function pointer corresponding to the first instruction in the native function pointer list, so that the function pointer pointing to libEGL is replaced by the first function pointer pointing to the rendering instruction interception module.

[0184] In a specific implementation, when the first application sends the first instruction to libEGL, the first function pointer is triggered to call a function in the rendering instruction interception module, so that the rendering instruction interception module intercepts the first instruction.

[0185] In one implementation, step S101 may specifically include steps S1011 - S1012 .

[0186] Step S1011: In response to a first operation by the user, the electronic device identifies a current scene of the foreground page;

[0187] Step S1012: If the current scene is a split-screen scene, the electronic device displays the first window and the second window in a split-screen format, and displays the first screen of the first application in the first window, and displays the second screen of the second application in the second window.

[0188] Steps S1011-S1012 may be implemented by the electronic device based on the scene recognition module in the framework layer.

[0189] FIG15 is a third flow chart of the application screen display method provided in an embodiment of the present application.

[0190] As shown in FIG. 15 , step S1011 may include steps S10111 - S10114 .

[0191] Step S10111: The electronic device calls the PMS to determine the first package name of the first application and the second package name of the second application.

[0192] PMS is usually used for the installation, update, and configuration management of software packages. PMS can obtain the package name of the application from the software package.

[0193] Step S10112: The electronic device determines a first running state of the first application according to the first package name, and determines a second running state of the second application according to the second package name, wherein the running state is used to determine whether the application is in a foreground running state or a background running state.

[0194] PMS can interact with monitoring tools in some operating systems to obtain the running status of applications.

[0195] Step S10113: If the first running state is the foreground running state and the second running state is the foreground running state, the electronic device calls the WMS to determine a first window size of the first window and a second window size of the second window.

[0196] The WMS can obtain the window coordinates of the first window to determine the width and height of the first window, so as to determine the size of the first window. For example, the size of the first window is 1120×922, and the size of the second window is 500×922.

[0197] Step S10114: If the electronic device determines that the sum of the first window size and the second window size is equal to a preset first threshold, the electronic device determines that the current scene is a split-screen scene.

[0198] The first threshold is the display area size of the display screen. For example, the display area size is 1620×922. If the first window size is 1120×922 and the second window size is 500×922, the sum of the first window size and the second window size is equal to the display area size.

[0199] Specifically, the above process is implemented based on the scene recognition module. After obtaining the first package name and the second package name from the PMS, the scene recognition module can determine the first running state of the first application corresponding to the first package name, and determine the second running state of the second application corresponding to the second package name. After determining that both applications are running in the foreground, the first window size and the second window size are obtained from the WMS, and after determining that the sum of the first window size and the second window size is equal to the preset first threshold, the current scene is identified as a split-screen scene.

[0200] In one implementation, the electronic device needs to meet certain conditions to intercept the first instruction sent by the first application to libEGL. For example, the electronic device can intercept the first instruction sent by the first application to libEGL after determining that the current scene is a split-screen scene.

[0201] It should be noted here that the method by which the electronic device identifies the current scene in the embodiment of the present application is only used for exemplary explanation. The electronic device can also determine that the current scene is a split-screen scene through other identification methods, such as obtaining the package name through the activity component manager ActivityManager, and monitoring the application's life cycle events through the ActivityLifecycleCallbacks interface to determine the application's foreground running status. In this way, the electronic device can determine in another way that there are two applications running in the foreground, and further obtain the window sizes of the two applications to identify the current scene. The embodiment of the present application does not limit the specific method by which the electronic device identifies the current scene.

[0202] In one implementation, the electronic device may further intercept the first instruction sent by the first application to libEGL after determining that the current scene is a floating window scene in a multi-window scene. The specific identification method of the floating window scene is not described in detail in this embodiment of the application.

[0203] Furthermore, the electronic device is not limited to intercepting the first instruction.

[0204] In fact, in step S102, the electronic device also displays the second window at the third aspect ratio. If the second application is of the same type as the first application, the electronic device will also intercept the second instruction sent by the second application when intercepting the first instruction. This is because the second instruction may also be an OpenGL instruction. When the second application sends the second instruction to libEGL, it triggers the second function pointer in the first function pointer list to call the function in the rendering instruction interception module. In this way, the rendering instruction interception module can intercept the second instruction.

[0205] The first and second function pointers are distinguished only for ease of description. These pointers are preset pointers to the rendering instruction interception module in the first function pointer list. Each application has a corresponding function pointer. Each function pointer is used to cause the rendering instruction interception module to intercept a specific instruction. Thus, electronic devices need to distinguish different instructions and perform different operations on them.

[0206] Specifically, the electronic device can distinguish different instructions through the graphics context glContext function.

[0207] The glContext function represents a graphics context, which manages and maintains the state and resources for graphics rendering. The glContext function must be activated before calling rendering-related functions. The specific activation method depends on the system library or framework layer used by the electronic device.

[0208] The first function pointer list includes a first glContext function and a second glContext function, the first glContext function corresponds to the first function pointer, and the second glContext function corresponds to the second function pointer.

[0209] In the process of the electronic device intercepting the first instruction sent by the first application and the second instruction sent by the second application, when the electronic device determines that the current scene is a split-screen scene, and the first application sends the first instruction to the first function pointer, and the second application sends the second instruction to the second function pointer, the electronic device activates the first glContext function to call the first function pointer, and activates the second glContext function to call the second function pointer. In this way, the electronic device controls the rendering instruction interception module to intercept the first instruction and the second instruction, and the electronic device can identify whether the first instruction or the second instruction is currently intercepted. The embodiments of the present application are generally applied to game applications. Based on the characteristics of game applications, users usually only run one game application when splitting the screen. Therefore, the following embodiments are further explained with reference to the embodiments involving intercepting the first instruction. The relevant processing method of the second instruction can refer to the first instruction, and the embodiments of the present application will not be repeated.

[0210] It should also be noted that the first instruction is actually a part of the first rendering instruction issued by the first application. The rendering instruction interception module only intercepts the first instruction, and the other parts of the first rendering instruction are sent to libEGL for processing in a conventional manner. This embodiment of the application will not be described in detail.

[0211] Step S103 : The electronic device modifies the first instruction to generate a modified instruction, where the modified instruction is used to instruct the electronic device to capture the first area in the first picture with a second aspect ratio.

[0212] After intercepting the first instruction, the electronic device can correct the first instruction. The electronic device corrects the first instruction based on the rendering scale calibration module of the framework layer. After the rendering instruction interception module intercepts the first instruction, it sends the first instruction to the rendering scale calibration module so that the rendering scale calibration module processes the first instruction.

[0213] The following describes the general rendering process of electronic devices.

[0214] FIG16 is a schematic diagram of a conventional rendering process of an electronic device.

[0215] As shown in Figure 16, the application sends rendering instructions to libEGL, which receives the rendering instructions and performs initialization. The specific initialization sequence may include initializing the window system, creating a graphics context, initializing OpenGL function pointers, and initializing the framebuffer (FB). FB initialization is implemented in the application layer code after the graphics context and OpenGL function pointers are initialized. The FB has an original ratio between the width and height of the framebuffer. In graphics rendering, the framebuffer is a memory area used to store rendering results. The framebuffer width and height determine the size of the final displayed image. The original ratio of the framebuffer represents the aspect ratio used during rendering. The original width and height of the framebuffer are recorded based on the glViewport function, and the original crop ratio of the framebuffer is recorded based on the glScissor function.

[0216] FB initialization is the step before rendering begins. After FB initialization, it can be used to receive rendering results.

[0217] During the rendering process, the electronic device can enter the main scene phase. The main scene phase is a step in the graphics rendering pipeline used to determine the visible portion of the camera's view frustum and perform subsequent processing. The main scene phase includes the main scene clipping phase. During the main scene clipping phase, the electronic device records the width and height of the current frame using the glViewport function and the clipping ratio of the current frame using the glScissor function. Therefore, the width and height of the current frame may be stretched or compressed.

[0218] The electronic device draws the main scene based on the width and height of the current frame and the cropping ratio of the current frame.

[0219] After the main scene of the electronic device is drawn, the UI drawing is further performed. The UI drawing may be, for example, the drawing of controls in the page. Since the UI drawing is performed after the main scene is drawn, the controls usually do not deform.

[0220] After the electronic device completes UI drawing, it adds the content in FB to the buffer queue (BufferQueue) through the swap buffer (Swapbuffer), and enables BufferQueue to interact with the system-level compositor SurfaceFlinger, so that SurfaceFlinger obtains the rendered image and sends it to the hardware compositor for synthesis, and displays the synthesized image on the monitor.

[0221] In this way, the width and height of the current frame and the cropping ratio of the current frame may be different from the original width and height and the original cropping ratio, resulting in phenomena such as picture stretching and picture compression.

[0222] FIG17 is a schematic diagram of the rendering process of the electronic device provided in an embodiment of the present application.

[0223] As shown in FIG. 17 , in an embodiment of the present application, after the FB is initialized, the electronic device needs to perform a ratio calibration when entering the main scene phase.

[0224] Specifically, this process is implemented by the rendering scale calibration module. Thus, before correcting the first instruction, the rendering scale calibration module first performs scale calibration to determine whether the first instruction requires correction. This process is also implemented based on the window monitoring module in the electronic device system library.

[0225] In a specific implementation, step S107 may be included before step S103.

[0226] Step S107: The window monitoring module obtains the first window size from the WMS based on a registered callback or periodic query, and sends the first window size to the rendering scale calibration module.

[0227] Registering a callback is a mechanism that allows custom code to be executed when a specific event occurs. When registering a callback function, you actually provide the pointer of the function to the system library or framework layer so that the function can be called when a certain event occurs.

[0228] In this way, when the WMS obtains the first window size event, the window monitoring module can send the first window size to the rendering scale calibration module based on the registered callback function. The first window size obtained by the WMS is the current first window size.

[0229] The window monitoring module can also periodically query the WMS for the first window size. Periodic query refers to the act of performing repeated query operations at a certain time interval or regularly.

[0230] Periodic queries can be implemented through various query instructions.

[0231] For example, the window monitoring module periodically queries the WMS through the getCurrentWindowMetrics query instruction.

[0232] In this way, the rendering scale module can perform scale calibration on the first instruction according to the first window size.

[0233] The first instruction includes a glViewport function instruction and a glScissor function instruction. The glViewport function instruction is used to make the first picture have the second aspect ratio. The glScissor function instruction is used to crop the first picture with the second aspect ratio.

[0234] Step S107 includes steps S1071 to S1073.

[0235] Step S1071: The electronic device obtains the second aspect ratio in the glViewport function instruction.

[0236] In step S1072 , the electronic device determines whether the first aspect ratio is the same as the second aspect ratio.

[0237] If the first aspect ratio of the original width and the original height recorded in the FB is the same as the current aspect ratio of the first window size (ie, the second aspect ratio), the electronic device does not need to modify the first instruction.

[0238] Step S1073: If the first aspect ratio is different from the second aspect ratio, the electronic device executes a step of correcting the first instruction.

[0239] That is, when the first aspect ratio of the original width and the original height recorded in the FB is different from the current aspect ratio of the first window size, the first instruction needs to be corrected, and the electronic device executes step S103.

[0240] FIG18 is a schematic diagram of a first picture correction scenario provided in an embodiment of the present application.

[0241] As shown in FIG. 18 , step S103 includes steps S1031 - S1033 .

[0242] Step S1031: The rendering ratio calibration module determines a second aspect ratio based on the first window size.

[0243] In step S1032 , the rendering ratio calibration module captures a first area in the first frame with a second aspect ratio.

[0244] For example, the original width of the first window is W1, the original height is H1, and the first aspect ratio is: W1:H1. The current height of the first window size is W2, the current width is H2, and the second aspect ratio is: W2:H2.

[0245] Step S1033 : The rendering scale calibration module modifies the glViewport function instruction and the glScissor function instruction. The modified glViewport function instruction is used to make the first area have the second aspect ratio. The modified glScissor function instruction is used to crop the first area with the second aspect ratio.

[0246] The electronic device captures the first area K in the first picture with a ratio of W1:H1 at a ratio of W2:H2, and crops the first area K at a ratio of W2:H2.

[0247] In this way, the electronic device can obtain the current width and current height corresponding to the first area K. When the first area K is at the current width and current height, it can fully cover the first window.

[0248] At this time, in the main scene cropping stage, the rendering scale calibration module corrects the original width and height in the glViewport function to the current width and height of the first area.

[0249] Step S104 : the electronic device controls libEGL to execute the correction instruction.

[0250] After libEGL executes the correction instruction, it also involves UI drawing, adding the content in FB to the buffer queue (BufferQueue) through the swap buffer (Swapbuffer), and making BufferQueue interact with the system-level compositor SurfaceFlinger, so that SurfaceFlinger obtains the rendered picture and sends it to the hardware compositor for synthesis, and displays the synthesized picture on the display. The embodiments of this application will not go into details about this.

[0251] Step S105 : The electronic device displays the first area in a first window in equal proportion.

[0252] In this way, the first area displayed by the electronic device can give the user a normal visual experience.

[0253] The application screen display method shown in the embodiment of the present application can solve the problems of screen stretching, screen compression, etc. that occur when the user adjusts the window display ratio when the electronic device displays the first window in split-screen form or displays the first window in floating window form.

[0254] FIG19 is a first interactive diagram of an application screen display method provided in an embodiment of the present application.

[0255] FIG20 is a second interactive schematic diagram of an application screen display method provided in an embodiment of the present application.

[0256] FIG21 is a second interactive schematic diagram of an application screen display method provided in an embodiment of the present application.

[0257] The following is an illustrative description of the interactive process of the application screen display method provided in the embodiment of the present application in conjunction with Figures 19, 20 and 21.

[0258] As shown in FIG19 , while a user is using a non-game application, the electronic device may display a window 11 of the non-game application in a full-screen or non-full-screen manner.

[0259] At this time, if you want to open the game application, you can perform a sliding operation 31 from the screen edge 21 of the electronic device to the inside of the screen.

[0260] The electronic device can display the first application bar 22 in response to the user's sliding operation 31. The first application bar 22 may include one or more application icons, for example, it may include an icon 23 of a game application. These icons may be preset by the electronic device or the user, or they may be determined by the electronic device based on information such as the user's frequency of use of the application.

[0261] The user may click 32 the icon 23 of the game application in the first application bar 22 to launch the game application.

[0262] After the electronic device starts the game application, the window 12 of the game application can be displayed above the window 11 of the non-game application in the form of a floating window, and an interactive object 24 for triggering the split-screen operation can be displayed on the top of the window 12 of the game application.

[0263] At this time, if the user wants to display the game application and the non-game application in a split-screen manner, he can click on the interactive object 24 at the top of the game application window 12 to display a split-screen button 25 in the interactive object. The split-screen button may include a left-right split-screen button and a top-bottom split-screen button.

[0264] The electronic device may display the window 12 of the game application and the window 11 of the non-game application in a split-screen format in response to the user's click operation 33 on the split-screen button 25 .

[0265] For example, if the user clicks the top-bottom split screen button, the electronic device can display the game application window 12 and the non-game application window 11 in a top-bottom split screen manner, for example: the game application window 12 is displayed in the upper half of the screen, and the non-game application window 11 is displayed in the lower half of the screen.

[0266] For example, if the user clicks the left-right split screen button, the electronic device can display the window 12 of the game application and the window 11 of the non-game application in a left-right split screen manner, for example: the window 12 of the game application is displayed on the left half of the screen, and the window 11 of the non-game application is displayed on the right half of the screen.

[0267] In addition, the electronic device may further display a split screen boundary element 26 between the game application window 12 and the non-game application window 11. The split screen boundary element 26 may be, for example, an interactive bar element having a certain width.

[0268] 20 or 21 , if the user wants to adjust the size of the game application window 12, the user may perform a drag operation 34 on the split screen boundary element 26. In response to the user performing the drag operation 34 on the split screen boundary element 26, the electronic device may change the size of the game application window 12 along the dragging direction of the user, thereby changing the aspect ratio of the game application window 12.

[0269] For example, as shown in FIG20 , an electronic device displays a game application window 12 and a non-game application window 11 in a top-bottom split screen, with the game application window 12 displayed in the upper half of the screen and the non-game application window 11 displayed in the lower half of the screen. If a user drags the split screen boundary element 26 upward, the electronic device reduces the height of the game application window 12 upward, increasing the aspect ratio of the game application window 12. At the same time, the electronic device can capture 27 a target screen from the game screen displayed in the game application window 12 before the adjustment, based on the adjusted aspect ratio of the game application window 12, and display the target screen in the adjusted game application window 12.

[0270] For example, as shown in FIG21 , an electronic device displays a game application window 12 and a non-game application window 11 in a split-screen manner, with the game application window 12 displayed in the upper half of the screen and the non-game application window 11 displayed in the lower half of the screen. If a user drags the split-screen boundary element downward, the electronic device increases the height of the game application window 12 downward, reducing the aspect ratio of the game application window 12. At the same time, the electronic device can capture 27 a target screen from the game screen displayed in the game application window 12 before the adjustment, according to the adjusted aspect ratio of the game application window 12, and display the target screen in the adjusted game application window 12.

[0271] In this way, the target image does not need any stretching, compression or other proportional changes, and can fill and display the window of the adjusted game application, thereby improving the user experience.

[0272] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of an electronic device. It is understandable that, in order to realize the above functions, the electronic device includes a hardware structure and / or software module corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the application screen display method steps of each example described in the embodiment disclosed in this application, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or electronic device software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0273] In the embodiment of the present application, the functional modules or functional units of the electronic device can be divided according to the above method examples. For example, each functional module or functional unit can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules or functional units. Among them, the division of modules or units in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0274] The present application also provides an application screen display device, which may include:

[0275] A display module, the display module is used to display a first window in response to a first operation of a user, and display a first screen of a first application in the first window, wherein the first window has a preset first aspect ratio, the first aspect ratio is the ratio of the width to the height of the visible area of ​​the first window, the first window is a window in a split-screen form or a window in a floating window form, and, in response to the user's adjustment operation of the first aspect ratio, the first window is displayed with a second aspect ratio.

[0276] Graphics processing libEGL module, the libEGL module is used to render the first picture.

[0277] The rendering instruction interception module is used to intercept a first instruction sent by the first application to the libEGL module, and the first instruction is used to instruct the libEGL module to stretch or compress the first picture so that the first picture has a second aspect ratio, which is different from the first aspect ratio.

[0278] The rendering ratio calibration module is used to correct the first instruction and generate a correction instruction, wherein the correction instruction is used to instruct the libEGL module to intercept the first area in the first picture with a second aspect ratio.

[0279] The libEGL module is also used to implement fixup instructions.

[0280] The display module is further configured to display the first area in a proportional manner in the first window.

[0281] In one implementation, the method further includes:

[0282] A scene recognition module is used to identify the current scene of the foreground page. The current scene includes a split-screen scene. The split-screen scene is that the display module displays the first window and the second window in a split-screen format, and displays the first screen of the first application in the first window, and displays the second screen of the second application in the second window.

[0283] In one implementation, the method further includes:

[0284] The package manager service PMS module is used to determine the first package name of the first application and the second package name of the second application; determine the first running state of the first application according to the first package name, and determine the second running state of the second application according to the second package name, wherein the running state is used to determine whether the application is in the foreground running state or the background running state.

[0285] The window manager service WMS module is used to determine a first window size of the first window and a second window size of the second window if the first running state is a foreground running state and the second running state is a foreground running state.

[0286] The scene recognition module is further configured to determine that the current scene is a split-screen scene when the sum of the first window size and the second window size is equal to a preset first threshold.

[0287] In one implementation, the libEGL module is further used to set a first function pointer list, the first function pointer list includes a first function pointer, the first function pointer points to the rendering instruction interception module, the first function pointer is used to enable the rendering instruction interception module to intercept a first instruction, and the first instruction is one of the open graphics library OpenGL instructions.

[0288] The rendering instruction interception module is also used to intercept the first instruction when the first application sends the first instruction to the first function pointer if the scene recognition module determines that the current scene is a split-screen scene.

[0289] In one implementation, the first function pointer list further includes a second function pointer, the second function pointer points to the rendering instruction interception module, and the second function pointer is used to enable the rendering instruction interception module to intercept a second instruction, which is one of the OpenGL instructions.

[0290] The rendering instruction interception module is also used to intercept the second instruction when the second application sends the second instruction to the second function pointer if the scene recognition module determines that the current scene is a split-screen scene.

[0291] In one implementation, the first function pointer list includes a first graphics context glContext function and a second glContext function, the first glContext function corresponds to a first function pointer, the second glContext function corresponds to a second function pointer, and the second function pointer is used to enable the rendering instruction interception module to intercept the second instruction.

[0292] The libEGL module is further configured to activate the first glContext function to call the first function pointer and activate the second glContext function to call the second function pointer if the current scene is a split-screen scene and the first application sends a first instruction to the first function pointer and the second application sends a second instruction to the second function pointer. The rendering instruction interception module is further configured to intercept the first instruction and the second instruction. This implementation illustrates a specific method for the application screen display device to intercept and send the first instruction to correct the first instruction. In this way, the application screen display device can resolve issues such as screen stretching and compression that occur in split-screen scenarios.

[0293] In one implementation, the method further includes:

[0294] The window monitoring module is used to obtain the first window size from the WMS module based on a registered callback or a periodic query, and send the first window size to the rendering scale calibration module.

[0295] In one implementation, the rendering instruction interception module is further configured to send the first instruction to the rendering scale calibration module.

[0296] In one implementation, the first instruction includes a viewport glViewport function instruction and a cropping glScissor function instruction. The glViewport function instruction is used to make the first picture have the second aspect ratio, and the glScissor function instruction is used to crop the first picture with the second aspect ratio.

[0297] The rendering ratio calibration module is further used to obtain the second aspect ratio in the glViewport function instruction; determine whether the first aspect ratio and the second aspect ratio are the same; if the first aspect ratio and the second aspect ratio are different, correct the first instruction.

[0298] In one implementation, the rendering scale calibration module is further used to determine a second aspect ratio based on the first window size; to capture a first area in the first screen with the second aspect ratio; and to modify a glViewport function instruction and a glScissor function instruction, wherein the modified glViewport function instruction is used to make the first area have the second aspect ratio, and the modified glScissor function instruction is used to crop the first area with the second aspect ratio.

[0299] FIG22 is a schematic structural diagram of an application screen display device provided in an embodiment of the present application.

[0300] As shown in Figure 22, in one embodiment, an electronic device can implement corresponding functions using the hardware device shown in Figure 22. The device may include: a touch screen 701, a memory 702, a processor 703, and a communication module 704. Each of the above components may be connected via one or more communication buses 705. Each of the above components may be connected via one or more communication buses 705. The touch screen 701 may include a display panel 7011 and a touch sensor 7012. The display panel 7011 is used to display images, and the touch sensor 7012 may transmit detected touch operations to an application processor to determine the type of touch event and provide visual output related to the touch operation via the display panel 7011. The processor 703 may include one or more processing units, such as an application processor, a modem processor, a graphics processor, an image signal processor, a controller, a video codec, a digital signal processor, a baseband processor, and / or a neural network processor. The different processing units may be independent devices or integrated into one or more processors. The memory 702 is coupled to the processor 703 and is used to store various software programs and / or computer instructions. The memory 702 may include a volatile memory and / or a non-volatile memory. When the processor executes the computer instructions, the electronic device may perform the various functions or steps of the above method embodiments.

[0301] In one embodiment, the touch screen 701 may include a display panel 7011 and a touch sensor 7012, wherein the display panel 7011 is used to display images, and the touch sensor 7012 can transmit the detected touch operation to the application processor to determine the type of touch event and provide visual output related to the touch operation through the display panel 7011. The processor 703 may include one or more processing units, for example: the processor 703 may include an application processor, a modem processor, a graphics processor, an image signal processor, a controller, a video codec, a digital signal processor, a baseband processor, and / or a neural network processor. The different processing units may be independent devices or integrated into one or more processors. The memory 702 is coupled to the processor 703 and is used to store various software programs, capacitance data, etc. The memory 702 may include volatile memory and / or non-volatile memory.

[0302] When the software program and / or multiple groups of instructions in the memory 702 are executed by the processor 703, the electronic device implements the following method steps: in response to a first operation of the user, the electronic device displays a first window and displays a first screen of the first application in the first window, wherein the first window has a preset first aspect ratio, and the first aspect ratio is the ratio of the width to the height of the visible area of ​​the first window, and the first window is a split-screen window or a floating window; in response to the user's adjustment operation of the first aspect ratio, the electronic device displays the first window with a second aspect ratio, and intercepts a first instruction sent by the first application to the graphics library libEGL, wherein libEGL is located in the system library of the electronic device, and the first instruction is used to instruct the electronic device to stretch or compress the first screen so that the first screen has a second aspect ratio, which is different from the first aspect ratio; the electronic device corrects the first instruction to generate a correction instruction, and the correction instruction is used to instruct the electronic device to intercept the first area in the first screen with the second aspect ratio; the electronic device controls libEGL to execute the correction instruction; and the electronic device displays the first area in the first window in equal proportion.

[0303] The present application also provides an electronic device, comprising: a processor, a memory and a touch screen; the memory stores program instructions, and when the program instructions are executed by the processor, the electronic device executes the application screen display method in any implementation method of the above embodiments.

[0304] An embodiment of the present application also provides a chip system, which includes at least one processor and at least one interface circuit. The processor and the interface circuit can be interconnected via lines. For example, the interface circuit can be used to receive signals from other devices (such as the memory of an electronic device). For another example, the interface circuit can be used to send signals to other devices. Exemplarily, the interface circuit can read instructions stored in the memory and send the instructions to the processor. When the instructions are executed by the processor, the electronic device can perform the various steps in the above embodiments. Of course, the chip system can also include other discrete devices, which is not specifically limited in the embodiment of the present application.

[0305] An embodiment of the present application also provides a computer-readable storage medium, which includes computer instructions. When the computer instructions are executed on the above-mentioned electronic device, the electronic device executes the various functions or steps executed by the mobile phone in the above-mentioned method embodiment.

[0306] The embodiment of the present application further provides a computer program product, which, when executed on a computer, enables the computer to execute the functions or steps executed by the mobile phone in the above method embodiment.

[0307] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0308] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0309] Units described as separate components may or may not be physically separate, and components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0310] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0311] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0312] The above content is only a specific embodiment of this application, but the scope of protection of this application is not limited to this. Any changes or replacements within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A method for displaying an application screen, characterized in that: Used in electronic equipment, including: In response to a first operation of the user, the electronic device displays a first window, and displays a first screen of a first application in the first window, wherein the first screen is rendered, the first window has a preset first aspect ratio, the first aspect ratio is a ratio of a width to a height of a visible area of ​​the first window, and the first window is a split-screen window or a floating window; In response to a user's adjustment operation on the first window, the electronic device displays the first window with a second aspect ratio, determines a target picture with the second aspect ratio from the first picture, and displays the target picture in the first window, wherein the second aspect ratio is different from the first aspect ratio.

2. The application screen display method according to claim 1, characterized in that: In response to the user's adjustment operation on the first window, the electronic device displays the first window with a second aspect ratio, determines a target picture corresponding to the second aspect ratio from the first picture, and displays the target picture in the first window, including: In response to a user's adjustment operation on the first window, the electronic device displays the first window with a second aspect ratio, and intercepts a first instruction sent by the first application to a graphics library libEGL, wherein the libEGL is located in a system library of the electronic device, and the first instruction is used to instruct the electronic device to stretch or compress the first picture so that the first picture has a second aspect ratio, and the second aspect ratio is different from the first aspect ratio; The electronic device modifies the first instruction to generate a modified instruction, wherein the modified instruction is used to instruct the electronic device to capture a target picture in the first picture with the second aspect ratio; The electronic device controls the libEGL to execute the correction instruction; The electronic device displays the target screen in the first window.

3. The application screen display method according to claim 1 or 2, characterized in that: The method of displaying, in response to a first operation of a user, a first window by the electronic device and displaying a first screen of a first application in the first window comprises: In response to a first operation by the user, the electronic device identifies a current scene of the foreground page; If the current scene is a split-screen scene, the electronic device displays the first window and the second window in a split-screen format, and displays a first screen of a first application in the first window, and displays a second screen of a second application in the second window.

4. The application screen display method according to claim 3, characterized in that: The first application is a game application, and the second application is any one of a game application, a social application, a music application, a video application, a communication application, a productivity application, a news application, a reading application, a health application, an education application, and a tool application.

5. The application screen display method according to claim 4, characterized in that: When the first application is a game application and the second application is a non-game application, the second screen is not obtained by rendering; In response to the user's adjustment operation on the first window, the electronic device displays the first window with a second aspect ratio, comprising: In response to the user's adjustment operation on the first window, the electronic device adjusts the width and height of the second window ratio so that the second window has a target aspect ratio, and the aspect ratio of the second picture is the same as the target aspect ratio.

6. The application screen display method according to claim 3, characterized in that: The electronic device identifies the current scene of the foreground page, including: The electronic device calls a package manager service PMS to determine a first package name of the first application and a second package name of the second application; The electronic device determines a first running state of the first application according to the first package name, and determines a second running state of the second application according to the second package name, wherein the running state is used to determine whether the application is in a foreground running state or in a background running state; If the first running state is the foreground running state, and the second running state is the foreground running state, the electronic device calls a window manager service WMS to determine a first window size of the first window, and a second window size of the second window; If the electronic device determines that the sum of the first window size and the second window size is equal to a preset first threshold, the electronic device determines that the current scene is the split-screen scene.

7. The application screen display method according to claim 6, characterized in that: The framework layer of the electronic device includes a rendering instruction interception module and a first function pointer list, the first function pointer list includes a first function pointer, the first function pointer points to the rendering instruction interception module, the first function pointer is used to enable the rendering instruction interception module to intercept a first instruction, and the first instruction is one of the open graphics library OpenGL instructions; In response to the user's adjustment operation on the first aspect ratio, the electronic device displays the first window with a second aspect ratio, and intercepts a first instruction sent by the first application to libEGL, including: If the electronic device determines that the current scene is the split-screen scene, the electronic device controls the first application to send the first instruction to the first function pointer; The electronic device controls the rendering instruction interception module to intercept the first instruction.

8. The application screen display method according to claim 7, characterized in that: In response to the user's adjustment operation on the first aspect ratio, the electronic device displays the first window with a second aspect ratio and intercepts the first instruction sent by the first application, including: In response to the user's adjustment operation on the first aspect ratio, the electronic device displays the first window with a second aspect ratio and displays the second window with a third aspect ratio, and intercepts a first instruction sent by the first application and intercepts a second instruction sent by the second application, wherein the second instruction is one of the OpenGL instructions.

9. The application screen display method according to claim 8, characterized in that: The first function pointer list includes a first graphics context glContext function and a second glContext function, the first glContext function corresponds to the first function pointer, the second glContext function corresponds to a second function pointer, and the second function pointer is used to enable the rendering instruction interception module to intercept the second instruction; The electronic device intercepts a first instruction sent by a first application, and intercepts a second instruction sent by the second application, including: If the electronic device determines that the current scene is the split-screen scene, the electronic device controls the first application issuing the first instruction to the first function pointer, and controlling the second application to issue the second instruction to the second function pointer; The electronic device activates the first glContext function to call the first function pointer, and activates the second glContext function to call the second function pointer; The electronic device controls the rendering instruction interception module to intercept the first instruction and the second instruction.

10. The application screen display method according to claim 7, characterized in that: The framework layer of the electronic device also includes a window monitoring module and a rendering ratio calibration module; Before the electronic device corrects the first instruction, the method further includes: The window monitoring module obtains the first window size from the WMS based on a registration callback or a periodic query; The window monitoring module sends the first window size to the rendering scale calibration module.

11. The application screen display method according to claim 10, characterized in that: Before the electronic device corrects the first instruction, the method further includes: The rendering instruction interception module sends the first instruction to the rendering scale calibration module.

12. The application screen display method according to claim 11, characterized in that: The first instruction includes a viewport glViewport function instruction and a cropping glScissor function instruction, the glViewport function instruction is used to make the first picture have the second aspect ratio, and the glScissor function instruction is used to crop the first picture with the second aspect ratio; Before the electronic device corrects the first instruction, the method further includes: The electronic device obtains the second aspect ratio in the glViewport function instruction; The electronic device determines whether the first aspect ratio is the same as the second aspect ratio; If the first aspect ratio is different from the second aspect ratio, the electronic device performs a step of correcting the first instruction.

13. The application screen display method according to claim 12, characterized in that: The electronic device correcting the first instruction includes: The rendering scale calibration module determines the second aspect ratio based on the first window size; The rendering ratio calibration module intercepts a first area in the first picture with the second aspect ratio; The rendering ratio calibration module corrects the glViewport function instruction and the glScissor function instruction, the corrected glViewport function instruction is used to make the first area have the second aspect ratio, and the corrected glScissor function instruction is used to crop the first area with the second aspect ratio.

14. An electronic device, characterized in that: include: A processor and a memory, wherein the memory stores program instructions, and when the program instructions are executed by the processor, the electronic device executes the application screen display method according to any one of claims 1 to 13.

15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed on the electronic device, the electronic device executes the application screen display method according to any one of claims 1 to 13.

16. A computer program product, characterized in that When the computer program product is executed on an electronic device, the electronic device executes the application screen display method according to any one of claims 1 to 13.