CN105957121A - Animation display system and display method in application - Google Patents

Animation display system and display method in application Download PDF

Info

Publication number
CN105957121A
CN105957121A CN201610493270.XA CN201610493270A CN105957121A CN 105957121 A CN105957121 A CN 105957121A CN 201610493270 A CN201610493270 A CN 201610493270A CN 105957121 A CN105957121 A CN 105957121A
Authority
CN
China
Prior art keywords
resource
thread
animation
interface
district
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
Application number
CN201610493270.XA
Other languages
Chinese (zh)
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.)
Nubia Technology Co Ltd
Original Assignee
Nubia Technology 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 Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Priority to CN201610493270.XA priority Critical patent/CN105957121A/en
Publication of CN105957121A publication Critical patent/CN105957121A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • 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
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention discloses an animation display system and an animation display method in an application. The animation display system comprises an interface drawing module and an interface display control module, wherein the interface drawing module is used for creating a drawing thread, in order that the drawing thread reads resources of a current frame of an animation from a preset resource cache region, and calculates and draws a user interface of the current frame of the animation on a drawing interface based on the read resources; and the interface display control module is used for invoking a UI thread of the application, in order that the UI thread displays the user interface drawn by the interface drawing module on a display interface of the application. According to the animation display system and the animation display method, an animation interface is drawn through the independent drawing thread and drawing interface in advance, the drawn animation interface is displayed through the independent UI thread and display interface, the burden of the UI thread is released, and the UI thread is focused on interaction with users, thereby effectively enhancing the fluency degree of the animation and responsivity of user interface interaction.

Description

The display system of animation and display packing in application
Technical field
The present invention relates to mobile terminal applied technical field, particularly relate to the display system of animation in a kind of application System and display packing.
Background technology
Along with lifting and the development of software engineering of mobile terminal (such as mobile phone) hardware performance, more come The most Mobile solution begin to focus on dynamic effect design, and increasing team has appreciated that dynamic effect is at product Importance in Consumer's Experience.
In prior art, all compare multiple owing to the UI (User Interface, user interface) of animation is general Miscellaneous, amount of calculation is bigger so that the smooth degree of animation and the responsiveness of user interface interaction are relatively low, Widely apply animation to cause application card to pause, the strong influence experience of user simultaneously.
Summary of the invention
One of reason producing drawbacks described above is: in the drawing process of existing cartoon interface, and UI thread needs Directly to draw cartoon interface at display interface and to be shown.
In view of the reason realizing generation drawbacks described above found and in order to overcome the defect of above-mentioned prior art, Present invention is primarily targeted at display system and the display packing proposing animation in a kind of application, it is intended to carry Rise smooth degree and the responsiveness of user interface interaction of animation.
For achieving the above object, the display system of animation, described system in a kind of application that the present invention provides Including:
Interface drafting module, is used for creating drafting thread, makes described drafting thread from preset caching resource District reads the resource of described animation present frame, and paints on drafting interface based on the described resource read Make the user interface of described animation present frame;
Interface display control module, for calling the UI thread of described application, makes described UI thread by institute The described user interface stating interface drafting module drafting shows on the display interface of described application.
As the improvement of present system, described system also includes:
Resource processing module, for read described animation from preset caching resource district current receiving During the request of the resource of frame, described caching resource district searches the resource of present frame;
When not finding, call resource and read thread, make described resource read thread from described animation Resource loads the resource of present frame, and the resource of present frame is stored in described caching resource district.
Another as present system improves, and described resource processing module is additionally operable to:
Preset resource buffer area;
Enable resource and read thread, make described resource read thread and the resource of described animation is carried out pretreatment, And the resource completing pretreatment is stored in described caching resource district.
As the further improvement of present system, described resource processing module is concrete when carrying out pretreatment For:
Based on preset resources strategy, cache hit rate strategy and/or scheduling strategy, from described animation Resource in load the resource of next frame.
As the further improvement of present system, described resource processing module also has when carrying out pretreatment Body is used for:
Obtain the resolution of described display interface;
Based on described resolution, the resource being stored in described caching resource district is compressed.
Additionally, for achieving the above object, the present invention also proposes the display packing of animation, institute in a kind of application The method of stating includes step:
Create and draw thread, make described drafting thread read described animation from preset caching resource district and work as The resource of front frame, and on drafting interface, draw described animation present frame based on the described resource read User interface;
Call the UI thread of described application, make described UI thread described user interface be shown described and answer Display interface on.
As the improvement of the inventive method, described method further comprises the steps of:
When receiving the request of the resource reading described animation present frame from preset caching resource district, The resource of present frame is searched in described caching resource district;
When not finding, call resource and read thread, make described resource read thread from described animation Resource loads the resource of present frame, and the resource of present frame is stored in described caching resource district.
Another as the inventive method improves, and further comprises the steps of: before the described step creating drafting thread
Preset resource buffer area;
Enable resource and read thread, make described resource read thread and the resource of described animation is carried out pretreatment, And the resource completing pretreatment is stored in described caching resource district.
As the further improvement of the inventive method, the step of described pretreatment includes step:
Based on preset resources strategy, cache hit rate strategy and/or scheduling strategy, from described animation Resource in load the resource of next frame.
As the further improvement of the inventive method, the step of described pretreatment further comprises the steps of:
Obtain the resolution of described display interface;
Based on described resolution, the resource being stored in described caching resource district is compressed.
The system and method that the present invention proposes draws animation in advance by independent drafting thread and drafting interface Interface, shows, by independent UI thread and display interface, the cartoon interface drawn, frees UI thread Burden, make that UI thread is absorbed in for user is mutual, effectively promotes smooth degree and the user of animation The responsiveness of interface alternation.
Accompanying drawing explanation
Fig. 1 is the hardware architecture diagram of the optional mobile terminal realizing each embodiment of the present invention;
Fig. 2 is the wireless communication system schematic diagram of mobile terminal as shown in Figure 1;
Fig. 3 is the structural representation of display system of animation in a kind of application in the embodiment of the present invention;
Fig. 4 is the flow chart of reception event;
Fig. 5 is the flow chart of period treatment event;
Without the flow chart of response when Fig. 6 is period treatment event;
Fig. 7 is each module working timing figure of display system of animation in a kind of application in the embodiment of the present invention;
Fig. 8 is the flow chart of display packing of animation in a kind of application in the embodiment of the present invention.
The realization of the object of the invention, functional characteristics and advantage will in conjunction with the embodiments, do referring to the drawings further Explanation.
Detailed description of the invention
Should be appreciated that specific embodiment described herein, only in order to explain the present invention, is not used to limit Determine the present invention.
The mobile terminal realizing each embodiment of the present invention is described referring now to accompanying drawing.In follow-up description In, use the suffix being used for representing such as " module ", " parts " or " unit " of element only for having It is beneficial to the explanation of the present invention, itself does not has specific meaning.Therefore, " module " can mix with " parts " Close ground to use.
Mobile terminal can be implemented in a variety of manners.Such as, the mobile terminal described in the present invention is permissible Including such as mobile phone, smart phone, notebook computer, digit broadcasting receiver, PDA (individual number Word assistant), PAD (panel computer), PMP (portable media player), the shifting of guider etc. The fixed terminal of dynamic terminal and such as numeral TV, desk computer etc..But, people in the art Member it will be appreciated that in addition to the element except being used in particular for mobile purpose, according to the embodiment of the present invention Structure can also apply to the terminal of fixed type.
Fig. 1 is the hardware configuration signal of the optional mobile terminal realizing each embodiment of the present invention.
Mobile terminal 100 can include wireless communication unit 110, A/V (audio/video) input block 120, User input unit 130, output unit 140, memorizer 150, interface unit 160, controller 170 and electricity Source unit 180 etc..Fig. 1 shows the mobile terminal with various assembly, it should be understood that also The most not realistic execute all assemblies illustrated.Can alternatively implement more or less of assembly.Will be below Describe the element of mobile terminal in detail.
Wireless communication unit 110 generally includes one or more assembly, and it allows mobile terminal 100 with wireless Radio communication between communication system or network.Such as, wireless communication unit 110 can include that broadcast connects Receive module 111, mobile communication module 112, wireless Internet module 113, short range communication module 114 and position At least one in information module 115.
Broadcast reception module 111 via broadcast channel from external broadcasting management server receive broadcast singal and/ Or broadcast related information.
Mobile communication module 112 send radio signals to base station (such as, access point, node B etc.), In exterior terminal and server at least one and/or receive from it radio signal.Such radio Signal can include voice call signal, video calling signal or according to text and/or Multimedia Message The various types of data sent and/or receive.
Wireless Internet module 113 supports the Wi-Fi (Wireless Internet Access) of mobile terminal.This module can internal or Externally it is couple to terminal.Wi-Fi (Wireless Internet Access) technology involved by this module can include WLAN (nothing Line LAN) (Wi-Fi), Wibro (WiMAX), Wimax (worldwide interoperability for microwave access), HSDPA (at a high speed Downlink packets accesses) etc..
Short range communication module 114 is the module for supporting junction service.Some examples of short-range communication technology Including bluetooth TM, RF identification (RFID), Infrared Data Association (IrDA), ultra broadband (UWB), purple honeybee TM etc..
Positional information module 115 is the module of positional information for checking or obtain mobile terminal.Position is believed The typical case of breath module 115 is GPS (global positioning system).
A/V input block 120 is used for receiving audio or video signal.A/V input block 120 can include phase Machine 121 and mike 122, camera 121 in Video Capture pattern or image capture mode by image capturing Static images or the view data of video that device obtains process.Picture frame after process can show On display unit 141.Mike 122 can be at telephone calling model, logging mode, speech recognition mould Formula etc. operational mode receives sound (voice data) via mike, and can be by such sound Reason is voice data.Audio frequency (voice) data after process can be converted in the case of telephone calling model The form output of mobile communication base station can be sent to via mobile communication module 112.
It is mobile to control that user input unit 130 can generate key input data according to the order of user's input The various operations of terminal.User input unit 130 allows user to input various types of information, and permissible Including keyboard, metal dome, touch pad (such as, detection due to touched and cause resistance, pressure, electricity The sensitive component of change held etc.), roller, rocking bar etc..Especially, when touch pad as a layer When being superimposed upon on display unit 141, touch screen can be formed.
Interface unit 160 is used as at least one external device (ED) and is connected connecing of can passing through with mobile terminal 100 Mouthful.Such as, external device (ED) can include wired or wireless head-band earphone port, external power source (or battery Charger) port, wired or wireless FPDP, memory card port, for connect there is identification module The port of device, audio frequency input/output (I/O) port, video i/o port, ear port etc..Interface list Unit 160 can be also used for receive from external device (ED) input (such as, data message, electric power etc.) and One or more elements that the input received is transferred in mobile terminal 100 or may be used for moving Dynamic transmission data between terminal and external device (ED).
Output unit 140 can include display unit 141, dio Output Modules 142, alarm unit 143 etc. Deng.
Display unit 141 may be displayed on the information processed in mobile terminal 100.Such as, mobile terminal is worked as 100 when being in telephone calling model, display unit 141 can show and call or other communicate (such as, civilian This information receiving and transmitting, multimedia file download etc.) relevant user interface (UI) or graphic user interface (GUI).When mobile terminal 100 is in video calling pattern or image capture mode, display unit 141 Can show capture image and/or the image of reception, illustrate video or image and the UI of correlation function or GUI etc..
Meanwhile, when display unit 141 and touch pad the most superposed on one another to form touch screen time, aobvious Show that unit 141 can serve as input equipment and output device.Display unit 141 can include liquid crystal display (LCD), thin film transistor (TFT) LCD (TFT-LCD), Organic Light Emitting Diode (OLED) display, flexibility show Show at least one in device, three-dimensional (3D) display etc..Some in these display may be constructed such that Transparence is to allow user to watch from outside, and this is properly termed as transparent display, typical transparent display Can for example, TOLED (transparent organic light emitting diode) display etc..According to the specific enforcement wanted Mode, mobile terminal 100 can include two or more display units (or other display device), such as, Mobile terminal can include outernal display unit (not shown) and inner display unit (not shown).Touch screen can For detecting touch input pressure and touch input position and touch input area.
Dio Output Modules 142 can be in call signal at mobile terminal and receive pattern, call mode, note Time under the isotypes such as record pattern, speech recognition mode, broadcast reception mode, wireless communication unit 110 is connect Receive or in memorizer 150 storage voice data transducing audio signal and be output as sound.And And, the audio frequency that dio Output Modules 142 can provide relevant to the specific function of mobile terminal 100 execution is defeated Go out (such as, call signal receives sound, message sink sound etc.).Dio Output Modules 142 can wrap Include speaker, buzzer etc..
Alarm unit 143 can provide output to notify event to mobile terminal 100.Typically Event can include calling reception, message sink, key signals input, touch input etc..Except audio frequency Or outside video frequency output, alarm unit 143 can provide in a different manner and export sending out with notification event Raw.Such as, alarm unit 143 can with vibration form provide output, when receive calling, message or During some other entrance communication (incomingcommunication), alarm unit 143 can provide sense of touch defeated Go out (that is, vibration) to notify to user.By providing such sense of touch to export, even if in the shifting of user When mobile phone is in the pocket of user, user also is able to identify the generation of various event.Alarm unit The output of 143 generations that notification event can also be provided via display unit 141 or dio Output Modules 142.
Memorizer 150 can store the process performed by controller 170 and control the software program etc. of operation Deng, or can temporarily store oneself through output maybe will export data (such as, telephone directory, message, Still image, video etc.).And, memorizer 150 can store about when touch is applied to touch screen The vibration of the various modes of output and the data of audio signal.
Memorizer 150 can include the storage medium of at least one type, described storage medium include flash memory, Hard disk, multimedia card, card-type memorizer (such as, SD or DX memorizer etc.), random access storage device (RAM), static random-access memory (SRAM), read only memory (ROM), electrically erasable Read only memory (EEPROM), programmable read only memory (PROM), magnetic storage, disk, light Dish etc..And, mobile terminal 100 can be connected the storage function performing memorizer 150 with by network Network storage device cooperation.
Controller 170 generally controls the overall operation of mobile terminal.Such as, controller 170 performs and voice Control that call, data communication, video calling etc. are relevant and process.It addition, controller 170 can wrap Including the multi-media module 171 for reproducing (or playback) multi-medium data, multi-media module 171 can construct In controller 170, or it is so structured that separate with controller 170.Controller 170 can perform pattern to be known Other places are managed, so that the handwriting input performed on the touchscreen or picture drafting input are identified as character or figure Picture.It addition, controller 170 can also include: interface drafting module 172 and interface display control module 173; Wherein, interface drafting module 172 can read the resource of described animation present frame and draw on interface drawing The user interface of described animation present frame;Interface drafting module can be drawn by interface display control module 173 Described user interface show on the display interface of the display unit 141 of described application.Controller passes through nothing The message (such as short message, application message and other notification messages) that line communication unit 110 receives is carried out Process, and carry out carrying out message notifying and carry out message by display unit 141 to show by alarm unit 143 Show.
Power subsystem 180 receives external power or internal power under the control of controller 170 and provides behaviour Make the suitable electric power needed for each element and assembly.
Various embodiment described herein can be to use such as computer software, hardware or its any group The computer-readable medium closed is implemented.Implementing for hardware, embodiment described herein can pass through Use application-specific IC (ASIC), digital signal processor (DSP), digital signal processing device (DSPD), programmable logic device (PLD), field programmable gate array (FPGA), processor, control Device, microcontroller, microprocessor, it is designed to perform in the electronic unit of function described herein extremely Few one is implemented, and in some cases, such embodiment can be at the controller 180 of mobile terminal Middle enforcement.Implementing for software, the embodiment of such as process or function can perform at least one with permission The single software module planting function or operation is implemented.Software code can be by with any suitable programming The software application (or program) that language is write is implemented, and software code can be stored in depositing of mobile terminal Perform in reservoir 150 and by controller 170.
Mobile terminal 100 may be constructed such that utilization is via frame or packet transmission data as shown in Figure 1 The most wired and wireless communication system and satellite-based communication system operate.
The communication system being wherein operable to according to the mobile terminal of the present invention is described referring now to Fig. 2.
Such communication system can use different air interfaces and/or physical layer.Such as, by communication system The air interface that system uses includes such as frequency division multiple access (FDMA), time division multiple acess (TDMA), CDMA (CDMA) move lead to UMTS (UMTS) (especially, Long Term Evolution (LTE)), the whole world Communication system (GSM) etc..As non-limiting example, explained below relates to cdma communication system, But such teaching is equally applicable to other type of system.
With reference to Fig. 2, cdma wireless communication system can include multiple mobile terminal 100, multiple base station (BS) 270, base station controller (BSC) 275 and mobile switching centre (MSC) 280.MSC280 is configured to Interface is formed with Public Switched Telephony Network (PSTN) 290.MSC280 is also structured to and can be via returning Journey circuit is couple to the BSC275 of base station 270 and forms interface.If back haul link can be according to connecing that Ganji knows Any one in Kou constructs, and described interface includes such as E1/T1, ATM, IP, PPP, frame relay, HDSL, ADSL or xDSL.It will be appreciated that system as shown in Figure 2 can include multiple BSC2750。
Each BS270 can service one or more subregion (or region), by multidirectional antenna or sensing certain party To antenna cover each subregion radially away from BS270.Or, each subregion can be by being used for Two or more antennas of diversity reception cover.Each BS270 may be constructed such that the multiple frequencies of support are divided Join, and the distribution of each frequency has specific frequency spectrum (such as, 1.25MHz, 5MHz etc.).
Intersecting that subregion and frequency are distributed can be referred to as CDMA Channel.BS270 can also be referred to as base Station transceiver subsystem (BTS) or other equivalent terms.In this case, term " base station " is permissible For broadly representing single BSC275 and at least one BS270.Base station can also be referred to as " cellular station ". Or, each subregion of specific BS270 can be referred to as multiple cellular station.
As shown in Figure 2, broadcast singal is sent in system the shifting operated by broadcsting transmitter (BT) 295 Dynamic terminal 100.As shown in Figure 1 broadcast reception module 111 is arranged on mobile terminal 100 and sentences and connect Receive the broadcast singal sent by BT295.In fig. 2 it is shown that several global positioning systems (GPS) satellite 300.Satellite 300 helps to position at least one in multiple mobile terminals 100.
In fig. 2, depict multiple satellite 300, it is understood that be, it is possible to use any number of defend Star obtains useful location information.GPS module 115 is generally configured to and satellite as shown in Figure 1 300 coordinate the location information wanted with acquisition.Substitute GPS tracking technique or GPS tracking technique it Outward, it is possible to use other technology of the position of mobile terminal can be followed the tracks of.It addition, at least one GPS defends Star 300 can optionally or additionally process satellite dmb transmission.
As a typical operation of wireless communication system, BS270 receives from various mobile terminals 100 Reverse link signal.Mobile terminal 100 generally participates in call, information receiving and transmitting communicates with other type of. Each reverse link signal that certain base station 270 receives is processed in specific BS270.Obtain Data are forwarded to the BSC275 being correlated with.BSC provides call resource distribution and includes between BS270 The mobile management function of the coordination of soft switching process.The data received also are routed to by BSC275 MSC280, it provides the extra route service for forming interface with PSTN290.Similarly, PSTN290 Yu MSC280 forms interface, MSC Yu BSC275 forms interface, and BSC275 phase BS270 should be controlled forward link signals to be sent to mobile terminal 100 in ground.
Based on above-mentioned mobile terminal hardware configuration and communication system, the present invention each embodiment following is proposed.
As it is shown on figure 3, first embodiment of the invention proposes the display system of animation, described system in a kind of application System includes:
Interface drafting module 172, is used for creating drafting thread, makes described drafting thread delay from preset resource The resource of described animation present frame is read in request in district of depositing, and is drawing boundary based on the described resource read The user interface (i.e. cartoon interface) of described animation present frame is drawn on face;
Interface display control module 173, for calling the UI thread of described application, makes described UI thread by boundary The described user interface that iso-surface patch module 172 is drawn shows on the display interface of described application.
Wherein, one or more during resource includes following resource: picture, word, voice, position, Color etc..
Below as a example by Android (Android) system, describe the embodiment of the present invention in detail.
Finding based on the analysis for prior art, animation UI is not suitable for entering in the main thread of application program Row is drawn.At this time it is necessary for needing complicated and efficiently UI one independent painting of view generation to those Figure surface, and use independent thread to draw the UI of these views.Concrete reason is as follows:
As shown in Figure 4, Android control is all the drawing surface that the UI of oneself is plotted in host window On (i.e. the display interface of application program), it means that their UI is that (being called for short should at application program With or program) main thread (UI thread) in carry out drawing.Due to application program main thread except Outside UI to be drawn, in addition it is also necessary to response user input in time.
As it is shown in figure 5, the event handling object of host window can receive the driving event (letter of system acquisition Title event), then, periodically process event.Wherein event includes asking resource event, drawing interface Event etc..
As shown in Figure 6, when UI thread can not timely respond to the process of event, system just will be considered that application Program does not responds to, and therefore will eject an ANR (Application Not Responding, application Program is without response) dialog box is out.For animation, their UI is the most more complicated, and requirement Can draw efficiently.UI thread assume responsibility for too many work, when there being time-consuming operation at main thread, Event can not perform in time, and the object being responsible for processing only processes last event in event chained list, at this moment, Arise that so-called " frame-skipping ", " card " phenomenon.
Based on above-mentioned discovery, in the present embodiment, system is painted in advance by independent drafting thread and drafting interface Cartoon interface processed, shows, by independent UI thread and display interface, the cartoon interface drawn, frees UI The burden of thread, make that UI thread is absorbed in for user is mutual, effectively promote the smooth degree of animation with And the responsiveness of user interface interaction, can efficiently solve existing animation shows frame-skipping, the card made simultaneously Etc. problem.
Wherein, draw interface and be equivalent to one at the interface of running background.
On the basis of first embodiment display system, it is further proposed that the variant embodiment of first embodiment, At this it should be noted that in order to make description brief, only describe in each variant embodiment and implement with first The difference of example.
In another embodiment of the present invention, described system can also include:
Resource processing module, for reading described animation in the request from preset caching resource district that receives During the resource of present frame, described caching resource district searches the resource of present frame;
When not finding, call resource and read thread, make described resource read thread from described animation Resource loads the resource of present frame, and the resource of present frame is stored in described caching resource district.
Because in prior art, resource I/O operation (i.e. resource loads operation) and cartoon interface calculate operation Switching surfaces higher, reduce further smooth degree and the responsiveness of user interface interaction of animation, Cause the problem that systematic function is low, the present embodiment reads thread (i.e. IO thread) by resource and loads Resource, loads operation by resource in UI thread from the prior art and separates, can effective existing skill This problem of art.
In yet another embodiment of the present invention, described resource processing module can be also used for:
Preset resource buffer area;
Enable resource and read thread, make described resource read thread and the resource of described animation is carried out pretreatment, And the resource completing pretreatment is stored in described caching resource district.
In the embodiment of the present invention, by preset resource buffer area, and read thread by animation institute by resource The resource needed is stored in caching resource district in advance, further speeds up the speed of animation calculating and plotting process.
In yet another embodiment of the present invention, described resource processing module is specifically used when carrying out pretreatment In:
Based on preset resources strategy, cache hit rate strategy and/or scheduling strategy, from described animation Resource in load next frame (next frame of present frame) resource.
The embodiment of the present invention, by preset some strategies, loads next frame resource in advance, and by next frame Resource stores caching resource district, and other frames that can meet animation carry out resource request, prevents from repeating IO Load, further accelerate the processing speed of animation calculating and plotting process.
Wherein, described resource processing module when carrying out pretreatment also particularly useful for:
Obtain the resolution (i.e. the screen resolution of mobile terminal belonging to this application) of described display interface;
Based on described resolution, the resource being stored in described caching resource district is compressed.
The embodiment of the present invention can effectively solve the form of some resource or size with display interface resolution not Consistent problem.
Hereinafter, lift a concrete application examples, describe the work schedule of display system in the present invention.
As it is shown in fig. 7, the display system of this application examples includes that resource pretreatment module (is called for short resource to process Module), animation UI drafting module (be called for short animation drafting module) and interface display control module be (in figure Display interface in interface display control module is only shown).
Wherein, display interface includes common UI district and animation UI district.Animation UI drafting module includes animation UI draws district's (i.e. drawing interface).
Step 1, resource pretreatment module starts independent thread, and its major function is just by the pre-of resource Process, and the resource handled well is put into shared region for UI drafting thread.
Be individually enabled resource read thread be because I/O operation and calculate operation switching surfaces higher, The problem easily causing degraded performance, so, start IO thread can concentrate do some read-writes optimize, pre- Process etc. have the biggest benefit to improving performance.
Implement and include: caching resource district is set at resource read module, receive the money of UI drafting module Source ask, first make a look up in caching resource district, if found, according to UI draw request to money Source processes, and returns to UI drafting module;If it does not exist, then carry out resource loading, process Return to UI drafting module, put it into caching resource district simultaneously;
The purpose arranging caching resource is that other frames for animation carry out resource request, prevents repeating IO and loads, The speed of animation process can be further speeded up.
Step 2, animation UI drafting module calculates based on the described resource read and draws on drafting interface The user interface of described animation present frame;
When implementing, animation UI drafting module can be also used for running time and animation fortune according to animation Row curve calculates the display effect of current UI, such as position, transparency, color etc., and is plotted to Independent drafting interface.
Should be in use-case, animation UI drafting module mainly employs SurfaceView control, and it is embedded One Surface being specifically designed to drafting.We can control form and the size of this Surface. Surfaceview controls the drafting position of this Surface.Main drafting control module is inherited SurfaceView also realizes SurfaceHolder.Callback interface, and create drafting thread interface is carried out Draw, and submit change to, figure is shown.As such, it is possible to screen in thread outside main thread Draw on (display interface).Picture task so can be avoided to cause main thread to block the when of heavy, Thus improve the response speed of program.
Step 3, interface display control module is called the UI thread of described application, is made described UI thread by institute State user interface to show on the display interface of described application.
Resource process, UI computing and the drafting of above-mentioned whole animation are all carried out in independent thread, UI Drafting be also to carry out at independent drafting interface, so, UI thread can be single-minded processes the friendship of user Mutually, more conforming to the principle that responsibility is single, structure is the most clear, and performance the most significantly promotes, and uses The Experience Degree at family is more preferable.
The present invention further provides a kind of display packing.
As shown in Figure 8, the display packing of animation, described method bag in a kind of application in the embodiment of the present invention Include step:
S101, creates and draws thread, makes described drafting thread ask to read from preset caching resource district The resource of described animation present frame, and calculate based on the described resource read and draw on drafting interface The user interface of described animation present frame;
S102, calls the UI thread of described application, makes described UI thread described user interface be shown On the display interface of described application.
In another embodiment of the present invention, described method further comprises the steps of:
When receiving the resource of the described animation present frame of request reading from preset caching resource district, Described caching resource district searches the resource of present frame;
When not finding, call resource and read thread, make described resource read thread from described animation Resource loads the resource of present frame, and the resource of present frame is stored in described caching resource district.
In yet another embodiment of the present invention, further comprise the steps of: before the described step creating drafting thread
Preset resource buffer area;
Enable resource and read thread, make described resource read thread and the resource of described animation is carried out pretreatment, And the resource completing pretreatment is stored in described caching resource district.
Specifically, the step of described pretreatment includes step:
Based on preset resources strategy, cache hit rate strategy and/or scheduling strategy, from described animation Resource in load the resource of next frame.
Specifically, the step of described pretreatment can also include step:
Obtain the resolution of described display interface;
Based on described resolution, the resource being stored in described caching resource district is compressed.
Each embodiment of display packing in the present invention, is painted in advance by independent drafting thread and drafting interface Cartoon interface processed, shows, by independent UI thread and display interface, the cartoon interface drawn, frees UI The burden of thread, make that UI thread is absorbed in for user is mutual, effectively promote the smooth degree of animation with And the responsiveness of user interface interaction, can efficiently solve existing animation shows frame-skipping, the card made simultaneously Etc. problem.
It should be noted that in this article, term " include ", " comprising " or its any other variant Be intended to comprising of nonexcludability so that include the process of a series of key element, method, article or Person's device not only includes those key elements, but also includes other key elements being not expressly set out, or also Including the key element intrinsic for this process, method, article or device.In the feelings not having more restriction Under condition, statement " including ... " key element limited, it is not excluded that include this key element process, Method, article or device there is also other identical element.
The invention described above embodiment sequence number, just to describing, does not represent the quality of embodiment.
Through the above description of the embodiments, those skilled in the art is it can be understood that arrive above-mentioned Embodiment method can add the mode of required general hardware platform by software and realize, naturally it is also possible to logical Cross hardware, but a lot of in the case of the former is more preferably embodiment.Based on such understanding, the present invention's The part that prior art is contributed by technical scheme the most in other words can be with the form body of software product Revealing to come, this computer software product is stored in a storage medium (such as ROM/RAM, magnetic disc, light Dish) in, including some instructions with so that a station terminal equipment (can be mobile phone, computer, service Device, air-conditioner, or the network equipment etc.) perform the method described in each embodiment of the present invention.
These are only the preferred embodiments of the present invention, not thereby limit the scope of the claims of the present invention, every Utilize equivalent structure or equivalence flow process conversion that description of the invention and accompanying drawing content made, or directly or Connect and be used in other relevant technical fields, be the most in like manner included in the scope of patent protection of the present invention.

Claims (10)

1. the display system of animation in an application, it is characterised in that described system includes:
Interface drafting module, is used for creating drafting thread, makes described drafting thread from preset caching resource District reads the resource of described animation present frame, and paints on drafting interface based on the described resource read Make the user interface of described animation present frame;
Interface display control module, for calling the UI thread of described application, makes described UI thread by institute The described user interface stating interface drafting module drafting shows on the display interface of described application.
2. the system as claimed in claim 1, it is characterised in that described system also includes:
Resource processing module, for read described animation from preset caching resource district current receiving During the request of the resource of frame, described caching resource district searches the resource of present frame;
When not finding, call resource and read thread, make described resource read thread from described animation Resource loads the resource of present frame, and the resource of present frame is stored in described caching resource district.
3. system as claimed in claim 1 or 2, it is characterised in that described resource processing module is also used In:
Preset resource buffer area;
Enable resource and read thread, make described resource read thread and the resource of described animation is carried out pretreatment, And the resource completing pretreatment is stored in described caching resource district.
4. system as claimed in claim 3, it is characterised in that described resource processing module carry out pre- During process specifically for:
Based on preset resources strategy, cache hit rate strategy and/or scheduling strategy, from described animation Resource in load the resource of next frame.
5. system as claimed in claim 4, it is characterised in that described resource processing module carry out pre- During process also particularly useful for:
Obtain the resolution of described display interface;
Based on described resolution, the resource being stored in described caching resource district is compressed.
6. the display packing of animation in an application, it is characterised in that described method includes step:
Create and draw thread, make described drafting thread read described animation from preset caching resource district and work as The resource of front frame, and calculate and draw described animation based on the described resource read on interface and work as drawing The user interface of front frame;
Call the UI thread of described application, make described UI thread described user interface be shown described and answer Display interface on.
7. method as claimed in claim 6, it is characterised in that described method further comprises the steps of:
When receiving the request of the resource reading described animation present frame from preset caching resource district, The resource of present frame is searched in described caching resource district;
When not finding, call resource and read thread, make described resource read thread from described animation Resource loads the resource of present frame, and the resource of present frame is stored in described caching resource district.
Method the most as claimed in claims 6 or 7, it is characterised in that the step of thread is drawn in described establishment Further comprise the steps of: before rapid
Preset resource buffer area;
Enable resource and read thread, make described resource read thread and the resource of described animation is carried out pretreatment, And the resource completing pretreatment is stored in described caching resource district.
9. method as claimed in claim 8, it is characterised in that the step of described pretreatment includes step:
Based on preset resources strategy, cache hit rate strategy and/or scheduling strategy, from described animation Resource in load the resource of next frame.
10. method as claimed in claim 9, it is characterised in that the step of described pretreatment also includes Step:
Obtain the resolution of described display interface;
Based on described resolution, the resource being stored in described caching resource district is compressed.
CN201610493270.XA 2016-06-29 2016-06-29 Animation display system and display method in application Pending CN105957121A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610493270.XA CN105957121A (en) 2016-06-29 2016-06-29 Animation display system and display method in application

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610493270.XA CN105957121A (en) 2016-06-29 2016-06-29 Animation display system and display method in application

Publications (1)

Publication Number Publication Date
CN105957121A true CN105957121A (en) 2016-09-21

Family

ID=56901650

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610493270.XA Pending CN105957121A (en) 2016-06-29 2016-06-29 Animation display system and display method in application

Country Status (1)

Country Link
CN (1) CN105957121A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106547571A (en) * 2016-11-30 2017-03-29 北京酷我科技有限公司 A kind of cardon display packing that can customize
CN106856007A (en) * 2016-12-08 2017-06-16 微鲸科技有限公司 A kind of animation method for drafting
CN107038736A (en) * 2017-03-17 2017-08-11 腾讯科技(深圳)有限公司 A kind of animated show method and terminal device based on frame per second
CN109582409A (en) * 2018-10-15 2019-04-05 广东宝莱特医用科技股份有限公司 A kind of display stacking method based on double buffering
CN109669752A (en) * 2018-12-19 2019-04-23 北京达佳互联信息技术有限公司 A kind of interface method for drafting, device and mobile terminal
CN109710143A (en) * 2018-11-23 2019-05-03 努比亚技术有限公司 A kind of changing interface control method, terminal and computer readable storage medium
CN109902068A (en) * 2019-02-15 2019-06-18 广州视源电子科技股份有限公司 Method and device for capturing household appliance logs and computer readable storage medium
CN111880868A (en) * 2020-06-16 2020-11-03 上海趣蕴网络科技有限公司 Asynchronous image drawing method and device based on multi-level cache

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130063459A1 (en) * 2011-09-09 2013-03-14 Microsoft Corporation Primitive composition
CN102999332A (en) * 2011-11-14 2013-03-27 微软公司 Animation for display assembly generated by computer and of user interface and content item
US20140143648A1 (en) * 2012-11-16 2014-05-22 Vladimir Kolesnikov Bolt Shadow Workers
CN104038806A (en) * 2014-06-11 2014-09-10 深圳市九洲电器有限公司 Application interface display method and set top box
CN104424661A (en) * 2013-08-23 2015-03-18 联想(北京)有限公司 Three-dimensional object display method and device
CN105426185A (en) * 2015-11-13 2016-03-23 珠海格力节能环保制冷技术研究中心有限公司 Dynamic image display processing method and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130063459A1 (en) * 2011-09-09 2013-03-14 Microsoft Corporation Primitive composition
CN102999332A (en) * 2011-11-14 2013-03-27 微软公司 Animation for display assembly generated by computer and of user interface and content item
US20140143648A1 (en) * 2012-11-16 2014-05-22 Vladimir Kolesnikov Bolt Shadow Workers
CN104424661A (en) * 2013-08-23 2015-03-18 联想(北京)有限公司 Three-dimensional object display method and device
CN104038806A (en) * 2014-06-11 2014-09-10 深圳市九洲电器有限公司 Application interface display method and set top box
CN105426185A (en) * 2015-11-13 2016-03-23 珠海格力节能环保制冷技术研究中心有限公司 Dynamic image display processing method and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
陈起: "P2P流媒体点播系统缓存策略的研究与实现", 《中国优秀硕士学位论文全文数据库 (信息科技辑)》 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106547571A (en) * 2016-11-30 2017-03-29 北京酷我科技有限公司 A kind of cardon display packing that can customize
CN106856007A (en) * 2016-12-08 2017-06-16 微鲸科技有限公司 A kind of animation method for drafting
CN107038736A (en) * 2017-03-17 2017-08-11 腾讯科技(深圳)有限公司 A kind of animated show method and terminal device based on frame per second
CN109582409A (en) * 2018-10-15 2019-04-05 广东宝莱特医用科技股份有限公司 A kind of display stacking method based on double buffering
CN109710143A (en) * 2018-11-23 2019-05-03 努比亚技术有限公司 A kind of changing interface control method, terminal and computer readable storage medium
CN109669752A (en) * 2018-12-19 2019-04-23 北京达佳互联信息技术有限公司 A kind of interface method for drafting, device and mobile terminal
CN109902068A (en) * 2019-02-15 2019-06-18 广州视源电子科技股份有限公司 Method and device for capturing household appliance logs and computer readable storage medium
CN111880868A (en) * 2020-06-16 2020-11-03 上海趣蕴网络科技有限公司 Asynchronous image drawing method and device based on multi-level cache

Similar Documents

Publication Publication Date Title
CN105957121A (en) Animation display system and display method in application
CN105094960A (en) Data loading device and method based on two channels
CN104731411B (en) The click action recognition methods of mobile terminal and device
CN106407341A (en) Page processing method, apparatus and system
CN106304037A (en) The management method of virtual SIM card and device
CN105335517A (en) Method and terminal for selecting heat multimedia
CN106843723A (en) A kind of application program associates application method and mobile terminal
CN105975052A (en) Screen switching method and device
CN109189300A (en) A kind of view circularly exhibiting method and apparatus
CN107786749A (en) A kind of information processing method, terminal and computer-readable recording medium
CN106778887A (en) The terminal and method of sentence flag sequence are determined based on condition random field
CN106657579A (en) Content sharing method, device and terminal
CN106535228A (en) System upgrading device and method
CN106991014A (en) A kind of method, device and mobile terminal for handling user's incoming event
CN106961524A (en) A kind of method for information display and device
CN106130981A (en) The self-defined device and method of digital label of augmented reality equipment
CN104780278B (en) Route generation method based on communication data and device
CN105872997A (en) Short message merging method and terminal equipment
CN104901992B (en) A kind of method and apparatus of resource transfers
CN105681547A (en) Middleware instance management device and method
CN107071161A (en) The aggregation display method and mobile terminal of icon in a kind of status bar
CN105491221B (en) A kind of functional module divides and the processing method and terminal of centralized displaying
CN106412871A (en) Method of realizing communication processing and terminal
CN106376004A (en) Information processing method and terminal
CN106656278A (en) Near field communication (NFC) device and terminal equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into 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: 20160921