CN112506601A - Embedded graphic device updating display method and device - Google Patents
Embedded graphic device updating display method and device Download PDFInfo
- Publication number
- CN112506601A CN112506601A CN202011447029.6A CN202011447029A CN112506601A CN 112506601 A CN112506601 A CN 112506601A CN 202011447029 A CN202011447029 A CN 202011447029A CN 112506601 A CN112506601 A CN 112506601A
- Authority
- CN
- China
- Prior art keywords
- dirty
- dirty data
- region
- copying
- data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 32
- 239000000872 buffer Substances 0.000 claims abstract description 64
- 238000009877 rendering Methods 0.000 claims abstract description 12
- 238000004590 computer program Methods 0.000 claims description 10
- 230000008569 process Effects 0.000 abstract description 13
- 230000008859 change Effects 0.000 abstract description 5
- 238000010586 diagram Methods 0.000 description 2
- 230000007246 mechanism Effects 0.000 description 2
- 230000006870 function Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Image Generation (AREA)
Abstract
The invention provides an updating and displaying method and a device of embedded graphic equipment, wherein the method comprises the following steps: dirty region dirty data generated when a user creates a graphic control and moves the graphic control is obtained; copying dirty region dirty data to a background cache buffer of the graphic equipment through memory copy; and switching front and back buffer caches based on the driver layer, rendering the latest dirty region dirty data on the screen of the device, and copying the dirty region dirty data of the front buffer cache of the graphics device to the back buffer cache of the graphics device. Therefore, occupation of hardware resources such as CPU, memory bandwidth and memory capacity in the copying and drawing process of full-screen whole-frame image data (generally far larger than dirty region dirty data) can be reduced, the refresh frame rate of a graphic system is improved, smoothness of the graphic change process is improved, and poor experience such as pause and frustration is reduced.
Description
Technical Field
The invention relates to the field of graph updating display, in particular to an updating display method and device for embedded graph equipment.
Background
In the embedded device with less hardware resources, at present, a graphics system adopting a double-buffer drawing mechanism can realize background drawing and foreground rendering of graphics, and avoid the problem of screen tearing caused by a single-buffer drawing mechanism when foreground graphics are refreshed and displayed, but because double-buffer drawing copies the buffer of a full-screen whole-frame background graphics device to the buffer of the foreground graphics device, the copy data volume is large, the process can occupy a large amount of cpu, memory bus bandwidth, memory capacity and other precious embedded device hardware resources, thereby causing low graphics refreshing frame rate, unsmooth graphics change process, and poor experiences such as pause and the like.
Disclosure of Invention
In view of this, embodiments of the present invention provide an update display method and apparatus for an embedded graphics device, so as to solve the problems of large consumption of hardware resources for copying full-screen data, low graphics refresh frame rate, unsmooth graphics change process, and frustration during double-buffer rendering of the graphics device.
In a first aspect of the embodiments of the present invention, an update display method for an embedded graphics device is provided, including:
dirty region dirty data generated when a user creates a graphic control and moves the graphic control is obtained;
copying dirty region dirty data to a background back buffer through memory copy;
and switching front and back buffer based on the driving layer, rendering the latest dirty region dirty data on the screen of the device, and copying the dirty region dirty data of the front stage to the back buffer of the back stage.
In a second aspect of the embodiments of the present invention, an apparatus for updating a display of an embedded graphics device is provided, including:
the acquisition module is used for acquiring dirty region dirty data generated when a user creates a graphic control and moves the graphic control;
the copying module is used for copying dirty region dirty data to a background back buffer through memory copy;
and the switching drawing module is used for switching the front and back buffer based on the driving layer, rendering the latest dirty region dirty data on the screen of the equipment, and copying the dirty region dirty data of the front stage to the back buffer.
In a third aspect of the embodiments of the present invention, there is provided an embedded device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the method according to the first aspect of the embodiments of the present invention when executing the computer program.
In a fourth aspect of the embodiments of the present invention, a computer-readable storage medium is provided, in which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the method provided in the first aspect of the embodiments of the present invention.
In the embodiment of the invention, only the changed dirty region dirty data is copied to the back buffer, and the latest dirty region dirty data is rendered on the screen of the equipment through the switching of the front buffer and the back buffer, so that the occupation of hardware resources such as a CPU (central processing unit), a memory bandwidth, a memory capacity and the like in the copying and drawing process of the full-screen whole-frame image data (generally far larger than the dirty region dirty data) can be reduced, the refresh frame rate of a graphic system is improved, the smoothness of the graphic change process is increased, and the bad experiences such as pause and the like are reduced.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings described below are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flowchart of an update display method for an embedded graphics device according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating a dirty region dirty data rendering process according to an embodiment of the present invention;
fig. 3 is another flowchart of a dirty region dirty data rendering process according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an apparatus for updating a display of an embedded graphics device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, features and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the embodiments described below are only a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons skilled in the art without any inventive work shall fall within the protection scope of the present invention, and the principle and features of the present invention shall be described below with reference to the accompanying drawings.
The terms "comprises" and "comprising," when used in this specification and claims, and in the accompanying drawings and figures, are intended to cover non-exclusive inclusions, such that a process, method or system, or apparatus that comprises a list of steps or elements is not limited to the listed steps or elements.
Referring to fig. 1, fig. 1 is a schematic flowchart illustrating an update display method for an embedded graphics device according to an embodiment of the present invention, including:
s101, dirty region dirty data generated when a user creates a graphic control and moves the graphic control is obtained;
new dirty data is generated when the user creates a new graphical control or moves a graphical control in the dirty region.
Judging whether an overlapping area exists in dirty data or not; and if the overlapped area exists, performing color superposition on the dirty data of the overlapped area part to obtain the final dirty data. And for the repeatedly drawn area, performing a color superposition algorithm in the repeated area.
S102, copying dirty region dirty data to a background back buffer through memory copying;
the double-buffering technology comprises two graphics buffers, namely a front buffer and a back buffer, wherein the front buffer and the back buffer are respectively used for rendering graphics, the front buffer is a graphics buffer which is being rendered, and the back buffer is a graphics buffer which is to be rendered next. And copying dirty data corresponding to the changed area to a back buffer so as to render the next frame of picture.
S103, switching the front and back buffer based on the drive layer, rendering the latest dirty region dirty data on the screen of the device, and copying the dirty region dirty data of the front buffer to the back buffer.
And switching the front and back buffer based on the driving layer, namely switching the back buffer to the front buffer, displaying the front buffer on the screen of the equipment, switching the front buffer to the back buffer, and copying dirty region dirty data of the front to the back so as to draw new dirty region dirty data on the back buffer next time.
And switching the back buffer to the front buffer by using a method of switching the front buffer and the back buffer by using the driving layer, and switching the front buffer to the back buffer, so that the content containing the latest dirty data can be rendered on the screen of the equipment.
And copying the old dirty data of the foreground to the background, so as to facilitate the next dirty data drawing.
It is understood that the dirty data refers to data that needs to be updated; the dirty area refers to an area that needs to be updated. The font buffer refers to the current display buffer of the graphic equipment; the back buffer refers to a background cache of the graphics device.
In another embodiment of the present invention, as shown in fig. 2 and 3, after dirty regions generate dirty data, the dirty data corresponding to changed portions are copied to a background buffer, the foreground and background buffers are switched to draw the latest dirty data, the old dirty data is copied to the background, the newly generated dirty data is copied to the background again, and the foreground and background buffers are switched to render and display the next frame of data.
In the method provided by this embodiment, only the changed dirty data is copied to the background buffer area each time, and the drawing of the next frame of picture is realized by switching the front and back buffers, so that the situations that the whole frame of image copy occupies the memory bandwidth, occupies the memory capacity, occupies the cpu resource, and the like in the double buffers can be greatly reduced, the refresh frame rate of the graphics system is improved, the smoothness of the graphics change process is increased, and the bad experiences such as pause and pause are reduced.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
Fig. 4 is a schematic structural diagram of an apparatus for updating display of an embedded graphics device according to an embodiment of the present invention, where the apparatus includes:
the acquisition module is used for acquiring dirty region dirty data generated when a user creates a graphic control and moves the graphic control;
wherein, still include: judging whether an overlapping area exists in dirty data or not; and if the overlapped area exists, performing color superposition on the dirty data of the overlapped area part to obtain the final dirty data.
The copying module is used for copying dirty region dirty data to a background back buffer through memory copy;
and the switching drawing module is used for switching the front and back buffer based on the driving layer, rendering the latest dirty region dirty data on the screen of the equipment, and copying the dirty region dirty data of the front stage to the back buffer.
It is understood that, in one embodiment, the electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program performs steps S101 to S103 as in the first embodiment, and the processor implements the updated display of the picture of the graphic device when executing the computer program.
Those skilled in the art will understand that all or part of the steps in the method for implementing the above embodiments may be implemented by a program to instruct associated hardware, where the program may be stored in a computer-readable storage medium, and when executed, the program includes steps S101 to S103, where the storage medium includes, for example: ROM/RAM, magnetic disk, optical disk, etc.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.
Claims (6)
1. An update display method for an embedded graphic device, comprising:
dirty region dirty data generated when a user creates a graphic control and moves the graphic control is obtained;
copying dirty region dirty data to a background back buffer through memory copy;
and switching front and back buffer based on the driving layer, rendering the latest dirty region dirty data on the screen of the device, and copying the dirty region dirty data of the front stage to the back buffer of the back stage.
2. The method of claim 1, wherein obtaining dirty region dirty data generated when a user creates a graphical control and moves the graphical control further comprises:
judging whether an overlapping area exists in dirty area dirty data or not;
and if the overlapped area exists, performing color superposition on dirty area dirty data of the overlapped area part to obtain final dirty area dirty data.
3. An apparatus for updating a display for an embedded graphics device, comprising:
the acquisition module is used for acquiring dirty region dirty data generated when a user creates a graphic control and moves the graphic control;
the copying module is used for copying dirty region dirty data to a background back buffer through memory copy;
and the switching drawing module is used for switching the front and back buffer based on the driving layer, rendering the latest dirty region dirty data on the screen of the equipment, and copying the dirty region dirty data of the front stage to the back buffer.
4. The apparatus of claim 3, wherein the obtaining dirty region dirty data generated when the user creates the graphical control and moves the graphical control further comprises:
judging whether an overlapping area exists in dirty area dirty data or not;
and if the overlapped area exists, performing color superposition on dirty area dirty data of the overlapped area part to obtain final dirty area dirty data.
5. An embedded device comprising a processor, a memory and a computer program stored in and running on the memory, wherein the steps of the embedded graphics device update display method according to any of claims 1 to 2 are implemented when the computer program is executed by the processor.
6. A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, carries out the steps of the embedded graphics device update display method according to any one of claims 1 to 2.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011447029.6A CN112506601A (en) | 2020-12-08 | 2020-12-08 | Embedded graphic device updating display method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011447029.6A CN112506601A (en) | 2020-12-08 | 2020-12-08 | Embedded graphic device updating display method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112506601A true CN112506601A (en) | 2021-03-16 |
Family
ID=74971310
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011447029.6A Pending CN112506601A (en) | 2020-12-08 | 2020-12-08 | Embedded graphic device updating display method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112506601A (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105426185A (en) * | 2015-11-13 | 2016-03-23 | 珠海格力节能环保制冷技术研究中心有限公司 | Dynamic image display processing method and system |
CN110032527A (en) * | 2018-01-12 | 2019-07-19 | 联发科技股份有限公司 | The method and associative processor of buffer area exchange |
-
2020
- 2020-12-08 CN CN202011447029.6A patent/CN112506601A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105426185A (en) * | 2015-11-13 | 2016-03-23 | 珠海格力节能环保制冷技术研究中心有限公司 | Dynamic image display processing method and system |
CN110032527A (en) * | 2018-01-12 | 2019-07-19 | 联发科技股份有限公司 | The method and associative processor of buffer area exchange |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108595242B (en) | Page display method, electronic equipment and computer storage medium | |
US7533351B2 (en) | Method, apparatus, and program for dynamic expansion and overlay of controls | |
EP2893529B1 (en) | Method and device for selective display refresh | |
KR102073848B1 (en) | Immersive mode for a web browser | |
CN110221889B (en) | Page display method and device, electronic equipment and storage medium | |
US9224367B2 (en) | Image processing apparatus, image processing method, and image processing program | |
US20060005146A1 (en) | System and method for using selective soft focus as a user interface design element | |
WO2022194003A1 (en) | Screen capture method and apparatus, electronic device, and readable storage medium | |
EP1316064B1 (en) | Scaling images | |
US5838291A (en) | Display control method and apparatus | |
CN111476852A (en) | Reader refresh method, computing device, and computer storage medium | |
US10181169B1 (en) | Display response enhancement | |
JP2004102343A (en) | Screen display processing device and method, and computer program | |
CN111381925A (en) | GUI (graphical user interface) fragment type rendering method and device based on dirty rectangle mechanism | |
CN113450733A (en) | Screen refreshing method, display system and user equipment | |
US20120007872A1 (en) | Method And Computer Program For Operation Of A Multi-Buffer Graphics Memory Refresh, Multi-Buffer Graphics Memory Arrangement And Communication Apparatus | |
CN112506601A (en) | Embedded graphic device updating display method and device | |
US20100182331A1 (en) | Method and apparatus for drawing image | |
CN115079869A (en) | Rendering method and device of electronic whiteboard | |
JP2001350619A (en) | Method for displaying a plurality of windows | |
JP4761900B2 (en) | Window processing apparatus and method using stencil | |
CN111966318A (en) | Image display method, device, equipment and storage medium | |
JPH06149533A (en) | Segment quick plotting system for reducing plotting processing for segment outside display area | |
US7598954B2 (en) | Adapting and rendering graphic effects | |
CN116071459B (en) | Ink screen-based hand drawing control method, system and readable storage medium |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210316 |
|
RJ01 | Rejection of invention patent application after publication |