CN107038736B - Animation display method based on frame rate and terminal equipment - Google Patents

Animation display method based on frame rate and terminal equipment Download PDF

Info

Publication number
CN107038736B
CN107038736B CN201710159973.3A CN201710159973A CN107038736B CN 107038736 B CN107038736 B CN 107038736B CN 201710159973 A CN201710159973 A CN 201710159973A CN 107038736 B CN107038736 B CN 107038736B
Authority
CN
China
Prior art keywords
frame rate
offset
frame
normal
animation
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
CN201710159973.3A
Other languages
Chinese (zh)
Other versions
CN107038736A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201710159973.3A priority Critical patent/CN107038736B/en
Publication of CN107038736A publication Critical patent/CN107038736A/en
Priority to PCT/CN2018/078976 priority patent/WO2018166470A1/en
Application granted granted Critical
Publication of CN107038736B publication Critical patent/CN107038736B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/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
    • G06T13/00Animation
    • G06T13/802D [Two Dimensional] animation, e.g. using sprites
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/7243User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages
    • H04M1/72439User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages for image or video messaging

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Human Computer Interaction (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Processing Or Creating Images (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

The embodiment of the invention discloses a frame rate-based animation display method and terminal equipment, which are applied to the technical field of information processing. In the method of this embodiment, the terminal device may calculate the current frame rate of the animation page in real time, then determine the current offset of the loop operation in each frame of the animation page according to the current frame rate and the product of the normal frame rate and the normal offset when the animation page is not lost, so that the total offset per second of the loop operation in the animation page is the product of the normal frame rate and the normal offset or a certain fixed value, and display the animation page according to the current offset. Therefore, when the frame rate of the animation page is dynamically changed when the animation page is out of frame, the current offset of the loop operation depending on the frame rate needs to be dynamically determined, so that the rate of the loop operation in the animation page is kept unchanged and cannot be reduced due to the reduction of the frame rate.

Description

Animation display method based on frame rate and terminal equipment
Technical Field
The invention relates to the technical field of information processing, in particular to a frame rate-based animation display method and terminal equipment.
Background
Normally, when the mobile terminal displays the animation, the frame rate per second is 60 frames, and the loop operation following the frame rate is 60 times. If the frame rate is lowered, the number of corresponding loop operations is also reduced. For example, in the state that the moving end H5 loses frames in the game page, all operations that rely on the frame rate to make a loop, such as game background movement or automatic character movement, may affect the running rate of the game because the decrease in the frame rate causes the decrease in the number of loop operations per second during the running of the game.
In the prior art, in the state that the mobile terminal H5 is out of frame in the game page, a timing call function is generally adopted to perform loop operation, so that the number of loop operations per second is fixed to about 30, which may cause the problem of slow game execution speed.
Disclosure of Invention
The embodiment of the invention provides a frame rate-based animation display method and terminal equipment, which can be used for dynamically determining the current offset of cyclic operation in each frame of animation page according to the current frame rate of the animation page.
The embodiment of the invention provides an animation display method based on a frame rate, which comprises the following steps:
calculating the current frame rate of the animation page;
determining the current offset of the cyclic operation in each frame of animation page according to the product of the normal frame rate and the normal offset and the current frame rate, so that the total offset per second of the cyclic operation in each frame of animation page is the product of the normal frame rate and the normal offset or is a certain fixed value;
the normal frame rate is the frame rate when the animation page is not lost, the normal offset is the offset of the cyclic operation in each frame of animation page when the animation page is not lost, and a certain fixed value is a value in a preset range of the difference value of the product of the normal frame rate and the normal offset;
and displaying each frame of animation page according to the determined current offset.
An embodiment of the present invention further provides a terminal device, including:
the frame rate calculation unit is used for calculating the current frame rate of the animation page;
the offset determining unit is used for determining the current offset of the cyclic operation in each frame of animation page according to the product of the normal frame rate and the normal offset and the current frame rate, so that the total offset per second of the cyclic operation in each frame of animation page is the product of the normal frame rate and the normal offset or is a certain fixed value; the normal frame rate is the frame rate when the animation page is not lost, the normal offset is the offset of the cyclic operation in each frame of animation page when the animation page is not lost, and a certain fixed value is a value in a preset range of the difference value of the product of the normal frame rate and the normal offset;
and the first display unit is used for displaying each frame of animation page according to the determined current offset.
As can be seen, in the method of this embodiment, the terminal device may calculate the current frame rate of the animation page in real time, then determine the current offset of the loop operation in each frame of the animation page according to the current frame rate and the product of the normal frame rate and the normal offset when the animation page is not lost, so that the total offset per second of the loop operation in the animation page is the product of the normal frame rate and the normal offset or is a certain fixed value, and display the animation page according to the current offset. Therefore, when the frame rate of the animation page is dynamically changed when the animation page is out of frame, the current offset of the loop operation depending on the frame rate needs to be dynamically determined, so that the rate of the loop operation in the animation page is kept unchanged and cannot be reduced due to the reduction of the frame rate.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a flowchart of a frame rate-based animation display method according to an embodiment of the present invention;
FIG. 2 is a flowchart of another frame rate-based animation display method according to an embodiment of the present invention;
FIG. 3 is a flow chart of a frame rate-based animation display method provided in an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a terminal device according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of another terminal device provided in the embodiment of the present invention;
fig. 6 is a schematic structural diagram of another terminal device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are, for example, capable of operation in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The embodiment of the invention provides a frame rate-based animation display method, which is a method executed by terminal equipment (such as a game terminal and the like) supporting frame rate-based animation, and a flow chart is shown in fig. 1 and comprises the following steps:
step 101, calculating the current frame rate of the animation page, i.e. the number of frames of the animation page per second.
It can be understood that when the terminal device displays the animation page based on the frame rate, it needs to generate each frame of animation page and then display the generated animation page. In general, the frame rate of the animation page is fixed, that is, the number of frames of the animation page displayed by the terminal device per second is the same, for example, 60 frames per second, while in case of frame loss of the animation page, the frame rate is dynamically changed.
It should be noted that, the method of this embodiment is a flow triggered by the terminal device at a fixed period; or when detecting that the animation page is lost, the terminal equipment triggers the process, wherein when the terminal equipment detects that the frame number of the animation page displayed per second is changed greatly, the animation page of the terminal equipment can be determined to be lost.
Step 102, determining the current offset of the loop operation in each frame of animation page according to the product of the normal frame rate and the normal offset and the current frame rate calculated in the step 101, so that the total offset per second of the loop operation in the animation page is the product of the normal frame rate and the normal offset or is a certain fixed value.
The normal frame rate is the frame rate when the animation page is not lost, the normal offset is the offset of the cyclic operation in each frame of animation page when the animation page is not lost, and a certain fixed value is the value of the difference value of the product of the normal frame rate and the normal offset within a preset range. The normal frame rate and the normal offset may be preset in the terminal device by the user in advance, or may be calculated by the terminal device and stored in the terminal device when the animation page has not lost frames. The loop operation refers to the same operation in each frame of the animation page, such as the operation of moving the background forward.
In general, the offset of the loop operation in each frame of the animation page is also fixed, so that the number of the loop operations in the animation page displayed by the terminal device per second is also fixed, for example, 60 times per second. In order to keep the rate of the loop operation unchanged when the animation page is out of frame, in this embodiment, it is necessary to determine the corresponding current offset in real time according to the current frame rate, so that the total offset per second of the loop operation in the animation page is unchanged, for example, the total offset per second of the loop operation in the animation page is the same as the total offset per second of the loop operation in the animation page under a normal condition (i.e., the product of the normal offset and the normal frame rate), or may be fixed to a certain value, which is not limited herein.
For example, under normal conditions, the normal offset of the loop operation in each frame of the animation page is 1 pixel, and 60 frames per second, the total offset per second of the loop operation in the animation page is 60 pixels, and in this embodiment, the corresponding current offset may be determined, so that the product of the current frame rate and the current offset is 60.
Specifically, when the terminal device performs this step, in one case, the ratio of the product of the normal frame rate and the normal offset to the current frame rate may be directly determined as the current offset. In another case, the terminal device needs to determine that a certain value of the difference between the normal frame rate and the product of the normal offset in a preset range is a certain fixed value, and then determine the ratio of the certain fixed value to the current frame rate as the current offset.
And 103, displaying each frame of animation page according to the current offset determined in the step 102. Specifically, on the basis of a current frame animation page displayed currently, after an object of the cyclic operation is shifted according to the current offset, a next frame animation page is obtained, the next frame animation page is displayed, and the like, and each frame animation page is displayed.
As can be seen, in the method of this embodiment, the terminal device may calculate the current frame rate of the animation page in real time, and then determine the current offset of the loop operation in each frame of the animation page according to the current frame rate and the product of the normal frame rate and the normal offset when the animation page is not lost, so that the total offset per second of the loop operation in the animation page is the product of the normal frame rate and the normal offset, or is a certain fixed value, and display the animation page according to the current offset. Therefore, when the frame rate of the animation page is dynamically changed when the animation page is out of frame, the current offset of the loop operation depending on the frame rate needs to be dynamically determined, so that the rate of the loop operation in the animation page is kept unchanged and cannot be reduced due to the reduction of the frame rate.
In a specific embodiment, when the terminal device executes the step 101, when each frame of animation page starts to be generated, the corresponding generation start time may be recorded, then the average consumed time of each frame of animation page is determined according to the generation start time of each frame of animation page, and the current frame rate is determined according to the average consumed time. For example, when the frame rate is 60 frames per second, the average time of animation page per frame is 16.7 milliseconds. When the average time consumption of each frame of animation page is determined, the difference value of the starting generation time of the adjacent frame of animation page can be obtained firstly, then the difference values are averaged to obtain the average time consumption of each frame of animation page, and the current frame rate is the ratio of 1 to the average time consumption.
It should be noted that, since the terminal device generates each frame of animation page by calling the drawing function of the animation page when generating each frame of animation page, in this embodiment, each time a certain frame of animation page is generated by calling the drawing function of the animation page, the calling time may be recorded as the starting generation time of the corresponding frame of animation page.
The drawing function of the Animation page may be a request Animation Frame (request Animation Frame) function, a set Interval (set Interval) function, or a set Timeout (set Timeout) function. However, since the request Animation Frame function is corresponding to the Frame rate, that is, the drawing of each Frame of Animation page calls the function, in this embodiment, the call time may be directly recorded when the function is called.
The set Interval function or the set Timeout function is not corresponding to the frame rate, that is, when the terminal device displays each animation page, the type of function is not necessarily called, in this case, it is necessary for the user to call the type of function (the set Interval function or the set Timeout function) when each animation page is displayed by setting the function in advance through the terminal device, so that the type of function corresponds to the frame rate, and the terminal device can obtain the average consumed time of each animation page according to the call time of the type of function.
Referring to fig. 2, in another specific embodiment, after the terminal device performs step 101, the following step 104 may be performed first:
step 104, determining whether the current frame rate calculated in the step 101 is consistent with the normal frame rate, if so, executing step 105, and if not, executing the steps 102 and 103.
And 105, displaying each frame of animation page according to the normal offset.
In this embodiment, the terminal device considers that, if the frame rate of the animation page is not changed, each frame of animation page can be directly displayed according to the normal offset without re-determining the current offset.
A specific embodiment is described below to describe the method of this embodiment, where the terminal device in this embodiment is a game terminal, and the animation page displayed by the terminal device is a game page, and with reference to fig. 3, the method of this embodiment includes:
in step 201, when the game page is not lost, the frame rate of the game page is set to 60, that is, 60 frames per second, the normal offset of the loop operation (background forward movement) in the game page is x (px), and the total amount of the loop operation in the animation page is 60x (px) if the second is 60 frames in the normal state.
Step 202, when the game terminal is started, when each Frame of game page is generated, a request Animation Frame function is called to generate the game page, the game terminal records the time for calling the Animation Frame function, and therefore the time consumption T of each Frame of game page is calculated according to the recorded time, and the current Frame rate Y of the game page is 1/T.
In step 203, the ratio Z of the normal frame rate (60) to the current frame rate Y is calculated, i.e. Z is 60/Y.
Step 204, taking the product of the normal offset X and the ratio Z of the normal frame rate and the current frame rate as the current offset of the circular operation in the game page.
In step 205, the game terminal displays each frame of game page according to the current offset.
During the actual operation of the game terminal, the game terminal will loop through the above steps 202 and 203, so as to ensure that the total offset per second of the loop operation in the game page (forward movement of the background in the game page) is close to 60x (px).
For example, in a super marrio game terminal, the loop operation in each frame of animation page is that marrio automatically runs forward, under a normal state, marrio automatically moves forward by 1 pixel (px) in each frame of game page, and can move by 60px per second, and under a lost frame state, the frame rate of the game page may be only 20 frames per second, and the marrio in the game page needs to automatically move forward by 3 pixels to enable the running rate of marrio to be unchanged by the method.
An embodiment of the present invention further provides a terminal device, a schematic structural diagram of which is shown in fig. 4, and the terminal device may specifically include:
a frame rate calculating unit 10, configured to calculate a current frame rate of the animation page;
an offset determining unit 11, configured to determine a current offset of a cyclic operation in each frame of animation page according to a product of a normal frame rate and a normal offset and the current frame rate calculated by the frame rate calculating unit 10, so that a total offset per second of the cyclic operation in the animation page is a product of the normal frame rate and the normal offset, or is a certain fixed value; the normal frame rate is the frame rate when the animation page is not lost, the normal offset is the offset of the cyclic operation in each frame of animation page when the animation page is not lost, and a certain fixed value is a value in a preset range of the difference value of the product of the normal frame rate and the normal offset; specifically, the offset determining unit 11 is configured to determine a ratio of a product of the normal frame rate and a normal offset to the current frame rate as the current offset; or determining that a certain value of a difference value between the normal frame rate and the product of the normal frame rate and the normal offset in a preset range is the certain fixed value, and determining the ratio of the certain fixed value to the current frame rate as the current offset.
The first display unit 12 is configured to display each frame of animation page according to the current offset determined by the offset determination unit 11.
It can be seen that, in the terminal device, the frame rate calculating unit 10 may calculate the current frame rate of the animation page in real time, then the offset determining unit 11 determines the current offset of the loop operation in each frame of the animation page according to the current frame rate and the product of the normal frame rate and the normal offset when the animation page is not lost, so that the total offset per second of the loop operation in the animation page is the product of the normal frame rate and the normal offset or is a certain fixed value, and the first displaying unit 12 displays the animation page according to the current offset. Therefore, when the frame rate of the animation page is dynamically changed when the animation page is out of frame, the current offset of the loop operation depending on the frame rate needs to be dynamically determined, so that the rate of the loop operation in the animation page is kept unchanged and cannot be reduced due to the reduction of the frame rate.
Referring to fig. 5, in a specific embodiment, the terminal device may further include a second presentation unit 13 and a setting unit 14 in addition to the structure shown in fig. 4, and the frame rate calculation unit 10 may be implemented by a time recording unit 110 and a time consumption calculation unit 120, specifically:
a time recording unit 110 for recording a corresponding start generation time when each frame animation page starts to be generated; if the generation of each frame of animation page is performed by calling a drawing function of an animation page, the time recording unit 110 is specifically configured to record a calling time as a starting generation time of a corresponding frame of animation page when a certain frame of animation page is generated by calling the drawing function of the animation page.
Specifically, the drawing function of the animation page may be a function of requesting an animation frame, a function of setting a space, or a function of setting a timeout, and if the drawing function of the animation page is the function of setting a space or the function of setting a timeout, the terminal device further needs to call the function of setting a space or the function of setting a timeout when each frame of animation page is displayed through the setting unit 14, so that the time recording unit 110 records the call time of the function according to the setting of the setting unit 14.
The time-consuming calculating unit 120 is configured to determine an average time-consuming period of each frame of animation page according to the start generation time of each frame of animation page recorded by the time recording unit 110, and determine the current frame rate according to the average time-consuming period.
And a second display unit 13, configured to display each frame of animation page according to the normal offset if the current frame rate calculated by the time-consuming calculation unit 120 in the frame rate calculation unit 10 is consistent with the normal frame rate.
In this embodiment, after the frame rate calculation unit 10 calculates the current frame rate, if the current frame rate is consistent with the normal frame rate, the animation page is displayed through the second display unit 13. If the current frame rate is not consistent with the normal frame rate, the current offset is determined by the offset determining unit 11, and then the animation page is displayed by the first displaying unit 12.
The present invention further provides a terminal device, a schematic structural diagram of which is shown in fig. 6, where the terminal device may generate a relatively large difference due to different configurations or performances, and may include one or more Central Processing Units (CPUs) 20 (e.g., one or more processors) and a memory 21, and one or more storage media 22 (e.g., one or more mass storage devices) storing the application programs 221 or the data 222. Wherein the memory 21 and the storage medium 22 may be a transient storage or a persistent storage. The program stored in the storage medium 22 may include one or more modules (not shown), each of which may include a series of instruction operations for the terminal device. Still further, the central processor 20 may be arranged to communicate with the storage medium 22, and to execute a series of instruction operations in the storage medium 22 on the terminal device.
Specifically, the application program 221 stored in the storage medium 22 includes an application program for frame rate-based animation display, and the program may include the frame rate calculation unit 10, the offset determination unit 11, the first display unit 12, the second display unit 13, and the setting unit 14 in the terminal device, which will not be described herein again. Still further, the central processor 20 may be configured to communicate with the storage medium 22, and execute a series of operations corresponding to the application program of the frame rate based animation presentation stored in the storage medium 22 on the terminal device.
The terminal equipment may also include one or more power supplies 23, one or more wired or wireless network interfaces 24, one or more input-output interfaces 25, and/or one or more operating systems 223, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, and the like.
The steps executed by the terminal device in the above method embodiment may be based on the structure of the terminal device shown in fig. 6.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable storage medium, and the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
The animation display method and the terminal device based on the frame rate provided by the embodiment of the invention are described in detail, a specific example is applied in the description to explain the principle and the implementation mode of the invention, and the description of the embodiment is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (6)

1. A frame rate-based animation display method is characterized by comprising the following steps:
calculating the current frame rate of the animation page;
determining the current offset of the cyclic operation in each frame of animation page according to the product of the normal frame rate and the normal offset and the current frame rate, so that the total offset per second of the cyclic operation in each frame of animation page is the product of the normal frame rate and the normal offset or is a certain fixed value; the total offset per second is the product of the current frame rate and the current offset;
the normal frame rate is the frame rate when the animation page is not lost, the normal offset is the offset of the cyclic operation in each frame of animation page when the animation page is not lost, and a certain fixed value is a value in a preset range of the difference value of the product of the normal frame rate and the normal offset;
displaying each frame of animation page according to the current offset of the cyclic operation in each frame of animation page;
the calculating the current frame rate of the animation page specifically includes:
when a drawing function of an animation page is called to generate a certain frame of animation page, recording calling time as the starting generation time of the frame of animation page; determining the average consumed time of each frame of animation page according to the starting generation time of each frame of animation page, determining the current frame rate according to the average consumed time, setting a distance function or a timeout function for a drawing function of the animation page as a frame function of requesting animation;
wherein, if the drawing function of the animation page is a distance setting function or a time-out setting function, the method further comprises: and setting the interval setting function or the timeout setting function to be called when each frame of animation page is displayed, so that the interval setting function or the timeout setting function corresponds to the frame rate.
2. The method of claim 1,
the method for determining the current offset of the circular operation in each frame of animation page according to the product of the normal frame rate and the normal offset and the current frame rate so that the total offset per second of the circular operation in each frame of animation page is the product of the normal frame rate and the normal offset specifically comprises the following steps: determining the ratio of the product of the normal frame rate and the normal offset to the current frame rate as the current offset;
the method for determining the current offset of the cyclic operation in each frame of animation page according to the product of the normal frame rate and the normal offset and the current frame rate to enable the total offset per second of the cyclic operation in each frame of animation page to be a certain fixed value specifically comprises the following steps: and determining that a certain value of a difference value between the normal frame rate and the product of the normal offset in a preset range is the certain fixed value, and determining the ratio of the certain fixed value to the current frame rate as the current offset.
3. The method of any of claims 1-2, wherein after calculating the current frame rate of the animated page, the method further comprises:
if the current frame rate is consistent with the normal frame rate, displaying each frame of animation page according to the normal offset;
and if the current frame rate is not consistent with the normal frame rate, executing the steps of determining the current offset of the cyclic operation in each frame of animation page and displaying each frame of animation page according to the current offset of the cyclic operation in each frame of animation page.
4. A terminal device, comprising:
the frame rate calculation unit is used for calculating the current frame rate of the animation page;
the offset determining unit is used for determining the current offset of the cyclic operation in each frame of animation page according to the product of the normal frame rate and the normal offset and the current frame rate, so that the total offset per second of the cyclic operation in each frame of animation page is the product of the normal frame rate and the normal offset or is a certain fixed value; the normal frame rate is the frame rate when the animation page is not lost, the normal offset is the offset of the cyclic operation in each frame of animation page when the animation page is not lost, and a certain fixed value is a value in a preset range of the difference value of the product of the normal frame rate and the normal offset; the total offset per second is the product of the current frame rate and the current offset;
the first display unit is used for displaying each frame of animation page according to the current offset of the cyclic operation in each frame of animation page;
the frame rate calculating unit specifically includes:
the time recording unit is used for recording calling time as the starting generation time of a frame of animation page when the drawing function of the animation page is called to generate the frame of animation page, wherein the drawing function of the animation page is a frame function of requesting animation, and a spacing function or a time-out function is set;
the time consumption calculating unit is used for determining the average time consumption of each frame of animation page according to the starting generation time of each frame of animation page, and determining the current frame rate according to the average time consumption;
the device also comprises a setting unit, which is used for setting that the distance setting function or the overtime setting function needs to be called when each frame of animation page is displayed if the drawing function of the animation page is the distance setting function or the overtime setting function, so that the distance setting function or the overtime setting function corresponds to the frame rate.
5. The terminal device of claim 4,
the offset determining unit is specifically configured to determine a ratio of a product of the normal frame rate and the normal offset to the current frame rate as the current offset; or determining that a certain value of a difference value between the normal frame rate and the product of the normal frame rate and the normal offset in a preset range is the certain fixed value, and determining the ratio of the certain fixed value to the current frame rate as the current offset.
6. The terminal device according to any of claims 4 to 5, further comprising:
the second display unit is used for displaying each frame of animation page according to the normal offset if the current frame rate is consistent with the normal frame rate;
the offset determining unit is specifically configured to, if the current frame rate is inconsistent with the normal frame rate, perform the step of determining the current offset of the loop operation in each frame of the animation page.
CN201710159973.3A 2017-03-17 2017-03-17 Animation display method based on frame rate and terminal equipment Active CN107038736B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201710159973.3A CN107038736B (en) 2017-03-17 2017-03-17 Animation display method based on frame rate and terminal equipment
PCT/CN2018/078976 WO2018166470A1 (en) 2017-03-17 2018-03-14 Animation display method based on frame rate and terminal device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710159973.3A CN107038736B (en) 2017-03-17 2017-03-17 Animation display method based on frame rate and terminal equipment

Publications (2)

Publication Number Publication Date
CN107038736A CN107038736A (en) 2017-08-11
CN107038736B true CN107038736B (en) 2021-07-06

Family

ID=59534504

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710159973.3A Active CN107038736B (en) 2017-03-17 2017-03-17 Animation display method based on frame rate and terminal equipment

Country Status (2)

Country Link
CN (1) CN107038736B (en)
WO (1) WO2018166470A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107038736B (en) * 2017-03-17 2021-07-06 腾讯科技(深圳)有限公司 Animation display method based on frame rate and terminal equipment
CN108710688B (en) * 2018-05-21 2021-12-21 创新先进技术有限公司 Method and device for generating animation in page and electronic equipment
CN111494942B (en) * 2020-04-16 2022-02-22 腾讯科技(深圳)有限公司 Animation playing method, device, terminal and storage medium
CN113407029B (en) * 2021-06-25 2024-02-20 腾讯云计算(北京)有限责任公司 Page object state information determining method, device, equipment and readable medium

Family Cites Families (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030215011A1 (en) * 2002-05-17 2003-11-20 General Instrument Corporation Method and apparatus for transcoding compressed video bitstreams
US20080055311A1 (en) * 2006-08-31 2008-03-06 Ati Technologies Inc. Portable device with run-time based rendering quality control and method thereof
US8593463B2 (en) * 2009-10-27 2013-11-26 Microsoft Corporation Controlling animation frame rate of applications
US9106787B1 (en) * 2011-05-09 2015-08-11 Google Inc. Apparatus and method for media transmission bandwidth control using bandwidth estimation
CN103366391B (en) * 2013-06-26 2016-07-06 广州市动景计算机科技有限公司 The picture rendering intent of dynamic image and picture rendering device
JPWO2015053120A1 (en) * 2013-10-08 2017-03-09 シャープ株式会社 Image decoding apparatus, image decoding method, image encoding apparatus, and image encoding method
US9390464B2 (en) * 2013-12-04 2016-07-12 Nvidia Corporation Stencil buffer data compression
CN103778656B (en) * 2014-02-12 2018-09-07 腾讯科技(深圳)有限公司 A kind of image rendering method, device and electronic equipment
CN104881666B (en) * 2014-02-27 2018-01-16 王磊 A kind of real-time bianry image connected component labeling implementation method based on FPGA
CN104808984B (en) * 2015-03-24 2018-01-19 魅族科技(中国)有限公司 Display interface method for refreshing and device
CN104811821B (en) * 2015-04-02 2018-03-16 小米科技有限责任公司 The method and device of screen frame per second is painted in adjustment
CN105848012A (en) * 2016-03-30 2016-08-10 乐视控股(北京)有限公司 Real-time transcoding rate control method and device
CN106023192B (en) * 2016-05-17 2019-04-09 成都通甲优博科技有限责任公司 A kind of time reference real-time calibration method and system of Image-capturing platform
CN106127843B (en) * 2016-06-16 2019-05-17 福建数博讯信息科技有限公司 The rendering method and device of three-dimensional virtual scene
CN105957121A (en) * 2016-06-29 2016-09-21 努比亚技术有限公司 Animation display system and display method in application
CN107038736B (en) * 2017-03-17 2021-07-06 腾讯科技(深圳)有限公司 Animation display method based on frame rate and terminal equipment

Also Published As

Publication number Publication date
CN107038736A (en) 2017-08-11
WO2018166470A1 (en) 2018-09-20

Similar Documents

Publication Publication Date Title
CN107038736B (en) Animation display method based on frame rate and terminal equipment
CN110297996B (en) Animation display method, device, equipment and storage medium based on H5 page
CN107786748B (en) Image display method and apparatus
CN107451193B (en) A kind of acquisition methods and device of customer terminal webpage load time, electronic equipment
CN108721898B (en) Frame rate determination method and apparatus, storage medium, and electronic apparatus
US20180335823A1 (en) Method and Apparatus for Reducing Power Consumption of Terminal Device
CN111767002B (en) Page display method, device, equipment and storage medium
CN106937090A (en) The method and device of a kind of video storage
CN106484348B (en) Animation drawing method and system based on synchronous signals
CN113766324B (en) Video playing control method and device, computer equipment and storage medium
CN114071047A (en) Frame rate control method and related device
US8884971B2 (en) Animation engine decoupled from animation catalog
CN111625456A (en) Stuck positioning method and device
CN105573603A (en) Method and device for adjusting screen darkening time of terminal
CN111277659A (en) Method and device for detecting display state of transverse screen and vertical screen of mobile phone
CN107688517B (en) WPF program jamming detection method and device
CN108712676B (en) Method and device for automatically playing video based on React framework
CN105808629B (en) Webpage processing method and device
CN110941464A (en) Light exposure method, device, system and storage medium
CN113126741B (en) Mobile terminal frame rate control method, device, computer equipment and storage medium
CN111467797B (en) Game data processing method and device, computer storage medium and electronic equipment
CN110557627B (en) Performance monitoring method and device and storage medium
CN108961380B (en) Graph rendering method and device
CN111240926A (en) IOS stuck monitoring method and system
CN111352555A (en) List sliding performance optimization 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