Display control method and device, electronic equipment and storage medium
By determining the target resolution based on the initial resolution in a large-screen mobile phone, creating a small-sized canvas and enlarging it to a full-screen display layer, the problem of dynamically adjusting the display resolution in the existing technology is solved, and the smoothness of the mobile phone is significantly improved. speed and endurance.
Patent Information
- Application Number
- CN202310382498.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-11
- Publication Date
- 2024-10-18
AI Technical Summary
In the existing technology, in order to take into account the performance and battery life of large-screen mobile phones, the display resolution is usually dynamically adjusted during the rendering and synthesis stage of the image processing unit, but the effect is poor.
By determining the target resolution based on the initial resolution supported by the application, creating a canvas of the corresponding size, rendering and display operations are performed on the canvas, and the target display layer is enlarged to the full screen size and sent to the image processing unit for composite display, reducing underlying operations. data, reducing the time and power consumption of rendering display operations.
It effectively improves the fluency and battery life of large-screen mobile phones, and significantly improves performance and battery life.
Smart Images

Figure CN118803104A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of image processing technology, and in particular to a display control method, device, electronic device and storage medium. Background Art
[0002] At present, the performance configuration of mobile devices is very high, such as large-size screens (referred to as large screens), the latest processors and large battery capacity. In related technologies, in order to balance the performance and battery life of large-screen mobile phones, the graphics processing unit (GPU) is usually intervened in the rendering and synthesis stage to dynamically adjust the display resolution of the application to reduce power consumption, improve fluency and increase battery life, but the effect is poor. Summary of the invention
[0003] The present disclosure provides a display control method, device, electronic device and storage medium to at least solve the problem in the related art that the performance and battery life of large-screen mobile phones are poorly improved.
[0004] The technical solution of the present disclosure is as follows:
[0005] According to a first aspect of an embodiment of the present disclosure, a display control method is provided, comprising: determining a target resolution according to an initial resolution supported by an application, the target resolution being smaller than the initial resolution; creating a canvas of a corresponding size according to the target resolution; performing a rendering and display operation on the canvas according to the target resolution to obtain a target display layer; enlarging the target display layer to a full-screen size according to the screen resolution to obtain a screen display layer; and sending the screen display layer to an image processing unit, so that the image processing unit performs a synthetic display on the screen according to the screen display layer.
[0006] In one embodiment of the present disclosure, determining the target resolution based on the initial resolution supported by the application includes: acquiring a display mode of the application; determining a corresponding scaling ratio based on the display mode, wherein the scaling ratio is less than one; and determining the target resolution based on the initial resolution and the scaling ratio.
[0007] In one embodiment of the present disclosure, a pre-configured correspondence table between the plurality of display modes and the plurality of zoom ratios is obtained; and the corresponding zoom ratio is determined according to the display mode and the correspondence table.
[0008] In one embodiment of the present disclosure, the display mode includes any one of the following modes: full screen mode, small window mode and in-application split screen mode.
[0009] In one embodiment of the present disclosure, creating a canvas of a corresponding size according to the target resolution includes: determining a corresponding target window size according to the target resolution; and creating the canvas of a corresponding size according to the target window size.
[0010] In one embodiment of the present disclosure, performing a rendering and display operation on the canvas according to the target resolution to obtain a target display layer includes: determining a corresponding target pixel density and a target window size according to the target resolution; and performing a rendering and display operation on the canvas according to the target resolution, the target pixel density, and the target window size to obtain the target display layer.
[0011] In one embodiment of the present disclosure, the rendering and display operation includes at least one of the following operations: measuring, placing, and drawing.
[0012] In one embodiment of the present disclosure, the step of enlarging the target display layer to a full-screen size according to the screen resolution to obtain the screen display layer includes: determining a corresponding screen window size according to the screen resolution; and enlarging the target display layer to a full-screen size according to the screen window size to obtain the screen display layer.
[0013] According to a second aspect of an embodiment of the present disclosure, a display control device is provided, including: a determination module, configured to determine a target resolution according to an initial resolution supported by an application, the target resolution being smaller than the initial resolution; a creation module, configured to create a canvas of a corresponding size according to the target resolution; an operation module, configured to perform a rendering display operation on the canvas according to the target resolution to obtain a target display layer; an enlargement module, configured to enlarge the target display layer to a full-screen size according to the screen resolution to obtain a screen display layer; a sending module, configured to send the screen display layer to an image processing unit, so that the image processing unit performs a synthetic display on the screen according to the screen display layer.
[0014] In one embodiment of the present disclosure, the determination module is further configured to: obtain a display mode of the application; determine a corresponding scaling ratio according to the display mode, the scaling ratio being less than one; and determine the target resolution according to the initial resolution and the scaling ratio.
[0015] In one embodiment of the present disclosure, the determination module is further configured to: obtain a pre-configured correspondence table between the multiple display modes and the multiple zoom ratios; and determine the corresponding zoom ratio according to the display mode and the correspondence table.
[0016] In one embodiment of the present disclosure, the display mode includes any one of the following modes: full screen mode, small window mode and in-application split screen mode.
[0017] In one embodiment of the present disclosure, the creation module is further configured to: determine a corresponding target window size according to the target resolution; and create the canvas of a corresponding size according to the target window size.
[0018] In one embodiment of the present disclosure, the operation module is further configured to: determine the corresponding target pixel density and target window size according to the target resolution; and perform the rendering and display operation on the canvas according to the target resolution, the target pixel density and the target window size to obtain the target display layer.
[0019] In one embodiment of the present disclosure, the rendering and display operation includes at least one of the following operations: measuring, placing, and drawing.
[0020] In one embodiment of the present disclosure, the magnification module is further configured to: determine the corresponding screen window size according to the screen resolution; and magnify the target display layer to a full screen size according to the screen window size to obtain the screen display layer.
[0021] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, comprising: a display control device as described in the second aspect of an embodiment of the present disclosure.
[0022] According to a fourth aspect of an embodiment of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the instructions to implement the display control method as described in the first aspect of the embodiment of the present disclosure.
[0023] According to the fifth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided. When instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device can execute the display control method as described in the first aspect of the embodiment of the present disclosure.
[0024] The technical solution provided by the embodiments of the present disclosure brings at least the following beneficial effects:
[0025] The display control method of the disclosed embodiment determines the target resolution according to the initial resolution supported by the application, the target resolution is smaller than the initial resolution, a canvas of corresponding size is created according to the target resolution, rendering and display operations are performed on the canvas, and the obtained target display layer is enlarged to full screen size, and the obtained screen display layer is sent to the image processing unit for composite display. The disclosed embodiment intervenes in the first stage of rendering, i.e., the stage of creating the canvas, and creates a small-sized canvas by lowering the resolution. Subsequent rendering and display operations are all performed on the small-sized canvas, and the obtained target display layer is enlarged to full screen size and sent to the image processing unit for composite display, which reduces the data of the underlying operations, thereby reducing the time of the rendering and display operations, reducing power consumption, improving fluency, and increasing battery life, and has a good effect on improving the performance and battery life of large-screen mobile phones.
[0026] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.
[0028] Figure 1 The diagram is a schematic diagram of a scene of a display control method according to an exemplary embodiment.
[0029] Figure 2 is a flowchart of a display control method according to another exemplary embodiment.
[0030] Figure 3 is a flowchart of a display control method according to another exemplary embodiment.
[0031] Figure 4 is a schematic diagram of full screen mode.
[0032] Figure 5 This is a schematic diagram of the small window mode.
[0033] Figure 6 is a diagram of the split-screen mode within the app.
[0034] Figure 7 is a flowchart of a display control method according to another exemplary embodiment.
[0035] Figure 8 The invention is a block diagram of a display control device according to an exemplary embodiment.
[0036] Fig. 9It is a block diagram of an electronic device according to an exemplary embodiment.
[0037] Fig.10 is a block diagram of an electronic device according to another exemplary embodiment. DETAILED DESCRIPTION
[0038] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.
[0039] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0040] To clearly illustrate the display control method of the embodiment of the present disclosure, Figure 1 The display control method of the embodiment of the present disclosure is described. Figure 1 As shown, when the App process is started, the initial resolution supported by the App is obtained, corresponding to window A, window B, ..., window X. The display mode of the application, that is, the scene, is identified, and the scaling scale corresponding to the scene is obtained. According to the scale, the initial resolution is reduced to the target resolution, corresponding to the small-sized small window A, small window B, ..., small window X, a corresponding small-sized canvas is created, a series of rendering and display operations are performed on the small-sized canvas, the target display layer is obtained, the target display layer is enlarged to the full screen size, and the enlarged screen display layer is obtained, corresponding to the enlarged layer A, enlarged layer B, ..., enlarged layer X, and the enlarged screen display layer is sent to the image processing unit GPU, and the GPU performs synthesis display on the screen according to the screen display layer.
[0041] The technical solutions in the embodiments of the present disclosure are further described clearly and completely below in conjunction with the accompanying drawings.
[0042] Figure 2 FIG. 1 is a flow chart of a display control method according to another exemplary embodiment. Figure 2 As shown, the display control method of the embodiment of the present disclosure may include the following steps:
[0043] S201, determining a target resolution according to an initial resolution supported by an application, wherein the target resolution is smaller than the initial resolution.
[0044] It should be noted that the display control method of the embodiment of the present disclosure is executed by the display control device provided by the embodiment of the present disclosure, which can be set in an electronic device to execute the display control method of the embodiment of the present disclosure. The electronic device can be a smart mobile device such as a mobile phone or a tablet computer.
[0045] In the disclosed embodiment, when the App starts the application process, it sends a resolution acquisition request to the server. According to the acquisition request, the server obtains the resolution supported by the current application through the system service process as the initial resolution, and sends the initial resolution to the App. The App adjusts the initial resolution and reduces it to the target resolution.
[0046] S202: Create a canvas of a corresponding size according to the target resolution.
[0047] In the disclosed embodiment, the App creates a canvas (Surface) of a size corresponding to the target resolution according to the target resolution determined in step S201, that is, creates a small-sized canvas.
[0048] S203, performing rendering and display operations on the canvas according to the target resolution to obtain a target display layer.
[0049] In the disclosed embodiment, the App performs a series of rendering and display operations on the canvas created in step S202 according to the target resolution determined in step S201, ensuring that the operations are performed on a small-sized canvas, and generates a target display layer after the operations are completed. The rendering and display operations may specifically include but are not limited to at least one of the following operations: measuring, placing, and drawing.
[0050] S204, enlarging the target display layer to a full screen size according to the screen resolution to obtain a screen display layer.
[0051] In the disclosed embodiment, the App side submits the target display layer generated in step S203 to the server side, and the window state (WindowState) component in the server side obtains the resolution of the current screen, that is, the screen resolution, and enlarges the target display layer obtained in step S203 to the full screen size according to the screen resolution to obtain the screen display layer.
[0052] S205, sending the screen display layer to the image processing unit, so that the image processing unit performs synthesis display on the screen according to the screen display layer.
[0053] In the disclosed embodiment, the server sends the screen display layer obtained in step S204 to the graphics processing unit GPU, and the canvas synthesizer (SurfaceFlinger) in the GPU performs synthesis and display on the screen according to the screen display layer.
[0054] In summary, the display control method provided by the embodiment of the present disclosure determines the target resolution according to the initial resolution supported by the application, and the target resolution is smaller than the initial resolution. A canvas of the corresponding size is created according to the target resolution, and a rendering and display operation is performed on the canvas. The obtained target display layer is enlarged to the full screen size, and the obtained screen display layer is sent to the image processing unit for composite display. The embodiment of the present disclosure intervenes in the first stage of rendering, i.e., the stage of creating the canvas, and creates a small-sized canvas by lowering the resolution. Subsequent rendering and display operations are all performed on the small-sized canvas, and the obtained target display layer is enlarged to the full screen size and sent to the image processing unit for composite display, which reduces the data of the underlying operations, thereby reducing the time of the rendering and display operations, reducing power consumption, improving fluency, and increasing battery life, and has a good effect on improving the performance and battery life of large-screen mobile phones.
[0055] Figure 3 FIG. 1 is a flow chart of a display control method according to another exemplary embodiment. Figure 3 As shown, based on the above embodiment, the display control method of the embodiment of the present disclosure may include the following steps:
[0056] In the above embodiment, step S201 “determining the target resolution according to the initial resolution supported by the application” may specifically include the following steps S301 - S303 .
[0057] S301, obtaining the display mode of the application.
[0058] In the disclosed embodiment, the App obtains the current display mode of the application, that is, the scene when the canvas is created. The display mode may specifically include but is not limited to any one of the following modes: full screen mode, small window mode, and in-application split screen mode.
[0059] Full screen mode refers to adjusting the display page (ie, window) of a software or application to a size that fills the entire screen on a terminal device such as a mobile phone. Figure 4 is a schematic diagram of full screen mode, such as Figure 4 As shown, the window of application A fills the entire screen.
[0060] Small window mode, also called free window mode, refers to adjusting the display page (i.e. window) of the software or application to a size smaller than the screen on the screen of a terminal device such as a mobile phone. In this mode, users are allowed to dynamically adjust the window size of the application, and one or more application windows can be displayed on the screen. Figure 5 is a schematic diagram of the small window mode, such as Figure 5 As shown, free small windows of application A and application B are displayed on the top of the desktop on the screen, and the window sizes of application A and application B are smaller than the size of the screen.
[0061] The in-app split-screen mode refers to the display of at least two windows of the software or application separated on the left and right sides on the screen of a terminal device such as a mobile phone, with each display page (i.e. window) of the software or application as the basic unit. It is commonly used in tablets and foldable screen devices. Figure 6 This is a schematic diagram of the split-screen mode within the application, such as Figure 6 As shown, two windows are displayed on the left and right of the screen, the left window is the list page of application A, and the right window is the details page of application A.
[0062] S302, determining a corresponding zoom ratio according to the display mode, where the zoom ratio is less than one.
[0063] In the disclosed embodiment, the App determines the preset scaling ratio (scale) corresponding to the display mode obtained in step S301. The scale is less than 1 to ensure that the target resolution determined in step S303 according to the initial resolution and the scaling ratio is less than the initial resolution.
[0064] In some embodiments, Figure 7 As shown, the above step S302 "determining the corresponding zoom ratio according to the display mode" may specifically include the following steps S701-S702:
[0065] S701, obtaining a pre-configured correspondence table between a plurality of display modes and a plurality of zoom ratios.
[0066] In the embodiment of the present disclosure, a corresponding scale may be preconfigured for each display mode, and a list including correspondences between multiple display modes and multiple scaling ratios, i.e., a correspondence table, is generated, wherein the multiple display modes and the multiple scaling ratios correspond one to one.
[0067] S702: Determine a corresponding zoom ratio according to the display mode and the corresponding relationship table.
[0068] In the embodiment of the present disclosure, the App side determines the scale corresponding to the display mode obtained in step S301 by searching the corresponding relationship table obtained in step S701 according to the display mode obtained in step S301.
[0069] S303: Determine the target resolution according to the initial resolution and the scaling ratio.
[0070] In the embodiment of the present disclosure, the App side calculates the product of the initial resolution supported by the application and the scale determined in step S302 as the target resolution.
[0071] Furthermore, step S202 of “creating a canvas of corresponding size according to the target resolution” in the above embodiment may specifically include the following steps S304-S305.
[0072] S304: Determine a corresponding target window size according to the target resolution.
[0073] In the disclosed embodiment, the App determines the window size corresponding to the target resolution, that is, the target window size, according to the target resolution determined in step S303.
[0074] S305: Create a canvas of a corresponding size according to the target window size.
[0075] In the disclosed embodiment, the App creates a canvas of a corresponding size according to the target window size determined in step S304, and the size of the canvas is the target window size.
[0076] Furthermore, step S203 in the above embodiment, “performing a rendering and display operation on the canvas according to the target resolution to obtain a target display layer”, may specifically include the following steps S306-S307.
[0077] S306: Determine a corresponding target pixel density and a target window size according to the target resolution.
[0078] In the disclosed embodiment, the App determines the window size corresponding to the target resolution, i.e., the target window size, and determines the pixel density corresponding to the target resolution, i.e., the target pixel density, according to the target resolution determined in step S303.
[0079] S307, performing rendering and display operations on the canvas according to the target resolution, target pixel density and target window size to obtain a target display layer.
[0080] In the embodiment of the present disclosure, the App performs a series of rendering and display operations on the canvas according to the target resolution determined in step S303 and the target pixel density and target window size determined in step S306, ensuring that the operations are performed on a small-sized canvas, and generates a target display layer after the operations are completed. The rendering and display operations may specifically include but are not limited to at least one of the following operations: measuring, placing, and drawing.
[0081] Furthermore, step S204 in the above embodiment, “enlarging the target display layer to the full screen size according to the screen resolution to obtain the screen display layer”, may specifically include the following steps S308-S307.
[0082] S308: Determine the corresponding screen window size according to the screen resolution.
[0083] In the disclosed embodiment, the App side submits the target display layer generated in step S307 to the server side, and the WindowState component in the server side obtains the resolution of the current screen, i.e., the screen resolution, and determines the window size corresponding to the screen resolution, i.e., the screen window size, based on the screen resolution.
[0084] S309, enlarging the target display layer to a full screen size according to the screen window size to obtain a screen display layer.
[0085] In the disclosed embodiment, the server enlarges the target display layer obtained in step S307 to the full screen size according to the screen window size determined in step S308 to obtain the screen display layer.
[0086] S310, sending the screen display layer to the image processing unit, so that the image processing unit performs synthesis display on the screen according to the screen display layer.
[0087] In the embodiment of the present disclosure, the specific process of step S310 can refer to the relevant description in step S205 of the above embodiment, which will not be repeated here.
[0088] In summary, the display control method provided by the embodiment of the present disclosure determines the target resolution according to the initial resolution supported by the application, the target resolution is smaller than the initial resolution, a canvas of corresponding size is created according to the target resolution, a rendering display operation is performed on the canvas, and the obtained target display layer is enlarged to the full screen size, and the obtained screen display layer is sent to the image processing unit for synthetic display. The embodiment of the present disclosure intervenes in the first stage of rendering, that is, the stage of creating a canvas, and creates a small-sized canvas by reducing the resolution. The subsequent rendering and display operations are all performed on the small-sized canvas, and the obtained target display layer is enlarged to the full screen size and sent to the image processing unit for synthetic display, which reduces the data of the underlying operation, thereby reducing the time of the rendering and display operation, reducing power consumption, improving fluency, and increasing battery life, and has a good effect on improving the performance and battery life of large-screen mobile phones. In addition, the corresponding scaling ratio is determined according to the display mode of the application, and then the target resolution corresponding to the display mode is determined, so that the adjustment gear of the resolution can be flexibly switched according to different display modes, and multiple display modes such as full-screen mode, small window mode, and split-screen mode in the application can be adapted.
[0089] Figure 8 FIG. 1 is a block diagram of a display control device according to an exemplary embodiment. Figure 8 As shown, the display control device 800 of the embodiment of the present disclosure includes: a determination module 801, a creation module 802, an operation module 803, an amplification module 804 and a sending module 805.
[0090] The determination module 801 is configured to determine a target resolution according to an initial resolution supported by the application, wherein the target resolution is smaller than the initial resolution.
[0091] The creation module 802 is configured to create a canvas of a corresponding size according to the target resolution.
[0092] The operation module 803 is configured to perform a rendering display operation on the canvas according to the target resolution to obtain a target display layer.
[0093] The enlargement module 804 is configured to enlarge the target display layer to a full screen size according to the screen resolution to obtain a screen display layer.
[0094] The sending module 805 is configured to send the screen display layer to the image processing unit, so that the image processing unit performs synthesis display on the screen according to the screen display layer.
[0095] In one embodiment of the present disclosure, the determination module 801 is further configured to: obtain a display mode of the application; determine a corresponding scaling ratio according to the display mode, the scaling ratio being less than one; and determine a target resolution according to the initial resolution and the scaling ratio.
[0096] In one embodiment of the present disclosure, the determination module 801 is further configured to: obtain a pre-configured correspondence table between multiple display modes and multiple zoom ratios; and determine the corresponding zoom ratio according to the display mode and the correspondence table.
[0097] In one embodiment of the present disclosure, the display mode includes any one of the following modes: full screen mode, small window mode and in-application split screen mode.
[0098] In one embodiment of the present disclosure, the creation module 802 is further configured to: determine the corresponding target window size according to the target resolution; and create a canvas of a corresponding size according to the target window size.
[0099] In one embodiment of the present disclosure, the operation module 803 is further configured to: determine the corresponding target pixel density and target window size according to the target resolution; perform rendering and display operations on the canvas according to the target resolution, target pixel density and target window size to obtain the target display layer.
[0100] In one embodiment of the present disclosure, the rendering and display operation includes at least one of the following operations: measuring, placing, and drawing.
[0101] In one embodiment of the present disclosure, the magnification module 804 is further configured to: determine the corresponding screen window size according to the screen resolution; and magnify the target display layer to the full screen size according to the screen window size to obtain the screen display layer.
[0102] In the embodiments of the present disclosure, the specific manner in which each module in the device of the above embodiments performs operations has been described in detail in the embodiments of the method, and will not be repeated here.
[0103] In summary, the display control device provided by the embodiment of the present disclosure intervenes in the first stage of rendering, i.e., the stage of creating a canvas, and creates a small-sized canvas by reducing the resolution. Subsequent rendering and display operations are all performed on the small-sized canvas, and the obtained target display layer is enlarged to the full-screen size and sent to the image processing unit for composite display, thereby reducing the data of the underlying operation, thereby reducing the time of the rendering and display operation, reducing power consumption, improving fluency, and increasing battery life, and having a good effect on improving the performance and battery life of large-screen mobile phones. In addition, the corresponding zoom ratio is determined according to the display mode of the application, and then the target resolution corresponding to the display mode is determined, so that the adjustment gear of the resolution can be flexibly switched according to different display modes, and multiple display modes such as full-screen mode, small window mode, and split-screen mode within the application can be adapted.
[0104] In order to implement the above embodiment, Fig. 9 As shown, the embodiment of the present disclosure further proposes an electronic device 900, including the above-mentioned display control device 800.
[0105] The electronic device of the disclosed embodiment intervenes in the first stage of rendering, i.e., the stage of creating a canvas, and creates a small-sized canvas by reducing the resolution. Subsequent rendering and display operations are all performed on the small-sized canvas, and the obtained target display layer is enlarged to the full-screen size and sent to the image processing unit for composite display, thereby reducing the data of the underlying operation, thereby reducing the time of the rendering and display operation, reducing power consumption, improving fluency, and increasing battery life, and having a good effect on improving the performance and battery life of large-screen mobile phones. In addition, the corresponding zoom ratio is determined according to the display mode of the application, and then the target resolution corresponding to the display mode is determined, so that the adjustment gear of the resolution can be flexibly switched according to different display modes, and multiple display modes such as full-screen mode, small window mode, and split-screen mode within the application can be adapted.
[0106] Fig.10 is a block diagram of an electronic device 900 according to an exemplary embodiment.
[0107] like Fig.10 As shown, the electronic device 900 includes:
[0108] The memory 901 and the processor 902 , a bus 903 connecting different components (including the memory 901 and the processor 902 ), the memory 901 stores a computer program, and when the processor 902 executes the program, the display control method of the embodiment of the present disclosure is implemented.
[0109] Bus 903 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor or a local bus using any of a variety of bus structures. For example, these architectures include but are not limited to Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus and Peripheral Component Interconnect (PCI) bus.
[0110] The electronic device 900 typically includes a variety of electronic device readable media. These media can be any available media that can be accessed by the electronic device 900, including volatile and non-volatile media, removable and non-removable media.
[0111] The memory 901 may also include computer system readable media in the form of volatile memory, such as random access memory (RAM) 904 and / or cache memory 905. The electronic device 900 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 906 may be used to read and write non-removable, non-volatile magnetic media ( Fig.10 not shown, usually called a "hard drive"). Although Fig.10 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 903 via one or more data medium interfaces. Memory 901 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present disclosure.
[0112] A program / utility 908 having a set (at least one) of program modules 907 may be stored, for example, in the memory 901, such program modules 907 including but not limited to an operating system, one or more application programs, other program modules, and program data, each of which or some combination thereof may include an implementation of a network environment. The program modules 907 generally perform the functions and / or methods of the embodiments described in the present disclosure.
[0113] The electronic device 900 may also communicate with one or more external devices 909 (e.g., keyboard, pointing device, display 911, etc.), one or more devices that enable a user to interact with the electronic device 900, and / or any device that enables the electronic device 900 to communicate with one or more other computing devices (e.g., network card, modem, etc.). Such communication may be performed through an input / output (I / O) interface 912. Furthermore, the electronic device 900 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 913. Fig.10 As shown, the network adapter 913 communicates with other modules of the electronic device 900 via the bus 903. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with the electronic device 900, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0114] The processor 902 executes various functional applications and data processing by running the programs stored in the memory 901 .
[0115] It should be noted that the implementation process and technical principles of the electronic device of this embodiment refer to the aforementioned explanation of the display control method of the embodiment of the present disclosure, and will not be repeated here.
[0116] The electronic device provided by the disclosed embodiment intervenes in the first stage of rendering, i.e., the stage of creating a canvas, and creates a small-sized canvas by reducing the resolution. Subsequent rendering and display operations are all performed on the small-sized canvas, and the obtained target display layer is enlarged to the full-screen size and sent to the image processing unit for composite display, thereby reducing the data of the underlying operation, thereby reducing the time of the rendering and display operation, reducing power consumption, improving fluency, and increasing battery life, and having a good effect on improving the performance and battery life of large-screen mobile phones. In addition, the corresponding zoom ratio is determined according to the display mode of the application, and then the target resolution corresponding to the display mode is determined, so that the adjustment gear of the resolution can be flexibly switched according to different display modes, and multiple display modes such as full-screen mode, small window mode, and split-screen mode within the application can be adapted.
[0117] In order to implement the above embodiments, the present disclosure also proposes a computer-readable storage medium.
[0118] When the instructions in the computer-readable storage medium are executed by the processor of the electronic device, the electronic device can perform the display control method as described above. Optionally, the computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0119] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0120] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A display control method, characterized in that: include: Determining a target resolution according to an initial resolution supported by the application, wherein the target resolution is smaller than the initial resolution; Create a canvas of corresponding size according to the target resolution; Performing a rendering and display operation on the canvas according to the target resolution to obtain a target display layer; Enlarging the target display layer to a full screen size according to the screen resolution to obtain a screen display layer; The screen display layer is sent to an image processing unit, so that the image processing unit performs synthesis display on the screen according to the screen display layer.
2. The display control method according to claim 1, characterized in that: The determining the target resolution according to the initial resolution supported by the application includes: Obtaining a display mode of the application; Determining a corresponding zoom ratio according to the display mode, the zoom ratio being less than one; The target resolution is determined according to the initial resolution and the scaling ratio.
3. The display control method according to claim 2, characterized in that: The determining the corresponding zoom ratio according to the display mode includes: Acquire a pre-configured correspondence table between the plurality of display modes and the plurality of scaling ratios; The corresponding zoom ratio is determined according to the display mode and the corresponding relationship table.
4. The display control method according to claim 2, characterized in that: The display mode includes any one of the following modes: full screen mode, small window mode and in-application split screen mode.
5. The display control method according to claim 1, characterized in that: The step of creating a canvas of a corresponding size according to the target resolution includes: Determine a corresponding target window size according to the target resolution; The canvas of a corresponding size is created according to the target window size.
6. The display control method according to claim 1, characterized in that: The performing a rendering and display operation on the canvas according to the target resolution to obtain a target display layer includes: Determine a corresponding target pixel density and a target window size according to the target resolution; The rendering and display operation is performed on the canvas according to the target resolution, the target pixel density and the target window size to obtain the target display layer.
7. The display control method according to claim 1, characterized in that: The rendering and display operation includes at least one of the following operations: measuring, placing and drawing.
8. The display control method according to claim 1, characterized in that: The step of enlarging the target display layer to a full screen size according to the screen resolution to obtain the screen display layer includes: Determine the corresponding screen window size according to the screen resolution; The target display layer is enlarged to a full screen size according to the screen window size to obtain the screen display layer.
9. A display control device, characterized in that: include: a determination module configured to determine a target resolution according to an initial resolution supported by the application, wherein the target resolution is smaller than the initial resolution; A creation module, configured to create a canvas of a corresponding size according to the target resolution; An operation module is configured to perform a rendering and display operation on the canvas according to the target resolution to obtain a target display layer; an enlargement module, configured to enlarge the target display layer to a full screen size according to the screen resolution to obtain a screen display layer; The sending module is configured to send the screen display layer to the image processing unit, so that the image processing unit can synthesize and display it on the screen according to the screen display layer.
10. The display control device according to claim 9, characterized in that: The determination module is further configured to: Obtaining a display mode of the application; Determining a corresponding zoom ratio according to the display mode, the zoom ratio being less than one; The target resolution is determined according to the initial resolution and the scaling ratio.
11. The display control device according to claim 10, characterized in that: The determination module is further configured to: Acquire a pre-configured correspondence table between the plurality of display modes and the plurality of scaling ratios; The corresponding zoom ratio is determined according to the display mode and the corresponding relationship table.
12. The display control device according to claim 10, characterized in that: The display mode includes any one of the following modes: full screen mode, small window mode and in-application split screen mode.
13. The display control device according to claim 9, characterized in that: The creation module is further configured to: Determine a corresponding target window size according to the target resolution; The canvas of a corresponding size is created according to the target window size.
14. The display control device according to claim 9, characterized in that: The operation module is further configured to: Determine a corresponding target pixel density and a target window size according to the target resolution; The rendering and display operation is performed on the canvas according to the target resolution, the target pixel density and the target window size to obtain the target display layer.
15. The display control device according to claim 9, characterized in that: The rendering and display operation includes at least one of the following operations: measuring, placing and drawing.
16. The display control device according to claim 9, characterized in that: The amplification module is further configured as follows: Determine the corresponding screen window size according to the screen resolution; The target display layer is enlarged to a full screen size according to the screen window size to obtain the screen display layer.
17. An electronic device, characterized in that: include: A display control device as claimed in any one of claims 9 to 16.
18. An electronic device, characterized in that: include: processor; a memory for storing executable instructions for the processor; The processor is configured to execute the instructions to implement the display control method according to any one of claims 1 to 8.
19. A computer-readable storage medium, characterized in that: When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the display control method according to any one of claims 1 to 8.
