CN106504305A - A kind of animation processing method and device - Google Patents
A kind of animation processing method and device Download PDFInfo
- Publication number
- CN106504305A CN106504305A CN201610941563.XA CN201610941563A CN106504305A CN 106504305 A CN106504305 A CN 106504305A CN 201610941563 A CN201610941563 A CN 201610941563A CN 106504305 A CN106504305 A CN 106504305A
- Authority
- CN
- China
- Prior art keywords
- target
- animation
- layer
- image
- specified attribute
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T13/00—Animation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T15/00—3D [Three Dimensional] image rendering
- G06T15/005—General purpose rendering architectures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2213/00—Indexing scheme for animation
- G06T2213/08—Animation software package
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Graphics (AREA)
- Processing Or Creating Images (AREA)
Abstract
The invention discloses a kind of animation processing method and device, can avoid repetition figure layer from rendering, when playing animation reuses figure layer so as to realize the purpose of the system resource for saving terminal.Methods described includes:The default instrument for animation performance tuning is adjusted;The specified attribute in the default instrument being opened, each self-corresponding image of one or more target figure layers being cached using the specified attribute, wherein, the duration consumed during the target figure layer drawing image is more than or equal to specified duration.
Description
Technical field
The present invention relates to technical field of internet application, more particularly to a kind of animation processing method and device.
Background technology
With the development of Internet technology, the information that people can be obtained from the Internet is increasingly enriched, due to animation
Can present give people to enrich, interesting picture and content, increasing people like seeing animation on the net.Dynamic in the Internet
Draw and present to user, such as flash animation in a variety of forms, flash can include simple animation, video content, answer
Miscellaneous PowerPoint or application program etc..With the fast development of terminal technology, people can be in terminal (such as smart mobile phone, flat board
Computer etc.) upper playing animation.However, playing animation can consume substantial amounts of terminal system resource in terminal, how terminal is saved
System resource becomes problem demanding prompt solution.
Content of the invention
The present invention provides a kind of animation processing method and device, can avoid repeating when playing animation reuses figure layer
Figure layer is rendered, so as to realize the purpose of the system resource for saving terminal.
The present invention provides a kind of animation processing method, including:
The default instrument for animation performance tuning is adjusted;
The specified attribute in the default instrument is opened, and one or more target figure layers is cached using the specified attribute each
Self-corresponding image, wherein, the duration consumed during the target figure layer drawing image is more than or equal to specified duration.
In an embodiment of the present invention, each self-corresponding figure of one or more target figure layers is cached using the specified attribute
Picture, including:
One or more target figure layers are plotted to the image outside terminal screen using the specified attribute, and will be described
Image buffer storage gets up.
In an embodiment of the present invention, methods described also includes:
The drafting that succeeding target figure layer is carried out using the described image of caching.
In an embodiment of the present invention, the default instrument is the Core Animation instruments in Instruments.
In an embodiment of the present invention, the Core Animation instruments are visualization tool.
In an embodiment of the present invention, the specified attribute is shouldRasterizep attributes.
The present invention also provides a kind of video processing apparatus, including:
Module is adjusted, for having adjusted the default instrument for animation performance tuning;
Cache module, for opening the specified attribute in the default instrument, using the specified attribute cache one or
The each self-corresponding image of multiple target figure layers, wherein, the duration consumed during the target figure layer drawing image is more than or equal to
Specified duration.
In an embodiment of the present invention, the cache module is additionally operable to:
One or more target figure layers are plotted to the image outside terminal screen using the specified attribute, and will be described
Image buffer storage gets up.
In an embodiment of the present invention, described device also includes:
Drafting module, for carrying out the drafting of succeeding target figure layer using the described image of caching.
In an embodiment of the present invention, the default instrument is the Core Animation instruments in Instruments.
In an embodiment of the present invention, the Core Animation instruments are visualization tool.
In an embodiment of the present invention, the specified attribute is shouldRasterizep attributes.
In embodiments of the present invention, the default instrument for animation performance tuning has been adjusted;Open in the default instrument
Specified attribute, caches each self-corresponding image of one or more target figure layers, wherein, the target figure using the specified attribute
The duration consumed during layer drawing image is more than or equal to specified duration.As can be seen here, the embodiment of the present invention can be moved playing
Repetition figure layer is avoided to render when drawing reuse figure layer, so as to realize the purpose of the system resource for saving terminal.
Other features and advantages of the present invention will be illustrated in the following description, also, partly be become from description
Obtain it is clear that or being understood by implementing the present invention.The purpose of the present invention and other advantages can pass through in the explanation that is write
In book, claims and accompanying drawing, specifically noted structure is realizing and obtain.
Below by drawings and Examples, technical scheme is described in further detail.
Description of the drawings
Accompanying drawing is used for providing a further understanding of the present invention, and constitutes a part for description, the reality with the present invention
Applying example is used for explaining the present invention together, is not construed as limiting the invention.In the accompanying drawings:
The flow chart that Fig. 1 show animation processing method in one embodiment of the invention;
The flow chart that Fig. 2 show animation processing method in another embodiment of the present invention;
Fig. 3 show the structural representation of video processing apparatus in one embodiment of the invention;And
Fig. 4 show the structural representation of video processing apparatus in another embodiment of the present invention.
Specific embodiment
The preferred embodiments of the present invention are illustrated below in conjunction with accompanying drawing, it will be appreciated that preferred reality described herein
Apply example to be merely to illustrate and explain the present invention, be not intended to limit the present invention.
Be illustrated in figure 1 the flow chart of animation processing method in one embodiment of the invention, the method can apply computer,
In the terminals such as mobile phone, the method may comprise steps of S11-S12.
Step S11, has adjusted the default instrument for animation performance tuning.
In this step, default instrument can be the Core Animation instruments in Instruments, and the instrument is can
Have depending on chemical industry, can be used to monitor Core Animation animation performances, and to animation performance tuning.Also, Core
Animation instruments are rendered to help debug there is provided a series of check box options.
Step S12, opens the specified attribute in default instrument, caches one or more target figure layers using the specified attribute
Each self-corresponding image, wherein, the duration consumed during target figure layer drawing image is more than or equal to specified duration.
In this step, the specified attribute that presets in instrument can be shouldRasterizep attributes.Work as use
When shouldRasterizep attributes, time-consuming figure layer is drawn and can be buffered, and then regards a simply flat picture
Present.When caching regeneration, this option is highlighted with regard to having been carried out to rasterize layer with redness.If caching frequent regeneration
If, it is meant that rasterizing might have negative performance impact.Enable shouldRasterize attributes figure layer can be painted
Make the image outside a screen.Then this image will be buffered and be plotted to actual figure layer contents and
Subgraph layer.If there are a lot of subgraph layers or there is the effect application of complexity, do so will be than redrawing all of all affairs
Frame is profitable much.But rasterisation original image needs the time, but also can consume extra internal memory.
Additionally, specified duration mentioned above can be configured according to the actual requirements, the present invention is not limited.At this
In inventive embodiments, the duration consumed during figure layer drawing image can be recorded, the duration of record is compared with specified duration
Compared with it is target figure layer to determine that the duration of record is more than the corresponding figure layer of specified duration.
In embodiments of the present invention, the default instrument for animation performance tuning has been adjusted;Open in the default instrument
Specified attribute, caches each self-corresponding image of one or more target figure layers, wherein, the target figure using the specified attribute
The duration consumed during layer drawing image is more than or equal to specified duration.As can be seen here, the embodiment of the present invention can be moved playing
Repetition figure layer is avoided to render when drawing reuse figure layer, so as to realize the mesh of the system resource (such as internal memory, CPU etc.) for saving terminal
's.
In the alternative embodiment of the present invention, in above step S12, one or more targets are cached using the specified attribute
The each self-corresponding image of figure layer may be embodied as following steps A1-A2:
One or more target figure layers are plotted to the image outside terminal screen using the specified attribute by step A1.
Step A2, the image buffer storage of above-mentioned drafting is got up, to carry out succeeding target figure layer using the image of caching
Draw.
Animation processing method of the invention is discussed in detail below by a specific embodiment realizes process.Such as Fig. 2 institutes
The flow chart of animation processing method in another embodiment of the present invention is shown as, the method may comprise steps of S21-S24.
Step S21, has adjusted the Core Animation instruments for animation performance tuning.
In this step, Core Animation instruments can be visualization tool, can be used to monitor Core
Animation animation performances, and to animation performance tuning.Also, Core Animation instruments provide a series of check boxes
Option is rendered to help debug.
Step S22, opens the shouldRasterizep attributes in Core Animation instruments.
In this step, when using shouldRasterizep attributes, time-consuming figure layer is drawn and can be buffered, so
Present as a simply flat picture afterwards.When caching regeneration, this option is with regard to being carried out to rasterize layer with redness
Highlighted.If caching frequent regeneration, it is meant that rasterizing might have negative performance impact.Enable
Figure layer can be plotted to the image outside a screen by shouldRasterize attributes.Then this image will be buffered
Come and be plotted to the contents and subgraph layer of actual figure layer.If there are a lot of subgraph layers or have complexity effect application,
Do so will be more profitable much than redrawing all frames of all affairs.But rasterisation original image needs the time, but also
Extra internal memory can be consumed.
The concrete code for opening the shouldRasterizep attributes in Core Animation instruments is as follows:
View.layer.shouldRasterize=YES;
View.layer.rasterizationScale=[UIScreen mainScreen] .scale.
Step S23, using shouldRasterizep attributes by one or more target figure layers be plotted to terminal screen it
Outer image.
Step S24, the image buffer storage of above-mentioned drafting is got up, to carry out succeeding target figure layer using the image of caching
Draw, wherein, the duration consumed during target figure layer drawing image is more than or equal to specified duration.
It should be noted that in actual applications, above-mentioned all optional embodiments can be any in the way of adopting and combine
Combination, forms the alternative embodiment of the present invention, and this is no longer going to repeat them.
Corresponding to the animation processing method in above-described embodiment, the present invention also provides a kind of video processing apparatus.Such as Fig. 3 institutes
The structural representation of video processing apparatus in one embodiment of the invention is shown as, including:
Module 31 is adjusted, for having adjusted the default instrument for animation performance tuning;
Cache module 32, for opening the specified attribute in the default instrument, caches one using the specified attribute
Or each self-corresponding image of multiple target figure layers, wherein, the duration that consumed during the target figure layer drawing image more than or wait
In specified duration.
In an embodiment of the present invention, the cache module 32 is additionally operable to:
One or more target figure layers are plotted to the image outside terminal screen using the specified attribute, and will be described
Image buffer storage gets up.
In an embodiment of the present invention, as shown in figure 4, the device that figure 3 above shows can also include:
Drafting module 41, for carrying out the drafting of succeeding target figure layer using the described image of caching.
In an embodiment of the present invention, the default instrument is the Core Animation instruments in Instruments.
In an embodiment of the present invention, the Core Animation instruments are visualization tool.
In an embodiment of the present invention, the specified attribute is shouldRasterizep attributes.
The said apparatus of the embodiment of the present invention:The default instrument for animation performance tuning is adjusted;Open the default work
Specified attribute in tool, caches each self-corresponding image of one or more target figure layers using the specified attribute, wherein, described
The duration consumed during target figure layer drawing image is more than or equal to specified duration.As can be seen here, the embodiment of the present invention can be
Playing animation avoids repetition figure layer from rendering when reusing figure layer, so as to realize the purpose of the system resource for saving terminal.
Those skilled in the art are it should be appreciated that embodiments of the invention can be provided as method, system or computer program
Product.Therefore, the present invention can adopt complete hardware embodiment, complete software embodiment or with reference to software and hardware in terms of reality
Apply the form of example.And, the present invention can be adopted in one or more computers for wherein including computer usable program code
The shape of the upper computer program that implements of usable storage medium (including but not limited to disk memory and optical memory etc.)
Formula.
The present invention is the flow process with reference to method according to embodiments of the present invention, equipment (system) and computer program
Figure and/or block diagram are describing.It should be understood that can be by computer program instructions flowchart and/or each stream in block diagram
Journey and/or the combination of square frame and flow chart and/or the flow process in block diagram and/or square frame.These computer programs can be provided
Instruct the processor of general purpose computer, special-purpose computer, Embedded Processor or other programmable data processing devices to produce
A raw machine so that produced for reality by the instruction of computer or the computing device of other programmable data processing devices
The device of the function of specifying in present one flow process of flow chart or one square frame of multiple flow processs and/or block diagram or multiple square frames.
These computer program instructions may be alternatively stored in and can guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works so that the instruction being stored in the computer-readable memory is produced to be included referring to
Make the manufacture of device, the command device realize in one flow process of flow chart or one square frame of multiple flow processs and/or block diagram or
The function of specifying in multiple square frames.
These computer program instructions can be also loaded in computer or other programmable data processing devices so that in meter
Series of operation steps is executed on calculation machine or other programmable devices to produce computer implemented process, so as in computer or
The instruction executed on other programmable devices is provided for realization in one flow process of flow chart or multiple flow processs and/or block diagram one
The step of function of specifying in individual square frame or multiple square frames.
Obviously, those skilled in the art can carry out the essence of various changes and modification without deviating from the present invention to the present invention
God and scope.So, if these modifications of the present invention and modification belong to the scope of the claims in the present invention and its equivalent technologies
Within, then the present invention is also intended to comprising these changes and modification.
Claims (10)
1. a kind of animation processing method, it is characterised in that include:
The default instrument for animation performance tuning is adjusted;
The specified attribute in the default instrument is opened, and one or more target figure layers is cached using the specified attribute each right
The image that answers, wherein, the duration consumed during the target figure layer drawing image is more than or equal to specified duration.
2. method according to claim 1, it is characterised in that cache one or more target figures using the specified attribute
The each self-corresponding image of layer, including:
One or more target figure layers are plotted to the image outside terminal screen using the specified attribute, and by described image
It is cached.
3. method according to claim 2, it is characterised in that methods described also includes:
The drafting that succeeding target figure layer is carried out using the described image of caching.
4. the method according to any one of claim 1-3, it is characterised in that the default instrument is Instruments
In Core Animation instruments.
5. method according to claim 4, it is characterised in that the Core Animation instruments are visualization tool.
6. the method according to any one of claim 1-3, it is characterised in that the specified attribute is
ShouldRasterizep attributes.
7. a kind of video processing apparatus, it is characterised in that include:
Module is adjusted, for having adjusted the default instrument for animation performance tuning;
Cache module, for opening the specified attribute in the default instrument, is cached using the specified attribute one or more
The each self-corresponding image of target figure layer, wherein, the duration consumed during the target figure layer drawing image is more than or equal to specified
Duration.
8. device according to claim 7, it is characterised in that the cache module is additionally operable to:
One or more target figure layers are plotted to the image outside terminal screen using the specified attribute, and by described image
It is cached.
9. device according to claim 8, it is characterised in that described device also includes:
Drafting module, for carrying out the drafting of succeeding target figure layer using the described image of caching.
10. the device according to any one of claim 7-9, it is characterised in that the default instrument is Instruments
In Core Animation instruments.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610941563.XA CN106504305A (en) | 2016-10-25 | 2016-10-25 | A kind of animation processing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610941563.XA CN106504305A (en) | 2016-10-25 | 2016-10-25 | A kind of animation processing method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106504305A true CN106504305A (en) | 2017-03-15 |
Family
ID=58322871
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610941563.XA Pending CN106504305A (en) | 2016-10-25 | 2016-10-25 | A kind of animation processing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106504305A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108242070A (en) * | 2017-10-09 | 2018-07-03 | 北京车和家信息技术有限公司 | A kind of image drawing method, image plotting device and computer equipment |
WO2020192417A1 (en) * | 2019-03-22 | 2020-10-01 | 华为技术有限公司 | Image rendering method and apparatus, electronic device |
CN113986432A (en) * | 2021-10-27 | 2022-01-28 | 北京乐驾科技有限公司 | Vehicle-mounted terminal animation interface display method and device, storage medium and electronic device |
US11791772B2 (en) | 2019-04-04 | 2023-10-17 | Huawei Technologies Co., Ltd. | Oscillator and device |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101847269A (en) * | 2009-03-27 | 2010-09-29 | 上海科泰世纪科技有限公司 | Multi-layer cartoon rendering system and method |
-
2016
- 2016-10-25 CN CN201610941563.XA patent/CN106504305A/en active Pending
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101847269A (en) * | 2009-03-27 | 2010-09-29 | 上海科泰世纪科技有限公司 | Multi-layer cartoon rendering system and method |
Non-Patent Citations (1)
Title |
---|
钱嘘嘘: "《Instruments_高效绘图_图像10_图层性能_专有图层-简书》", 8 February 2016 * |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108242070A (en) * | 2017-10-09 | 2018-07-03 | 北京车和家信息技术有限公司 | A kind of image drawing method, image plotting device and computer equipment |
WO2020192417A1 (en) * | 2019-03-22 | 2020-10-01 | 华为技术有限公司 | Image rendering method and apparatus, electronic device |
US11816775B2 (en) | 2019-03-22 | 2023-11-14 | Huawei Technologies Co., Ltd. | Image rendering method and apparatus, and electronic device |
US11791772B2 (en) | 2019-04-04 | 2023-10-17 | Huawei Technologies Co., Ltd. | Oscillator and device |
CN113986432A (en) * | 2021-10-27 | 2022-01-28 | 北京乐驾科技有限公司 | Vehicle-mounted terminal animation interface display method and device, storage medium and electronic device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US12017145B2 (en) | Method and system of automatic animation generation | |
CN106504305A (en) | A kind of animation processing method and device | |
CN109389661B (en) | Animation file conversion method and device | |
CN112652025B (en) | Image rendering method and device, computer equipment and readable storage medium | |
CN102339291B (en) | Method and equipment for generating list | |
CN108010112A (en) | Animation processing method, device and storage medium | |
CN107251004A (en) | The backward compatibility realized by using deception clock and fine-grained frequency control | |
US20210343072A1 (en) | Shader binding management in ray tracing | |
CN108966036B (en) | Barrage display methods, electronic equipment and computer storage medium | |
CN112860264B (en) | Method and device for reconstructing abstract syntax tree | |
CN110555900B (en) | Rendering instruction processing method and device, storage medium and electronic equipment | |
CN109242934A (en) | A kind of generation method and equipment of animation code | |
CN108717547A (en) | The method and device of sample data generation method and device, training pattern | |
CN113391811B (en) | Function compiling method, function compiling device, electronic equipment and computer readable storage medium | |
CN111540032A (en) | Audio-based model control method, device, medium and electronic equipment | |
WO2024131621A1 (en) | Special effect generation method and apparatus, electronic device, and storage medium | |
CN109925715A (en) | A kind of virtual waters generation method, device and terminal | |
JP2008204428A (en) | Memory access method using three dimensional address mapping | |
CN116821080A (en) | Online picture compression method and device, electronic equipment and storage medium | |
CN114331808A (en) | Action posture storage method, device, medium and electronic equipment | |
CN114329046A (en) | Dynamic video storage management method, device, medium and electronic equipment based on map | |
CN116996778A (en) | Image restoration method and device, storage medium and electronic equipment | |
CN114329859A (en) | Box routing configuration method and system, electronic equipment and storage medium | |
CN109002361B (en) | Data processing method, distribution method, electronic device, client and storage medium | |
US9773293B2 (en) | Composition data dispatcher |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170315 |