Image rendering control method and device and control layer in operating system
By introducing a control layer into the operating system, adjusting rendering parameters to match device performance and user selection, the problem of high-performance devices rendering low-resolution pictures is solved, and image rendering resolution and user experience are improved.
Patent Information
- Application Number
- CN202411216544.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2024-12-17
AI Technical Summary
High-performance electronic devices affect user experience when rendering low-resolution pictures, and the existing technology is difficult to effectively solve this problem.
By introducing a control layer into the operating system, intercepting the current rendering parameters transmitted by the application layer interface, adjusting to the target rendering parameters, and transmitting them to the driver layer to control the graphics processor to render images, including adjusting resolutions based on device performance and user selection Rate parameters to ensure that the image output meets the optimization conditions.
It realizes that without changing the original driver layer code, improves image rendering resolution, improves user experience, enhances image viewing effect, and avoids limited to rendering parameters preset by applications or devices.
Smart Images

Figure CN119151790A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to an image rendering control method, device and control layer in an operating system. Background Art
[0002] With the development of technology, electronic devices generally have higher device performance. For example, mobile phones are equipped with a graphics processing unit (GPU) with high processing performance.
[0003] However, some applications usually limit the rendering resolution of the picture, which causes high-performance electronic devices to still render low-resolution pictures, which significantly affects the user experience of the device and software products. Summary of the invention
[0004] In view of this, the present application provides an image rendering control method, device and control layer in an operating system, as follows:
[0005] A method for controlling image rendering, comprising:
[0006] Obtaining current rendering parameters transmitted by the application program through the application layer interface of the operating system;
[0007] Adjusting the current rendering parameters to target rendering parameters;
[0008] The target rendering parameters are transmitted to the driver layer interface of the operating system, so that the driver layer interface controls the graphics processor to render the target image according to the target rendering parameters.
[0009] In the above method, preferably, the current rendering parameter is generated in response to a rendering adjustment operation;
[0010] Wherein, adjusting the current rendering parameters to target rendering parameters includes:
[0011] According to the target resolution parameter, the current rendering parameter is adjusted to the target rendering parameter, the target rendering parameter corresponds to the target resolution parameter; the target resolution parameter is obtained from the rendering adjustment operation.
[0012] The above method, preferably, further comprises:
[0013] Outputting an interactive interface, wherein a plurality of resolution parameters to be selected are presented in the interactive interface;
[0014] A rendering adjustment operation on the interactive interface is obtained, where the rendering adjustment operation is for a target resolution parameter presented in the interactive interface.
[0015] The above method preferably further comprises:
[0016] Monitoring whether a device performance parameter of the electronic device on which the application is running and the current rendering parameter satisfy an adjustment condition;
[0017] When the adjustment condition is met, a rendering adjustment instruction is generated; the rendering adjustment instruction is used to trigger the acquisition of the current rendering parameters transmitted by the application program through the application layer interface of the operating system.
[0018] In the above method, preferably, adjusting the current rendering parameters to the target rendering parameters includes:
[0019] Determining target resolution parameters according to the device performance parameters;
[0020] According to the target resolution parameter, the current rendering parameter is adjusted to the target rendering parameter; the device performance parameter matches the target resolution parameter.
[0021] The above method preferably determines the target resolution parameter based on the device performance parameter, including:
[0022] Find the target resolution parameter corresponding to the device performance parameter from the corresponding relationship table;
[0023] The correspondence table includes at least one correspondence to be selected, and the correspondence to be selected is a correspondence between a device performance parameter and a resolution parameter.
[0024] In the above method, preferably, adjusting the current rendering parameters to the target rendering parameters includes:
[0025] Determine initial resolution parameters;
[0026] Obtaining image output parameters corresponding to the initial resolution parameters, where the image output parameters are parameters formed by the graphics processor rendering the image according to the initial resolution parameters;
[0027] According to the adjustment rule, based on the image output parameter, the initial resolution parameter is adjusted at least once until the adjusted resolution parameter makes the image output parameter meet the optimization condition, and according to the adjusted resolution parameter, the current rendering parameter is adjusted to the target rendering parameter;
[0028] The adjustment rule includes: a method of sequentially increasing the resolution parameter, or a method of sequentially decreasing the resolution parameter.
[0029] In the above method, preferably, the image output parameter is the image output frame rate;
[0030] The image output parameters satisfy the preferred conditions, including:
[0031] The image output frame rate is greater than or equal to a preset output frame rate corresponding to the application.
[0032] A control layer in an operating system, comprising:
[0033] A plurality of processing interfaces, each of the processing interfaces is respectively mapped to a corresponding application layer interface in the operating system;
[0034] Among them, the processing interface is used to: obtain the current rendering parameters transmitted by the application through the application layer interface mapped by the processing interface; adjust the current rendering parameters to the target rendering parameters; transmit the target rendering parameters to the driver layer interface of the operating system, so that the driver layer interface controls the graphics processor to render the target image according to the target rendering parameters.
[0035] A device for controlling image rendering, comprising:
[0036] A parameter obtaining unit, used to obtain current rendering parameters transmitted by the application program through the application layer interface of the operating system;
[0037] A parameter adjustment unit, used for adjusting the current rendering parameters to target rendering parameters;
[0038] A parameter transmission unit is used to transmit the target rendering parameters to the driver layer interface of the operating system, so that the driver layer interface controls the graphics processor to render the target image according to the target rendering parameters. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0040] Figure 1 A flowchart of an image rendering control method provided in an embodiment of the present application;
[0041] Figure 2 This is an example diagram of the control layer in the embodiment of the present application;
[0042] Figure 3 This is an example diagram of the interactive interface in the embodiment of the present application;
[0043] Figure 4 This is an example diagram of a user adjusting the resolution in an embodiment of the present application;
[0044] Figure 5 Another example diagram of the user adjusting the resolution in the embodiment of the present application;
[0045] Figure 6 Another flow chart of an image rendering control method provided by an embodiment of the present application;
[0046] Figure 7 A partial flow chart of an image rendering control method provided in an embodiment of the present application;
[0047] Figure 8 Another partial flow chart of an image rendering control method provided in an embodiment of the present application;
[0048] Fig. 9 A flowchart of another part of an image rendering control method provided in an embodiment of the present application;
[0049] Fig.10 Another partial flow chart of an image rendering control method provided in an embodiment of the present application;
[0050] Fig.11 A schematic diagram of the structure of a control layer in an operating system provided in an embodiment of the present application;
[0051] Fig.12 A schematic diagram of the structure of an image rendering control device provided in an embodiment of the present application;
[0052] Fig.13 This is an example diagram of resolution adjustment in a mobile phone gaming scenario applicable to this application. DETAILED DESCRIPTION
[0053] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0054] refer to Figure 1 As shown, it is a flowchart of an implementation method of an image rendering control method provided in an embodiment of the present application, which can be applied to electronic devices capable of image processing, such as mobile phones, tablet computers, computers, etc. with graphics processors. The technical solution in this embodiment is mainly used to improve the user's viewing experience of images.
[0055] Specifically, the method in this embodiment may include the following steps:
[0056] Step 101: Obtain current rendering parameters transmitted by the application program through the application layer interface of the operating system.
[0057] Among them, the application layer interface refers to the interface called by the application program in the operating system.
[0058] For example, taking the Android operating system as an example, the application layer interface can be a standard API (Application Programming Interface) called by the application, such as eglMakeCurrent, g1Texstorage2D, glViewport, glscissor, glBlitrramebuffer and other interfaces. Figure 2 As shown in . The current rendering parameters transmitted by each application layer interface are different in parameter type. Accordingly, the current rendering parameters transmitted by each application layer interface are also different in the rendering functions implemented.
[0059] Specifically, in this embodiment, a control layer may be deployed between the application layer and the driver layer of the operating system, and a processing interface may be deployed in the control layer, such as Figure 2 As shown in , each processing interface is mapped to the corresponding application layer interface in the operating system. The processing interfaces mapped to the application layer interface are: eglMakeCurrent arr hooked, glTexstorage2D arrhooked, glViewport arr hooked, glscissor arr hooked, glBlitrramebuffer arrhooked, etc. The interface files of these processing interfaces are stored in an independent library file libLayerGLEs arr.so. Correspondingly, these processing interfaces can call the driver layer interface, such as eglMakeCurrent, glTexstorage2D, glViewport, glscissor, glBlitrramebuffer, etc. The interface files of these driver layer interfaces are in the corresponding library file libGLES(,v1 C,v2).so. Based on this, when each application calls the application layer interface in the Android application package APK (Android application package) to transmit the current rendering parameters, each processing interface of the control layer obtains the current rendering parameters transmitted by the application layer interface to which it is mapped.
[0060] It should be noted that the parameter values in the current rendering parameters are limited to the parameter values of a specific type preset by the electronic device or set by the user; or, the parameter values in the current rendering parameters are limited to the parameter values of a specific type set in the application.
[0061] Step 102: Adjust current rendering parameters to target rendering parameters.
[0062] In one implementation, in step 102 , the current rendering parameters may be adjusted to the target rendering parameters according to the parameter values of the specific parameter type.
[0063] It should be noted that, in this embodiment, adjusting the current rendering parameter to the target rendering parameter means: adjusting the parameter value of the current rendering parameter to the parameter value of the target rendering parameter.
[0064] The parameter value of the specific parameter type here can be a parameter value of a resolution parameter, a color parameter, etc. Accordingly, the parameter value in each current rendering parameter (i.e., the current rendering parameter transmitted by each application layer interface) is adjusted to the parameter value in the target rendering parameter corresponding to the specific parameter. For example, the processing interface eglMakeCurrentarr hooked adjusts the parameter value of the current rendering parameter obtained from the application layer interface eglMakeCurrent to correspond to the target resolution to obtain the target rendering parameter.
[0065] Step 103: transmitting the target rendering parameters to the driver layer interface of the operating system, so that the driver layer interface controls the graphics processor to render the target image according to the target rendering parameters.
[0066] For example, Figure 2 As shown in , each processing interface adjusts the current rendering parameters obtained from the corresponding application layer interface to the target rendering parameters, and then transmits the target rendering parameters to the corresponding driver layer interface, so that the driver layer interface can control the graphics processing unit GPU (graphics processing unit) to render the target image according to the target rendering parameters.
[0067] It can be seen from the above technical solution that in a method for controlling the rendering of an image provided by an embodiment of the present application, the current rendering parameters transmitted by the application through the application layer interface of the operating system are obtained, and then the current rendering parameters are adjusted to the target rendering parameters, and then the target rendering parameters are transmitted to the driver layer interface of the operating system, so that the driver layer interface controls the graphics processor to render the target image according to the target rendering parameters. It can be seen that in this embodiment, by intercepting the current rendering parameters that the application layer interface is ready to transmit to the driver layer interface, the current rendering parameters are adjusted to the target rendering parameters, and then the target rendering parameters are transmitted to the driver layer interface. In this way, when the graphics processor renders the target image, it is no longer subject to the rendering parameters set by the application or the rendering parameters set on the electronic device, and can be adjusted to the corresponding rendering parameters as required, thereby achieving the corresponding rendering effect, thereby improving the user's image viewing experience.
[0068] In one implementation, the current rendering parameters obtained in this embodiment are rendering parameters transmitted by a specific application through an application layer interface. The specific application here can be an application recorded in an application whitelist, such as a game application, a video playback application, or a picture viewing application. For example, step 101 is executed when it is detected that the application is a game application. If other applications need to call a graphics processor to render an image, the technical solution in this embodiment is not executed.
[0069] In one implementation, the current rendering parameters are generated in response to a rendering adjustment operation. The rendering adjustment operation is input by a user on an interactive interface. Based on this, when adjusting the current rendering parameters to the target rendering parameters in step 102, it can be implemented in the following manner:
[0070] According to the target resolution parameters, adjust the current rendering parameters to the target rendering parameters.
[0071] The target rendering parameter corresponds to the target resolution parameter, and the target resolution parameter is obtained from the rendering adjustment operation.
[0072] Specifically, Figure 3 As shown in , in this embodiment, an interactive interface can be output to the user on the electronic device, and a plurality of resolution parameters to be selected are presented in the interactive interface, such as 1080p (1920×1080) or 720p (1280×720) and other resolution parameters. The user can perform a resolution selection operation on the interactive interface, based on which, in this embodiment, a rendering adjustment operation on the interactive interface can be obtained, and the rendering adjustment operation is for the target resolution parameter presented in the interactive interface. For example, the user selects the resolution of "1080p" on the interactive interface, so that the rendering adjustment operation obtained in this embodiment includes the target resolution parameter, i.e., 1080p, and the current rendering parameters are also generated in response to the rendering adjustment operation, and the current rendering parameters are transmitted to the driver layer interface by the application program calling each application layer interface, so as to control the graphics processor to render the target image. Based on this, when the application calls each application layer interface to transmit the corresponding current rendering parameters, in this embodiment, each processing interface in the control layer can obtain the current rendering parameters transmitted by the mapped application layer interface, and then adjust the current rendering parameters to the target rendering parameters according to the target resolution parameter 1080p in the rendering adjustment operation. In this way, the target rendering parameters correspond to the target resolution parameter 1080p. After that, each processing interface calls the corresponding driver layer interface to send the target rendering parameters to the driver layer interface. The driver layer interface controls the GPU to render the target image according to the target rendering parameters corresponding to the target resolution parameter 1080p. In this way, the target image presents a 1080p rendering effect, and is not limited to the highest resolution of 720p set in the application.
[0073] In one implementation, the resolution parameters to be selected presented in the interactive interface may be: various resolution parameters supported by the electronic device where the graphics processor is located. For example, the resolution parameters to be selected presented in the interactive interface may be determined according to the device performance parameters of the electronic device. Alternatively, the resolution parameters to be selected presented in the interactive interface may be: preferred resolution parameters supported by the electronic device where the graphics processor is located and superior to the resolution parameters corresponding to the current rendering parameters.
[0074] The device performance parameters of the electronic device can be obtained based on parameters such as the device model, etc. The device performance parameters can include: memory parameters, video memory parameters, computing kernel parameters, and other parameters that affect the display effect of the device.
[0075] In another specific implementation, Figure 4 As shown in , in this embodiment, an interactive interface can be output for the user on the electronic device, and a prompt message of "whether to adjust the resolution" is output on the interactive interface. The user can click the "OK" or "Cancel" control to indicate whether to adjust the resolution. If the user clicks the "OK" control, then, in this embodiment, a rendering adjustment operation on the interactive interface can be obtained, and the rendering adjustment operation includes a target resolution parameter, and the target resolution parameter can be a resolution parameter that can be achieved by the device performance parameters of the electronic device, and the target resolution parameter is better than the resolution parameter corresponding to the current rendering parameter. Moreover, in this embodiment, in response to the rendering adjustment operation, the current rendering parameters are also generated, and the current rendering parameters are transmitted to the driver layer interface by the application program calling each application layer interface, so as to control the graphics processor to render the target image. Based on this, when the application calls each application layer interface to transmit the corresponding current rendering parameters, in this embodiment, each processing interface in the control layer can obtain the current rendering parameters transmitted by the mapped application layer interface, and then adjust the current rendering parameters to the target rendering parameters according to the target resolution parameter 1080p in the rendering adjustment operation. In this way, the target rendering parameters correspond to the target resolution parameter 1080p. After that, each processing interface calls the corresponding driver layer interface to send the target rendering parameters to the driver layer interface. The driver layer interface controls the GPU to render the target image according to the target rendering parameters corresponding to the target resolution parameter 1080p. In this way, the target image presents a 1080p rendering effect, and is not limited to the highest resolution of 720p set in the application.
[0076] In another specific implementation, Figure 5As shown in , in this embodiment, an interactive interface can be output for the user on the electronic device, and the interactive interface can output a resolution input box, and the user can enter the required resolution value in the resolution input box, such as 1080p. Then, in this embodiment, a rendering adjustment operation on the interactive interface can be obtained, and the rendering adjustment operation includes a target resolution parameter. Moreover, in this embodiment, in response to the rendering adjustment operation, a current rendering parameter is also generated, and the current rendering parameter is transmitted to the driver layer interface by the application program calling various application layer interfaces, so as to control the graphics processor to render the target image. Based on this, when the application calls each application layer interface to transmit the corresponding current rendering parameters, in this embodiment, each processing interface in the control layer can obtain the current rendering parameters transmitted by the mapped application layer interface, and then adjust the current rendering parameters to the target rendering parameters according to the target resolution parameter 1080p in the rendering adjustment operation. In this way, the target rendering parameters correspond to the target resolution parameter 1080p. After that, each processing interface calls the corresponding driver layer interface to send the target rendering parameters to the driver layer interface. The driver layer interface controls the GPU to render the target image according to the target rendering parameters corresponding to the target resolution parameter 1080p. In this way, the target image presents a 1080p rendering effect, and is not limited to the highest resolution of 720p set in the application.
[0077] In one implementation, this embodiment may also include the following processing: Figure 6 As shown in:
[0078] Step 104: monitor whether the device performance parameters of the electronic device on which the application is running and the current rendering parameters meet the adjustment conditions. If yes, execute step 105; otherwise, continue to execute step 104.
[0079] Step 105: Generate a rendering adjustment instruction, where the rendering adjustment instruction is used to trigger step 101, that is, step 101 is executed in response to the rendering adjustment instruction.
[0080] The adjustment condition may be: the maximum resolution parameter supported by the device performance parameter is greater than the resolution parameter corresponding to the current rendering parameter. For example, the maximum resolution supported by the memory and kernel of the mobile phone is 1080p, and the resolution corresponding to the current rendering parameter is 720p. At this time, the adjustment condition is met, and a rendering adjustment instruction is directly generated, or a rendering adjustment instruction is generated based on the user's rendering adjustment operation. In response to the rendering adjustment instruction, steps 101 to 103 are executed, thereby improving the rendering effect of the image by adjusting the rendering parameters.
[0081] Based on the above implementation scheme, when adjusting the current rendering parameters to the target rendering parameters in step 102, it can be implemented in the following ways, such as Figure 7As shown in:
[0082] Step 701: Determine target resolution parameters according to device performance parameters.
[0083] The target resolution parameter matches the device performance parameter. For example, the target resolution parameter may be: a resolution parameter selected by a user from any resolution parameter supported by the device performance parameter, or the target resolution parameter may be: the highest resolution parameter supported by the device performance parameter. Alternatively, the target resolution parameter may be: any resolution parameter supported by the device performance parameter that is better than the resolution parameter corresponding to the current rendering parameter.
[0084] Specifically, in step 701, an interactive interface can be output to the user, in which a plurality of candidate resolution parameters that can be achieved by the device performance parameters are presented. The user performs a resolution selection operation on the interactive interface, thereby generating a rendering adjustment operation on the electronic device, which includes a target resolution parameter. Based on this, the target resolution parameter is obtained from the rendering adjustment operation.
[0085] It should be noted that the candidate resolution parameters presented in the interactive interface are all superior to the resolution parameters corresponding to the current rendering parameters.
[0086] Alternatively, the target resolution parameter corresponding to the device performance parameter may be searched from the correspondence table in step 701. For example, the target resolution parameter corresponding to the device performance parameter may be the highest resolution parameter supported by the device performance parameter.
[0087] The correspondence table includes at least one correspondence to be selected, and the correspondence to be selected is: the correspondence between the device performance parameter and the resolution parameter. Different device performance parameters can support different maximum resolution parameters. Thus, in this embodiment, the highest resolution parameter that can be supported by the device performance parameter of the electronic device where the application is located is queried in the correspondence table, that is, the target resolution parameter.
[0088] Step 702: According to the target resolution parameter, adjust the current rendering parameter to the target rendering parameter.
[0089] For example, according to the target resolution parameter, the current rendering parameter is adjusted to the target rendering parameter, and the target rendering parameter corresponds to the target resolution parameter. Therefore, after the driver layer interface controls the GPU to render the target image according to the target rendering parameter, the target image presents the rendering effect corresponding to the target resolution parameter.
[0090] In one implementation, when adjusting the current rendering parameters to the target rendering parameters in step 102, it can be implemented in the following manner: Figure 8 As shown in:
[0091] Step 801: Determine initial resolution parameters.
[0092] The initial resolution parameter may be any resolution parameter supported by the electronic device on which the application is running, or the initial resolution parameter may be the minimum or maximum resolution parameter supported by the electronic device on which the application is running.
[0093] Step 802: Obtain image output parameters corresponding to the initial resolution parameters.
[0094] The image output parameters are parameters related to the image and display effect experience displayed after the graphics processor renders the image according to the initial resolution parameters. In other words, the image output parameters can characterize the display effect after the image is rendered. For example, for a video file, the image output parameter can be the image output frame rate; for a single image, the image output parameter can be the image noise content, etc.
[0095] Specifically, in step 802, the rendering parameters used by the driver layer interface are adjusted according to the initial resolution parameters, so that the graphics processor renders the image according to the initial resolution parameters, and then the image output parameters, such as the image output frame rate, of the image rendered by the graphics processor are output by the display device within a target time length, such as 2 seconds.
[0096] Step 803: According to the adjustment rule, based on the image output parameters, the initial resolution parameters are adjusted at least once until the adjusted resolution parameters make the image output parameters meet the optimization conditions, and then step 804 is executed.
[0097] Step 804: Adjust the current rendering parameters to the target rendering parameters according to the adjusted resolution parameters.
[0098] The adjustment rule may include: a method of sequentially increasing the resolution parameter, or a method of sequentially decreasing the resolution parameter.
[0099] The optimization condition may be: the output effect presented by the image output parameters is optimal, and the adjusted resolution parameter is the largest among all resolution parameters supported by the electronic device.
[0100] Taking the image output parameter as the image output frame rate as an example, the image output parameter may satisfy the optimization condition that the image output frame rate is greater than or equal to the preset output frame rate. The preset output frame rate may be the output frame rate set by the application; or the preset output frame rate may be the output frame rate set by default for the electronic device; or the preset output frame rate may be the output frame rate configured by the user on the electronic device.
[0101] For example, if the frame rate required by the application is 120 frames per second, and if the adjusted resolution parameter makes the image output frame rate less than 120, then it can be determined that the image output frame rate does not meet the optimization condition. If the adjusted resolution parameter makes the image output frame rate reach 120 or higher, and the adjusted resolution parameter is the largest among all resolutions supported by the electronic device.
[0102] Specifically, Fig. 9 As shown in , the following is a specific implementation process of adjusting the current rendering parameters to the target rendering parameters in this embodiment:
[0103] Step 901: taking the minimum resolution parameter among all resolution parameters supported by the electronic device as the initial resolution parameter.
[0104] Step 902: using the initial resolution parameter as the intermediate resolution parameter;
[0105] Step 903: According to the intermediate resolution parameter, adjust the current rendering parameter to the intermediate rendering parameter.
[0106] Step 904: Transmit the intermediate rendering parameters to the driver layer interface, so that the driver layer interface controls the graphics processor to render multiple frames of intermediate images according to the intermediate rendering parameters.
[0107] Step 905: Obtain an image output frame rate of the intermediate image output by the display device within a target duration.
[0108] Step 906: Determine whether the image output frame rate is less than the preset output frame rate, if yes, execute step 907, if no, execute step 908.
[0109] Step 907: Determine the intermediate resolution parameter used in the last adjustment of the rendering parameters as the target resolution parameter, and adjust the current rendering parameters to the target rendering parameters according to the target resolution parameter.
[0110] Step 908: Increase the intermediate resolution parameter, determine the increased resolution parameter as the intermediate resolution parameter, and return to execute step 903.
[0111] It can be seen that in this embodiment, starting from the smallest resolution parameter, the resolution parameter is gradually increased until it is adjusted to the largest resolution parameter that can output the image without frame drops, that is, the target resolution parameter. According to the target resolution parameter, the current rendering parameter is adjusted to the target rendering parameter.
[0112] Or, if Fig.10 As shown in , the following is a specific implementation process of adjusting the current rendering parameters to the target rendering parameters in this embodiment:
[0113] Step 1001: taking the maximum resolution parameter among all resolution parameters supported by the electronic device as the initial resolution parameter.
[0114] Step 1002: using the initial resolution parameter as an intermediate resolution parameter;
[0115] Step 1003: According to the intermediate resolution parameters, adjust the current rendering parameters to the intermediate rendering parameters.
[0116] Step 1004: Transmit the intermediate rendering parameters to the driver layer interface, so that the driver layer interface controls the graphics processor to render multiple frames of intermediate images according to the intermediate rendering parameters.
[0117] Step 1005: Obtain an image output frame rate of the intermediate image output by the display device within a target duration.
[0118] Step 1006: Determine whether the image output frame rate is greater than or equal to the preset output frame rate, if yes, execute step 1007, if not, execute step 1008.
[0119] Step 1007: determine the intermediate resolution parameter used for adjusting the rendering parameters this time as the target resolution parameter, and adjust the current rendering parameters to the target rendering parameters according to the target resolution parameter.
[0120] Step 1008: reduce the intermediate resolution parameter, determine the reduced resolution parameter as a new intermediate resolution parameter, and return to execute step 1003.
[0121] It can be seen that in this embodiment, starting from the maximum resolution parameter, the resolution parameter is gradually reduced until it is adjusted to the maximum resolution parameter that can output the image without frame drops, that is, the target resolution parameter. According to the target resolution parameter, the current rendering parameter is adjusted to the target rendering parameter.
[0122] refer to Fig.11 , is a schematic diagram of the structure of a control layer in an operating system provided in an embodiment of the present application, and the control layer may include the following modules:
[0123] Multiple processing interfaces 1, each processing interface 1 is mapped to a corresponding application layer interface 2 in the operating system, and each processing interface 1 can call a corresponding driver layer interface 3. The rendering parameters processed by each processing interface 1 have different parameter types, and rendering parameters with different parameter types implement different rendering functions.
[0124] Among them, the processing interface 1 is used to: obtain the current rendering parameters transmitted by the application layer interface 2 mapped by the processing interface 1; adjust the current rendering parameters to the target rendering parameters; transmit the target rendering parameters to the driver layer interface 3 of the operating system, so that the driver layer interface 3 controls the graphics processor 4 to render the target image according to the target rendering parameters.
[0125] It can be seen from the above technical solution that in a control layer in an operating system provided by an embodiment of the present application, by obtaining the current rendering parameters transmitted by the application through the application layer interface of the operating system, then adjusting the current rendering parameters to the target rendering parameters, and then transmitting the target rendering parameters to the driver layer interface of the operating system, the driver layer interface controls the graphics processor to render the target image according to the target rendering parameters. It can be seen that in this embodiment, by intercepting the current rendering parameters that the application layer interface is ready to transmit to the driver layer interface, adjusting the current rendering parameters to the target rendering parameters, and then transmitting the target rendering parameters to the driver layer interface, when the graphics processor renders the target image, it is no longer subject to the rendering parameters supported by the application, and can be adjusted to the corresponding rendering parameters as required, thereby achieving the corresponding rendering effect, thereby improving the user's image viewing experience.
[0126] In one implementation, the current rendering parameters are generated in response to a rendering adjustment operation;
[0127] Among them, when the processing interface 1 adjusts the current rendering parameters to the target rendering parameters, it is specifically used to: adjust the current rendering parameters to the target rendering parameters according to the target resolution parameters, and the target rendering parameters correspond to the target resolution parameters; the target resolution parameters are obtained from the rendering adjustment operation.
[0128] Based on the above implementation, the rendering adjustment operation is obtained in the following manner: outputting an interactive interface, in which a plurality of resolution parameters to be selected are presented; obtaining the rendering adjustment operation on the interactive interface, wherein the rendering adjustment operation is for a target resolution parameter presented in the interactive interface.
[0129] In one implementation, the processing interface 1 obtains the current rendering parameters transmitted by the application through the application layer interface of the operating system in response to the rendering adjustment instruction. The rendering adjustment instruction is obtained by monitoring whether the device performance parameters of the electronic device on which the application is running and the current rendering parameters meet the adjustment conditions; and generating the rendering adjustment instruction when the adjustment conditions are met.
[0130] In one implementation, when adjusting the current rendering parameters to the target rendering parameters, the processing interface 1 is specifically used to: determine the target resolution parameters according to the device performance parameters; adjust the current rendering parameters to the target rendering parameters according to the target resolution parameters; and match the device performance parameters with the target resolution parameters.
[0131] Among them, when the processing interface 1 determines the target resolution parameter based on the device performance parameter, it is specifically used to: search for the target resolution parameter corresponding to the device performance parameter from the correspondence table; wherein the correspondence table includes at least one to-be-selected correspondence, and the to-be-selected correspondence is the correspondence between the device performance parameter and the resolution parameter.
[0132] In one implementation, when adjusting the current rendering parameters to the target rendering parameters, the processing interface 1 is specifically used to: determine an initial resolution parameter; obtain an image output parameter corresponding to the initial resolution parameter, wherein the image output parameter is a parameter formed by the graphics processor rendering the image according to the initial resolution parameter; according to an adjustment rule, based on the image output parameter, adjust the initial resolution parameter at least once until the adjusted resolution parameter makes the image output parameter meet the optimization condition, and adjust the current rendering parameter to the target rendering parameter according to the adjusted resolution parameter; wherein the adjustment rule includes: a method of increasing the resolution parameter in sequence, or a method of decreasing the resolution parameter in sequence.
[0133] Wherein, the image output parameter is an image output frame rate; wherein, the image output parameter satisfies a preferred condition, including: the image output frame rate is greater than or equal to a preset output frame rate corresponding to the application.
[0134] refer to Fig.12 , is a schematic diagram of the structure of an image rendering control device provided in an embodiment of the present application, the device is Fig.11 Specifically, the device may include the following units:
[0135] The parameter obtaining unit 1201 is used to obtain the current rendering parameters transmitted by the application program through the application layer interface of the operating system;
[0136] A parameter adjustment unit 1202, used to adjust the current rendering parameters to target rendering parameters;
[0137] The parameter transmission unit 1203 is used to transmit the target rendering parameters to the driver layer interface of the operating system, so that the driver layer interface controls the graphics processor to render the target image according to the target rendering parameters.
[0138] It can be seen from the above technical solution that in an image rendering control device provided by an embodiment of the present application, the current rendering parameters transmitted by the application through the application layer interface of the operating system are obtained, and then the current rendering parameters are adjusted to the target rendering parameters, and then the target rendering parameters are transmitted to the driver layer interface of the operating system, so that the driver layer interface controls the graphics processor to render the target image according to the target rendering parameters. It can be seen that in this embodiment, by intercepting the current rendering parameters that the application layer interface is ready to transmit to the driver layer interface, the current rendering parameters are adjusted to the target rendering parameters, and then the target rendering parameters are transmitted to the driver layer interface. In this way, when the graphics processor renders the target image, it is no longer subject to the rendering parameters supported by the application, and can be adjusted to the corresponding rendering parameters as required, thereby achieving the corresponding rendering effect, thereby improving the user's image viewing experience.
[0139] In one implementation, the current rendering parameters are generated in response to a rendering adjustment operation;
[0140] The parameter adjustment unit 1202 is specifically used to: adjust the current rendering parameter to the target rendering parameter according to the target resolution parameter, the target rendering parameter corresponds to the target resolution parameter; the target resolution parameter is obtained from the rendering adjustment operation.
[0141] Specifically, the rendering adjustment operation can be obtained in the following manner: outputting an interactive interface, wherein a plurality of resolution parameters to be selected are presented in the interactive interface; obtaining the rendering adjustment operation on the interactive interface, wherein the rendering adjustment operation is for a target resolution parameter presented in the interactive interface.
[0142] In one implementation, the parameter obtaining unit 1201 obtains the current rendering parameters transmitted by the application through the application layer interface of the operating system in response to the rendering adjustment instruction. The rendering adjustment instruction is obtained by monitoring whether the device performance parameters of the electronic device on which the application is running and the current rendering parameters meet the adjustment conditions; and generating the rendering adjustment instruction when the adjustment conditions are met.
[0143] In one implementation, the parameter adjustment unit 1202 is specifically used to: determine a target resolution parameter according to the device performance parameter; adjust the current rendering parameter to the target rendering parameter according to the target resolution parameter; and match the device performance parameter with the target resolution parameter.
[0144] Among them, when the parameter adjustment unit 1202 determines the target resolution parameter based on the device performance parameter, it is specifically used to: search for the target resolution parameter corresponding to the device performance parameter from the correspondence table; wherein the correspondence table includes at least one to-be-selected correspondence, and the to-be-selected correspondence is the correspondence between the device performance parameter and the resolution parameter.
[0145] In one implementation, the parameter adjustment unit 1202 is specifically used to: determine an initial resolution parameter; obtain an image output parameter corresponding to the initial resolution parameter, where the image output parameter is a parameter formed by the graphics processor rendering the image according to the initial resolution parameter; according to an adjustment rule, based on the image output parameter, adjust the initial resolution parameter at least once until the adjusted resolution parameter makes the image output parameter meet the optimization condition, and adjust the current rendering parameter to the target rendering parameter according to the adjusted resolution parameter; wherein the adjustment rule includes: a method of increasing the resolution parameter in sequence, or a method of decreasing the resolution parameter in sequence.
[0146] Wherein, the image output parameter is an image output frame rate; wherein, the image output parameter satisfies a preferred condition, including: the image output frame rate is greater than or equal to a preset output frame rate corresponding to the application.
[0147] It should be noted that the specific implementation method of each unit in this embodiment can refer to the corresponding content in the previous text and will not be described in detail here.
[0148] Taking an Android phone in a gaming scenario as an example, the technical solution of this application is illustrated below:
[0149] First, the rendering resolution of games on Android phones is much lower than that on iOS, and the image quality is poor, which is significantly different from the iOS camp. Since it is currently impossible to customize the image quality for specific Android devices, even powerful devices cannot take advantage of their performance to achieve higher image quality.
[0150] Some of the current methods used to improve game quality are as follows:
[0151] (1) Cooperate with game manufacturers to open higher game rendering resolutions to achieve higher image quality; however, due to some objective factors, it is difficult to promote cooperation.
[0152] (2) Developing game super-resolution can improve the game quality, but the game has high requirements for latency. Due to the limitations of computing power and power consumption on mobile devices, it is difficult to restore high image quality.
[0153] The technical solution of this application further improves the rendering quality of the game by further improving the rendering resolution to 1600p (2560×1600) based on the highest rendering resolution that the application can provide, such as 840p (800×600). This application improves the software level of the device by adding a "control layer" between the application layer and the driver layer in the software stack.
[0154] For example, for gaming applications, such as Fig.13 As shown in , when the user needs to improve the game quality, the control menu in the menu bar can be used to tell the "control layer" the target rendering resolution. After receiving the information, the control layer "intercepts" the rendering resolution passed in by the application layer interface. The rendering resolution includes the width and height of the rendering resolution. After that, it is adjusted to the rendering resolution set in the menu bar, thereby improving the rendering quality. Due to the introduction of the software control layer, the technical solution of this application will not modify / destroy the original driver layer code; the "control layer" only includes functions related to controlling the rendering resolution, and the binary size can be controlled within a smaller range, such as within 500KB, which will not take up a lot of space; in addition, in terms of software stack performance, no additional API calls are introduced, so there will be no impact.
[0155] It can be seen that in this application, by adding an underlying control layer, the rendering function of a specific resolution of the control layer can be triggered in special scenarios (such as games) to improve the display effect.
[0156] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0157] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may 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.
[0158] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0159] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for controlling image rendering, comprising: Obtain the current rendering parameters transmitted by the application through the application layer interface of the operating system; Adjusting the current rendering parameters to target rendering parameters; The target rendering parameters are transmitted to the driver layer interface of the operating system, so that the driver layer interface controls the graphics processor to render the target image according to the target rendering parameters.
2. The method of claim 1, wherein the current rendering parameters are generated in response to a rendering adjustment operation; in, Adjusting the current rendering parameters to target rendering parameters includes: According to the target resolution parameter, the current rendering parameter is adjusted to the target rendering parameter, the target rendering parameter corresponds to the target resolution parameter; the target resolution parameter is obtained from the rendering adjustment operation.
3. The method according to claim 2, further comprising: Outputting an interactive interface, wherein a plurality of resolution parameters to be selected are presented in the interactive interface; A rendering adjustment operation on the interactive interface is obtained, where the rendering adjustment operation is for a target resolution parameter presented in the interactive interface.
4. The method according to claim 1, further comprising: Monitoring whether a device performance parameter of the electronic device on which the application is running and the current rendering parameter satisfy an adjustment condition; When the adjustment condition is met, generating a rendering adjustment instruction; The rendering adjustment instruction is used to trigger the acquisition of the current rendering parameters transmitted by the application program through the application layer interface of the operating system.
5. The method according to claim 4, adjusting the current rendering parameters to the target rendering parameters, comprising: Determining target resolution parameters according to the device performance parameters; According to the target resolution parameter, adjusting the current rendering parameter to the target rendering parameter; The device performance parameters match the target resolution parameters.
6. The method according to claim 5, determining a target resolution parameter based on the device performance parameter, comprising: Find the target resolution parameter corresponding to the device performance parameter from the corresponding relationship table; The correspondence table includes at least one correspondence to be selected, and the correspondence to be selected is a correspondence between a device performance parameter and a resolution parameter.
7. The method according to claim 1, adjusting the current rendering parameters to target rendering parameters, comprising: Determine initial resolution parameters; Obtaining image output parameters corresponding to the initial resolution parameters, where the image output parameters are parameters formed by the graphics processor rendering the image according to the initial resolution parameters; According to the adjustment rule, based on the image output parameter, the initial resolution parameter is adjusted at least once until the adjusted resolution parameter makes the image output parameter meet the optimization condition, and according to the adjusted resolution parameter, the current rendering parameter is adjusted to the target rendering parameter; The adjustment rule includes: a method of sequentially increasing the resolution parameter, or a method of sequentially decreasing the resolution parameter.
8. The method according to claim 7, wherein the image output parameter is an image output frame rate; in, The image output parameters satisfy the preferred conditions, including: The image output frame rate is greater than or equal to a preset output frame rate corresponding to the application.
9. A control layer in an operating system, comprising: A plurality of processing interfaces, each of the processing interfaces is respectively mapped to a corresponding application layer interface in the operating system; Among them, the processing interface is used to: obtain the current rendering parameters transmitted by the application through the application layer interface mapped by the processing interface; adjust the current rendering parameters to the target rendering parameters; transmit the target rendering parameters to the driver layer interface of the operating system, so that the driver layer interface controls the graphics processor to render the target image according to the target rendering parameters.
10. An image rendering control device, comprising: A parameter obtaining unit, used to obtain current rendering parameters transmitted by the application program through the application layer interface of the operating system; A parameter adjustment unit, used for adjusting the current rendering parameters to target rendering parameters; A parameter transmission unit is used to transmit the target rendering parameters to the driver layer interface of the operating system, so that the driver layer interface controls the graphics processor to render the target image according to the target rendering parameters.
