CN109978971A - UI drawing practice, device and mobile terminal - Google Patents

UI drawing practice, device and mobile terminal Download PDF

Info

Publication number
CN109978971A
CN109978971A CN201910251998.5A CN201910251998A CN109978971A CN 109978971 A CN109978971 A CN 109978971A CN 201910251998 A CN201910251998 A CN 201910251998A CN 109978971 A CN109978971 A CN 109978971A
Authority
CN
China
Prior art keywords
thread
frame
tasks
additional
drawn
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.)
Granted
Application number
CN201910251998.5A
Other languages
Chinese (zh)
Other versions
CN109978971B (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.)
Oneplus Technology Shenzhen Co Ltd
Original Assignee
Oneplus 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 Oneplus Technology Shenzhen Co Ltd filed Critical Oneplus Technology Shenzhen Co Ltd
Priority to CN201910251998.5A priority Critical patent/CN109978971B/en
Publication of CN109978971A publication Critical patent/CN109978971A/en
Application granted granted Critical
Publication of CN109978971B publication Critical patent/CN109978971B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/206Drawing of charts or graphs
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • General Engineering & Computer Science (AREA)
  • Controls And Circuits For Display Device (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

It includes: reception drawing tasks that the present invention, which provides a kind of UI drawing practice, device and mobile terminal, the UI drawing practice, the additional drawing thread that the operation of the drawing tasks is distributed to main drawing thread according to preset rules and pre-established;Strategy is excessively drawn using preset reduction by the main drawing thread or additional drawing thread of the drawing tasks to check the operation of the every frame of the drawing tasks, filters out omissible operation in every frame drawing;The omissible operation of every frame drawing in the drawing tasks is removed, obtains optimal mapping operation, and draw according to the optimal mapping operation.UI drawing practice of the invention, is drawn using multithreading, and reduces omissible mapping operation, is reduced and is excessively drawn, and so as to improve plotting speed, reduces frame.

Description

UI drawing practice, device and mobile terminal
Technical field
The present invention relates to computer drawing technology fields, eventually in particular to a kind of UI drawing practice, device, movement End and computer storage medium.
Background technique
Currently, executing UI in the interface UI of various mobile terminals (UI, User Interface, user interface) and drawing Single main drawing thread is generally used when Rendering operations, when main drawing thread because will affect when drawing tasks load is excessive The speed of drawing, thus the case where so that mobile terminal is generated frame phenomenon, the interface UI frame picture is caused to have some setbacks, secondly, holding Row UI draws during rendering only merely by mapping operation by as far as being closely ranked up, and according to by carrying out as far as close mode It draws and renders, it may occur that the phenomenon that excessively drawing.
Summary of the invention
In view of the above problems, the present invention provides the storages of a kind of UI drawing practice, device, mobile terminal and computer to be situated between Matter to draw using multithreading, and reduces omissible mapping operation, reduces and excessively draws, and draws so as to improve Speed reduces frame.
To achieve the goals above, the present invention adopts the following technical scheme that:
A kind of UI drawing practice, comprising:
Receive drawing tasks, by the operation of the drawing tasks according to preset rules distribute to main drawing thread and in advance The additional drawing thread established;
Strategy is excessively drawn using preset reduction by the main drawing thread of the drawing tasks or additional drawing thread The operation of the every frame of the drawing tasks is checked, omissible operation in every frame drawing is filtered out;
Remove every frame in the drawing tasks to draw omissible operation, obtain optimal mapping operation, and according to it is described most Excellent mapping operation is drawn.
Preferably, the operation of the drawing tasks includes uploading the operation of drawing material, frame buffering drafting operation, character pattern lattice Figure prepares operation and reduces excessively to draw operation.
Preferably, the preset rules include:
Upload drawing material operation, frame buffering are drawn into operation and the character point system of battle formations prepares operation point At least one additional drawing thread for pre-establishing of dispensing;
Operation is excessively drawn into the reduction and distributes to the main drawing thread.
Preferably, the preset rules include drawing upload drawing material operation, frame buffering operate, is described The character point system of battle formations prepares operation and the reduction is excessively drawn operation and is randomly assigned to the main drawing thread and described additional Drawing thread, so that the main drawing thread and the additional drawing thread cooperation execute the operation of drawing tasks.
Preferably, described " preset reduction to be utilized by the main drawing thread of the drawing tasks or additional drawing thread Excessively draw strategy to check the operation of the every frame of the drawing tasks, filter out omissible operation in every frame drawing " packet It includes:
For each frame draw in All Layers, from the near to the remote by the main drawing thread or the additional drawing thread The drawing covered in every frame drawing tasks by next figure layer is filtered out, and judges whether next figure layer is opaque;
When next figure layer is opaque, the capped range of the drawing covered by next figure layer is determined, and Omissible operation in every frame drawing is determined according to the capped range.
The present invention also provides a kind of UI plotting units, comprising:
Mapping operation distribution module, for receiving drawing tasks, by the operation of the drawing tasks according to preset rules point The main drawing thread of dispensing and the additional drawing thread pre-established;
Operation screening module can be saved, for by the drawing tasks main drawing thread or additional drawing thread using pre- If reduction excessively draw strategy the operation of the every frame of the drawing tasks checked, filter out every frame draw in it is omissible Operation;
Graphics module draws omissible operation for removing every frame in the drawing tasks, obtains optimal mapping operation, And it draws according to the optimal mapping operation.
Preferably, the operation of the drawing tasks includes uploading the operation of drawing material, frame buffering drafting operation, character pattern lattice Figure prepares operation and reduces excessively to draw operation.
Preferably, described to save operation screening module:
Figure layer Covering judgment unit passes through the main drawing thread or institute for All Layers in drawing for each frame It states additional drawing thread and filters out the drawing covered in every frame drawing tasks by next figure layer from the near to the remote, and judge described next Whether figure layer is opaque;
Operation determination unit can be saved, for determining and described being covered by next figure layer when next figure layer is opaque Drawing capped range, and according to the capped range determine every frame draw in omissible operation.
The present invention also provides a kind of mobile terminal, including memory and processor, the memory is calculated for storing Machine program, the processor runs the computer program so that UI drawing practice described in the mobile terminal execution.
The present invention also provides a kind of computer storage medium, it is stored with computer used in the mobile terminal Program.
The present invention provides a kind of UI drawing practice, which includes: reception drawing tasks, by the drawing tasks The operation additional drawing thread distributing to main drawing thread according to preset rules and pre-establish;Pass through the drawing tasks Main drawing thread or additional drawing thread using preset reduction excessively draw operation of the strategy to the every frame of the drawing tasks It is checked, filters out omissible operation in every frame drawing;The omissible operation of every frame drawing in the drawing tasks is removed, Optimal mapping operation is obtained, and is drawn according to the optimal mapping operation.UI drawing practice of the invention, utilizes multithreading It draws, and reduces omissible mapping operation, reduce and excessively draw, so as to improve plotting speed, reduce frame.
To enable the above objects, features and advantages of the present invention to be clearer and more comprehensible, preferred embodiment is cited below particularly, and cooperate Appended attached drawing, is described in detail below.
Detailed description of the invention
In order to illustrate the technical solution of the embodiments of the present invention more clearly, below will be to needed in the embodiment attached Figure is briefly described, it should be understood that the following drawings illustrates only certain embodiments of the present invention, therefore is not construed as pair The restriction of the scope of the invention.
Fig. 1 is a kind of flow diagram for UI drawing practice that the embodiment of the present invention 1 provides;
Fig. 2 is a kind of flow diagram of the mapping operation distribution for UI drawing practice that the embodiment of the present invention 1 provides;
Fig. 3 is a kind of flow diagram for saving operation screening for UI drawing practice that the embodiment of the present invention 1 provides;
Fig. 4 is a kind of structural schematic diagram for UI plotting unit that the embodiment of the present invention 2 provides;
Fig. 5 is a kind of structural schematic diagram of the mapping operation distribution module for UI plotting unit that the embodiment of the present invention 2 provides;
Fig. 6 is a kind of structural schematic diagram for saving operation screening module for UI plotting unit that the embodiment of the present invention 2 provides.
Specific embodiment
Below in conjunction with attached drawing in the embodiment of the present invention, technical solution in the embodiment of the present invention carries out clear, complete Ground description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.Usually exist The component of the embodiment of the present invention described and illustrated in attached drawing can be arranged and be designed with a variety of different configurations herein.Cause This, is not intended to limit claimed invention to the detailed description of the embodiment of the present invention provided in the accompanying drawings below Range, but it is merely representative of selected embodiment of the invention.Based on the embodiment of the present invention, those skilled in the art are not doing Every other embodiment obtained under the premise of creative work out, shall fall within the protection scope of the present invention.
Embodiment 1
Fig. 1 is a kind of flow diagram for UI drawing practice that the embodiment of the present invention 1 provides, and this method includes following step It is rapid:
Step S11: receive drawing tasks, by the operation of drawing tasks according to preset rules distribute to main drawing thread and The additional drawing thread pre-established.
In the embodiment of the present invention, system and various programs in the terminal carry out showing in the process of running defeated When out, can all the information shown be subjected to drawing rendering, then be exported.Such as the network using mobile terminal When application program carries out the display of webpage, for being used to indicate various texts, picture and details layout on received webpage XML layout file (XML, eXtensible Markup Language, extensible markup language) and markup language, all can be through Cross CPU (CPU, Central Processing Unit, central processing unit) and GPU (GPU, the Graphics in mobile terminal Processing Unit, graphics processor) calculation processing, it draws and is converted into the image and text that user can understand.
In the embodiment of the present invention, the CPU of above-mentioned mobile terminal will generate one group of drawing after carrying out conversion process to webpage Order passes through the order and controls drawing thread and carry out drawing tasks to carry out drawing tasks, wherein the operation of drawing tasks includes The operation of drawing material is uploaded, frame buffering drafting operates, the character point system of battle formations prepares operation and reduces the operations such as excessive drafting operation. Wherein, the picture that uploading the operation of drawing material will also be drawn is uploaded in the memory of GPU.Frame buffering draws behaviour Make namely FBO (Frame Buffer Object, frame buffering) is drawn, (App, Application are answered according to upper layer App application With program) it needs, establish the drafting of GPU figure layer.The character point system of battle formations prepares operation namely prepares the font shown, for GPU draws word and needs.It reduces and excessively draws operation, namely reduce same pixel and repeat the operation drawn.
In the embodiment of the present invention, above-mentioned preset rules include that will upload the operation of drawing material, frame buffering drafting operation, font Dot chart prepares operation and reduction excessively drafting operation and is randomly assigned thread of to main drawing thread and additionally drawing, so that master draws Figure line journey and additional drawing thread cooperation execute the operation of drawing tasks.
In the embodiment of the present invention, in addition to main drawing thread, additional drawing thread can be pre-established in mobile terminal, Before the various operations for carrying out above-mentioned drawing tasks, various operations will be distributed to main drawing line according to default rule by mobile terminal Journey and additional drawing thread execute.Wherein, which at least establishes one, can also basis The quantity of mapping operation and the quantity for executing the required computing resource setting foundation of operation, here without limitation.
In the embodiment of the present invention, the various mapping operations during above-mentioned drawing tasks are distributed to master according to preset rules and are drawn Figure line journey and thread of additionally drawing, such as in the case where only establishing an additional drawing thread, reduction can excessively be drawn Main drawing thread is distributed in the operations such as system operation, will upload the operation of drawing material, frame buffering draws operation and the character point system of battle formations Prepare operation and distributes to additional drawing thread.Wherein, thread of additionally drawing in upper example can also establish multiple, each additional lines Journey is each to be responsible for an operation.After the operation that additional thread completes distribution, the main available additional thread of drawing thread completes behaviour Make the related resource generated, final drawing is finally completed by main drawing thread.Wherein, the thread for being finally completed drawing can be Main drawing thread is also possible to additional drawing thread, and the thread finally drawn has to wait for other threads and completes after operating, It obtains related resource and carries out final drawing, to achieve the purpose that multithreading parallelization.
Step S12: it is excessively drawn by the main drawing thread of drawing tasks or additional drawing thread using preset reduction Strategy checks the operation of the every frame of drawing tasks, filters out omissible operation in every frame drawing.
During drawing, it is optimal that the pixel that mobile terminal is shown theoretically is drawn once in a frame time , but due to the case where being likely to occur layout overlapping in drawing course, such as the picture on web page background, according to generally drawing Painter's algorithm used in figure process, the first rendering context of meeting, then draws picture, at this moment the pixel of the picture region is then drawn It has made twice.
In the embodiment of the present invention, before being drawn, the mobile terminal can by the main drawing threads of drawing tasks or Additional drawing thread is excessively drawn strategy using preset reduction and is checked the operation of the every frame picture of drawing tasks, filters out Omissible operation in every frame drawing.Wherein, it includes Front-to-Back strategy that strategy is excessively drawn in above-mentioned preset reduction, Carry out compared to by painter's algorithm by being overlapped drawing in the way of close, Front-to-Back strategy be then by closely to The remote inspection for carrying out mapping operation, checks superposition phenomenon present in layout of drawing, to find out omissible operation.Its In, above-mentioned Front-to-Back strategy is only the one of which in detection methods, can be executed by main drawing thread, can also It is executed with there is additional drawing thread, here without limitation.
Step S13: the omissible operation of every frame drawing in removal drawing tasks obtains optimal mapping operation, and according to most Excellent mapping operation is drawn.
In the embodiment of the present invention, in filtering out every frame drawing after omissible operation, which can remove and draw The omissible operation of every frame drawing, obtains optimal mapping operation in figure task, in the rendering next drawn using GPU The excessive rendering of same pixel is reduced when operation.
In the embodiment of the present invention, as shown in Fig. 2, including following step the step of the distribution of the mapping operation of the UI drawing practice It is rapid:
Step S21: the operation of drawing material will be uploaded, frame buffering draws operation and the character point system of battle formations prepares operation and distributes to At least one additional drawing thread pre-established.
In the embodiment of the present invention, which will upload the operation of drawing material, frame buffering draws operation and character point The system of battle formations prepares the operations such as operation and distributes at least one additional thread pre-established, wherein the quantity of additional thread can root It is determined according to the operation needed to be implemented, each additional thread is responsible for the operation of a drawing tasks, is also possible to an additional lines Journey is performed simultaneously two or more operations, here without limitation.Wherein, the assigning process of the operation of above-mentioned drawing tasks can be with It is realized using the form for sending instruction, such as the CPU in mobile terminal can then appoint after receiving drawing tasks according to drawing Instruction needed for business generates operation, and corresponding distribution instruction is generated according to preset rules, mobile terminal is by executing distribution Instruction, the operational order of drawing tasks is assigned in corresponding additional thread, so that additional thread executes corresponding operation.
Step S22: it will reduce excessively to draw to operate and distribute to main drawing thread.
In the embodiment of the present invention, which will reduce the excessively operations such as drafting operation and distribute to main drawing thread, main Drawing thread excessively draws operation to reduce the repetition in same pixel and draw and render, to avoid more by executing the reduction Remaining operation causes to fall frame phenomenon caused by drawing time-out.
In the embodiment of the present invention, which saves the step of operation is screened as shown in figure 3, including following step It is rapid:
Step S31: for each frame draw in All Layers, from the near to the remote by main drawing thread or additional drawing thread The drawing covered in every frame drawing tasks by next figure layer is filtered out, and judges whether next figure layer is opaque.
In the embodiment of the present invention, mobile terminal will run the preset reduction by main drawing thread or additional drawing thread Excessively draw the inspection that strategy carries out mapping operation, wherein it includes Front-to-Back that strategy is excessively drawn in the preset reduction Strategy, wherein the Front-to-Back strategy is according to painter's algorithm by fast to all mapping operations as far as close plotting mode Speed does pre-processing, carries out calculating inspection further according to the mode of backward, namely mode from the near to the remote checks that mapping operation produces The coverage condition of the All Layers of raw drawing.It, will after filtering out the drawing covered in every frame drawing tasks by next figure layer Judge whether next figure layer is opaque, namely judges whether next figure layer really covers current layer.
It is above-mentioned to judge whether next draw is routine that opaque process can use this field in the embodiment of the present invention Algorithm or application program are realized, such as can be provided with algorithm in the terminal, to the color for judging to draw, here not It limits.
Step S32: when next figure layer is opaque, determining the capped range of the drawing covered by next figure layer, and Omissible operation in every frame drawing is determined according to capped range.
In the embodiment of the present invention, when it is opaque for judging next figure layer, the capped of capped drawing can be determined Range, and range is capped according to this and determines omissible operation in every frame drawing.Wherein, present figure is complete by next figure layer When covering, then the corresponding all operations of the drawing then can be identified as omissible operation.It, should when present figure is not completely covered Mobile terminal can use algorithm and calculate capped area, and judge whether capped area exceeds preset threshold value, work as quilt When the area of covering exceeds preset threshold value, it can also determine that the corresponding all operations of drawing are omissible operation.
It in the embodiment of the present invention, such as include to draw text, draw grid and drawing frames buffering figure in drawing tasks When the tasks such as layer, which can go to execute the operation for drawing required by task by establishing additional thread, such as upload and draw The character point system of battle formations and the drawing frames buffering etc. that text is drawn needed for drawing material, preparation needed for grid, are then drawn by master Whether figure line journey judges to draw text, drafting grid and drawing frames buffering figure layer etc. because covering can be omitted, and is finally drawn by master Figure line journey obtains additional drawing thread and completes the resource that operation generates, and draws.
Embodiment 2
Fig. 4 is a kind of structural schematic diagram for UI plotting unit that the embodiment of the present invention 2 provides.
The UI plotting unit 400 includes:
Mapping operation distribution module 410, for receiving drawing tasks, by the operation of the drawing tasks according to preset rules The additional drawing thread distributing to main drawing thread and pre-establishing.
Operation screening module 420 can be saved, for the main drawing thread or additional drawing thread benefit by the drawing tasks It excessively draws strategy with preset reduction to check the operation of the every frame of the drawing tasks, filtering out can save in every frame drawing Operation slightly.
Graphics module 430 obtains optimal drawing behaviour for removing the omissible operation of every frame drawing in the drawing tasks Make, and draws according to the optimal mapping operation.
In the embodiment of the present invention, the operation of the drawing tasks is operated including uploading drawing material, frame buffering drafting operates, The character point system of battle formations prepares operation and reduces excessively to draw operation.
As shown in figure 5, the mapping operation distribution module 410 includes:
Additional thread allocation unit 411, for upload drawing material operation, frame buffering to be drawn operation and font Dot chart prepares operation and distributes at least one additional drawing thread pre-established.
Main thread allocation unit 412 distributes to the main drawing thread for operation excessively to be drawn in the reduction.
As shown in fig. 6, this can save operation screening module 420 include:
Figure layer Covering judgment unit 421, for All Layers in drawing for each frame, by the main drawing thread or The additional drawing thread filters out the drawing covered in every frame drawing tasks by next figure layer from the near to the remote, and judge it is described under Whether one figure layer is opaque.
Operation determination unit 422 can be omitted, for determining described by next figure layer when next figure layer is opaque The capped range of the drawing of covering, and omissible operation in every frame drawing is determined according to the capped range.
In the embodiment of the present invention, above-mentioned modules and the more detailed function description of unit can refer to previous embodiment The content of middle corresponding portion, details are not described herein.
In addition, the present invention also provides a kind of mobile terminal, the mobile terminal may include smart phone, tablet computer, Vehicle-mounted computer, intelligent wearable device etc..The mobile terminal includes memory and processor, and memory can be used for storing computer journey Sequence, processor is by running the computer program, to make the mobile terminal execution above method or above-mentioned UI plotting unit In modules function.
Memory may include storing program area and storage data area, wherein storing program area can storage program area, at least Application program needed for one function (such as sound-playing function, image player function etc.) etc.;Storage data area can store root Created data (such as audio data, phone directory etc.) etc. are used according to mobile terminal.In addition, memory may include high speed Random access memory, can also include nonvolatile memory, a for example, at least disk memory, flush memory device or Other volatile solid-state parts.
The present embodiment additionally provides a kind of computer storage medium, for storing computer used in above-mentioned mobile terminal Program.
In several embodiments provided herein, it should be understood that disclosed device and method can also pass through Other modes are realized.The apparatus embodiments described above are merely exemplary, for example, flow chart and structure in attached drawing Figure shows the system frame in the cards of the device of multiple embodiments according to the present invention, method and computer program product Structure, function and operation.In this regard, each box in flowchart or block diagram can represent a module, section or code A part, a part of the module, section or code includes one or more for implementing the specified logical function Executable instruction.It should also be noted that function marked in the box can also be to be different from the implementation as replacement The sequence marked in attached drawing occurs.For example, two continuous boxes can actually be basically executed in parallel, they are sometimes It can execute in the opposite order, this depends on the function involved.It is also noted that in structure chart and/or flow chart The combination of each box and the box in structure chart and/or flow chart, can function or movement as defined in executing it is dedicated Hardware based system realize, or can realize using a combination of dedicated hardware and computer instructions.
In addition, each functional module or unit in each embodiment of the present invention can integrate one independence of formation together Part, be also possible to modules individualism, an independent part can also be integrated to form with two or more modules.
It, can be with if the function is realized and when sold or used as an independent product in the form of software function module It is stored in a computer readable storage medium.Based on this understanding, technical solution of the present invention is substantially in other words The part of the part that contributes to existing technology or the technical solution can be embodied in the form of software products, the meter Calculation machine software product is stored in a storage medium, including some instructions are used so that a computer equipment (can be intelligence Can mobile phone, personal computer, server or network equipment etc.) execute each embodiment the method for the present invention whole or Part steps.And storage medium above-mentioned include: USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), Random access memory (RAM, Random Access Memory), magnetic or disk etc. be various to can store program code Medium.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any Those familiar with the art in the technical scope disclosed by the present invention, can easily think of the change or the replacement, and should all contain Lid is within protection scope of the present invention.Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. a kind of UI drawing practice characterized by comprising
Drawing tasks are received, the operation of the drawing tasks is distributed into main drawing thread according to preset rules and is pre-established Additional drawing thread;
Strategy is excessively drawn to institute using preset reduction by the main drawing thread of the drawing tasks or additional drawing thread The operation for stating the every frame of drawing tasks is checked, omissible operation in every frame drawing is filtered out;
It removes every frame in the drawing tasks to draw omissible operation, obtains optimal mapping operation, and optimal drawn according to described Graphic operation is drawn.
2. UI drawing practice according to claim 1, which is characterized in that the operation of the drawing tasks includes uploading to draw Material operation, frame buffering draw operation, character point system of battle formations preparation operation and reduce excessively to draw and operate.
3. UI drawing practice according to claim 2, which is characterized in that the preset rules include:
Upload drawing material operation, frame buffering are drawn into operation and the character point system of battle formations prepares operation and distributes to At least one additional drawing thread pre-established;
Operation is excessively drawn into the reduction and distributes to the main drawing thread.
4. UI drawing practice according to claim 2, which is characterized in that the preset rules include that the upload is drawn Material operation, the frame buffering draw operation, the character point system of battle formations prepare operation and it is described reduction excessively draw operation with Machine is distributed to the main drawing thread and the additional drawing thread, so that the main drawing thread and the additional drawing thread Cooperation executes the operation of drawing tasks.
5. UI drawing practice according to claim 1, which is characterized in that described " to pass through the main drawing of the drawing tasks Thread or additional drawing thread are excessively drawn strategy using preset reduction and are checked the operation of the every frame of the drawing tasks, Filter out omissible operation in every frame drawing " include:
For All Layers in the drawing of each frame, screened from the near to the remote by the main drawing thread or the additional drawing thread The drawing covered in every frame drawing tasks by next figure layer out, and judge whether next figure layer is opaque;
When next figure layer is opaque, the capped range of the drawing covered by next figure layer is determined, and according to The capped range determines omissible operation in every frame drawing.
6. a kind of UI plotting unit characterized by comprising
Mapping operation distribution module distributes to the operation of the drawing tasks according to preset rules for receiving drawing tasks Main drawing thread and the additional drawing thread pre-established;
Operation screening module can be saved, for by the drawing tasks main drawing thread or additional drawing thread using preset It reduces excessively drafting strategy to check the operation of the every frame of the drawing tasks, filters out omissible behaviour in every frame drawing Make;
Graphics module obtains optimal mapping operation, and press for removing the omissible operation of every frame drawing in the drawing tasks It draws according to the optimal mapping operation.
7. UI plotting unit according to claim 6, which is characterized in that the operation of the drawing tasks includes uploading to draw Material operation, frame buffering draw operation, character point system of battle formations preparation operation and reduce excessively to draw and operate.
8. UI plotting unit according to claim 6, which is characterized in that described to save operation screening module:
Figure layer Covering judgment unit passes through the main drawing thread or the volume for All Layers in drawing for each frame Outer drawing thread filters out the drawing covered in every frame drawing tasks by next figure layer from the near to the remote, and judges next figure layer It whether is opaque;
Operation determination unit can be saved, for determining and described being drawn by what next figure layer covered when next figure layer is opaque The capped range of figure, and omissible operation in every frame drawing is determined according to the capped range.
9. a kind of mobile terminal, which is characterized in that including memory and processor, the memory is for storing computer journey Sequence, the processor runs the computer program so that the mobile terminal execution is according to claim 1 to any one of 5 institutes The UI drawing practice stated.
10. a kind of computer storage medium, which is characterized in that it is stored with used in mobile terminal as claimed in claim 9 Computer program.
CN201910251998.5A 2019-03-29 2019-03-29 UI drawing method and device and mobile terminal Active CN109978971B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910251998.5A CN109978971B (en) 2019-03-29 2019-03-29 UI drawing method and device and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910251998.5A CN109978971B (en) 2019-03-29 2019-03-29 UI drawing method and device and mobile terminal

Publications (2)

Publication Number Publication Date
CN109978971A true CN109978971A (en) 2019-07-05
CN109978971B CN109978971B (en) 2023-07-07

Family

ID=67081757

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910251998.5A Active CN109978971B (en) 2019-03-29 2019-03-29 UI drawing method and device and mobile terminal

Country Status (1)

Country Link
CN (1) CN109978971B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103399729A (en) * 2013-06-28 2013-11-20 广州市动景计算机科技有限公司 Processing method, processing device and processor of HTML5 Canvas application
CN103955957A (en) * 2014-04-22 2014-07-30 Tcl集团股份有限公司 3D graphics rending method and system
CN105872679A (en) * 2015-12-31 2016-08-17 乐视网信息技术(北京)股份有限公司 Barrage display method and device
CN106354512A (en) * 2016-09-08 2017-01-25 广州华多网络科技有限公司 User interface rendering method and device thereof
CN108037966A (en) * 2017-11-10 2018-05-15 维沃移动通信有限公司 A kind of interface display method, device and mobile terminal
CN108389153A (en) * 2018-03-15 2018-08-10 广东欧珀移动通信有限公司 A kind of method and terminal device of view load
CN108510428A (en) * 2018-03-09 2018-09-07 广东欧珀移动通信有限公司 Picture method for drafting and Related product

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103399729A (en) * 2013-06-28 2013-11-20 广州市动景计算机科技有限公司 Processing method, processing device and processor of HTML5 Canvas application
CN103955957A (en) * 2014-04-22 2014-07-30 Tcl集团股份有限公司 3D graphics rending method and system
CN105872679A (en) * 2015-12-31 2016-08-17 乐视网信息技术(北京)股份有限公司 Barrage display method and device
CN106354512A (en) * 2016-09-08 2017-01-25 广州华多网络科技有限公司 User interface rendering method and device thereof
CN108037966A (en) * 2017-11-10 2018-05-15 维沃移动通信有限公司 A kind of interface display method, device and mobile terminal
CN108510428A (en) * 2018-03-09 2018-09-07 广东欧珀移动通信有限公司 Picture method for drafting and Related product
CN108389153A (en) * 2018-03-15 2018-08-10 广东欧珀移动通信有限公司 A kind of method and terminal device of view load

Also Published As

Publication number Publication date
CN109978971B (en) 2023-07-07

Similar Documents

Publication Publication Date Title
CN109783181B (en) Screen adaptive display method, electronic device and computer storage medium
CN104503655A (en) Application program interface display control method and device
CN106095437B (en) The implementation method and device of the user interface layout type of RTL from right to left
CN110286992A (en) The method and device that interface figure is redrawn
CN112905326B (en) Task processing method and device
CN106055295A (en) Picture processing method and device, and picture drawing method and device
CN109684000B (en) APP data display method, device, equipment and computer readable storage medium
DE202013012437U1 (en) Hidden text input box
CN106569805B (en) Canvas storage method, picture drawing method and equipment
CN109376053A (en) Data processing method, device and mobile terminal
DE112013006049T5 (en) Display device and image processing method therefor
CN111435937A (en) Refreshing method and device for monitoring platform
CN111597845A (en) Two-dimensional code detection method, device and equipment and readable storage medium
CN103324484A (en) Method and device for displaying view
CN111736751B (en) Stroke redrawing method, device and readable storage medium
CN109933383A (en) Adjust the method and apparatus of game APP operation frame per second
CN109978971A (en) UI drawing practice, device and mobile terminal
CN106407009A (en) Picture display method and device
CN111340790B (en) Bounding box determination method, device, computer equipment and storage medium
CN117611703A (en) Barrage character rendering method, barrage character rendering device, barrage character rendering equipment, storage medium and program product
KR101347178B1 (en) Apparatus and method for drawing vector image
CN107908455B (en) Browser page switching method and system
CN105260353A (en) Typesetting method and device for mobile terminal
CN106548501B (en) Image drawing method and device
US11017505B2 (en) System and method for applying antialiasing to images

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