CN105159647A - Method and device for refreshing screen - Google Patents

Method and device for refreshing screen Download PDF

Info

Publication number
CN105159647A
CN105159647A CN201510705337.7A CN201510705337A CN105159647A CN 105159647 A CN105159647 A CN 105159647A CN 201510705337 A CN201510705337 A CN 201510705337A CN 105159647 A CN105159647 A CN 105159647A
Authority
CN
China
Prior art keywords
drafting
screen
event
information
timer
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
CN201510705337.7A
Other languages
Chinese (zh)
Inventor
王志明
Original Assignee
Beijing Huayun Tianyi 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 Beijing Huayun Tianyi Technology Co Ltd filed Critical Beijing Huayun Tianyi Technology Co Ltd
Priority to CN201510705337.7A priority Critical patent/CN105159647A/en
Publication of CN105159647A publication Critical patent/CN105159647A/en
Pending legal-status Critical Current

Links

Abstract

The invention discloses a method and device for refreshing a screen, and relates to the technical field of screen displaying. The work efficiency in the screen refreshing process can be improved. The method for refreshing the screen includes a uniform refreshing method. The uniform refreshing method includes the steps that first drawing information generated through drawing based on a timer is stored in a buffering area of the screen, and before drawing based on the timer is completed, second drawing information generated through at least one time of drawing based on an event is stored in the buffering area of the screen; after drawing based on the timer is completed, the screen is refreshed based on the first drawing information and the second drawing information in the buffering area of the screen. The method and device are mainly applied to the refreshing process of images on the screen.

Description

Screen refresh method and device thereof
Technical field
The present invention relates to screen display technology field, particularly relate to a kind of screen refresh method and device thereof.
Background technology
On the screen of the equipment such as computing machine, panel computer in picture procedure for displaying, need to draw to screen.Usual display engine supports two kinds of different plotting modes: a kind of is drafting based on event; Another kind is the drafting based on timer.Drafting based on event refers to the drafting triggered in response to event, the drafting such as carried out in response to user operation new window, drafting based on timer refers to that the periodicity of carrying out in response to timer is drawn, such as, in the video display process drafting of video pictures.Drafting based on event is dead space and redraws mechanism, when application program or system need the region redrawn on screen, need this region to be set to dead space, system is that dead space generation redraws event, only need draw for dead space during this event of application response.The drafting information produced based on the drafting of event is stored in screen buffer, each time based on after the completing of event, image transmitting corresponding to drafting information that this time in screen buffer produce based on the drafting of event by corresponding function can be called to screen, with redraw.Drafting based on timer is usually used in the scene of game or multimedia, and application program needs reconstruction clock generator, i.e. a timer, with fixing frame number redraw during operation.
But when the drafting based on event and the drafting based on timer work simultaneously, redraw makes work efficiency lower frequently.
Summary of the invention
The invention provides a kind of screen refresh method and device thereof, the work efficiency in screen-refresh process can be improved.
On the one hand, a kind of screen refresh method is provided, comprises:
Unified method for refreshing, described unified method for refreshing comprises:
The first drafting information drafting based on timer produced is stored in screen buffer, and described based on before the completing of timer, the second drafting information drafting at least one times based on event produced is stored in described screen buffer;
Described based on after the completing of timer, draw information and described second based on described first in described screen buffer and draw information redraw.
Particularly, each described drafting based on event comprises: arrange inactive area, draw for described inactive area.
Particularly, to draw after information and described second draws the process of information redraw based on described first in described screen buffer described, described unified method for refreshing also comprises: the inactive area that the drafting at least one times based on event described in replacement produces.
Particularly, above-mentioned screen refresh method, also comprises:
Judge whether the drafting based on event works with the drafting based on timer simultaneously, if so, then applies described unified method for refreshing, if not, then applies independent refresh method;
Described independent refresh method comprises: the drafting information drafting based on event produced is stored in screen buffer, each time based on after the completing of event, based on the drafting information redraw in screen buffer.
On the other hand, a kind of screen-refresh device is provided, comprises:
Unified refresh module, described unified refresh module is used for:
The first drafting information drafting based on timer produced is stored in screen buffer, and described based on before the completing of timer, the second drafting information drafting at least one times based on event produced is stored in described screen buffer;
Described based on after the completing of timer, draw information and described second based on described first in described screen buffer and draw information redraw.
Particularly, above-mentioned screen-refresh device, also comprises:
Based on the drafting module of event, for arranging inactive area, draw for described inactive area.
Particularly, described unified refresh unit also for, to draw after information and described second draws the process of information redraw based on described first in described screen buffer described, the inactive area that the drafting at least one times based on event described in replacement produces.
Particularly, described screen-refresh device also comprises:
Judging unit, for judging whether the drafting based on event works with the drafting based on timer simultaneously;
Applying unit, if work for the drafting based on event and the drafting based on timer simultaneously, then applies the function of described unified refresh module, if the drafting based on event and the drafting non-simultaneous operation based on timer, then applies the function of independent refresh module;
Described independent refresh module, is stored in screen buffer for the drafting information drafting based on event produced, each time based on after the completing of event, based on the drafting information redraw in screen buffer.
Screen refresh method provided by the invention and device thereof, based on before the completing of timer, the drafting information two kinds of plotting modes produced is stored in screen buffer together, based on after the completing of timer, again based on the drafting information redraw together that two kinds of plotting modes in screen buffer produce, like this, when the drafting based on timer works with the drafting based on event simultaneously, without the need to all calling respective function with redraw based on after the completing of event each time, but by twice first unique caching of all drafting information of completing between time point based on timer, then based on redraw unified after the completing of timer, thus reduce the number of times of screen-refresh, but because the drafting based on timer is inherently periodic, therefore the drafting based on timer inherently has refreshing frequency more frequently, can ensure that the drafting information produced based on the drafting of event is transferred to screen in time to a certain extent, thus the efficiency that improve in screen-refresh process.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the process flow diagram of a kind of screen refresh method in the embodiment of the present invention;
Fig. 2 is the process flow diagram of another kind of screen refresh method in the embodiment of the present invention;
Fig. 3 is the structural drawing of a kind of screen-refresh device in the embodiment of the present invention.
Embodiment
Below in conjunction with accompanying drawing, the embodiment of the present invention is described in detail.
Should be clear and definite, described embodiment is only a part of embodiment of the present invention, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making other embodiments all obtained under creative work prerequisite, belong to the scope of protection of the invention.
The embodiment of the present invention provides a kind of screen method, comprising:
Unified method for refreshing, as shown in Figure 1, above-mentioned unified method for refreshing comprises:
Step 101, the first drafting information drafting based on timer produced are stored in screen buffer, above-mentioned based on before the completing of timer, the second drafting information drafting at least one times based on event produced is stored in above-mentioned screen buffer;
Owing to based on the drafting of timer being the drawing process of one-period, each time based on all can redraw after the completing of timer, therefore in this step, based on corresponding function directly can not be called after the completing of event, screen is refreshed, but until completing next time based on timer, the drafting information that drafting based on event is produced and be all stored in same screen buffer based on the drafting information that the drafting of timer produces, drafting information is the information corresponding to image of drawing, after drawing information transmission to screen, image corresponding to screen display drafting information, the i.e. refreshing of screen.
Step 102, above-mentioned based on after the completing of timer, draw information and above-mentioned second based on above-mentioned first in above-mentioned screen buffer and draw information redraw.
In this step, due to the first drafting information that the drafting incessantly stored in screen buffer based on timer produces, also store the second drafting information that the drafting based on event produces, therefore, in order to improve drawing efficiency, based on after the completing of timer, the first drafting information in screen buffer is transferred to screen, with redraw together with the second drafting information.
Screen refresh method in the embodiment of the present invention, based on before the completing of timer, the drafting information two kinds of plotting modes produced is stored in screen buffer together, based on after the completing of timer, again based on the drafting information redraw together that two kinds of plotting modes in screen buffer produce, like this, when the drafting based on timer works with the drafting based on event simultaneously, without the need to all calling respective function with redraw based on after the completing of event each time, but by twice first unique caching of all drafting information of completing between time point based on timer, then based on redraw unified after the completing of timer, thus reduce the number of times of screen-refresh, but owing to being periodic based on the drafting of timer, therefore the drafting based on timer inherently has refreshing frequency more frequently, can ensure that the drafting information produced based on the drafting of event is transferred to screen in time to a certain extent, thus the efficiency that improve in screen-refresh process.
Particularly, the above-mentioned drafting based on event comprises at every turn: arrange inactive area, draw for above-mentioned inactive area.If above-mentioned screen buffer stores repeatedly based on the second drafting information that the drafting of event produces, then illustrate above-mentioned based on before the completing of timer, be provided with multiple inactive area, now above-mentioned second drafting information comprises and carries out drawing produced drafting information for multiple inactive area.
As shown in Figure 2, particularly, in above-mentioned steps 102, draw after information and above-mentioned second draws the process of information redraw based on above-mentioned first in above-mentioned screen buffer, above-mentioned unified method for refreshing also comprises: step 103, reset above-mentioned at least one times based on the inactive area that the drafting of event produces.
In the prior art, at every turn based on all can redraw after the completing of event, then reset this time based on event drafting set by inactive area, but in the present embodiment, due to directly redraw can not be carried out by call function each based on after the completing of event, but until just agree to redraw based on completing of timer next time, therefore the time point carrying out resetting based on inactive area set in the drawing process of event is also needed to adjust, the inactive area at every turn produced based on the drafting of event can be superimposed, until completing and redraw based on timer, just each inactive area produced based on the drafting of event is reset, so that unified when carrying out the drafting based on event when a next cycle, new inactive area is set.
Further, above-mentioned screen refresh method also comprises:
Step 100, judge whether drafting based on event works with the drafting based on timer simultaneously, if, then apply described unified method for refreshing, namely corresponding step 101,102 and 103 is performed, if not, namely based on the drafting of event independent of the drawing based on timer, then apply independent refresh method;
Above-mentioned independent refresh method comprises: step 104, the drafting information drafting based on event produced are stored in screen buffer, each time based on after the completing of event, based on the drafting information redraw in screen buffer.
Owing to only having when the drafting based on event works with the drafting based on timer simultaneously, just have the ineffective problem that redraw frequently causes, just need under this kind of scene to apply above-mentioned unified method for refreshing, when the drafting based on event is independent of drawing based on timer, if still apply above-mentioned unified method for refreshing, then the drafting information that the drafting based on event can be caused to produce cannot be transferred to screen in time.Therefore, when judging the drafting based on event independent of drawing based on timer, then existing independent refresh method is applied.Like this for different scenes, can either ensure that the drafting information that different plotting mode produces can transfer to screen in time, the work efficiency in screen-refresh process can be improved again.
As shown in Figure 3, the embodiment of the present invention also provides a kind of screen-refresh device, comprise: unified refresh module 1, unified refresh module 1 for: the first drafting information drafting based on timer produced is stored in screen buffer, described based on before the completing of timer, the second drafting information drafting at least one times based on event produced is stored in described screen buffer; Described based on after the completing of timer, draw information and described second based on described first in described screen buffer and draw information redraw.
Screen-refresh device in the present embodiment can apply the screen refresh method in above-described embodiment, its detailed process and principle same as the previously described embodiments, do not repeat them here.
Screen-refresh device in the present embodiment, based on before the completing of timer, the drafting information two kinds of plotting modes produced is stored in screen buffer together, based on after the completing of timer, again based on the drafting information redraw together that two kinds of plotting modes in screen buffer produce, like this, when the drafting based on timer works with the drafting based on event simultaneously, without the need to all calling respective function with redraw based on after the completing of event each time, but by twice first unique caching of all drafting information of completing between time point based on timer, then based on redraw unified after the completing of timer, thus reduce the number of times of screen-refresh, but because the drafting based on timer is inherently periodic, therefore the drafting based on timer inherently has refreshing frequency more frequently, can ensure that the drafting information produced based on the drafting of event is transferred to screen in time to a certain extent, thus the efficiency that improve in screen-refresh process.
Particularly, above-mentioned screen-refresh device, also comprises: based on the drafting module 2 of event, for arranging inactive area, draw for described inactive area.Drawing process each time based on event all can arrange corresponding inactive area.
Particularly, above-mentioned unified refresh unit 1 also for, to draw after information and described second draws the process of information redraw based on described first in described screen buffer described, the inactive area that the drafting at least one times based on event described in replacement produces.
Particularly, above-mentioned screen-refresh device also comprises: judging unit 3, for judging whether the drafting based on event works with the drafting based on timer simultaneously; Applying unit 4, if work for the drafting based on event and the drafting based on timer simultaneously, then the function of the unified refresh module 1 of application, if the drafting based on event and the drafting non-simultaneous operation based on timer, then applies the function of independent refresh module 5; Independent refresh module 5, is stored in screen buffer for the drafting information drafting based on event produced, each time based on after the completing of event, based on the drafting information redraw in screen buffer.
The above; be only the specific embodiment of the present invention; but protection scope of the present invention is not limited thereto; anyly be familiar with those skilled in the art in the technical scope that the present invention discloses; the increase and decrease of change or replacement or quantity can be expected easily, all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should described be as the criterion with the protection domain of claim.

Claims (8)

1. a screen refresh method, is characterized in that, comprising:
Unified method for refreshing, described unified method for refreshing comprises:
The first drafting information drafting based on timer produced is stored in screen buffer, and described based on before the completing of timer, the second drafting information drafting at least one times based on event produced is stored in described screen buffer;
Described based on after the completing of timer, draw information and described second based on described first in described screen buffer and draw information redraw.
2. screen refresh method according to claim 1, is characterized in that,
Each described drafting based on event comprises: arrange inactive area, draw for described inactive area.
3. screen refresh method according to claim 2, is characterized in that,
To draw after information and described second draws the process of information redraw based on described first in described screen buffer described, described unified method for refreshing also comprises: the inactive area that the drafting at least one times based on event described in replacement produces.
4. screen refresh method as claimed in any of claims 1 to 3, is characterized in that, also comprises:
Judge whether the drafting based on event works with the drafting based on timer simultaneously, if so, then applies described unified method for refreshing, if not, then applies independent refresh method;
Described independent refresh method comprises: the drafting information drafting based on event produced is stored in screen buffer, each time based on after the completing of event, based on the drafting information redraw in screen buffer.
5. a screen-refresh device, is characterized in that, comprising:
Unified refresh module, described unified refresh module is used for:
The first drafting information drafting based on timer produced is stored in screen buffer, and described based on before the completing of timer, the second drafting information drafting at least one times based on event produced is stored in described screen buffer;
Described based on after the completing of timer, draw information and described second based on described first in described screen buffer and draw information redraw.
6. screen-refresh device according to claim 5, is characterized in that, also comprise:
Based on the drafting module of event, for arranging inactive area, draw for described inactive area.
7. screen-refresh device according to claim 6, it is characterized in that, described unified refresh unit also for, to draw after information and described second draws the process of information redraw based on described first in described screen buffer described, the inactive area that the drafting at least one times based on event described in replacement produces.
8. according to the screen-refresh device in claim 5 to 7 described in any one, it is characterized in that, described screen-refresh device also comprises:
Judging unit, for judging whether the drafting based on event works with the drafting based on timer simultaneously;
Applying unit, if work for the drafting based on event and the drafting based on timer simultaneously, then applies the function of described unified refresh module, if the drafting based on event and the drafting non-simultaneous operation based on timer, then applies the function of independent refresh module;
Described independent refresh module, is stored in screen buffer for the drafting information drafting based on event produced, each time based on after the completing of event, based on the drafting information redraw in screen buffer.
CN201510705337.7A 2015-10-27 2015-10-27 Method and device for refreshing screen Pending CN105159647A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510705337.7A CN105159647A (en) 2015-10-27 2015-10-27 Method and device for refreshing screen

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510705337.7A CN105159647A (en) 2015-10-27 2015-10-27 Method and device for refreshing screen

Publications (1)

Publication Number Publication Date
CN105159647A true CN105159647A (en) 2015-12-16

Family

ID=54800516

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510705337.7A Pending CN105159647A (en) 2015-10-27 2015-10-27 Method and device for refreshing screen

Country Status (1)

Country Link
CN (1) CN105159647A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106933595A (en) * 2017-03-21 2017-07-07 珠海亿智电子科技有限公司 It is a kind of to lift the method that GUI window refreshes efficiency
WO2020211029A1 (en) * 2019-04-18 2020-10-22 深圳市柔宇科技有限公司 Note redrawing method, writing device, and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1262939A1 (en) * 2001-05-31 2002-12-04 Nokia Corporation Method and apparatus for updating a frame buffer with reduced power consumption
US20050022211A1 (en) * 2003-03-27 2005-01-27 Microsoft Corporation Configurable event handling for an interactive design environment
CN102486726A (en) * 2010-12-03 2012-06-06 北京晶智意达科技有限公司 Multithread drawing method based on Qt
CN104123177A (en) * 2014-07-18 2014-10-29 无锡梵天信息技术股份有限公司 Lockless multithreading data synchronization method
CN104331262A (en) * 2014-10-09 2015-02-04 北京配天技术有限公司 QT-embedded synchronous display method and system as well as numerical control machine tool

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1262939A1 (en) * 2001-05-31 2002-12-04 Nokia Corporation Method and apparatus for updating a frame buffer with reduced power consumption
US20050022211A1 (en) * 2003-03-27 2005-01-27 Microsoft Corporation Configurable event handling for an interactive design environment
CN102486726A (en) * 2010-12-03 2012-06-06 北京晶智意达科技有限公司 Multithread drawing method based on Qt
CN104123177A (en) * 2014-07-18 2014-10-29 无锡梵天信息技术股份有限公司 Lockless multithreading data synchronization method
CN104331262A (en) * 2014-10-09 2015-02-04 北京配天技术有限公司 QT-embedded synchronous display method and system as well as numerical control machine tool

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106933595A (en) * 2017-03-21 2017-07-07 珠海亿智电子科技有限公司 It is a kind of to lift the method that GUI window refreshes efficiency
WO2020211029A1 (en) * 2019-04-18 2020-10-22 深圳市柔宇科技有限公司 Note redrawing method, writing device, and storage medium
CN113330412A (en) * 2019-04-18 2021-08-31 深圳市柔宇科技股份有限公司 Method for redrawing notes, writing equipment and storage medium

Similar Documents

Publication Publication Date Title
US20170148422A1 (en) Refresh control method and apparatus of display device
JP6069354B2 (en) Receiving apparatus, video refresh frequency control method, apparatus and system
TWI336874B (en) Drive circuit, display apparatus, and method for adjusting screen refresh rate
CN113225427B (en) Image display method and terminal equipment
US20110145730A1 (en) Utilization of Browser Space
CN104268113B (en) The lcd controller of DPI interfaces and the method for its adaptive bandwidth
US9529463B1 (en) Method and device for reducing latency for rendering and displaying stylus strokes
CN107622760B (en) LCD display method and LCD driving circuit
CN104301788A (en) Method and device for providing video interaction
US11615509B2 (en) Picture processing method and device
CN109426474A (en) A kind of double-display screen synchronization system
WO2016019753A1 (en) Refresh control method and apparatus for display device
CN104063837A (en) Image display processing method and system and mobile terminal
CN105159647A (en) Method and device for refreshing screen
CN102663989A (en) Buffer processing method and device for display of mobile terminal
KR20220143667A (en) Reduced display processing unit delivery time to compensate for delayed graphics processing unit render times
CN110989956A (en) Multi-screen information interaction method and device, storage medium and computer equipment
CN103309097B (en) Liquid crystal cell and there is the liquid crystal display of this liquid crystal cell
CN112419456B (en) Special effect picture generation method and device
US20180130443A1 (en) Techniques for managing transmission and display of a display data stream
CN107908455B (en) Browser page switching method and system
CN102186097A (en) Three-dimensional (3D) image display method, device and equipment
CN104468505A (en) Safety audit log playing method and device
CN104519392A (en) Method and system for switching terminal display images of spliced wall
CN109960562B (en) Information display method and device and computer readable storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
CB03 Change of inventor or designer information

Inventor after: Wang Yufang

Inventor before: Wang Zhiming

COR Change of bibliographic data
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C41 Transfer of patent application or patent right or utility model
TA01 Transfer of patent application right

Effective date of registration: 20160122

Address after: 100085, 8 floor, building 226, four street, Haidian District, Beijing, 2

Applicant after: Wang Yufang

Address before: 100085, 8 floor, building 226, four street, Haidian District, Beijing, 2

Applicant before: BEIJING HUAYUN TIANYI TECHNOLOGY CO., LTD.

WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20151216