CN116077940B - Drawing processing method and related device in game application - Google Patents

Drawing processing method and related device in game application Download PDF

Info

Publication number
CN116077940B
CN116077940B CN202210537785.0A CN202210537785A CN116077940B CN 116077940 B CN116077940 B CN 116077940B CN 202210537785 A CN202210537785 A CN 202210537785A CN 116077940 B CN116077940 B CN 116077940B
Authority
CN
China
Prior art keywords
type
frequency
game
application
terminal device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210537785.0A
Other languages
Chinese (zh)
Other versions
CN116077940A (en
Inventor
仇建斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202210537785.0A priority Critical patent/CN116077940B/en
Publication of CN116077940A publication Critical patent/CN116077940A/en
Application granted granted Critical
Publication of CN116077940B publication Critical patent/CN116077940B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/60Generating or modifying game content before or while executing the game program, e.g. authoring tools specially adapted for game development or game-integrated level editor
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/50Controlling the output signals based on the game progress
    • A63F13/52Controlling the output signals based on the game progress involving aspects of the displayed game scene
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/20Processor architectures; Processor configuration, e.g. pipelining
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the application provides a drawing processing method and a related device in game application, which are applied to the technical field of terminals. The method comprises the following steps: determining that the drawing for the game application includes a first type of drawing that is not related to a game screen in the game application; acquiring a first drawing frequency of a first type of drawing; and when the first drawing frequency is larger than the first threshold value, reducing the drawing frequency of the first drawing type. Because the fluency of the game picture can be influenced by the excessively high first drawing frequency, the drawing frequency of the first drawing is reduced, so that more computing capacity of the CPU is used for drawing the game picture, the fluency of the game picture can be improved, and the occurrence of the clamping phenomenon is reduced.

Description

Drawing processing method and related device in game application
Technical Field
The present application relates to the field of game application technologies, and in particular, to a method and related apparatus for processing graphics in game applications.
Background
Currently, with the development of terminal technology, more and more terminal devices support game applications, and the functional requirements of users on the game applications are more and more diversified, so as to meet the social requirements of users in games, more game applications support displaying social information in game pictures, for example, the social information includes a ranking list, a dialogue between users, and the like.
In one implementation, when the terminal device runs the game application, the terminal device draws and synthesizes the social information and the game picture together, and then displays an interface comprising the social information and the game picture. The social information can be fixedly displayed at a certain position of the game picture, and the content of the social information can be updated in real time.
However, a game application including social information and game screens is prone to a stuck phenomenon when running.
Disclosure of Invention
The embodiment of the application provides a drawing processing method and a related device in game application, which are applied to terminal equipment. By reducing the drawing frequency of the first drawing, the fluency of the game picture is improved, and the occurrence of the clamping phenomenon is reduced.
In a first aspect, an embodiment of the present application provides a method for processing a drawing in a game application, including: determining that the drawing for the gaming application includes a first type of drawing that is not related to a game screen in the gaming application; acquiring a first drawing frequency of a first type of drawing; and when the first drawing frequency is larger than the first threshold value, reducing the drawing frequency of the first drawing type.
In this way, by determining that the drawing for the gaming application includes a first type of drawing that is not related to the game screen, and obtaining a first drawing frequency for the first type of drawing, the drawing frequency for the first type of drawing is reduced when the first drawing frequency is greater than a first threshold. Because the fluency of the game picture can be influenced by the excessively high first drawing frequency, the drawing frequency of the first drawing is reduced, so that more computing capacity of the CPU is used for drawing the game picture, the fluency of the game picture can be improved, and the occurrence of the clamping phenomenon is reduced.
Optionally, reducing the drawing frequency of the first type of drawing includes: and reducing the drawing frequency of the first drawing type to a second drawing frequency, wherein the second drawing frequency is smaller than or equal to the first threshold value.
Thus, in the embodiment of the present application, when the drawing frequency of the first type of drawing is higher than the first threshold, the CPU may waste the computing resource, and when the drawing frequency of the first type of drawing is lower than the lowest drawing frequency of the first type of drawing preset in the terminal device, the first type of drawing may cause a blocking phenomenon, so that the second drawing frequency may be set as the first threshold, or a certain value between the first threshold and the lowest drawing frequency of the first type of drawing preset in the terminal device, and when the first drawing frequency is higher than the first threshold, the drawing frequency of the first type of drawing is reduced to the second drawing frequency, which may not only ensure the smoothness of the first type of drawing, but also reduce the occupation of the computing resource of the CPU.
Optionally, reducing the drawing frequency of the first type of drawing to the second drawing frequency includes: and according to the number of frames corresponding to the first drawing frequency and the number of frames corresponding to the second drawing frequency, frame loss is carried out in a drawing stage or a rendering stage of the first drawing.
Therefore, occupation of the first type of drawing on the CPU can be reduced in the drawing stage or the rendering stage, so that more computing capacity of the CPU is used for drawing or rendering the game picture, smoothness of the game picture can be improved, and the occurrence of a clamping phenomenon is reduced.
Optionally, frame dropping is performed in a drawing stage or a rendering stage of the first drawing, including: intermittent discontinuous frame dropping is performed in a drawing phase or a rendering phase of the first-class drawing.
Thus, intermittent frame loss is carried out during frame loss, instead of centralized continuous frame loss, so that the picture of the first-class drawing can be smoother.
Optionally, after reducing the drawing frequency of the first type of drawing when the first drawing frequency is greater than the first threshold, the method further includes: acquiring a display area corresponding to the first-class drawing in a display interface; and adjusting the drawing frame rate of the first drawing type according to the size of the display area.
Therefore, the drawing frame rate of the first drawing type can be flexibly adjusted according to the size of the display area, excessive occupation of the CPU by the first drawing type is reduced, and the phenomenon of clamping and stopping of the game picture is reduced.
Optionally, adjusting the drawing frame rate of the first drawing according to the size of the display area includes: when the size of the display area is reduced, increasing the drawing frame rate of the first-type drawing, wherein the increased drawing frame rate of the first-type drawing is smaller than or equal to a first threshold value; alternatively, when the size of the display area becomes larger, the drawing frame rate of the first-type drawing is further reduced.
Thus, when the size of the display area is larger, the drawing frame rate of the first drawing is reduced, so that excessive occupation of the CPU by the first drawing is reduced, and the fluency of the game picture is influenced; when the size of the display area is smaller, the drawing frame rate of the first drawing is increased, so that the first drawing does not influence the fluency of the game picture, and the display effect of the display content corresponding to the first drawing can be improved.
Optionally, determining that the drawing for the gaming application includes a first type of drawing includes: judging whether a drawing program or a drawing function corresponding to the first type of drawing is called in the drawing of the game application; if a drawing program or drawing function corresponding to the first type of drawing is called in the drawing of the game application, determining that the drawing for the game application comprises the first type of drawing.
Thus, by the method, whether the drawing for the game application comprises the first type of drawing is determined, the judgment standard is clear, and the operation is simple.
Optionally, the drawing program or drawing function corresponding to the first drawing is: drawing programs or drawing functions in the system program of the terminal device.
In this way, the drawing elements in the first type of drawing are simpler, and may include, for example, basic drawing elements such as points, planes, rectangles, arrows, etc., which are provided by the system supported by the terminal device, so that the drawing program or drawing function corresponding to the first type of drawing may also call the drawing program or drawing function in the system program of the terminal device. The system of the terminal equipment can modify the drawing program or drawing function corresponding to the first drawing type, so that the operation and control are convenient.
Optionally, the method further comprises: executing a second type of drawing in the gaming application; synthesizing the drawing result of the first drawing type and the drawing result of the second drawing type to obtain a synthesized picture; and displaying the synthesized picture.
In this way, the drawing frequency of the second type of drawing is kept unchanged, the drawing frequency of the first type of drawing is reduced below a first threshold value, and as the first type of drawing needs fewer drawing elements, the drawing frequency of the first type of drawing is properly reduced, the fluency of the first type of drawing is not affected, and meanwhile, more computing capacity of a CPU can be used for the second type of drawing, so that the fluency of the second type of drawing can be improved. And the drawing results of the first type of drawing and the drawing results of the second type of drawing are synthesized, so that the fluency of synthesized pictures can be improved, and the occurrence of the clamping phenomenon can be reduced.
In a second aspect, an embodiment of the present application provides a terminal device, which may also be referred to as a terminal (terminal), a User Equipment (UE), a Mobile Station (MS), a Mobile Terminal (MT), or the like. The terminal device may be a mobile phone, a smart television, a wearable device, a tablet (Pad), a computer with wireless transceiving function, a Virtual Reality (VR) terminal device, an augmented reality (augmented reality, AR) terminal device, a wireless terminal in industrial control (industrial control), a wireless terminal in unmanned driving (self-driving), a wireless terminal in teleoperation (remote medical surgery), a wireless terminal in smart grid (smart grid), a wireless terminal in transportation safety (transportation safety), a wireless terminal in smart city (smart city), a wireless terminal in smart home (smart home), or the like.
The terminal device includes: the touch screen comprises a touch panel and a display screen; one or more processors; a memory; a plurality of applications; and one or more computer programs, wherein the one or more computer programs are stored in the memory, the one or more computer programs comprising instructions that, when executed by the terminal device, cause the terminal device to perform the steps of: determining that the drawing for the gaming application includes a first type of drawing that is not related to a game screen in the gaming application; acquiring a first drawing frequency of a first type of drawing; and when the first drawing frequency is larger than the first threshold value, reducing the drawing frequency of the first drawing type.
Optionally, reducing the drawing frequency of the first type of drawing includes: and reducing the drawing frequency of the first drawing type to a second drawing frequency, wherein the second drawing frequency is smaller than or equal to the first threshold value.
Optionally, reducing the drawing frequency of the first type of drawing to the second drawing frequency includes: and according to the number of frames corresponding to the first drawing frequency and the number of frames corresponding to the second drawing frequency, frame loss is carried out in a drawing stage or a rendering stage of the first drawing.
Optionally, frame dropping is performed in a drawing stage or a rendering stage of the first drawing, including: intermittent discontinuous frame dropping is performed in a drawing phase or a rendering phase of the first-class drawing.
Optionally, after reducing the drawing frequency of the first type of drawing when the first drawing frequency is greater than the first threshold, the method further includes: acquiring a display area corresponding to the first-class drawing in a display interface; and adjusting the drawing frame rate of the first drawing type according to the size of the display area.
Optionally, adjusting the drawing frame rate of the first drawing according to the size of the display area includes: when the size of the display area is reduced, increasing the drawing frame rate of the first-type drawing, wherein the increased drawing frame rate of the first-type drawing is smaller than or equal to a first threshold value; alternatively, when the size of the display area becomes larger, the drawing frame rate of the first-type drawing is further reduced.
Optionally, determining that the drawing for the gaming application includes a first type of drawing includes: judging whether a drawing program or a drawing function corresponding to the first type of drawing is called in the drawing of the game application; if a drawing program or drawing function corresponding to the first type of drawing is called in the drawing of the game application, determining that the drawing for the game application comprises the first type of drawing.
Optionally, the drawing program or drawing function corresponding to the first drawing is: drawing programs or drawing functions in the system program of the terminal device.
Optionally, the method further comprises: executing a second type of drawing in the gaming application; synthesizing the drawing result of the first drawing type and the drawing result of the second drawing type to obtain a synthesized picture; and displaying the synthesized picture.
In a third aspect, an embodiment of the present application provides a terminal device, including: a processor and a memory, the processor being configured to invoke the program in the memory to cause the terminal device to perform the method provided in the first aspect.
In a fourth aspect, an embodiment of the present application provides a computer readable storage medium storing computer instructions that, when executed on a terminal device, cause the terminal device to perform the method provided in the first aspect.
In a fifth aspect, embodiments of the present application provide a computer program product comprising a computer program which, when run, causes a computer to carry out the method provided in the first aspect described above.
The advantages of each of the possible implementation manners of the second aspect to the fifth aspect may be referred to as the advantages of the first aspect, and are not described herein.
Drawings
FIG. 1 is a schematic diagram of a scenario in which a graphics processing method in a gaming application according to an embodiment of the present application is applicable;
fig. 2 is a schematic structural diagram of a terminal device according to an embodiment of the present application;
fig. 3 is a software architecture block diagram of a terminal device according to an embodiment of the present application;
FIG. 4 is a flow chart of a method for drawing processing in a game application according to an embodiment of the present application;
FIG. 5 is a flowchart illustrating a first type of plot frequency processing according to an embodiment of the present application;
FIG. 6 is a flow chart of a method of drawing processing in a further game application according to an embodiment of the present application;
FIG. 7 is a schematic diagram of a graphic processing device in a game application according to an embodiment of the present application;
fig. 8 is a schematic hardware structure of a drawing processing device in a game application according to an embodiment of the present application.
Detailed Description
In order to facilitate the clear description of the technical solutions of the embodiments of the present application, the following simply describes some terms and techniques involved in the embodiments of the present application:
1) Frame rate: the number of frames displayed per second is in units of transmission frames per second (frames per second, FPS). The frame is a single image picture of the minimum unit in the image animation, one frame is a still picture, and continuous frames form the animation. A high frame rate may result in a smoother and more realistic animation. The more frames per second, the smoother the displayed motion.
The frame rate includes an output frame rate and a display frame rate. The output frame rate refers to the frame rate of the interface or application program output to the display screen through the display card. The display frame rate refers to a display frame rate that is the frame rate at which an interface or application is actually displayed on the display screen.
2) Screen refresh rate: refers to the number of times a screen is refreshed per second, in hertz (Hz).
The higher the screen refresh rate, the higher the frame rate it can support. For example, if the refresh rate of a display screen is 120Hz, it can support both a frame rate of 60FPS and a frame rate of 90FPS, which can support a frame rate of 120FPS at maximum.
However, if the screen refresh rate is insufficient, the final display frame rate can only reach the value of the screen refresh rate at most even if the output frame rate is high. For example, if the refresh rate of one display screen is 60Hz, the final display frame rate can only reach 60FPS at most even if the output frame rate of the application is 100 FPS.
It should be noted that, before the frame is displayed on the interface, the process of drawing, rendering, synthesizing, etc. is usually required.
3) And (3) frame drawing: refers to picture drawing of a display interface. The display interface may be composed of one or more views, each of which may be drawn by a visual control of the view system, each of which is composed of sub-views, one of which corresponds to a widget in the view, e.g., one of which corresponds to a symbol in the picture view.
4) And (3) frame rendering: the rendered view is subjected to coloring operation, 3D effect is added, or the like. For example: the 3D effect may be a light effect, a shadow effect, a texture effect, etc.
5) And (3) frame synthesis: is a process of combining a plurality of the one or more rendered views into a display interface.
6) Other terms
In embodiments of the present application, the words "first," "second," and the like are used to distinguish between identical or similar items that have substantially the same function and effect. For example, the interface of the first target function and the interface of the second target function are for distinguishing different response interfaces, and the order of the different response interfaces is not limited. It will be appreciated by those of skill in the art that the words "first," "second," and the like do not limit the amount and order of execution, and that the words "first," "second," and the like do not necessarily differ.
In the present application, the words "exemplary" or "such as" are used to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "exemplary" or "for example" should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete fashion.
With the development of terminal technology, more and more terminal devices support game applications, and the functional requirements of users on the game applications are more and more diversified, so as to meet the social requirements of users in games, more game applications support displaying social information in game pictures, for example, the social information includes a ranking list, a dialogue between users, and the like. The technical scheme provided by the embodiment of the application can be applied to game applications supporting social information and game pictures, and particularly when the game applications are in operation, the drawing frequency corresponding to the social information is adjusted.
In one implementation, when the terminal device runs the game application, the terminal device draws and synthesizes the social information and the game picture together, and then displays an interface comprising the social information and the game picture. The social information can be fixedly displayed at a certain position of the game picture, and the content of the social information can be updated in real time.
When a game application including social information and game pictures is running, a part of the capabilities of the central processing unit (central processing unit, CPU) are used for processing the social information, and the other part of the capabilities are used for processing the game pictures, if the social information and the game pictures are drawn at a high drawing frequency, the operation speed of the CPU is affected, and the game is easy to be blocked.
In view of this, in the method for processing graphics in a game application provided by the embodiment of the present application, when the game application includes, in operation, graphics of a first type that are not related to a game frame in the game application, where the graphics of the first type may be graphics corresponding to social information, and a first graphics frequency of the graphics of the first type is too high to affect smoothness of the game frame, so when the first graphics frequency is greater than a first threshold, the graphics frequency of the graphics of the first type is reduced, so that more computing capability of a CPU is used for drawing the game frame, and further smoothness of the game frame may be improved, and occurrence of a click phenomenon is reduced.
Fig. 1 shows a schematic view of a scenario to which a drawing processing method in a game application according to an embodiment of the present application is applied.
As shown in fig. 1, a terminal device 100 is included in fig. 1. In the running of the game application, including the information 101 and the game screen 102 which are not related to the game screen, the information 101 which is not related to the game screen may be social information including a ranking list, a dialogue between users, a winning situation of the users, and the like.
For example, social information is taken as information not related to a game screen. In the running of the game application, when the drawing frequency corresponding to the social information is high (for example, 60Hz, drawing 60 times per second), the drawing of the social information occupies more processing capacity of the CPU, affects the operation speed of the CPU, and further affects the smoothness of the game picture. Because fewer drawing elements are required for drawing social information, the required drawing frequency is lower, and when social information is drawn at a lower drawing frequency (for example, 1Hz, drawing 1 time per second), the smoothness of the social information is not affected. Therefore, the terminal device can reduce the drawing frequency corresponding to the social information by acquiring the drawing frequency corresponding to the social information, and further improve the fluency of the game picture when the drawing frequency corresponding to the social information is greater than the first threshold.
The terminal device may also be referred to as a terminal (terminal), a User Equipment (UE), a Mobile Station (MS), a Mobile Terminal (MT), etc. The terminal device may be a mobile phone, a smart television, a wearable device, a tablet (Pad), a computer with wireless transceiving function, a Virtual Reality (VR) terminal device, an augmented reality (augmented reality, AR) terminal device, a wireless terminal in industrial control (industrial control), a wireless terminal in unmanned driving (self-driving), a wireless terminal in teleoperation (remote medical surgery), a wireless terminal in smart grid (smart grid), a wireless terminal in transportation safety (transportation safety), a wireless terminal in smart city (smart city), a wireless terminal in smart home (smart home), or the like. The embodiment of the application does not limit the specific technology and the specific equipment form adopted by the terminal equipment.
In order to better understand the embodiments of the present application, the following describes the structure of the terminal device according to the embodiments of the present application:
fig. 2 shows a schematic structural diagram of the terminal device 100. The terminal device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, keys 190, a motor 191, an indicator 192, a camera 193, a display 194, and a subscriber identity module (subscriberidentification module, SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the terminal device 100. In other embodiments of the application, terminal device 100 may include more or less components than illustrated, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The processor 110 may include one or more processing units, such as: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processingunit, GPU), an image signal processor (image signal processor, ISP), a controller, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to reuse the instruction or data, it may be called from memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby improving the efficiency of the system.
In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuitsound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver transmitter (universal asynchronous receiver/transmitter, UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (subscriber identity module, SIM) interface, and/or a universal serial bus (universal serial bus, USB) interface, among others.
The I2C interface is a bi-directional synchronous serial bus comprising a serial data line (SDA) and a serial clock line (derail clock line, SCL). In some embodiments, the processor 110 may contain multiple sets of I2C buses. The processor 110 may be coupled to the touch sensor 180K, charger, flash, camera 193, etc., respectively, through different I2C bus interfaces. For example: the processor 110 may be coupled to the touch sensor 180K through an I2C interface, so that the processor 110 and the touch sensor 180K communicate through an I2C bus interface to implement a touch function of the terminal device 100.
The I2S interface may be used for audio communication. In some embodiments, the processor 110 may contain multiple sets of I2S buses. The processor 110 may be coupled to the audio module 170 via an I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 may transmit an audio signal to the wireless communication module 160 through the I2S interface, to implement a function of answering a call through the bluetooth headset.
PCM interfaces may also be used for audio communication to sample, quantize and encode analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface. In some embodiments, the audio module 170 may also transmit audio signals to the wireless communication module 160 through the PCM interface to implement a function of answering a call through the bluetooth headset. Both the I2S interface and the PCM interface may be used for audio communication.
The UART interface is a universal serial data bus for asynchronous communications. The bus may be a bi-directional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is typically used to connect the processor 110 with the wireless communication module 160. For example: the processor 110 communicates with a bluetooth module in the wireless communication module 160 through a UART interface to implement a bluetooth function. In some embodiments, the audio module 170 may transmit an audio signal to the wireless communication module 160 through a UART interface, to implement a function of playing music through a bluetooth headset.
The MIPI interface may be used to connect the processor 110 to peripheral devices such as a display 194, a camera 193, and the like. The MIPI interfaces include camera serial interfaces (camera serial interface, CSI), display serial interfaces (displayserial interface, DSI), and the like. In some embodiments, processor 110 and camera 193 communicate through a CSI interface to implement the photographing function of terminal device 100. The processor 110 and the display 194 communicate via a DSI interface to implement the display function of the terminal device 100.
The GPIO interface may be configured by software. The GPIO interface may be configured as a control signal or as a data signal. In some embodiments, a GPIO interface may be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like. The GPIO interface may also be configured as an I2C interface, an I2S interface, a UART interface, an MIPI interface, etc.
The USB interface 130 is an interface conforming to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 130 may be used to connect a charger to charge the terminal device 100, or may be used to transfer data between the terminal device 100 and a peripheral device. And can also be used for connecting with a headset, and playing audio through the headset. The interface may also be used to connect other electronic devices, such as AR devices, etc.
It should be understood that the interfacing relationship between the modules illustrated in the embodiment of the present application is illustrated schematically, and does not constitute a structural limitation of the terminal device 100. In other embodiments of the present application, the terminal device 100 may also use different interfacing manners, or a combination of multiple interfacing manners in the foregoing embodiments.
The wireless communication function of the terminal device 100 can be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The terminal device 100 implements display functions through a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
The display screen 194 is used to display images, videos, and the like. The display 194 includes a display panel. The display panel may employ a liquid crystal display (liquid crystal display, LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED) or an active-matrix organic light-emitting diode (matrixorganic light emitting diode), a flexible light-emitting diode (flex), a mini, a Micro led, a Micro-OLED, a quantum dot light-emitting diode (quantum dot lightemitting diodes, QLED), or the like. In some embodiments, the terminal device 100 may include 1 or N display screens 194, N being a positive integer greater than 1.
The terminal device 100 may implement a photographing function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
The digital signal processor is used for processing digital signals, and can process other digital signals besides digital image signals. For example, when the terminal device 100 selects a frequency bin, the digital signal processor is used to fourier transform the frequency bin energy, or the like.
Video codecs are used to compress or decompress digital video. The terminal device 100 may support one or more video codecs. In this way, the terminal device 100 can play or record video in various encoding formats, for example: dynamic picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to realize expansion of the memory capability of the terminal device 100. The external memory card communicates with the processor 110 through an external memory interface 120 to implement data storage functions. For example, files such as music, video, etc. are stored in an external memory card.
The internal memory 121 may be used to store computer-executable program code that includes instructions. The internal memory 121 may include a storage program area and a storage data area. The storage program area may store an application program (such as a sound playing function, an image playing function, etc.) required for at least one function of the operating system, etc. The storage data area may store data (such as audio data, phonebook, etc.) created during use of the terminal device 100, and the like. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and the like. The processor 110 performs various functional applications of the terminal device 100 and data processing by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
The terminal device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playing, recording, etc.
The audio module 170 is used to convert digital audio information into an analog audio signal output and also to convert an analog audio input into a digital audio signal. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be disposed in the processor 110, or a portion of the functional modules of the audio module 170 may be disposed in the processor 110.
The keys 190 include a power-on key, a volume key, etc. The keys 190 may be mechanical keys. Or may be a touch key. The terminal device 100 may receive key inputs, generating key signal inputs related to user settings and function controls of the terminal device 100.
The SIM card interface 195 is used to connect a SIM card. The SIM card may be contacted and separated from the terminal apparatus 100 by being inserted into the SIM card interface 195 or by being withdrawn from the SIM card interface 195. The terminal device 100 may support 1 or N SIM card interfaces, N being a positive integer greater than 1. The SIM card interface 195 may support Nano SIM cards, micro SIM cards, and the like. The same SIM card interface 195 may be used to insert multiple cards simultaneously. The types of the plurality of cards may be the same or different. The SIM card interface 195 may also be compatible with different types of SIM cards. The SIM card interface 195 may also be compatible with external memory cards. The terminal device 100 interacts with the network through the SIM card to realize functions such as call and data communication. In some embodiments, the terminal device 100 employs esims, namely: an embedded SIM card. The eSIM card can be embedded in the terminal device 100 and cannot be separated from the terminal device 100.
The software system of the terminal device 100 may employ a layered architecture, an event driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture, etc. In the embodiment of the application, taking an Android system with a layered architecture as an example, a software structure of the terminal device 100 is illustrated.
Fig. 3 is a software configuration block diagram of the terminal device 100 of the embodiment of the present application. The layered architecture divides the software into several layers, each with distinct roles and branches. The layers communicate with each other through a software interface. In some embodiments, the Android system is divided into four layers, from top to bottom, an application layer, an application framework layer, an Zhuoyun row (Android run) and system libraries, and a kernel layer, respectively.
The application layer may include a series of application packages. As shown in fig. 3, the application package may include applications for cameras, calendars, phones, maps, games, and the like.
The application framework layer provides an application programming interface (application programming interface, API) and programming framework for application programs of the application layer. The application framework layer includes a number of predefined functions.
As shown in FIG. 3, the application framework layer may include a window manager, resource manager, notification manager, graphics rendering, and the like.
The window manager is used for managing window programs. The window manager may obtain the display screen size, determine if there is a status bar, lock screen, touch screen, drag screen, intercept screen, etc.
The resource manager provides various resources for the application program, such as localization strings, icons, pictures, layout files, video files, and the like.
The notification manager allows the application to display notification information in a status bar, can be used to communicate notification type messages, can automatically disappear after a short dwell, and does not require user interaction. Such as notification manager is used to inform that the download is complete, message alerts, etc. The notification manager may also be a notification in the form of a chart or scroll bar text that appears on the system top status bar, such as a notification of a background running application, or a notification that appears on the screen in the form of a dialog window. For example, prompting text information in a status bar, giving out a prompt tone, vibrating a terminal device, flashing an indicator light, etc.
Graphics drawing is used to draw graphics, such as those corresponding to social information in gaming applications.
The graphics rendering is used for rendering the drawn graphics, for example, after the graphics drawing is completed drawing social information in the game application, the graphics rendering is used for rendering the social information.
Android runtimes include core libraries and virtual machines. Android run time is responsible for scheduling and management of the Android system.
The core library consists of two parts: one part is a function which needs to be called by java language, and the other part is a core library of android.
The application layer and the application framework layer run in a virtual machine. The virtual machine executes java files of the application program layer and the application program framework layer as binary files. The virtual machine is used for executing the functions of object life cycle management, stack management, thread management, security and exception management, garbage collection and the like.
The system library may include a plurality of functional modules. For example: surface manager (surface manager), media Libraries (Media Libraries), three-dimensional graphics processing Libraries (e.g., openGL ES), 2D graphics engines (e.g., SGL), graphics composition, etc.
The surface manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
Media libraries support a variety of commonly used audio, video format playback and recording, still image files, and the like. The media library may support a variety of audio and video encoding formats, such as MPEG4, h.264, MP3, AAC, AMR, JPG, PNG, etc.
The three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, image rendering, synthesis, layer processing and the like.
The 2D graphics engine is a drawing engine for 2D drawing.
Graphics compositing is used to composite one or more rendered views into a display interface, such as compositing game visuals and social information in a game application after rendering.
The kernel layer is a layer between hardware and software. The kernel layer may include display drivers, camera drivers, audio drivers, central processor drivers, and the like.
The workflow of the terminal device 100 software and hardware is illustrated below in connection with the scenario of application launch or interface switching occurring in an application.
When touch sensor 180K receives a touch operation, a corresponding hardware interrupt is issued to the kernel layer. The kernel layer processes the touch operation into the original input event (including information such as touch coordinates, touch strength, time stamp of the touch operation, etc.). The original input event is stored at the kernel layer. The application framework layer acquires an original input event from the kernel layer, and identifies a control corresponding to the input event. Taking the touch operation as a touch click operation, taking a control corresponding to the click operation as an example of a control of a game application icon, the game application calls an interface of an application framework layer to start the game application, and then a display driver is started by calling a kernel layer to display a functional interface of the game application.
The method for adjusting the performance of the terminal equipment according to the embodiment of the application is described in detail below through specific embodiments. The following embodiments may be combined with each other or implemented independently, and the same or similar concepts or processes may not be described in detail in some embodiments.
Fig. 4 is a flowchart of a drawing processing method in a game application according to an embodiment of the present application. As shown in fig. 4, the method may include:
s401, determining that the drawing for the game application includes a first type of drawing.
In embodiments of the present application, the first type of drawing is not related to game visuals in a gaming application. The game screen may refer to a screen formed by each game element in the game, for example, the game screen may include elements such as characters, props, scenes, and the like in the game.
The first type of drawing being unrelated to game visuals in a gaming application is understood to be other types of drawing that are independent of game visuals. For example, the first type of drawing may include a drawing provided by a system supported by the terminal device that is composed of basic drawing elements, which may include points, planes, rectangles, arrows, and the like. For example, the first type of drawing may specifically include a drawing of social information in an interface as shown in FIG. 1.
It will be appreciated that the drawings of the gaming application may include, in addition to the first type of drawings, a second type of drawings, which may include drawings of a game screen in the interface as shown in FIG. 1. Thus, when the game application is running, the drawing results of the first type of drawing and the drawing results of the second type of drawing can be combined to obtain an interface including a game screen and social information, for example, as shown in fig. 1.
In one possible implementation, the first type of drawing and the second type of drawing may each correspond to a different drawing program or drawing function. For example, the first type of drawing may correspond to drawing of Draw in a system of terminal devices, and the second type of drawing may correspond to OpenGL drawing application of surfmeview.
At the start-up or running of the game application, the terminal device may determine whether the drawing for the game application includes a drawing of the first type by determining whether a drawing program or drawing function of the drawing of the first type is called in the drawing of the game application. For example, when a game application invokes Draw's drawing in the terminal system, then it is determined that the drawing for the game application includes a first type of drawing.
In another possible implementation, the first type of drawing and the second type of drawing may each correspond to different drawing channels, where the different drawing channels have different channel identifiers. For example, a first type of drawing may be drawn through a first drawing channel and a second type of drawing may be drawn through a second drawing channel.
When the game application is started or operated, the terminal device can determine whether the drawing for the game application comprises the drawing of the first type by judging whether the drawing channel identifier corresponding to the drawing of the first type is contained in the drawing of the game application. For example, when a game application draws through a first drawing channel, then it is determined that the drawing for the game application includes a first type of drawing.
S402, acquiring a first drawing frequency of a first type of drawing.
In the embodiment of the present application, the first drawing frequency may refer to a drawing frequency adopted when the terminal device currently performs the first type of drawing, where the first drawing frequency may be a highest frequency that is set by a game application developer and that is reachable by the game application, and the highest frequency is less than or equal to a screen refresh rate of the terminal device. For example, the higher the first drawing frequency, the faster the drawing speed of the first-class drawing, and when the first drawing frequency is 30Hz, it means that the first-class drawing is performed 30 times for 1 second.
The terminal device may obtain the first drawing frequency of the first drawing by analyzing a drawing program or a drawing function corresponding to the first drawing. For example, the drawing program includes a drawing cycle for drawing every 10 milliseconds, and the drawing frequency can be obtained based on the drawing cycle.
And S403, when the first drawing frequency is larger than a first threshold value, reducing the drawing frequency of the first drawing.
In the embodiment of the present application, the first threshold may be a preset maximum drawing frequency of the first type of drawing in the terminal device. The first thresholds corresponding to different game applications may or may not be the same.
In one possible implementation, the terminal device may analyze the first threshold according to the CPU processing capability and the occupation of the CPU by the game screen drawing. For example, when the occupation of the terminal device CPU by the game screen drawing exceeds a certain preset value, the first threshold is relatively low; when the occupancy of the game screen drawing to the terminal device CPU is below the preset value, the first threshold may be set relatively high.
In another possible implementation, the first threshold may be set empirically, for example, when the first drawing frequency is higher than 30Hz, which may result in waste of CPU computing resources, then the first threshold may be set to 30Hz. Embodiments of the present application are not limited herein with respect to the specific value of the first threshold.
Illustratively, the first class of drawing frequency is reduced below the first threshold when the first drawing frequency is greater than the first threshold, e.g., the first threshold is set to 30Hz, and the first class of drawing frequency is reduced to less than 30Hz, which may be 25Hz or 10Hz, when the first drawing frequency is greater than 30Hz.
According to the drawing processing method in the game application, which is provided by the embodiment of the application, the drawing for the game application comprises the first drawing which is irrelevant to the game picture, the first drawing frequency of the first drawing is obtained, and when the first drawing frequency is greater than the first threshold value, the drawing frequency of the first drawing is reduced. Because the fluency of the game picture can be influenced by the excessively high first drawing frequency, the drawing frequency of the first drawing is reduced, so that more computing capacity of the CPU is used for drawing the game picture, the fluency of the game picture can be improved, and the occurrence of the clamping phenomenon is reduced.
Optionally, on the basis of the embodiment corresponding to fig. 4, the method in the embodiment of the present application includes:
in one possible implementation, reducing the drawing frequency of the first type of drawing when the first drawing frequency is greater than a first threshold value includes: and when the first drawing frequency is larger than the first threshold value, reducing the drawing frequency of the first drawing type to the second drawing frequency.
In an embodiment of the present application, the second drawing frequency is less than or equal to the first threshold. The first threshold may be a maximum drawing frequency of the first type of drawing preset in the terminal device, and the second drawing frequency may be the first threshold, or a value between the first threshold and a minimum drawing frequency of the first type of drawing preset in the terminal device. For example, when the lowest drawing frequency of the first-type drawing set in advance in the terminal device is 10Hz, the first threshold value is 30Hz, the second drawing frequency may be set to 20Hz.
In an exemplary embodiment, when the acquired first drawing frequency is greater than the first threshold, the drawing frequency of the first type of drawing is reduced to the second drawing frequency. For example, the first threshold is set to 30Hz, the second drawing frequency is set to 20Hz, and when the acquired first drawing frequency is 60Hz, the first drawing frequency is greater than the first threshold, and the drawing frequency of the first type of drawing is reduced to 20Hz.
In the embodiment of the application, when the drawing frequency of the first type of drawing is higher than the first threshold, the waste of CPU computing resources is caused, and when the drawing frequency of the first type of drawing is lower than the lowest drawing frequency of the first type of drawing preset in the terminal equipment, the clamping phenomenon of the first type of drawing is caused, so that the second drawing frequency can be set to be the first threshold or a certain value between the first threshold and the lowest drawing frequency of the first type of drawing preset in the terminal equipment, and when the first drawing frequency is higher than the first threshold, the drawing frequency of the first type of drawing is reduced to be the second drawing frequency, thereby not only ensuring the fluency of the first type of drawing, but also reducing the occupation of CPU computing resources.
In one possible implementation, when the drawing frequency of the first type of drawing is reduced to the second drawing frequency, frame loss may be performed in the drawing stage or the rendering stage of the first type of drawing according to the number of frames corresponding to the first drawing frequency and the number of frames corresponding to the second drawing frequency.
In the embodiment of the application, different frequencies correspond to different numbers of frames. For example, when the drawing frequency is 60Hz, the number of frames corresponding thereto is 60 frames per second.
For example, the terminal device interface typically requires drawing, rendering, compositing, etc. before displaying the frame. When the frame is lost according to the number of frames corresponding to the second drawing frequency, the frame loss operation can be performed in a drawing stage or a rendering stage before the picture synthesis, so that the last synthesized picture is not affected.
For example, when the drawing frequency of the first drawing is reduced from the first drawing frequency to the second drawing frequency, the frame may be dropped in the drawing stage or the rendering stage of the first drawing according to the number of frames corresponding to the first drawing frequency and the second drawing frequency, respectively. When the difference between the numbers of frames corresponding to the first drawing frequency and the second drawing frequency is larger, the number of dropped frames is larger; when the difference between the numbers of frames corresponding to the first drawing frequency and the second drawing frequency is small, the number of dropped frames is small.
For example, when the first drawing frequency is 60Hz and the second drawing frequency is 20Hz, the number of frames corresponding to the first drawing frequency is 60 frames per second, the number of frames corresponding to the second drawing frequency is 20 frames per second, and when the drawing frequency of the first type of drawing is reduced from the first drawing frequency of 60Hz to the second drawing frequency of 20Hz, the number of frames can be discarded from 60 frames per second to 20 frames per second.
For example, taking frame loss in the drawing stage of the first-type drawing as an example, when a frame is lost, the corresponding drawing function may be skipped, that is, the image corresponding to the frame is discarded, so that the image is not involved in drawing of the first-type drawing.
For example, if the frame is dropped in the drawing stage, the dropped image does not participate in the rendering stage, or the frame dropping process may be performed in the rendering stage, the image is not dropped in the drawing stage, but the image corresponding to the dropped frame is dropped in the rendering stage, and the rendering process is not performed on the image.
In the embodiment of the application, when the drawing frequency of the first type drawing is reduced to the second drawing frequency, the frame loss is carried out in the drawing stage or the rendering stage of the first type drawing according to the number of frames corresponding to the first drawing frequency and the number of frames corresponding to the second drawing frequency, so that the occupation of the first type drawing on the CPU can be reduced in the drawing stage or the rendering stage, more computing capacity of the CPU is used for drawing or rendering the game picture, the fluency of the game picture can be improved, and the occurrence of the clamping phenomenon is reduced.
In one possible implementation, frame dropping occurs during a drawing phase or rendering phase of a first type of drawing, comprising: intermittent discontinuous frame dropping is performed in a drawing phase or a rendering phase of the first-class drawing.
In the embodiment of the application, in order to make the first-class drawing picture smoother, intermittent discontinuous frame loss is performed instead of centralized continuous frame loss when the frame is lost. For example, when the frame number is dropped from 60 frames per second to 20 frames per second, two thirds of the frame number is dropped, and one frame can be reserved, and two frames are dropped, so that the cycle is a period and a periodicity.
In one possible implementation, when the first drawing frequency is greater than the first threshold, after the drawing frequency of the first drawing is reduced, a display area corresponding to the first drawing in the display interface is obtained, and the drawing frame rate of the first drawing is adjusted according to the size of the display area.
In the embodiment of the application, the size of the display area of the first type of drawing in the game interface is not fixed, and the screen display area of the first type of drawing may be changed along with the change of information such as the number of game conversations, the number of leaderboards and the like. For example, if the number of current chat persons is large, the size of the dialog box is also relatively large.
For example, after the drawing frequency of the first type of drawing is reduced below the first threshold, the corresponding display area of the first type of drawing in the display interface may also be changed, and the drawing frame rate of the first type of drawing may be adjusted according to the size of the display area. For example, the drawing frame rate is correspondingly adjusted according to the number of people currently chatting and the size of the dialog box.
In the embodiment of the application, the drawing frame rate of the first drawing type can be flexibly adjusted according to the size of the display area, so that excessive occupation of the CPU by the first drawing type is reduced, and the phenomenon of clamping and stopping of the game picture is reduced.
In one possible implementation, adjusting a drawing frame rate of a first type of drawing according to a size of a display area includes: when the size of the display area is reduced, increasing the drawing frame rate of the first-type drawing, wherein the increased drawing frame rate of the first-type drawing is smaller than or equal to a first threshold value; alternatively, when the size of the display area becomes larger, the drawing frame rate of the first-type drawing is further reduced.
For example, when the size of the display area becomes larger, the first type of drawing to be drawn becomes larger, and the drawing frame rate of the first type of drawing is further lowered on the basis of lowering the drawing frequency of the first type of drawing. For example, when the first drawing frequency is greater than the first threshold, the drawing frame rate of the first drawing is further reduced below the second drawing frequency when the size of the display area is increased after the drawing frequency of the first drawing is reduced to the second drawing frequency.
Illustratively, when the size of the display area becomes smaller, the first type of drawing to be drawn becomes smaller, and the drawing frame rate of the first type of drawing is increased, but the drawing frame rate after the increase still does not exceed the first threshold.
In the embodiment of the application, the drawing frame rate of the first drawing type can be flexibly adjusted according to the size of the display area. When the size of the display area is larger, the drawing frame rate of the first drawing is reduced, so that excessive occupation of the first drawing to the CPU is reduced, and the fluency of the game picture is influenced; when the size of the display area is smaller, the drawing frame rate of the first drawing is increased, so that the first drawing does not influence the fluency of the game picture, and the display effect of the display content corresponding to the first drawing can be improved.
In one possible implementation, when it is determined that the drawing for the game application includes the first type of drawing, it is determined whether a drawing program or a drawing function corresponding to the first type of drawing is called in the drawing for the game application, and if the drawing program or the drawing function corresponding to the first type of drawing is called in the drawing for the game application, it is determined that the drawing for the game application includes the first type of drawing.
In the embodiment of the application, the drawing program or drawing function can be understood as that in the process of drawing an image, the corresponding drawing is completed by calling the corresponding drawing program or drawing function, so that the drawn picture can be rendered and synthesized.
For example, if the first type of drawing is not called, the first type of drawing may be selected from the first type of drawing, and the second type of drawing may be selected from the second type of drawing. When a drawing program or drawing function corresponding to the first type of drawing is called in the drawing of the game application, the drawing for the game application is determined to comprise the first type of drawing.
In the embodiment of the application, whether the drawing for the game application comprises the first type of drawing is determined by the method, the judgment standard is clear, and the operation is simple.
In one possible implementation, the drawing program or drawing function corresponding to the first type of drawing is: drawing programs or drawing functions in the system program of the terminal device. For example, the drawing program or drawing function corresponding to the first type of drawing may be a drawing program or drawing function using Draw in a system program of the terminal device.
In the embodiment of the present application, the drawing elements in the first type of drawing are simpler, for example, may include basic drawing elements such as points, planes, rectangles, arrows, etc., where the basic drawing elements are provided by a system supported by the terminal device, so that the drawing program or drawing function corresponding to the first type of drawing may also call the drawing program or drawing function in the system program of the terminal device. The system of the terminal equipment can modify the drawing program or drawing function corresponding to the first drawing type, so that the operation and control are convenient.
In one possible implementation, the method of drawing processing in a gaming application further includes: and executing a second type of drawing in the game application, combining the drawing result of the first type of drawing with the drawing result of the second type of drawing to obtain a combined picture, and displaying the combined picture.
In an embodiment of the present application, for the second type of drawing in the game application, the display memory is provided by a system supported by the terminal device, and is not drawn by the system, but is drawn by an open graphics library (open graphics library, openGL) in the game application.
In an embodiment of the present application, the drawings of the game application may include, in addition to the first type of drawings, a second type of drawings, such as drawings of a game screen. When the game application runs, the first-type drawing and the second-type drawing are performed simultaneously, and the drawing result of the first-type drawing and the drawing result of the second-type drawing are synthesized to obtain a synthesized picture, for example, a game interface comprising a game picture and social information, so that the synthesized picture can be displayed on the terminal equipment.
Exemplary embodimentsFIG. 5 is a flowchart illustrating a first type of drawing frequency processing according to an embodiment of the present application. As shown in FIG. 5, after entering the game interface, the first drawing frequency of the first drawing, the display frame rate of the synthesized picture and the drawing frequency of the second drawing are all f 1 The display frame rate of the synthesized picture and the drawing frequency of the second kind of drawing are kept as f in the whole game running process 1 While the drawing frequency of the first type of drawing is changed.
As shown in fig. 5, at t 1 At the moment, the terminal equipment acquires f 1 Greater than a first threshold f 0 The first class of drawing frequency is changed from the first drawing frequency f 1 Reduced to a second drawing frequency f 2 The corresponding frame loss situation is to discard one third of frames, for example, frame 1 and frame 2 can be reserved, frame 3 can be discarded, frame 4 and frame 5 can be similarly reserved, frame 6 can be discarded, and frame loss processing can be periodically performed.
In the embodiment of the application, the drawing frequency of the second type of drawing is kept unchanged, the drawing frequency of the first type of drawing is reduced below the first threshold value, and the drawing frequency of the first type of drawing is properly reduced without influencing the fluency of the first type of drawing because the first type of drawing needs less drawing elements, and meanwhile, more operation capacity of a CPU can be used for the second type of drawing, so that the fluency of the second type of drawing can be improved. And the drawing results of the first type of drawing and the drawing results of the second type of drawing are synthesized, so that the fluency of synthesized pictures can be improved, and the occurrence of the clamping phenomenon can be reduced.
Fig. 6 is a schematic flow chart of a drawing processing method in another game application according to the embodiment of the present application. As shown in fig. 6, the specific steps may be:
s601, it is determined that the drawing for the game application includes a first type of drawing.
For a specific implementation of step S601, reference may be made to steps S6011-S6012, for example.
S6011, judging whether a drawing program or a drawing function corresponding to the first type of drawing is called in the drawing of the game application. Wherein, the drawing program or drawing function corresponding to the first type of drawing is: drawing programs or drawing functions in the system program of the terminal device.
S6012, if a drawing program or drawing function corresponding to the first type of drawing is called in the drawing of the game application, determining that the drawing for the game application includes the first type of drawing.
S602, acquiring a first drawing frequency of a first type of drawing.
And S603, when the first drawing frequency is larger than the first threshold value, reducing the drawing frequency of the first drawing type to the second drawing frequency. Wherein the second drawing frequency is less than or equal to the first threshold.
For a specific implementation of step S603, reference may be made to step S6031, for example.
S6031, according to the number of frames corresponding to the second drawing frequency, intermittent discontinuous frame loss is carried out in the drawing stage or the rendering stage of the first drawing.
S604, acquiring a display area corresponding to the first-class drawing in the display interface.
S605, adjusting the drawing frame rate of the first drawing according to the size of the display area.
For a specific implementation of step S605, reference may be made to step S6051, for example.
S6051, when the size of the display area is reduced, increasing the drawing frame rate of the first drawing, wherein the increased drawing frame rate of the first drawing is smaller than or equal to a first threshold value; alternatively, when the size of the display area becomes larger, the drawing frame rate of the first-type drawing is further reduced.
According to the drawing processing method in the game application, whether the drawing corresponding to the first type of drawing comprises the first type of drawing is determined by judging whether the drawing corresponding to the first type of drawing or the drawing function is called in the drawing of the game application, when the drawing corresponding to the game application comprises the first type of drawing, the first drawing frequency of the first type of drawing is obtained, when the first drawing frequency is larger than a first threshold value, the drawing frequency of the first type of drawing is reduced to the second drawing frequency by carrying out intermittent frame loss in the drawing stage or the rendering stage of the first type of drawing. After the drawing frequency of the first type of drawing is reduced, a display area corresponding to the first type of drawing in a display interface is obtained, when the size of the display area is reduced, the drawing frame rate of the first type of drawing is increased, or when the size of the display area is increased, the drawing frame rate of the first type of drawing is further reduced. Because the fluency of the game picture can be influenced by the excessively high first drawing frequency, the drawing frequency of the first drawing is reduced by carrying out intermittent frame loss in the drawing stage or the rendering stage of the first drawing, so that more computing capacity of a CPU is used for drawing the game picture, the fluency of the game picture can be improved, and the occurrence of the cartoon phenomenon is reduced. In addition, on the basis of not affecting the fluency of the game picture, when the size of the display area corresponding to the first-type drawing in the display interface is smaller, the fluency of the picture corresponding to the first-type drawing can be improved by increasing the drawing frequency of the first-type drawing.
The implementations described in the above exemplary embodiments do not represent all implementations consistent with the present application. Rather, they are merely examples of methods consistent with aspects of the application as detailed in the accompanying claims.
The terminal device performance adjustment method according to the embodiment of the present application has been described above, and the terminal device for executing the terminal device performance adjustment method according to the embodiment of the present application is described below. It will be understood by those skilled in the art that the methods and apparatuses may be combined and cited, and the terminal device provided in the embodiments of the present application may perform the steps in the above-mentioned terminal device performance adjustment method.
Fig. 7 is a schematic structural diagram of a performance adjusting device for a terminal device according to an embodiment of the present application. As shown in fig. 7, the terminal device performance adjusting apparatus may be a terminal device in an embodiment of the present application. The terminal equipment performance adjusting device comprises: a touch screen 701, wherein the touch screen includes a touch panel and a display screen; one or more processors 702; a memory 703; a plurality of applications; and one or more computer programs, wherein the one or more computer programs are stored in the memory 703, the one or more computer programs comprising instructions that, when executed by the terminal device capability adjustment apparatus, cause the terminal device capability adjustment apparatus to perform the steps of: determining that the drawing for the gaming application includes a first type of drawing; the first type of drawing is not related to game visuals in the game application; acquiring a first drawing frequency of a first type of drawing; and when the first drawing frequency is larger than the first threshold value, reducing the drawing frequency of the first drawing type.
Optionally, reducing the drawing frequency of the first type of drawing includes: and reducing the drawing frequency of the first drawing type to a second drawing frequency, wherein the second drawing frequency is smaller than or equal to the first threshold value.
Optionally, reducing the drawing frequency of the first type of drawing to the second drawing frequency includes: and according to the number of frames corresponding to the first drawing frequency and the number of frames corresponding to the second drawing frequency, frame loss is carried out in a drawing stage or a rendering stage of the first drawing.
Optionally, frame dropping is performed in a drawing stage or a rendering stage of the first drawing, including: intermittent discontinuous frame dropping is performed in a drawing phase or a rendering phase of the first-class drawing.
Optionally, after reducing the drawing frequency of the first type of drawing when the first drawing frequency is greater than the first threshold, the method further includes: acquiring a display area corresponding to the first-class drawing in a display interface; and adjusting the drawing frame rate of the first drawing type according to the size of the display area.
Optionally, adjusting the drawing frame rate of the first drawing according to the size of the display area includes: when the size of the display area is reduced, increasing the drawing frame rate of the first-type drawing, wherein the increased drawing frame rate of the first-type drawing is smaller than or equal to a first threshold value; alternatively, when the size of the display area becomes larger, the drawing frame rate of the first-type drawing is further reduced.
Optionally, determining that the drawing for the gaming application includes a first type of drawing includes: judging whether a drawing program or a drawing function corresponding to the first type of drawing is called in the drawing of the game application; if a drawing program or drawing function corresponding to the first type of drawing is called in the drawing of the game application, determining that the drawing for the game application comprises the first type of drawing.
Optionally, the drawing program or drawing function corresponding to the first drawing is: drawing programs or drawing functions in the system program of the terminal device.
Optionally, the method further comprises: executing a second type of drawing in the gaming application; synthesizing the drawing result of the first drawing type and the drawing result of the second drawing type to obtain a synthesized picture; and displaying the synthesized picture.
Fig. 8 is a schematic hardware structure of a drawing processing device in a game application according to an embodiment of the present application. Referring to fig. 8, the apparatus includes: a memory 801, a processor 802, and a display 804. The apparatus may further comprise an interface circuit 803, wherein the memory 801, the processor 802, the interface circuit 803, and the display 804 may communicate; the memory 801, the processor 802, the interface circuit 803, and the display screen 804 may be in communication through a communication bus, and the memory 801 is used to store computer execution instructions, which are controlled to be executed by the processor 802, and to be displayed by the display screen 804, thereby implementing a drawing processing method in a game application provided in the following embodiments of the present application.
In a possible implementation manner, the computer-executed instructions in the embodiment of the present application may also be referred to as application program code, which is not limited in particular by the embodiment of the present application.
Optionally, the interface circuit 803 may also include a transmitter and/or a receiver. Alternatively, the processor 802 may include one or more CPUs, but may be other general purpose processors, digital signal processors (digital signal processor, DSP), application specific integrated circuits (application specific integrated circuit, ASIC), etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the present application may be embodied directly in a hardware processor for execution, or in a combination of hardware and software modules in a processor for execution.
The apparatus of this embodiment may be correspondingly configured to perform the steps performed in the foregoing method embodiments, and the implementation principle and technical effects are similar, which are not described herein again.
The embodiment of the application also provides a computer readable storage medium. The methods described in the above embodiments may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. If implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer readable media can include computer storage media and communication media and can include any medium that can transfer a computer program from one place to another. The storage media may be any target media that is accessible by a computer.
In one possible implementation, the computer readable medium may include RAM, ROM, compact disk-read only memory (CD-ROM) or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium targeted for carrying or storing the desired program code in the form of instructions or data structures and accessible by a computer. Also, any connection is properly termed a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (Digital Subscriber Line, DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. Disk and disc, as used herein, includes optical disc, laser disc, optical disc, digital versatile disc (Digital Versatile Disc, DVD), floppy disk and blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
Embodiments of the present application are described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processing unit of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processing unit of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The foregoing detailed description of the application has been presented for purposes of illustration and description, and it should be understood that the foregoing is by way of illustration and description only, and is not intended to limit the scope of the application.

Claims (9)

1. A method of drawing processing in a gaming application, comprising:
determining that a drawing for a gaming application includes a first type of drawing that is not related to a game screen in the gaming application;
acquiring a first drawing frequency of the first type of drawing;
when the first drawing frequency is larger than a first threshold value, reducing the drawing frequency of the first drawing to a second drawing frequency, wherein the second drawing frequency is equal to the first threshold value, or the second drawing frequency is between the first threshold value and the lowest drawing frequency of the first drawing preset in the terminal equipment, and the first threshold value is obtained according to CPU processing capacity and occupation analysis of a game picture drawing on a CPU;
acquiring a display area corresponding to the first-class drawing in a display interface;
when the size of the display area is smaller, the drawing frame rate of the first drawing type is increased, wherein the increased drawing frame rate of the first drawing type is smaller than or equal to the first threshold value;
and when the size of the display area is increased, further reducing the drawing frame rate of the first-type drawing.
2. The method of claim 1, wherein said reducing the drawing frequency of the first type of drawing to a second drawing frequency comprises:
And according to the number of frames corresponding to the first drawing frequency and the number of frames corresponding to the second drawing frequency, frame loss is carried out in a drawing stage or a rendering stage of the first drawing.
3. The method of claim 2, wherein the dropping frames at the drawing phase or rendering phase of the first-type drawing comprises:
intermittent discontinuous frame dropping is performed in a drawing stage or a rendering stage of the first-class drawing.
4. The method of claim 3, wherein the determining the drawing for the gaming application comprises a first type of drawing comprising:
judging whether a drawing program or a drawing function corresponding to the first type of drawing is called in the drawing of the game application;
and if the drawing program or the drawing function corresponding to the first type of drawing is called in the drawing of the game application, determining that the drawing for the game application comprises the first type of drawing.
5. The method of claim 4, wherein the drawing program or drawing function corresponding to the first type of drawing is: drawing programs or drawing functions in the system program of the terminal device.
6. The method according to any one of claims 1-5, further comprising:
Executing a second type of drawing in the gaming application;
synthesizing the drawing result of the first drawing type and the drawing result of the second drawing type to obtain a synthesized picture;
and displaying the synthesized picture.
7. A terminal device, comprising: a processor and a memory, the processor being configured to invoke a program in the memory to cause the terminal device to perform the method of any of claims 1-6.
8. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program which, when executed by a processor, implements the method according to any of claims 1-6.
9. A computer program product comprising a computer program which, when run, causes a computer to perform the method of any of claims 1-6.
CN202210537785.0A 2022-05-18 2022-05-18 Drawing processing method and related device in game application Active CN116077940B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210537785.0A CN116077940B (en) 2022-05-18 2022-05-18 Drawing processing method and related device in game application

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210537785.0A CN116077940B (en) 2022-05-18 2022-05-18 Drawing processing method and related device in game application

Publications (2)

Publication Number Publication Date
CN116077940A CN116077940A (en) 2023-05-09
CN116077940B true CN116077940B (en) 2023-10-20

Family

ID=86199734

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210537785.0A Active CN116077940B (en) 2022-05-18 2022-05-18 Drawing processing method and related device in game application

Country Status (1)

Country Link
CN (1) CN116077940B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106933587A (en) * 2017-03-10 2017-07-07 广东欧珀移动通信有限公司 A kind of figure layer draws control method, device and mobile terminal
WO2017173576A1 (en) * 2016-04-05 2017-10-12 华为技术有限公司 Display method and terminal
CN107423071A (en) * 2017-08-07 2017-12-01 苏州速显微电子科技有限公司 A kind of high efficiency man-machine interface drawing practice based on static figure layer
CN109453523A (en) * 2018-09-26 2019-03-12 努比亚技术有限公司 A kind of game picture display processing method, terminal and computer readable storage medium
CN109857559A (en) * 2019-01-25 2019-06-07 维沃移动通信有限公司 Terminal control method and terminal
KR20200017805A (en) * 2018-08-09 2020-02-19 (주)링크텍 Frequency sweep type jamming signal generator
CN111111175A (en) * 2019-12-18 2020-05-08 北京智明星通科技股份有限公司 Game picture generation method and device and mobile terminal
CN114489910A (en) * 2022-02-10 2022-05-13 北京字跳网络技术有限公司 Video conference data display method, device, equipment and medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017173576A1 (en) * 2016-04-05 2017-10-12 华为技术有限公司 Display method and terminal
CN106933587A (en) * 2017-03-10 2017-07-07 广东欧珀移动通信有限公司 A kind of figure layer draws control method, device and mobile terminal
CN107423071A (en) * 2017-08-07 2017-12-01 苏州速显微电子科技有限公司 A kind of high efficiency man-machine interface drawing practice based on static figure layer
KR20200017805A (en) * 2018-08-09 2020-02-19 (주)링크텍 Frequency sweep type jamming signal generator
CN109453523A (en) * 2018-09-26 2019-03-12 努比亚技术有限公司 A kind of game picture display processing method, terminal and computer readable storage medium
CN109857559A (en) * 2019-01-25 2019-06-07 维沃移动通信有限公司 Terminal control method and terminal
CN111111175A (en) * 2019-12-18 2020-05-08 北京智明星通科技股份有限公司 Game picture generation method and device and mobile terminal
CN114489910A (en) * 2022-02-10 2022-05-13 北京字跳网络技术有限公司 Video conference data display method, device, equipment and medium

Also Published As

Publication number Publication date
CN116077940A (en) 2023-05-09

Similar Documents

Publication Publication Date Title
CN112004086B (en) Video data processing method and device
CN116501210B (en) Display method, electronic equipment and storage medium
CN113556598A (en) Multi-window screen projection method and electronic equipment
CN113254120B (en) Data processing method and related device
CN116055786B (en) Method for displaying multiple windows and electronic equipment
CN112767231B (en) Layer composition method and device
CN114632329B (en) Terminal equipment performance adjusting method and related device
CN116774809A (en) Method and device for adjusting frequency, electronic equipment and readable storage medium
CN116095382B (en) Barrage identification method and related device
CN117711356B (en) Screen refresh rate switching method and electronic equipment
CN116688495B (en) Frame rate adjusting method and related device
CN116077940B (en) Drawing processing method and related device in game application
CN116414337A (en) Frame rate switching method and device
CN115686403A (en) Display parameter adjusting method, electronic device, chip and readable storage medium
WO2024016798A1 (en) Image display method and related apparatus
CN117909071B (en) Image display method, electronic device, storage medium, and chip system
CN117991961A (en) Data processing method, device and storage medium
CN116414336A (en) Frame rate switching method and device
CN118502848A (en) Display method and electronic equipment
CN118509643A (en) Playing processing method and device, electronic equipment and storage medium
CN118113190A (en) Window display method, electronic device and readable storage medium when application is started
CN118363688A (en) Interface rendering method, electronic device and computer readable storage medium
CN118314000A (en) Image prediction method, device, equipment and storage medium
CN116700819A (en) Method and device for starting camera hardware module and storage medium
CN118672379A (en) Scene-based terminal control method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant